Download
$ git clone https://github.com/bootlin/buildroot.git
STM32MP15x,MP13x
$ git clone https://github.com/bootlin/buildroot-external-st.git
$ cd buildroot/
$ $ make BR2_EXTERNAL=../buildroot-external-st st_stm32mp157c_dk2_defconfig
Glibc
BR2_TOOLCHAIN_BUILDROOT=y
BR2_TOOLCHAIN_BUILDROOT_VENDOR="buildroot"
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc"
其它的用 menuconfig 選出來,在ToolChain裡
regarding the QT5 functions config such as qml, refer to itqt5declarative //Qt Declarative提供了Qt QML和Qt Quick,用於QML開發UI
Compile
$ sudo make
rebuild package, rebuild kernel
$ sudo make pacakge_name-rebuild
ex: after modifing source code from output/build/package_name
$ sudo make uboot-rebuild
if want to rebuild kernel, pkgname is linux.
$ sudo make linux-rebuild
modify Kernel config
$ sudo make linux-menuconfig
or
delete output/build/package_name
$ sudo make linux-dirclean
$ sudo make
Cross-compile for the applicant:
Use gcc 7.5 to compile, so install Docker of Ubuntu 18.04
Build QT5 basic library
BR2_TOOLCHAIN_BUILDROOT_CXX=y //kernel要選,才能選QT5相關config
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/ubuntu/STMicroelectronics/buildroot/output/target/usr/lib:/home/ubuntu/STMicroelectronics/buildroot/output/host/lib
export PATH=$PATH:/home/ubuntu/STMicroelectronics/buildroot/output/host/bin:/home/ubuntu/STMicroelectronics/buildroot/output/host/opt/ext-toolchain/bin
沒有留言:
張貼留言