I am following the instructions to build U-Boot for a Jetson K1 but have run into some issues. So far I have built the dtc and the toolchain. When I go to build U-Boot, it appears that there is no make target for ardbeg like the directions suggest. If I grep for ardbeg, I don’t find it anywhere in my U-Boot source directory.
$ make ardbeg_config
make: *** No rule to make target 'ardbeg_config'. Stop.
make: *** [ardbeg_config] Error 1
$ grep -R ardbeg *
$
To get the U-Boot source I ran “git clone -n git://nv-tegra.nvidia.com/3rdparty/u-boot.git” and then “git checkout -b mybranch tegra-l4t-r19.3”. Did I miss a step somewhere or something?
$ make help
Cleaning targets:
clean - Remove most generated files but keep the config and
necessities for testing u-boot
clobber - Remove most generated files but keep the config
mrproper - Remove all generated files + config + various backup files
distclean - mrproper + remove editor backup and patch files
Other generic targets:
all - Build all necessary images depending on configuration
u-boot - Build the bare u-boot
dir/ - Build all files in dir and below
dir/file.[oisS] - Build specified target only
dir/file.lst - Build specified mixed source/assembly target only
(requires a recent binutils and recent build (System.map))
tags/TAGS - Generate tags file for editors
cscope - Generate cscope index
ubootrelease - Output the release version string
ubootversion - Output the version stored in Makefile
Static analysers
checkstack - Generate a list of stack hogs
Documentation targets:
U-Boot bootloader internal documentation in different formats:
htmldocs - HTML
pdfdocs - PDF
psdocs - Postscript
xmldocs - XML DocBook
mandocs - man pages
installmandocs - install man pages generated by mandocs
cleandocs - clean all generated DocBook files
make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build
make V=2 [targets] 2 => give reason for rebuild of target
make O=dir [targets] Locate all output files in "dir", including .config
make C=1 [targets] Check all c source with $CHECK (sparse by default)
make C=2 [targets] Force check of all c source with $CHECK
make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections
make W=n [targets] Enable extra gcc checks, n=1,2,3 where
1: warnings which may be relevant and do not occur too often
2: warnings which occur quite often but may still be relevant
3: more obscure warnings, can most likely be ignored
Multiple levels can be combined with W=12 or W=123
Execute "make" or "make all" to build all targets marked with [*]
For further info see the ./README file
$
Thanks for the tip kulve. Make likes that options but now I have a configuration issue.
$ make jetson-tk1_config
Configuring for jetson-tk1 - Board: jetson-tk1, Options: BOARD_JETSON_TK1=
$
It looks like to me that BOARD_JETSON_TK1 is set in boards.cfg. Here is the relevant snippet of boards.cfg:
Active arm armv7:arm720t tegra124 nvidia jetson-tk1 jetson-tk1 jetson-tk1:BOARD_JETSON_TK1= Stephen Warren <swarren@nvidia.com>
There are other variables defined in boards.cfg but I’m not sure what I should set BOARD_JETSON_TK1 to.
Here is a link to boards.cfg for your reference: https://web.cs.sunyit.edu/~stuarta/boards.cfg
I assumed that something was wrong since BOARD_JETSON_TK1 wasn’t set to anything. However it doesn’t give an error so that was stupid of me.
When I try to run “make all” or “make” I get a few issues. Perhaps I don’t have CROSS_COMPILE set to the proper directory. Below is a listing of the environment variables the guide states I need and the error I get compiling.
I had to define C_INCLUDE_PATH to get the compiler to see some header files. Also I had to prepend PATH to fix an error regarding cc1. The guide doesn’t mention making these changes which makes me feel that I have something wrong. I am pretty sure CROSS_COMPILE needs to be what is it because otherwise I get an error when I run “make distclean” along the lines of “$CROSS_COMPILE/gcc doesn’t exist” where $CROSS_COMPILE is whatever I set it to.
I didn’t need to export anything extra, just the ones that the doc mentioned.
But your CROSS_COMPILE is wrong. It’s a prefix for all the toolchain tools and it’s used like “${CROSS_COMPILE}gcc” or “${CROSS_COMPILE}ld” in the code. So set it to something like this:
I’m guessing your CC1 issues were due to wrong CROSS_COMPILE variable. I suggest that you run make clean to make sure all the compiled binaries are deleted before trying to build again.