Skip to contentSkip to conversation

Help with TI-U-BOOT

DISCUSSION Antoine Naud 3 participants 7 messages Jul 22, 2021 – Jul 24, 2021

lore
Share & tools
lore
#0 lore raw

Hi,

I don't know if I will join someone, but I try anyway !
Can I ask a question about an error I have while compiling the bootloader ?

Thanks,
Antoine

#1 lore raw
Quoted 8 lines · Antoine Naud

Hi,

I don't know if I will join someone, but I try anyway !
Can I ask a question about an error I have while compiling the bootloader ?

Thanks,
Antoine

Yes, just ask.

#2 lore raw

Okay ! Thanks for answering,

Here is the error I got when trying to compile using the command (make CROSS_COMPILE=arm-none-linux-gnueabihf- O=CSCM_build CSCM_defconfig all):

In file included from ../include/dm/of.h:11,

                 from ../include/dm/ofnode.h:12,
                 from ../include/asm-generic/gpio.h:10,
                 from ../arch/arm/include/asm/gpio.h:4,
                 from ../arch/arm/cpu/armv8/hisilicon/pinmux.c:10:

../include/dm/of.h: At top level:
../arch/arm/include/asm/global_data.h:117:58: error: invalid register name for ‘gd’
117 | #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("x18")
| ^~
../include/dm/of.h:86:1: note: in expansion of macro ‘DECLARE_GLOBAL_DATA_PTR’

   86 | DECLARE_GLOBAL_DATA_PTR;
      | ^~~~~~~~~~~~~~~~~~~~~~~

../scripts/Makefile.build:253: recipe for target 'arch/arm/cpu/armv8/hisilicon/pinmux.o' failed make[4]: *** [arch/arm/cpu/armv8/hisilicon/pinmux.o] Error 1 ../scripts/Makefile.build:394: recipe for target 'arch/arm/cpu/armv8/hisilicon' failed make[3]: *** [arch/arm/cpu/armv8/hisilicon] Error 2
../Makefile:1815: recipe for target 'arch/arm/cpu/armv8' failed
make[2]: *** [arch/arm/cpu/armv8] Error 2 /home/antoine/tisdk/build/ti-u-boot/Makefile:551: recipe for target '__build_one_by_one' failed make[1]: *** [__build_one_by_one] Error 2
make[1]: Leaving directory '/home/antoine/tisdk/build/ti-u-boot/CSCM_build' Makefile:177: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
antoine@ubuntu:~/tisdk/build/ti-u-boot$

thanks,

Antoine

-----Message d'origine-----
De : Ramon Fried <[email protected]>
Envoyé : 22 juillet 2021 16:13
À : Antoine Naud <[email protected]>
Cc : [email protected]
Objet : Re: Help with TI-U-BOOT

Quoted 8 lines · Antoine Naud

Hi,

I don't know if I will join someone, but I try anyway !
Can I ask a question about an error I have while compiling the bootloader ?

Thanks,
Antoine

Yes, just ask.

#3 lore raw
Quoted 43 lines · Antoine Naud

Okay ! Thanks for answering,

Here is the error I got when trying to compile using the command (make CROSS_COMPILE=arm-none-linux-gnueabihf- O=CSCM_build CSCM_defconfig all):

In file included from ../include/dm/of.h:11,

                 from ../include/dm/ofnode.h:12,
                 from ../include/asm-generic/gpio.h:10,
                 from ../arch/arm/include/asm/gpio.h:4,
                 from ../arch/arm/cpu/armv8/hisilicon/pinmux.c:10:

../include/dm/of.h: At top level:
../arch/arm/include/asm/global_data.h:117:58: error: invalid register name for ‘gd’
117 | #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("x18")
| ^~
../include/dm/of.h:86:1: note: in expansion of macro ‘DECLARE_GLOBAL_DATA_PTR’

   86 | DECLARE_GLOBAL_DATA_PTR;
      | ^~~~~~~~~~~~~~~~~~~~~~~

