Cross Linux From Scratch (CLFS) is a project that provides you with step-by-step instructions for building your own customized Linux system entirely from source.
There is no root password. Use passwd
to change the root password.
Debian 9 or Ubuntu 18.04 is recommended.
sudo apt update
sudo apt install gcc g++ make wget
./01-download-packages.sh
./02-build-toolchain.sh
$ aarch64-linux-gnu-gcc --version
aarch64-linux-gnu-gcc (GCC) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
./03-build-root-file-system.sh
./04-build-kernel.sh
./05-generate-image.sh
sudo dd if=out/image/sdcard.img of=/dev/sdX bs=4M
sync