Forum Discussion

7 Replies

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

    I've never used an OS in a NIOS before so the answer will not come from me.

    But if it is possible we would probably like to know what size you're targetting.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    if it is possible I wish it is between 200K and 500K, who can tell me how to do ?

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

    hi maoguohua,

    To reduce the size of the kernel, you can re-configure the kernel and disable those features you don't want. For example, if you don't want TCP/IP stack, I am sure you can reduce the size of resulting kernel a lot. Some filesytem, device drivers can be configured off. But I'm not sure if you can get a kernel image as small as 500k.

    If you don't have enough flash space to put the kernel, you can try compressing the image, like a Linux desktop. A compressed image can be easily smaller than 500k, but you need some booting code to uncompress the kernel...
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    > Can you tell me how to compress the image?

    You can use gzip. For example,

    $ gzip --best linux.bin

    This will replace linux.bin with linux.bin.gz. To recover

    the original:

    $ gzip -d linux.bin.gz

    This of course will require a bootloader that can decompress.

    The u-boot boot loader supports gzip decompression. However,

    the current u-boot port for Nios-II requires an update to fully

    support the linux boot command (bootm). A update should

    be available within the next few weeks.

    Regards,

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

    Thanks for you tell me how to compress the image!

    If you have an update to fully support the linux boot command (bootm) ,can you Email to me?

    My Email is maoguohua2002@163.com

    Thank you very much!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    u-boot has been updated to support kernel booting.

    I tested by booting a gzipped Microtronix linux kernel

    on the Altera 1C20 devkit board:

    vmlinux.bin: 1.6 MB (original binary)

    vmlinux.img: 678 KB (gzipped u-boot image).

    Regards,

    --Scott