Add /etc/inittab, /etc/passwd, /etc/group

This commit is contained in:
Alex Kotov 2023-09-07 22:26:25 +04:00
parent b32c3a7a93
commit 581d51e9e5
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
6 changed files with 25 additions and 0 deletions

View File

@ -15,7 +15,10 @@ 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

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

@ -101,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