This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Aisgen with latest Uboot on arago GIT

Other Parts Discussed in Thread: OMAPL138, OMAP-L138

Hi,

I'm working on omapl138 and I've cloned latest development tree for uboot git://arago-project.org/git/projects/u-boot-davinci.git.

I've build as usaul the binary for u-boot.

The issue I get is that  new version use relocation, so classical aisgen script does not work.

How do you use this new u-boot version?

Thanks for any links!

 

  • For boot modes like NOR, where the u-boot image is expected to start running from flash and then copy itself to RAM, relocation is necessary.  If this is the kind of relocation you are talking about (and please clarify if it is not), then I think you need to update the config header file for the platform to not build for NOR flash (see here).  If you build for NAND or SPI flash, you should get a binary that does not copy itself as the image knows that someone else copied it to it's runtime address in RAM before it started running.

    Let me know if I have misunderstood the issue you are having.

    Regards, Daniel

  • Hi daniel,

    I'm building u-boot for SPI boot.

    Previous version of boot I got:

    #file u-boot

    u-boot: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped

    New version:

    #file u-boot

    u-boot: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), statically linked, not stripped

     

    As you can see the new u-boot version is seen as a shared object. This is because it seems new version use position independant code. (that was not the case before).

    So applying AISGEN on it I get this error:

    #./OMAP-L138_bin/AISUtils/HexAIS_OMAP-L138.exe -ini ./OMAP-L138_bin/AISUtils/OMAP-L138.ini -o ./boot_images/u-boot_SPI_ais.bin ../u-boot-davinci/u-boot

    -----------------------------------------------------
       TI AIS Hex File Generator for OMAP-L138
       (C) 2010, Texas Instruments, Inc.
       Ver. 1.24
    -----------------------------------------------------


    Begining the AIS file generation.
    AIS file being generated for bootmode: SPIMASTER.
    ERROR: Not a valid object file.
    WARNING: Entry point set to null pointer!
    AIS file generation was successful.
    Wrote 76 bytes to file ./boot_images/u-boot_SPI_ais.bin.
    Conversion is complete.

    The issue is that since new object file generated is generated with position independant (-pie) flag, aisgen is lost.

    (thus the warning and the file is not correctly generated.)

    Hope I gave you enough information.

    Perhaps I do something wrong when generating u-boot?

    I saw people having the same issue:

    http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/95097

     

    So if you got some sort of workaround for aisgen I will be really happy! Perhaps a new version?

     

    Regards,

    Pep

     

  • Ah, it's a shared object now.  Well that's new.

    I assume that the build system still lets you generate a u-boot.bin?  If so, you can use that instead of the actual ELF file when prepping your AIS boot image.  You'll have to manually specify the load address and entry point since that info is not in the binary file, but other than that it should work.

    The ELF parser in the AISGen tool was not written to handle dynamic executables/modules, so I'm not shocked by this.  Still, it may be worth looking into to fix that, so if you could provide the ELF file I'll take a look.  Alternatively I could try to pull from the git tree and try to build myself, but if you have one ready to go that would be quicker.

    Regards, Daniel

  • Yeah no problem I can send you the file.

    Can you contact me on my private email?

     

  • I've sent an E2E friend request with contact details.

    Regards, Daniel

  • Dear all,

    I have the same problem with AISgen GUI tool (version 1.9): do you find any solution for HexAIS command line tool?

    I've tried to use u-boot BIN format file instead of ELF one, manually specifying load and entry point address (0xC1080000 for both of them).
    But after loading the AIS file to SPI Flash, u-boot does not start.
    Using previous version of U-boot (2009.11 - PSP 3.20), it works.

    There are several changes between versions 2009.11 and 2010.12 (PSP 3.21): CONFIG_SKIP_RELOCATE_UBOOT does not exist anymore, and relocation model seems changed. Any hints?

    Thanks in advance.

    Regards,
    Max

     

  • To close this thread...please see the response in this other thread:

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/151906.aspx#552578

    Regards, Daniel

  • Yes, for me it's ok to close the thread, thanks. Regards, Max