sudo apt update && sudo apt dist-upgrade
sudo apt-get install build-essential gawk gcc g++ gfortran git texinfo bison libncurses-dev tar wget qemu-user-static rsync rsync
git clone https://github.com/abhiTronix/rpi_rootfs.git
Note 💡: Download the lite-image file from Raspberry PI download page and if possible, use the img file after unzipping the img.zip file after the download is complete.
cd ~/rpi_rootfs
sudo chmod +x ./build_rootfs.sh
# To build rootfs
./build_rootfs.sh create ./2021-MM-DD-raspios-buster-armhf.img
It is a CMAKE_TOOLCHAIN_FILE definition file for cmake used when cross compile using cmake:
PI.cmake
before running cmake!!!
CMakeLists.txt
file with PI.cmake
!!!
cd cmake_source_distribution_root_path
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=~/rpi_rootfs/PI.cmake -DCMAKE_BUILD_TYPE=Debug ..
A python script that takes a sysroot directory and turn all the abolute symlinks and turn them into relative ones such that the sysroot is usable within another system.
sysroot-relativelinks.py path_to_sysroot_directory