Skip to content

DASICS-ICT/rootfs

Repository files navigation

Rootfs

Introduction

This repository automates the process of setting up and managing a root filesystem (rootfs) with the necessary applications.

Prerequisites

First, set the environment variables RISCV and RISCV_ROOTFS_HOME:

  • RISCV: The top directory of your RISC-V toolchain binaries, such as /opt/riscv
  • RISCV_ROOTFS_HOME: The top directory of this cloned repository

Usage

Initialization

Before building the rootfs, initialize the required git submodules:

make init

This command updates and initializes the submodules with a shallow clone (--depth 1).

Building the Rootfs

To build the rootfs, run:

make all

This 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.

Cleaning the Rootfs

To clean the build artifacts and directories, use:

make clean

This command cleans up the build directories of the specified applications and removes any generated initramfs files from the rootfsimg directory.

Cleaning submodules

To remove all generated files inside submodules, run:

make repoclean

This command not only initiates a make clean operation but also extends its reach to clean up any generated files residing within the submodules.

Deinitialization

To deinitialize and remove all git submodules, run:

make distclean

This command forcefully deinitializes all submodules, which is useful when you are about to switch git branches.

Generating initramfs manually

To manually generate initramfs.txt, use:

make initramfs

This command is particularly useful when you need to modify or update the rootfsimg either after make all or independently of it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published