Due to the various platforms and environments, build process could be failed.
If you use another version like Ubuntu 18.04, please refer to this TIP first.

In order to build Buildroot source tree for ODROID-N2, you require to install the proper version of toolchanins required and they can be downloaded from Linaro or ARM website. Here is the installation instruction and the toolchains are listed in the BSP release notes of AMLogic.

The toolchains should be installed into /opt/toolchain in order to follow up the further instructions.

$ mkdir -p /opt/toolchain

The instructions to install the toolchains.

$ wget https://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz -P /tmp
$ tar xJvf /tmp/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz -C /opt/toolchains
$ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz -P /tmp
$ tar xJvf /tmp/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz -C /opt/toolchains
$ wget https://releases.linaro.org/archive/14.04/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2014.04_linux.tar.xz -P /tmp
$ tar xJvf /tmp/gcc-linaro-arm-none-eabi-4.8-2014.04_linux.tar.xz -C /opt/toolchains
$ wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/6_1-2017q1/gcc-arm-none-eabi-6-2017-q1-update-linux.tar.bz2 -P /tmp
$ tar xjvf /tmp/gcc-arm-none-eabi-6-2017-q1-update-linux.tar.bz2 -C /opt/toolchains

The current Buildroot for ODROID-N2 is consisted with multiple git repositories and they can be downloaded by the command repo like Android, the command can be downloaded from Google download site. If you already have repo command, you do not need to download another copy of the command.

$ mkdir -p $HOME/bin
$ curl https://storage.googleapis.com/git-repo-downloads/repo > $HOME/bin/repo
$ chmod a+x $HOME/bin/repo
$ export PATH=$HOME/bin:$PATH

Checkout source tree

$ mkdir n2_buildroot
$ cd n2_buildroot
$ repo init -u https://github.com/hardkernel/manifest.git -b aml64_buildroot_master --depth=1
$ repo sync
$ repo start aml64_buildroot_master --all


Once you have done above, you can start to build the source tree from selecting a build target. The current Buildroot for ODROID-N2 provide the build target of Linux based Buildroot platform image as well as Petitboot image. The build target of the default Buildroot platform for ODROID-N2 is odroidn2_release.

$ source buildroot/build/setenv.sh odroidn2_release
$ make

At the end of the building, if everything goes fine, Buildroot drops many files in the directory out/odroidn2/images/.

$ ls output/odroidn2/images/
Image.gz  boot.ini  logo.bmp.gz  rootfs.cpio.uboot  rootfs.ext4  s922d_odroidn2.dtb  u-boot.bin
boot.cmd  boot.scr  rootfs.cpio  rootfs.ext2        rootfs.tar   sdcard.img
$ sudo dd if=output/odroidn2/images/sdcard.img of=<your/memory/card> conv=fsync

Due to the various platforms and environments, build process could be failed because of unmatched tools or different machine types required for the tools or in order to continuously manages the build, Docker container is the alternative solution to avoid such difficulties and this page Using Docker will briefly introduce you to how you can set up Docker and its environments.

  • odroid-n2/software/building_buildroot.txt
  • Last modified: 2019/07/04 15:27
  • by luke.go