../scripts/Makefile.build:253: recipe for target 'arch/arm/cpu/armv8/hisilicon/pinmux.o' failed make[4]: *** [arch/arm/cpu/armv8/hisilicon/pinmux.o] Error 1 ../scripts/Makefile.build:394: recipe for target 'arch/arm/cpu/armv8/hisilicon' failed make[3]: *** [arch/arm/cpu/armv8/hisilicon] Error 2
../Makefile:1815: recipe for target 'arch/arm/cpu/armv8' failed
make[2]: *** [arch/arm/cpu/armv8] Error 2 /home/antoine/tisdk/build/ti-u-boot/Makefile:551: recipe for target '__build_one_by_one' failed make[1]: *** [__build_one_by_one] Error 2
make[1]: Leaving directory '/home/antoine/tisdk/build/ti-u-boot/CSCM_build' Makefile:177: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
antoine@ubuntu:~/tisdk/build/ti-u-boot$

thanks,

Antoine

-----Message d'origine-----
De : Ramon Fried <[email protected]>
Envoyé : 22 juillet 2021 16:13
À : Antoine Naud <[email protected]>
Cc : [email protected]
Objet : Re: Help with TI-U-BOOT

Quoted 1 line · Antoine Naud
Quoted 8 lines
Quoted 7 lines

Hi,

I don't know if I will join someone, but I try anyway !
Can I ask a question about an error I have while compiling the bootloader ?

Thanks,
Antoine

Yes, just ask.

Looks like you're using the wrong cross-compiler What instructions are you following for building the project ?

#4 lore raw

Here is the full list of my commands:

$ sudo apt-get update
$ sudo apt-get install git-core
$ sudo apt-get install build-essential autoconf automake bison flex libssl-dev bc u-boot-tools python diffstat texinfo gawk chrpath dos2unix wget unzip socat doxygen libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386 g++-multilib
$ sudo apt-get update
$ sudo apt-get install python3.8
$ sudo apt-get install python3-distutils
$ sudo apt-get update
$ sudo dpkg-reconfigure dash
$ wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
$ tar -Jxvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz -C $HOME
$ wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
$ tar -Jxvf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz -C $HOME
$ git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
$ cd tisdk
$ ./oe-layertool-setup.sh -f configs/coresdk/coresdk-07.03.00.005-config.txt
$ cd build
$ . conf/setenv
$ export TOOLCHAIN_PATH_ARMV7=$HOME/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
$ export TOOLCHAIN_PATH_ARMV8=$HOME/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
$ MACHINE=adm437x-evm ARAGO_RT_ENABLE=1 bitbake tisdk-base-image
$ git clone git://git.ti.com/ti-u-boot/ti-u-boot.git
$ make CROSS_COMPILE=arm-linux-gnueabihf- O=CSCM_build CSCM_defconfig all

-----Message d'origine-----
De : Ramon Fried <[email protected]>
Envoyé : 23 juillet 2021 10:06
À : Antoine Naud <[email protected]>
Cc : [email protected]
Objet : Re: Help with TI-U-BOOT

Quoted 44 lines · Antoine Naud

Okay ! Thanks for answering,

Here is the error I got when trying to compile using the command (make CROSS_COMPILE=arm-none-linux-gnueabihf- O=CSCM_build CSCM_defconfig all):

In file included from ../include/dm/of.h:11,

                 from ../include/dm/ofnode.h:12,
                 from ../include/asm-generic/gpio.h:10,
                 from ../arch/arm/include/asm/gpio.h:4,
                 from ../arch/arm/cpu/armv8/hisilicon/pinmux.c:10:

../include/dm/of.h: At top level:
../arch/arm/include/asm/global_data.h:117:58: error: invalid register name for ‘gd’
117 | #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("x18")
| ^~
../include/dm/of.h:86:1: note: in expansion of macro ‘DECLARE_GLOBAL_DATA_PTR’

   86 | DECLARE_GLOBAL_DATA_PTR;
      | ^~~~~~~~~~~~~~~~~~~~~~~

