Post Go back to editing

sc598 uboot missing stage1 and stage2 loader

Category: Software
Product Number: EV-SC598-SOM
Software Version: Yocto 2.1.0

I have followed the quick start guide

https://wiki.analog.com/resources/tools-software/linuxdsp/docs/quickstartguide/quickstart_sc598

and it builds uboot without errors but these are the output files I have:

u-boot.cfg
u-boot.cfg.configs
u-boot.img
u-boot-nodtb.bin
u-boot-proper-sc598-som-ezkit.elf
u-boot-proper-sc598-som-ezkit.img
u-boot-sc598-som-ezkit
u-boot-sc598-som-ezkit.bin
u-boot-sc598-som-ezkit.ldr
u-boot-sc598-som-ezkit.ldr.emmc_boot_stage1
u-boot-sc598-som-ezkit.ldr.emmc_boot_stage2
u-boot-sc598-som-ezkit.lds
u-boot-sc598-som-ezkit.map
u-boot-sc598-som-ezkit.srec
u-boot-spl-sc598-som-ezkit.elf
u-boot-spl-sc598-som-ezkit.ldr
u-boot.sym

I have now found these files

$ cp tmp/deploy/images/adsp-sc598-som-ezkit/stage1-boot.ldr /tftpboot/
$ cp tmp/deploy/images/adsp-sc598-som-ezkit/stage2-boot.ldr /tftpboot/
$ cp tmp/deploy/images/adsp-sc598-som-ezkit/fitImage /tftpboot/

Can you point me to the script that generates these files ?

Regards Chris



I have now found these files $ cp tmp/deploy/images/adsp-sc598-som-ezkit/stage1-boot.ldr /tftpboot/ $ cp tmp/deploy/images/adsp-sc598-som-ezkit/stage2-boot.ldr /tftpboot/ $ cp tmp/deploy/images/adsp-sc598-som-ezkit/fitImage /tftpboot/ Can you point me to the script that generates these files ?
[edited by: chriselytone at 8:54 AM (GMT -4) on 31 Aug 2023]
  • ADI North America will be on summer shutdown starting August 24, 2023; perhaps another community member can assist you until our return on September 5th.
  • Hi Chris,

    I could see the stage1-boot.ldr & stage2-boot.ldr files with the minimal image itself, you can see my build output 

    598/build/tmp/deploy/images/adsp-sc598-som-ezkit$ ls
    fitImage Image-adsp-sc598-som-ezkit.bin sc598-som-ezkit.dtb
    fitImage--5.4.183-r0-adsp-sc598-som-ezkit-20230904045120.bin modules--5.4.183-r0-adsp-sc598-som-ezkit-20230904045120.tgz stage1-boot.ldr
    fitImage-adsp-sc598-som-ezkit.bin modules-adsp-sc598-som-ezkit.tgz stage2-boot.ldr
    Image sc598-som-ezkit--5.4.183-r0-adsp-sc598-som-ezkit-20230904045120.dtb u-boot-proper-sc598-som-ezkit.elf
    Image--5.4.183-r0-adsp-sc598-som-ezkit-20230904045120.bin sc598-som-ezkit-adsp-sc598-som-ezkit.dtb u-boot-spl-sc598-som-ezkit.elf

    I didn't get your query clearly, are you looking for these files or any other?

    stage1-boot.ldr was generated by u-boot-adi.bb file

    stage2-boot.ldr was generated by adsp-boot_git.bb

    which was defined in their board conf file.

    Thanks,

    Prasanth R

  • I was asking where to find the script or makefile that builds stage1-boot.ldr stage2-boot.ldr ?

  • Hi Chris,

    1. u-boot files like (spl and proper) were generated with the combination of different inputs under their respective u-boot-adi directory

    build/tmp/work/adsp_sc598_som_ezkit-poky-linux/u-boot-adi/

    2. The ldr file generation for the second stage was done with the elf file (u-boot-proper-sc598-som-ezkit.elf) as input from u-boot-adi and generated under adsp-boot directory (adsp-boot_git.bb). 

    do_compile() {
    cd ${WORKDIR}
    ${LDR} -T ${LDR_PROC} -c ${B}/${STAGE_2_TARGET_NAME} --bcode=${LDR_BCODE} ${STAGE_2_SRC}
    }

    So, you can explore the u-boot-adi Makefile, scripts,

    Thanks,

    Prasanth R

  • Thanks Prasanna
    This is why I get different results from building inside yocto
    to when I use the yocto external tools and  the makefile outside yocto

    There are similar issue building u-boot-adi outside yocto.
    This case is now now closed.