Step 3 : Compile Bare-Linux
In this program, you are going to learn
How to ?
Topics in this section,
Make sure current dir is $HOME
$ cd $HOME
Use below command to download the source code.
$ git clone git://git.buildroot.net/buildroot
Change the current directory to build as mentioned below.
$ cd buildroot
Now, list out the content of “board” directory to check if the bare-linux source code supports our required target.
test:board$ ls
aarch64-efi armadeus beagleboardx15 bsh firefly intel mender olpc qemu raspberrypi3-64 seeed synopsys uevm5432 zynqmp
acmesystems arrow beaglebone canaan freescale khadas microchip openblocks radxa raspberrypi4 sheevaplug technexion versal
altera aspeed beagleboneai chromebook friendlyarm kontron minnowboard orangepi raspberrypi raspberrypi4-64 sifive technologic visionfive
amarula asus beaglev ci20 globalscale lego nexbox pandaboard raspberrypi0 raspberrypicm4io sipeed terasic visionfive2
andes atmel beelink cubietech grinn lemaker nezha pc raspberrypi0w raspberrypicm4io-64 solidrun ti wandboard
arcturus avnet boundarydevices embest hardkernel librecomputer octavo pcengines raspberrypi2 raspberrypizero2w spike toradex warp7
arm bananapi broadcom engicam in-circuit linksprite olimex pine64 raspberrypi3 roseapplepi stmicroelectronics udoo zynq
We can see that our target “raspberrypi3-64” is supported by the bare-linux source code.
Now from the buildroot directory add the default configurations of raspberrypi3-64 in config file using the following command.
$ pwd
$HOME/buildroot
$ make raspberrypi3_64_defconfig
Run make command from buildroot directory to build the bare-linux
$ make
Once the build is done, the final target image will be present in the following directory.
test:images$ ls -l
total 134628
-rwxr-xr-x 1 test test 33555 Jan 30 11:27 bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 test test 34182 Jan 30 11:27 bcm2710-rpi-3-b-plus.dtb
-rwxr-xr-x 1 test test 20720 Jan 30 11:27 bcm2837-rpi-3-b.dtb
-rw-r--r-- 1 test test 33554432 Jan 30 11:27 boot.vfat
-rw-r--r-- 1 test test 530 Jan 30 11:27 genimage.cfg
-rw-r--r-- 1 test test 21324288 Jan 30 11:27 Image
-rw-r--r-- 1 test test 125829120 Jan 30 11:27 rootfs.ext2
lrwxrwxrwx 1 test test 11 Jan 30 11:27 rootfs.ext4 -> rootfs.ext2
drwxr-xr-x 3 test test 4096 Jan 30 11:02 rpi-firmware
-rw-r--r-- 1 test test 159384064 Jan 30 11:27 sdcard.img
What is /.bashrc file?
See Answer
??