../scripts/Makefile.build:253: recipe for target 'arch/arm/cpu/armv8/hisilicon/pinmux.o' failed
make[4]: *** [arch/arm/cpu/armv8/hisilicon/pinmux.o] Error 1 ../scripts/Makefile.build:394: recipe for target 'arch/arm/cpu/armv8/hisilicon' failed
make[3]: *** [arch/arm/cpu/armv8/hisilicon] Error 2 ../Makefile:1815: recipe for target 'arch/arm/cpu/armv8' failed make[2]: *** [arch/arm/cpu/armv8] Error 2 /home/antoine/tisdk/build/ti-u-boot/Makefile:551: recipe for target '__build_one_by_one' failed
make[1]: *** [__build_one_by_one] Error 2
make[1]: Leaving directory '/home/antoine/tisdk/build/ti-u-boot/CSCM_build' Makefile:177: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2 antoine@ubuntu:~/tisdk/build/ti-u-boot$

thanks,

Antoine

-----Message d'origine-----
De : Ramon Fried <[email protected]> Envoyé : 22 juillet 2021 16:13 À : Antoine Naud <[email protected]> Cc : [email protected] Objet : Re: Help with TI-U-BOOT

Quoted 1 line · Antoine Naud
Quoted 8 lines
Quoted 7 lines

Hi,

I don't know if I will join someone, but I try anyway !
Can I ask a question about an error I have while compiling the bootloader ?

Thanks,
Antoine

Yes, just ask.

Looks like you're using the wrong cross-compiler What instructions are you following for building the project ?

#5 lore raw
Quoted 83 lines · Antoine Naud

Here is the full list of my commands:

$ sudo apt-get update
$ sudo apt-get install git-core
$ sudo apt-get install build-essential autoconf automake bison flex libssl-dev bc u-boot-tools python diffstat texinfo gawk chrpath dos2unix wget unzip socat doxygen libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386 g++-multilib
$ sudo apt-get update
$ sudo apt-get install python3.8
$ sudo apt-get install python3-distutils
$ sudo apt-get update
$ sudo dpkg-reconfigure dash
$ wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
$ tar -Jxvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz -C $HOME
$ wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
$ tar -Jxvf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz -C $HOME
$ git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
$ cd tisdk
$ ./oe-layertool-setup.sh -f configs/coresdk/coresdk-07.03.00.005-config.txt
$ cd build
$ . conf/setenv
$ export TOOLCHAIN_PATH_ARMV7=$HOME/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
$ export TOOLCHAIN_PATH_ARMV8=$HOME/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
$ MACHINE=adm437x-evm ARAGO_RT_ENABLE=1 bitbake tisdk-base-image
$ git clone git://git.ti.com/ti-u-boot/ti-u-boot.git
$ make CROSS_COMPILE=arm-linux-gnueabihf- O=CSCM_build CSCM_defconfig all

-----Message d'origine-----
De : Ramon Fried <[email protected]>
Envoyé : 23 juillet 2021 10:06
À : Antoine Naud <[email protected]>
Cc : [email protected]
Objet : Re: Help with TI-U-BOOT

Quoted 46 lines · Antoine Naud

Okay ! Thanks for answering,

Here is the error I got when trying to compile using the command (make CROSS_COMPILE=arm-none-linux-gnueabihf- O=CSCM_build CSCM_defconfig all):

In file included from ../include/dm/of.h:11,

                 from ../include/dm/ofnode.h:12,
                 from ../include/asm-generic/gpio.h:10,
                 from ../arch/arm/include/asm/gpio.h:4,
                 from ../arch/arm/cpu/armv8/hisilicon/pinmux.c:10:

../include/dm/of.h: At top level:
../arch/arm/include/asm/global_data.h:117:58: error: invalid register name for ‘gd’
117 | #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("x18")
| ^~
../include/dm/of.h:86:1: note: in expansion of macro ‘DECLARE_GLOBAL_DATA_PTR’

   86 | DECLARE_GLOBAL_DATA_PTR;
      | ^~~~~~~~~~~~~~~~~~~~~~~

