Compare commits

...

3 Commits

Author SHA1 Message Date
Alex Kotov 581d51e9e5
Add /etc/inittab, /etc/passwd, /etc/group 2023-09-07 22:41:46 +04:00
Alex Kotov b32c3a7a93
Small improvements 2023-09-07 21:35:30 +04:00
Alex Kotov f0255f7375
Disable Busybox CONFIG_RMMOD 2023-09-07 21:19:16 +04:00
8 changed files with 29 additions and 7 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
/boot/bzImage
/boot/bzImage*
/build/
/image.iso
/musl-gcc.specs

View File

@ -15,12 +15,15 @@ SYSROOT = $(SRC)/sysroot
SYSROOT_TARGETS = \
$(SYSROOT)/bin/busybox \
$(SYSROOT)/etc/group \
$(SYSROOT)/etc/hosts \
$(SYSROOT)/etc/inittab \
$(SYSROOT)/etc/passwd \
$(SYSROOT)/etc/shells \
$(SYSROOT)/usr/lib/libc.a
all: fhs $(SYSROOT_TARGETS)
$(CHOWN) -R kotovalexarian:kotovalexarian $(SYSROOT)
$(CHOWN) -R user:user $(SYSROOT)
clean:
$(RM) -rf $(BUILDDIR) $(SYSROOT) musl-gcc.specs

View File

@ -1,9 +1,5 @@
set timeout=10
set timeout=5
menuentry "Linux" {
linux /boot/bzImage root=/dev/sr0 rootfstype=iso9660
}
menuentry "Tailix" {
multiboot2 /boot/tailix.multiboot2
}

1
etc/group Normal file
View File

@ -0,0 +1 @@
root:x:0:root

6
etc/inittab Normal file
View File

@ -0,0 +1,6 @@
tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
tty4::respawn:/sbin/getty 38400 tty4
tty5::respawn:/sbin/getty 38400 tty5
tty6::respawn:/sbin/getty 38400 tty6

1
etc/passwd Normal file
View File

@ -0,0 +1 @@
root::0:0:root:/root:/bin/sh

View File

@ -21,6 +21,7 @@ $(BUILDDIR)/busybox/.config: musl-gcc.specs
$(SED) -i 's!^#* *CONFIG_LSMOD[ =].*$$!CONFIG_LSMOD=n!' $(BUILDDIR)/busybox/.config
$(SED) -i 's!^#* *CONFIG_MODINFO[ =].*$$!CONFIG_MODINFO=n!' $(BUILDDIR)/busybox/.config
$(SED) -i 's!^#* *CONFIG_MODPROBE[ =].*$$!CONFIG_MODPROBE=n!' $(BUILDDIR)/busybox/.config
$(SED) -i 's!^#* *CONFIG_RMMOD[ =].*$$!CONFIG_RMMOD=n!' $(BUILDDIR)/busybox/.config
$(SED) -i 's!^#* *CONFIG_SELINUX[ =].*$$!CONFIG_SELINUX=n!' $(BUILDDIR)/busybox/.config
$(SED) -i 's!^#* *CONFIG_SELINUXENABLED[ =].*$$!CONFIG_SELINUXENABLED=n!' $(BUILDDIR)/busybox/.config
# Require Linux headers
@ -100,3 +101,5 @@ $(BUILDDIR)/busybox/.config: musl-gcc.specs
$(SED) -i 's!^#* *CONFIG_FEATURE_VI_REGEX_SEARCH[ =].*$$!CONFIG_FEATURE_VI_REGEX_SEARCH=n!' $(BUILDDIR)/busybox/.config
$(SED) -i 's!^#* *CONFIG_IFPLUGD[ =].*$$!CONFIG_IFPLUGD=n!' $(BUILDDIR)/busybox/.config
$(SED) -i 's!^#* *CONFIG_PAM[ =].*$$!CONFIG_PAM=n!' $(BUILDDIR)/busybox/.config
# Direct use of /etc/passwd, /etc/group, /etc/shadow
$(SED) -i 's!^#* *CONFIG_USE_BB_PWD_GRP[ =].*$$!CONFIG_USE_BB_PWD_GRP=y!' $(BUILDDIR)/busybox/.config

View File

@ -1,7 +1,19 @@
$(SYSROOT)/etc/group: etc/group
$(INSTALL) -d $(SYSROOT)/etc
$(INSTALL) -m 644 etc/group $(SYSROOT)/etc/group
$(SYSROOT)/etc/hosts: etc/hosts
$(INSTALL) -d $(SYSROOT)/etc
$(INSTALL) -m 644 etc/hosts $(SYSROOT)/etc/hosts
$(SYSROOT)/etc/inittab: etc/inittab
$(INSTALL) -d $(SYSROOT)/etc
$(INSTALL) -m 644 etc/inittab $(SYSROOT)/etc/inittab
$(SYSROOT)/etc/passwd: etc/passwd
$(INSTALL) -d $(SYSROOT)/etc
$(INSTALL) -m 644 etc/passwd $(SYSROOT)/etc/passwd
$(SYSROOT)/etc/shells: etc/shells
$(INSTALL) -d $(SYSROOT)/etc
$(INSTALL) -m 644 etc/shells $(SYSROOT)/etc/shells