Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andreicherniaev/buildroot_cpio_i386_bios
How to build Linux cpio (live) image
https://github.com/andreicherniaev/buildroot_cpio_i386_bios
Last synced: about 1 month ago
JSON representation
How to build Linux cpio (live) image
- Host: GitHub
- URL: https://github.com/andreicherniaev/buildroot_cpio_i386_bios
- Owner: AndreiCherniaev
- License: apache-2.0
- Created: 2024-10-23T07:52:42.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-23T15:41:31.000Z (3 months ago)
- Last Synced: 2024-10-23T18:10:30.732Z (3 months ago)
- Language: Shell
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
How to build Linux cpio (live) image.
## Clone
```
git clone --remote-submodules --recurse-submodules -j8 https://github.com/AndreiCherniaev/buildroot_cpio_i386_bios.git
cd buildroot_cpio_i386_bios/
```## Make image
```
make clean -C buildroot
make BR2_EXTERNAL=$PWD/my_external_tree -C $PWD/buildroot cpio_i386_bios_defconfig
make -C buildroot
```
## Save non-default buildroot .config
To save non-default buildroot's buildroot/.config to $PWD/my_external_tree/configs/cpio_i386_bios_defconfig
```
make -C $PWD/buildroot savedefconfig BR2_DEFCONFIG=$PWD/my_external_tree/configs/cpio_i386_bios_defconfig
```
## rebuild grub2
```
make grub2-dirclean -C buildroot
make grub2-rebuild -C buildroot
make -C buildroot
```
## Clean and build Kernel
[linux-reconfigure.](https://stackoverflow.com/questions/49260466/why-when-i-change-br2-linux-kernel-custom-config-file-and-run-make-linux-reconfi)
```
make linux-menuconfig -C buildroot
make linux-rebuild -C buildroot && make -C buildroot
```
## Save non-default Linux .config
To save non-default Linux's .config to $PWD/my_external_tree/board/my_company/my_board/pc_x86_bios_kernel_5.4.228.config
```
make -C $PWD/buildroot/ linux-update-defconfig BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=$PWD/my_external_tree/board/my_company/my_board/pc_x86_bios_kernel_5.4.228.config
```## Start in QEMU
```
qemu-system-i386 -m 512 -kernel ../Buildroot.img
```![QEMU err screen](QEMU_err.png)
# Check rootfs.cpio
Let's check what inside rootfs.cpio file. Unarchive rootfs.cpio to `archive/`
```
mkdir buildroot/output/images/archive && cd $_
cpio --no-absolute-filenames -i -vd < "../rootfs.cpio"
```
Inside `boot/` there is `grub/` only, there is no bzImage in `boot/`...