../scripts/Makefile.build:253: recipe for target 'arch/arm/cpu/armv8/hisilicon/pinmux.o' failed
make[4]: *** [arch/arm/cpu/armv8/hisilicon/pinmux.o] Error 1 ../scripts/Makefile.build:394: recipe for target 'arch/arm/cpu/armv8/hisilicon' failed
make[3]: *** [arch/arm/cpu/armv8/hisilicon] Error 2 ../Makefile:1815: recipe for target 'arch/arm/cpu/armv8' failed make[2]: *** [arch/arm/cpu/armv8] Error 2 /home/antoine/tisdk/build/ti-u-boot/Makefile:551: recipe for target '__build_one_by_one' failed
make[1]: *** [__build_one_by_one] Error 2
make[1]: Leaving directory '/home/antoine/tisdk/build/ti-u-boot/CSCM_build' Makefile:177: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2 antoine@ubuntu:~/tisdk/build/ti-u-boot$

thanks,

Antoine

-----Message d'origine-----
De : Ramon Fried <[email protected]> Envoyé : 22 juillet 2021 16:13 À : Antoine Naud <[email protected]> Cc : [email protected] Objet : Re: Help with TI-U-BOOT

Quoted 3 lines · Antoine Naud

Hi,

Quoted 7 lines
Quoted 6 lines
Quoted 5 lines

I don't know if I will join someone, but I try anyway !
Can I ask a question about an error I have while compiling the bootloader ?

Thanks,
Antoine

Yes, just ask.

Looks like you're using the wrong cross-compiler What instructions are you following for building the project ?

You're using a vendor specific build flow, please take it with them.

#6 lore raw
In reply to Antoine Naud
Quoted 25 lines · Antoine Naud

Here is the full list of my commands:

$ sudo apt-get update
$ sudo apt-get install git-core
$ sudo apt-get install build-essential autoconf automake bison flex libssl-dev bc u-boot-tools python diffstat texinfo gawk chrpath dos2unix wget unzip socat doxygen libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386 g++-multilib
$ sudo apt-get update
$ sudo apt-get install python3.8
$ sudo apt-get install python3-distutils
$ sudo apt-get update
$ sudo dpkg-reconfigure dash
$ wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
$ tar -Jxvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz -C $HOME
$ wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
$ tar -Jxvf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz -C $HOME
$ git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
$ cd tisdk
$ ./oe-layertool-setup.sh -f configs/coresdk/coresdk-07.03.00.005-config.txt
$ cd build
$ . conf/setenv
$ export TOOLCHAIN_PATH_ARMV7=$HOME/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
$ export TOOLCHAIN_PATH_ARMV8=$HOME/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
$ MACHINE=adm437x-evm ARAGO_RT_ENABLE=1 bitbake tisdk-base-image
Quoted 1 line
$ git clone git://git.ti.com/ti-u-boot/ti-u-boot.git

I think you might have missed a step here -> by default when you clone,
you get to the master branch which is not aligned with the OE configuration you picked. OE recipes is a bit smarter, and picks a specific commit in a release and builds with it.

Since I am familiar with the convention, the branch you are looking for
is ti-u-boot-2020.01 So: git checkout ti-u-boot-2020.01 to flip over
to the branch that coresdk-07.03.00.05 -> you can even pick the exact tag corresponding to the release if you like.

Quoted 1 line
$ make CROSS_COMPILE=arm-linux-gnueabihf- O=CSCM_build CSCM_defconfig all

Hmm.. personally I did'nt know you could mix defconfig and all step in one shot.. but hey, seems to work for me:

$ git branch -v
  master            a15fa1ba67d7 Merge tag 'dm-pull-21jul21' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
* ti-u-boot-2020.01 e995ed0ec11b configs: am64x_sk: Drop unused defconfigs
$ make -j`nproc` CROSS_COMPILE=arm-linux-gnueabihf- O=CSCM_build am335x_evm_mini_defconfig all

[...]
COPY spl/u-boot-spl.bin
MKIMAGE MLO
MKIMAGE MLO.byteswap
CFGCHK u-boot.cfg

Quoted 1 line

Now, that said, since there is a bit of a mix of TI conventions involved, i would suggest asking for help in https://e2e.ti.com/

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D