Table of Content
- 0. Building System OS
- 1. Update build Environment
- 2. Clone buildroot repo
- 3. Build
- 3.1 Build for i.MX 8QuadXPlus MEK CPU Board
- 4. Custom Build
- 4. Flash bin
- 4.1 Flash image to SD card
- 5. Run examples
- 6. Build & Run ARM Linux on Qemu
- 99. Reference URL
0. Building System OS
Ubuntu 18.04.3 LTS
1. Update build Environment
$ sudo apt-get install git build-essential curl chrpath gawk texinfo libncurses5-dev
2. Clone buildroot repo
$ git clone git://git.buildroot.net/buildroot
or
$ git clone https://git.buildroot.net/buildroot
3. Build
3.1 Build for i.MX 8QuadXPlus MEK CPU Board
$ cd buildroot
# Add ccache and download dir to config file
$ cat configs/freescale_imx8qxpmek_defconfig
BR2_CCACHE=y
BR2_CCACHE_DIR="/opt/buildroot/ccache"
BR2_DL_DIR="/opt/buildroot/dl"
BR2_aarch64=y
BR2_cortex_a35=y
BR2_ARM_FPU_VFPV3=y
......
$ make freescale_imx8qxpmek_defconfig
$ make
//Rebuild one package - make <package>-dirclean, such as:
$ make qt5base-dirclean
$ make
4. Custom Build
4.1 Custom kernel
//configure linux kernel
$ cd buildroot
$ make linux-menuconfig
$ make
//todo for imx7 qemu build & run
1. CONFIG_IMX_SDMA=y => n
2.
CONFIG_CFG80211=y n
CONFIG_CFG80211_WEXT=y n
4. Flash bin
4.1 Flash image to SD card
$ dd if=output/images/sdcard.img of=/dev/<your-sd-device>
########################################################
To determine the device associated to the SD card have a look in the
/proc/partitions file:
$ cat /proc/partitions
5. Run examples
5.1 Run Opengl example
//todo
5.2 Run Qt example
//todo
6. Build & Run ARM Linux on Qemu
6.1 qemu arm versatile
$ make qemu_arm_versatile_defconfig
$ make menuconfig
//Add OpenSSL libraries by navigating to Target packages -> Networking applications, and select openssh:
$ make
//run with QEMU with this command line:
$ qemu-system-arm \
-M versatilepb \
-kernel output/images/zImage \
-dtb output/images/versatile-pb.dtb \
-drive file=output/images/rootfs.ext2,if=scsi,format=raw \
-append "root=/dev/sda console=ttyAMA0,115200" \
-serial stdio \
-net nic,model=rtl8139 -net user \
-redir tcp:2222::22 \
-name Versatile_ARM_EXT2
6.2 Qemu arm imx6ul
$ cd buildroot
$ git checkout 2020.02.x
$ make imx6ulevk_defconfig
$ make j8