Forum Discussion

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

How to boot baremetal code from sd card

Hi

I want to boot the baremetal code from sd card.

I need some examples and the procedure about how to write the binary to SD card

11 Replies

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

    Yes, yes, BIG Thanks!!! :)

    I try earlier make .bin through "objcopy --gap-fill=0xff -O binary hwlib.axf hwlib.bin", as found in makefiles for u-boot.

    And then calls "mkimage -A arm -O u-boot -T standalone -C none -a 0x02000000 -e 0 -n "baremetal image" -d hwlib.bin hwlib.img.bin".

    Please, check our way on usual live kit board with word to word, with Altera LEDs example, since I find in text ug_soc_eds.pdf many large amount of mistakes, then need serious control. Any miss in long chain and 5 folders -- and all not work.

    My application Altera-SoCFPGA-HardwareLib-FPGA-CV-GNU/hwlib.axf not need change settings before compilation ?

    I try:

    $ fromelf --bin --output=hwlib.bin hwlib.axf
    ARM FromELF, 5.03 
    Fatal error: Q9932E: Cannot obtain license for Fromelf (feature fromelf5) with license version >= 5.0201301

    In license.lic, bouht with board, really absent "fromelf5" :( Exist other method of binarisation ?

    ...Partition A2 present on my SD-card, FAT also.

    It is possible recreate it through Win32DiskImager.exe and sd_card_linux_boot_image.img from embeddedsw/socfpga/prebuild_images.

    I can try "another way" and "more another ways" for learning, however my end target is 2nd stage in QSPI (preloader) and 3th also in QSPI (hwlib.axf.img.bin after 2 conversions).

    To have one flash device for 256K-preloader and another for 2M-application and 3M-rbf, let 2-3-4 times copied, is very-very strange.