-
Notifications
You must be signed in to change notification settings - Fork 2
1. Build UBoot
Edwin edited this page Dec 27, 2018
·
2 revisions
Boot loader is the very first stuff for iMX8
to boot up.
From official site of NXP, you might want to use Yocto tool chain for cross compile.
However, since Ubuntu already covered cross-compile using aarch64-linux-gnu library, provided by Linaro.
Install the Ubuntu toolchain gcc-aarch64-linux-gnu
GNU C compiler for the arm64 architecture,
since we using iMX8 arm64 platform.
sudo apt-get install gcc-aarch64-linux-gnu
# for gcc 4.9
sudo apt-get install gcc-4.9-aarch64-linux-gnu
Clone UBoot source code from codeaurora, checkout to version which you prefer to used.
In my case, I used 4.9.123 in both UBoot, mkimage and kernel.
- Note: There is nxp official tutorial and document using bitbucket repository (https://bitbucket.sw.nxp.com),
but all of them not work.
git clone https://source.codeaurora.org/external/imx/uboot-imx
git checkout imx_v2017.03_4.9.123_imx8mm_ga
Then you can run the script I provide : __build_uboot.sh__.
If you want to do it manually, fine~
Here you go, make sure you use correct defconfig.
cd uboot-imx
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
make distclean
# make imx8mq_evk_defconfig in my case
make <defconfig>
make -j 16
Now you finished UBoot build up! Eeeeeeeeeeeeeazsy, Right?
Of course! but here comes the tough stuff.
- This UBoot can't boot like UBoot of iMX6 did, it need mkimage!
- If your platform is customized, or you used customized DRAM, check out Create DDR Training File.
Enjoy!