Skip to content

Building Linux kernel and Filesystem Separately

Yuriy Kolerov edited this page Jul 26, 2023 · 7 revisions

Preface

Sometimes it's more convenient to build root file system and a Linux kernel separately. This guide covers an example when it's necessary to build those images separately for ARC HS38 target.

Suppose, that a toolchain for ARC HS38 is preinstalled in /tools/toolchains/arc-linux-gnu. The version is 2023.03 and it's based on glibc standard library.

Building Root Filesystem

Clone Buildroot:

$ Clone the latest Buildroot
$ git clone https://git.busybox.net/buildroot

# ... or use a custom repository for support of ARCv3 targets
$ https://github.com/foss-for-synopsys-dwc-arc-processors/buildroot

$ cd buildroot

Use snps_archs38_haps_defconfig configuration file for this example and enter a configuration menu:

$ make snps_archs38_haps_defconfig
$ make menuconfig

Deselect an option for the Linux kernel and select an appropriate filesystem for your needs:

Kernel -> [ ] Linux kernel
Filesystem images -> [*] cpio the root filesystem # For use as an initial RAM filesystem
                  -> ext2/3/4 root filesystem     # For mounting from a storage

Choose a preinstalled toolchain:

Toolchain -> Toolchain type -> (X) External toolchain
          -> (X) Custom toolchain
          -> Toolchain origin -> (X) Pre-installed toolchain
          -> Toolchain path -> /tools/toolchains/arc-linux-gnu
          -> External toolchain gcc version -> (X) 12.x
          -> External toolchain kernel headers series -> (X) 5.16.x
          -> External toolchain C library -> (X) uClibc/uClibc-ng
          -> [X] Toolchain has locale support?
          -> [ ] Toolchain has RPC support?
          -> [X] Toolchain has C++ support?
          -> [X] Toolchain has Fortran support?

Build the filesystem image:

make
Clone this wiki locally