summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2023-12-21 12:54:48 +0000
committerFreeArtMan <dos21h@gmail.com>2023-12-21 12:54:48 +0000
commit860350456aca9cbb5e8728fd71cbb7a4023578db (patch)
treeba8045273d4b19c4f584cfba7165484f45e70d3f
parent6db32478d5951f01fd055c61176db0fea84379a7 (diff)
downloados201-860350456aca9cbb5e8728fd71cbb7a4023578db.tar.gz
os201-860350456aca9cbb5e8728fd71cbb7a4023578db.zip
Added initrd script. Add bootable example with prebuilt images
-rwxr-xr-xcreate_installroot/boot_qemu_arm64.sh10
-rw-r--r--create_installroot/bootfs-arm64/Image.gzbin0 -> 9997538 bytes
-rwxr-xr-xcreate_installroot/rootfs-arm64/busyboxbin0 -> 1384328 bytes
-rwxr-xr-xcreate_installroot/rootfs-arm64/init9
-rw-r--r--create_tools/config/busybox-arm64.config2
5 files changed, 14 insertions, 7 deletions
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
--- /dev/null
+++ b/create_installroot/bootfs-arm64/Image.gz
Binary files differ
diff --git a/create_installroot/rootfs-arm64/busybox b/create_installroot/rootfs-arm64/busybox
new file mode 100755
index 0000000..3070325
--- /dev/null
+++ b/create_installroot/rootfs-arm64/busybox
Binary files 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
diff --git a/create_tools/config/busybox-arm64.config b/create_tools/config/busybox-arm64.config
index 33049a5..2030765 100644
--- a/create_tools/config/busybox-arm64.config
+++ b/create_tools/config/busybox-arm64.config
@@ -49,7 +49,7 @@ CONFIG_FEATURE_SYSLOG=y
# CONFIG_FEATURE_SHARED_BUSYBOX is not set
CONFIG_CROSS_COMPILER_PREFIX="aarch64-linux-gnu-"
CONFIG_SYSROOT=""
-CONFIG_EXTRA_CFLAGS=""
+CONFIG_EXTRA_CFLAGS="-static"
CONFIG_EXTRA_LDFLAGS=""
CONFIG_EXTRA_LDLIBS=""
# CONFIG_USE_PORTABLE_CODE is not set