Use External Toolchain in Build root (from Part 1) to generate Rootfs/Linux - Part 2
- Anup Halarnkar
- Apr 6, 2023
- 2 min read
Updated: Nov 12, 2024

For some months, we at WhileOne Techsoft Pvt. Ltd. have been helping our customer setup a system to validate the performance of their SoC platform. In this context, we had to bring up an aarch64 Linux based target image to run on their proprietary hardware SoC platform.
Part -1 of this series explains how to build an External Toolchain with BuildRoot.
Part -2 of this series explains how to build a Target Linux image and Rootfs in BuildRoot using the External Toolchain that we built in Part -1
Part -3 of this series explains how to integrate the generated External Toolchain binaries inside the Target Linux image using BuildRoot
In the following steps we shall configure the Buildroot to use the External Toolchain tarball(refer Part -1)to build the Kernel and Rootfs images and copy the extracted tarball binaries to the target under directory /usr

We have to modify the configuration and then rebuild using clean option. This will delete all output folders and files. So, its very important to move the tarball to some other location outside the ‘buildroot’ folder. If not yet done, please do this before proceeding ahead
1. Start menuconfig
make menuconfig
We only modify a few options. Rest of the options will remain the same as was configured earlier in Part -1. Target Options and Build Options shall remain same. So no need to change them
2. Modifying Toolchain Options:

a. Select option ‘External Toolchain’
b. Modify option of Toolchain origin to ‘Toolchain to be downloaded and installed’
c. Update URL to ‘file:///path/to/sdk-tarball’ as shown below.

d. Modify External Toolchain GCC version to ’11.x’(We used GCC-11.x to cross-compile the external toolchain in Part -1)

e. Modify External Toolchain kernel headers series to ‘5.4.x’(This was same configuration that we had kept for tarball earlier in Part -1)
f. Modify External Toolchain C library to ‘glibc/eglibc’
g. Disable ‘Toolchain has RPC support’(Please disable if it was not selected earlier during tarball generation)
h. Enable support for C++ and Fortran(This was enabled earlier for tarball configuration)


a. Modify Init system from ‘None’ to ‘BusyBox’

b. Enable option ‘Use symlinks to /usr for /bin, /sbin and /lib
c. Modify default BusyBox shell from ‘None’ to ‘/bin/sh/’

7. Now, save and exit from menuconfig
8. Build with new configuration settings
make clean all

9. Once the build is successful, the resulting images can be seen in the folder ‘output/images’


We were able to generate Rootfs and aarch64 Linux images by compiling with the External Toolchain that was earlier built in Part -1

[Check out Part -3 to know more on how to integrate the External Toolchain binaries inside the Target Linux Image]
A quote that has inspired me for a long time…
“Obstacles don’t have to stop you. If you run into a wall, don’t turn around and give up. Figure out how to climb it, go through it, or work around it.” — Michael Jordan
Comments