Buildroot Rootfs Only
Buildroot Rootfs Only
Suppose we want only to compile the root file system. The rootfs.ext4 and only that one to copy to
the image.
This task of using rootfs buildroot only require a lot of attension because there are option that affect
the kernel , for example , when adding firmware options like bluetooth and wifii , it add drivers to
the kernel build, there for a kernel should be build again.
When building rootfs only really require that only rootfs related packages will be selected.
Before we start:
We want to use xconfig , for that we need to install QT 4
or full:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 qt4-
dev-tools wget libncurses5 git-core nautilus-open-terminal
I will start with the raspberry pi 3 defconfig , for the 32 bit arm
make raspberrypi3_defconfig
#
# configuration written to /home/first/buildroot/buildroot-2017.05/.config
#
it will copy the config to the current directory as .config
and this is the file make xconfig or make menuconfig will work on.
Run
make xconfig
and in kernel , uncheck the linux kernel-package
prefix is the name of the compiler without the -gcc or -g++, just the name
the path is without the bin directory
type
make
using external pre-build cross compile will save us about an hour in the build.
install python:
https://askubuntu.com/questions/101591/how-do-i-install-the-latest-python-2-7-x-or-3-x-on-ubuntu
install matplotlib
https://matplotlib.org/users/installing.html
The root fs file is about 63 mega:
rw-r--r-- 1 first first 62914560 Jun 2 01:17 output/images/rootfs.ext2
Now lets copy using dd command , the file system that we built into the second partition and
replace the existing one:
If it is the first time, just create the two partitions using gparted.
if = is the source
of = the destination
122880+0 records in
122880+0 records out
62914560 bytes (63 MB) copied, 52.5073 s, 1.2 MB/s