From 860350456aca9cbb5e8728fd71cbb7a4023578db Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Thu, 21 Dec 2023 12:54:48 +0000 Subject: Added initrd script. Add bootable example with prebuilt images --- create_installroot/boot_qemu_arm64.sh | 10 ++++------ create_installroot/bootfs-arm64/Image.gz | Bin 0 -> 9997538 bytes create_installroot/rootfs-arm64/busybox | Bin 0 -> 1384328 bytes create_installroot/rootfs-arm64/init | 9 +++++++++ 4 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 create_installroot/bootfs-arm64/Image.gz create mode 100755 create_installroot/rootfs-arm64/busybox create mode 100755 create_installroot/rootfs-arm64/init (limited to 'create_installroot') diff --git a/create_installroot/boot_qemu_arm64.sh b/create_installroot/boot_qemu_arm64.sh index 94c9975..fc4ec51 100755 --- a/create_installroot/boot_qemu_arm64.sh +++ b/create_installroot/boot_qemu_arm64.sh @@ -2,12 +2,10 @@ qemu-system-aarch64 \ - -machine virt -m 1024M -cpu cortex-a53 \ - -kernel xos_image_arm64.gz \ - -initrd initramfs.cpio.zst \ - -append "root=/dev/initrd init=init" \ - -netdev user,id=mynet \ - -device virtio-net-pci,netdev=mynet \ + -machine virt -m 1024M -cpu cortex-a53 \ + -kernel bootfs-arm64/Image.gz \ + -initrd initrd-out.gz \ + -append "root=/dev/ram0 console=ttyAMA0 debug " \ -nographic diff --git a/create_installroot/bootfs-arm64/Image.gz b/create_installroot/bootfs-arm64/Image.gz new file mode 100644 index 0000000..7c73fb6 Binary files /dev/null and b/create_installroot/bootfs-arm64/Image.gz differ diff --git a/create_installroot/rootfs-arm64/busybox b/create_installroot/rootfs-arm64/busybox new file mode 100755 index 0000000..3070325 Binary files /dev/null and b/create_installroot/rootfs-arm64/busybox differ diff --git a/create_installroot/rootfs-arm64/init b/create_installroot/rootfs-arm64/init new file mode 100755 index 0000000..53ad0cc --- /dev/null +++ b/create_installroot/rootfs-arm64/init @@ -0,0 +1,9 @@ +#!/sh +/busybox echo "Boom" > /dev/kmsg +export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/ +/busybox mount -t proc none /proc +/busybox mount -t sysfs none /sys +/buysbox mount -t devtmpfs -o nosuid,mode=0755 udev /dev +/busybox mount /dev/pts +/busybox mount -t devpts -o noexec,nosuid,gid=5,mode=0620 devpts /dev/pts || true +exec /busybox sh -- cgit v1.2.3