Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

linux boot copier

Hello,

I uploaded microtronix linux binary file into flash. I would like to know if a boot copier (bootloader) is available in order to copy the kernel space into the RAM and after jumps there to start linux?

Best regards

Christian

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Christian, yes there is a very small boot loader at the beginning of the linux kernel code that copies the kernel from flash to ram when the kernel starts up.

    Provided your target hardware is set to execute code from flash, then the kernel should copy itself as soon as it starts up.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Is there some way that one can alter this bootloader???? Is there some code include with the IDE???

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Absolutely, the code in question is part of the Nios II architecture specific code in the kernel source tree.

    I can't remember the exact location but we can get that for you if you're having difficulty locating it.

    The kernel source code can be found in:

    $KERNEL_PLUGIN/linux-2.6.x

    After modifying the code, you will need to rebuild your kernel via the IDE.

    HINT: If your hardware hasn't changed and you wish to speed up compile time, you can change the
    project/build/include/nios2_system.h

    file to read only. That'll prevent it from being re-built and consequently, it should speed up the build time. (If your hardware does change, you'll have to switch the file back to writeable so that it can be re-built...)

    The above hint won't be necessary in the next release of the Nios II Linux Distribution.