Forum Discussion
Altera_Forum
Honored Contributor
21 years agoBootloaders
Has anyone successfully used either U-Boot or Redboot on a NON-Linux based system? More specifically, on a MicroC/OS-II-based system? I'm having a hell of a time figuring out if I can use eithe...
Altera_Forum
Honored Contributor
21 years agoHi Dave,
> How do I need to set up my memory for this to work. When the system boots, > the EPCS bootloader will load u-boot into RAM. Just strip the u-boot elf file and load it to the config device the same as you would any generic elf. > This places the exceptions at a fixed location. This exception address corresponds > to u-boot. You can set u-boot's run-time address any where you want in the ram. This is set via the TEXT_BASE macro in the board-specific config file. For example, look at board/psyent/pk1c20/config.mk. When u-boot starts execution, it will copy the exception trampoline to the address defined by CFG_EXCEPTION_ADDR. See include/configs/PK1C20.h. Please note that the u-boot build is completely command-line with no knowledge of your Quartus/SOPC Builder files -- it's not very sophisticated ;-) -- so the board config file must match you hardware configuration -- and it's up to the programmer to ensure this. > When I download my kernel, what do I have to do to get the exceptions > working correctly? This is up to your kernel. If it needs to be loaded at a specific address, just tell u-boot where you want it loaded. If you're image is copied over the exception address, you'll need to use the 'bootm' command as this will disable interrupts before copying the kernel image. u-boot itself doesn't care where the exception address is relative to itself. It will copy its exception trampoline as required. > Also, how do I prevent u-boot from stepping all over my kernel in RAM and > vice-versa? This is up to your kernel. Normally, once the kernel starts running the sram image of the bootloader goes bye-bye. When the system resets, the bootloader will be loaded from epcs and everything starts over. > Is there a way to force my kernel to only used a specific portion of my available RAM. I'm not a MicroC/OS-II user (yet). So you'll have to check the appropriate docs. When I use linux, I pass the mem= parameter in the command line to reserve high memory for things like shared PCI memory. The mem= parameter BTW wasn't supported in the stock kernel code for the version I'm using. If you need any board-specific help, you can just shoot me an email -- I'll be glad to help you get u-boot running on your board -- as time permits ;-) Regards, --Scott