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.

TI-SDK 05.06.00 u-boot mkimage fails

Hi,

     I'm using the TI SDK to try and build the MLO and u-boot for the Mityarm 3359. Here is the environment:

     - Ubuntu 12.0 64 bit (needed to add the 32 bit libraries, sudo apt-get install ia32-lib)

     - TI SDK 05.06.00.00

     - Source from git (git checkout -b AM335XPSP_04.06.00.08 origin/AM335XPSP_04.06.00.08)

     - Build command "make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- mityarm335x"

     Everything goes well until the mkimage command:

/arm-arago-linux-gnueabi/4.5.3 -lgcc -L /home/john/ti-sdk-am335x-evm-05.06.00.00/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3 -lgcc -Map u-boot.map -o u-boot
arm-arago-linux-gnueabi-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin
tools/mkimage -A arm -T firmware -C none \
        -O u-boot -a 0x80800000 -e 0 \
        -n  "U-Boot 2011.09-00000-ge301766 for mityarm335x board" \
        -d u-boot.bin u-boot.img
tools/mkimage: Can't stat u-boot.bin: Invalid argument
make[1]: *** [u-boot.img] Error 1
make[1]: Leaving directory `/home/john/u-boot-mityarm-335x'
make: *** [mityarm335x] Error 2
[linux-devkit]:~/u-boot-mityarm-335x>

     I have not found any errors like this in my searches so if someone could clue me into what mkimage means by "can't stat u-boot.bin"

Thanks,

     John C.

  • John,

    When building u-boot or the kernel, for your CROSS_COMPILE argument, I recommend putting the full path to your toolchain along with the prefix rather than just the prefix and not sourcing the environment setup script included with the SDK.

    Regards,
    Dave

  • Dave,

          Thank you for your quick response. I think I've followed your instructions by simply running the standard make command (no . ./environment-setup.) So new terminal and ran the following:

    make ARCH=arm CROSS_COMPILE=/home/john/ti-sdk-am335x-evm-05.06.00.00/linux-devkit/bin/arm-arago-linux-gnueabi- mityarm335x_config
    make ARCH=arm CROSS_COMPILE=/home/john/ti-sdk-am335x-evm-05.06.00.00/linux-devkit/bin/arm-arago-linux-gnueabi- mityarm335x

         It seems like everything goes well until the mkimage;

    go-linux-gnueabi/4.5.3 -lgcc -L /home/john/ti-sdk-am335x-evm-05.06.00.00/linux-devkit/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3 -lgcc -Map u-boot.map -o u-boot
    /home/john/ti-sdk-am335x-evm-05.06.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin
    tools/mkimage -A arm -T firmware -C none \
            -O u-boot -a 0x80800000 -e 0 \
            -n  "U-Boot 2011.09-00000-ge301766 for mityarm335x board" \
            -d u-boot.bin u-boot.img
    tools/mkimage: Can't stat u-boot.bin: Invalid argument
    make[1]: *** [u-boot.img] Error 1
    make[1]: Leaving directory `/home/john/u-boot-mityarm-335x'
    make: *** [mityarm335x] Error 2
    john@Ubuntu-12-04:~/u-boot-mityarm-335x$

         Any other suggestions would be greatly appreciated.

    John C.

  • Please try to manually run this line: 

    /home/john/ti-sdk-am335x-evm-05.06.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin

    It appears that your u-boot.bin is not being properly created which is why it cannot be seen by the stat command.

    Regards,

    Dave

  • Hey Dave,

                      Your command works, but even after the original mkimage fails, the u-boot.bin is there and has been created. I tried several things and I got the makeimage to work by changing 'tools/mkimage' to 'mkimage', then the command

    mkimage -A arm -T firmware -C none -O u-boot -a 0x80800000 -e 0 -n  "U-Boot 2011.09-00000-ge301766 for mityarm335x board" -d u-boot.bin u-boot.img

         will work. I went further still and changed the Makefile in four spots that use 'tools/mkimage' to the 'mkimage'. I did a make clean and then rebuilt with:

    make ARCH=arm CROSS_COMPILE=/home/john/ti-sdk-am335x-evm-05.06.00.00/linux-devkit/bin/arm-arago-linux-gnueabi- mityarm335x

         and the build completed. Does running the command tools/mkimage change the path so the it can't find the u-boot files needed in the directory above tools? It seems strange that I need to change the Makefile to get the build to work.

    John C.

  • It is likely an issue with your environment. Although this Linux release is not officially supported by TI, I grabbed the git repository and built it without issue using the 05.06.00.00 SDK and Ubuntu 12.04. I did install uboot-mkimage through apt-get on the host, not sure if this was specified as a requirement for mityarm.


    Regards,

    Dave

  • Dave,

              I'm pretty sure that the only think I've done with Ubuntu 12.04 is install system updates, the SDK package and the 32-bit library. I would agree that something in the way it searches the path (environment.) Thanks for all the help.

    John C.