This repository automates the process of setting up and managing a root filesystem (rootfs) with the necessary applications.
First, set the environment variables RISCV and RISCV_ROOTFS_HOME:
RISCV: The top directory of your RISC-V toolchain binaries, such as/opt/riscvRISCV_ROOTFS_HOME: The top directory of this cloned repository
Before building the rootfs, initialize the required git submodules:
make initThis command updates and initializes the submodules with a shallow clone (--depth 1).
To build the rootfs, run:
make allThis target compiles and installs the specified applications (in this case, busybox) and generates the initial RAM filesystem (initramfs) using a Python script located in the utils directory.
To clean the build artifacts and directories, use:
make cleanThis command cleans up the build directories of the specified applications and removes any generated initramfs files from the rootfsimg directory.
To remove all generated files inside submodules, run:
make repocleanThis command not only initiates a make clean operation but also extends its reach to clean up any generated files residing within the submodules.
To deinitialize and remove all git submodules, run:
make distcleanThis command forcefully deinitializes all submodules, which is useful when you are about to switch git branches.
To manually generate initramfs.txt, use:
make initramfsThis command is particularly useful when you need to modify or update the rootfsimg either after make all or independently of it.