Post Go back to editing

U-boot - difference between u-boot-spl-sc589-mini.elf and stage1-boot.ldr

Category: Software
Product Number: ADSP-SC589
Software Version: Yocto 3.1.1

What is the difference between u-boot-spl-sc589-mini.elf and stage1-boot.ldr?

I am currently making mods to uboot which only manifest when I run uboot over JTAG. Presumably that means the mods make their way to the u-boot-spl-sc589-mini.elf file.

However, when I power cycle the device, it doesn't work. Presumably that's because what is flashed to SPI flash is stage1-boot.ldr, not the ELF file.

So what is the difference between both files?

And how do i get my mods to persist on SPI flash?

Thank you.

Parents
  • Hi, so what was before on the sc589-mini spi flash? Different version of yocto?

    In this case better to start from the clean spi flash. Load the  u-boot over the spl, and clean the spi flash commands, assume you have 64MBit spi flash
    sf probe 2:1
    sf erase 0x0 0x4000000

    set the default env with
    env default -a

    Now update the spi with

    run update_spi_uboot_only

    or with
    run update_spi_uboot_stage1
    run update_spi_uboot_stage2

    this should make board bootable

    Also after eases can update whole flash with update_spi, so kernel and rootfs make way to the SPI flash


  • I have noticed that when I make a change to uboot code, rebuild, then do a diff of u-boot-spl-sc589-mini.elf before and after the build, I get a different binary. So I have confidence that the changes are appropriately compiled. However when I do a diff of stage1-boot-ldr, which is just u-boot-spl-sc589-mini.ldr renamed, before and after the rebuild, I have the exact same binary. So I think bitbake isn't rebuilding the LDR file, only the ELF file. I don't know why but I think that's what's happening.

  • yes, try to clean the u-boot-adi with "-c cleanall", my usual steps in this case are:
    bitbake u-boot-adi -c cleanall

    bitbake adsp-boot -c cleanall

    bitbake u-boot-adi -f 

    bitbake adsp-boot -f

    all stage1 and stage2 ldr files should be regenerated

  • That looks like it did a clean build but my board still doesn't boot.

    Is it the case that stage1-boot.ldr is just a release build of uboot and u-boot-spl-sc589-mini.elf  is a debug build ? Or are there other differences ? cheers

Reply Children
No Data