export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
PARAM="root=/dev/sda console=ttyS0 page_table_check=on" | |
qemu-system-x86_64 -smp 1 -m 1G -enable-kvm -cpu host \ | |
-net user,host=10.0.2.10,hostfwd=tcp::10022-:22 \ | |
-net nic,model=virtio-net-pci \ | |
-kernel arch/x86/boot/bzImage -nographic \ | |
-device virtio-scsi-pci,id=scsi \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drive.web-frontend_20220112.01_p1 | |
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/x86 5.16.0 Kernel Configuration | |
# | |
CONFIG_CC_VERSION_TEXT="gcc (Debian 11.2.0-12) 11.2.0" | |
CONFIG_CC_IS_GCC=y | |
CONFIG_GCC_VERSION=110200 | |
CONFIG_CLANG_VERSION=0 | |
CONFIG_AS_IS_GNU=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE | |
#include <fcntl.h> | |
#include <sched.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <sys/mount.h> | |
#include <sys/stat.h> | |
#include <sys/syscall.h> | |
#include <unistd.h> | |
#include <sys/mman.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/busybox sh | |
# 1) Download a prebuilt BusyBox binary here: | |
# https://busybox.net/downloads/binaries/ | |
# | |
# 2) Prepare your kernel | |
# cp /boot/vmlinuz vmlinuz | |
# | |
# 3) Copy the files | |
# install -Dm0755 busybox-x86_64 initramfs/bin/busybox |