aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile18
-rw-r--r--build_config/linux.config10
-rw-r--r--build_config/syslinux.cfg4
-rw-r--r--config/env2
-rwxr-xr-xcore/init5
-rwxr-xr-xutils/init5
-rwxr-xr-xutils/rtm2
7 files changed, 23 insertions, 23 deletions
diff --git a/Makefile b/Makefile
index 40373a4..d90bcc9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION=0.0.1
+ERSION=0.0.1
SYSLINUX_VERSION=6.03
KERNEL_VERSION=6.1.11
TARGET=./target
@@ -34,13 +34,13 @@ target:
initramfs: target core smash
@echo Installing Initramfs
- @mkdir -p ${INITRAMFS}/bin ${INITRAMFS}/system/config ${INITRAMFS}/system/manual
- @cp core/objects/* ${INITRAMFS}/bin/
+ @mkdir -p ${INITRAMFS}/system/config ${INITRAMFS}/system/manual ${INITRAMFS}/system/core ${INITRAMFS}/system/utils ${INITRAMFS}/system/scripts ${INITRAMFS}/system/devices
+ @cp core/objects/* ${INITRAMFS}/system/core/
+ @cp core/init ${INITRAMFS}/system/core/
+ @cp smash/smash ${INITRAMFS}/system/core/
+ @cp utils/* ${INITRAMFS}/system/utils/
@cp man/* ${INITRAMFS}/system/manual/
- @cp smash/smash ${INITRAMFS}/bin/
- @cp utils/* ${INITRAMFS}/bin/
- @cp config/* ${INITRAMFS}/system/config
- @mv ${INITRAMFS}/bin/init ${INITRAMFS}/init
+ @cp config/* ${INITRAMFS}/system/config/
@echo Building Initramfs
@cd ${INITRAMFS} && find . | cpio -o --quiet --format=newc > ../initramfs.img
@@ -52,7 +52,7 @@ ${TARGET}/kernel:
@mv linux-${KERNEL_VERSION} ${TARGET}/kernel-src
@cp build_config/linux.config ${TARGET}/kernel-src/.config
@echo Building Kernel
- @$(MAKE) -C ${TARGET}/kernel-src > /dev/null
+ @$(MAKE) -C ${TARGET}/kernel-src
@cp ${TARGET}/kernel-src/arch/x86_64/boot/bzImage ${TARGET}/kernel
${TARGET}/syslinux:
@@ -84,9 +84,9 @@ iso: rootfs
-joliet \
-full-iso9660-filenames \
-input-charset UTF8 \
+ -no-emul-boot \
-b syslinux/isolinux.bin \
-c syslinux/boot.cat \
- -no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
-quiet \
diff --git a/build_config/linux.config b/build_config/linux.config
index 367246f..da8ec37 100644
--- a/build_config/linux.config
+++ b/build_config/linux.config
@@ -44,7 +44,7 @@ CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set
# CONFIG_KERNEL_ZSTD is not set
-CONFIG_DEFAULT_INIT="/sbin/init"
+CONFIG_DEFAULT_INIT="/system/core/init"
CONFIG_DEFAULT_HOSTNAME="(none)"
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
@@ -788,7 +788,7 @@ CONFIG_MODULE_COMPRESS_NONE=y
# CONFIG_MODULE_COMPRESS_XZ is not set
# CONFIG_MODULE_COMPRESS_ZSTD is not set
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set
-CONFIG_MODPROBE_PATH="/sbin/modprobe"
+CONFIG_MODPROBE_PATH="/system/core/modprobe"
CONFIG_MODULES_TREE_LOOKUP=y
CONFIG_BLOCK=y
CONFIG_BLOCK_LEGACY_AUTOLOAD=y
@@ -1432,9 +1432,9 @@ CONFIG_PCCARD_NONSTATIC=y
#
CONFIG_AUXILIARY_BUS=y
# CONFIG_UEVENT_HELPER is not set
-CONFIG_DEVTMPFS=y
-CONFIG_DEVTMPFS_MOUNT=y
-# CONFIG_DEVTMPFS_SAFE is not set
+CONFIG_DEVTMPFS=n
+CONFIG_DEVTMPFS_MOUNT=n
+CONFIG_DEVTMPFS_SAFE=n
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
diff --git a/build_config/syslinux.cfg b/build_config/syslinux.cfg
index 5e0dbeb..16a987d 100644
--- a/build_config/syslinux.cfg
+++ b/build_config/syslinux.cfg
@@ -7,14 +7,14 @@ label 1
menu default
kernel /images/rex/kernel
initrd /images/rex/boot.img
- append quiet
+ append quiet rdinit=/system/core/init
endtext
label 2
menu label Boot reX over serial
kernel /images/rex/kernel
initrd /images/rex/boot.img
- append quiet console=ttyS0
+ append console=ttyS0 rdinit=/system/core/init
endtext
label 3
diff --git a/config/env b/config/env
index 6ae1b6f..fd9169d 100644
--- a/config/env
+++ b/config/env
@@ -1,2 +1,2 @@
-PATH=/bin/
+PATH=/system/core:/system/utils:/system/scripts
MANUALS=/system/manual/
diff --git a/core/init b/core/init
new file mode 100755
index 0000000..5802b36
--- /dev/null
+++ b/core/init
@@ -0,0 +1,5 @@
+#!/system/core/smash
+/system/core/clear
+/system/core/read /system/config/banner | /system/core/mdv
+/system/core/env -f /system/config/env /system/core/smash
+/system/core/powerctl poweroff
diff --git a/utils/init b/utils/init
deleted file mode 100755
index 2b4ca60..0000000
--- a/utils/init
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/smash
-/bin/clear
-/bin/read /system/config/banner | /bin/mdv
-/bin/env -f /system/config/env /bin/smash
-/bin/powerctl poweroff
diff --git a/utils/rtm b/utils/rtm
index 19d54f3..8852afc 100755
--- a/utils/rtm
+++ b/utils/rtm
@@ -1,2 +1,2 @@
-#!/bin/smash
+#!/system/core/smash
read $[MANUALS]/$[1].md | mdv | pager