Monday 8 July 2024

Building a custom Linux system using Buildroot

 1. List Available Defconfigs:

> The make "list-defconfigs" command lists the available defconfigs (configuration files) that you can use as a base for your system.
> These defconfigs define the default configuration options for different architectures and platforms.

2. Select a Defconfig:

> Choose a defconfig that matches your target architecture or platform.
> For example, if you’re using QEMU to emulate an x86_64 system, you can use the qemu_x86_64_defconfig.

3. Configure the System:

> Run make menuconfig to interactively configure your system.
> This command opens a menu where you can select various options, such as enabling specific packages, adjusting kernel settings, and customizing your root filesystem.

4. Build the System:

> Finally, execute make to start the build process.
> Buildroot will compile the kernel, bootloader, root filesystem, and other components based on your configuration.

Create Raspberry Pi Image:

$ git clone https://github.com/buildroot/buildroot.git

Then go to build root path.

$ cd buildroot
$ make list-defconfigs | grep raspberry
$ make raspberrypi_defconfig
$ make menuconfig
$ make

$ ./buildroot/output/images/start-qemu.sh


No comments: