aboutsummaryrefslogtreecommitdiff
path: root/util/mkrootfs
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-02-06 13:22:04 +0100
committerlonkaars <loek@pipeframe.xyz>2024-02-06 13:22:04 +0100
commita9ef380662da3efa382017ff8423f1a894b31bfd (patch)
tree26c160523c050945502408148faae6508712033b /util/mkrootfs
parentae327cc50fd9d3e59e9f60088243adfc69cb312e (diff)
dynamic linking application starts
Diffstat (limited to 'util/mkrootfs')
-rwxr-xr-xutil/mkrootfs14
1 files changed, 8 insertions, 6 deletions
diff --git a/util/mkrootfs b/util/mkrootfs
index 91eff68..ae1f489 100755
--- a/util/mkrootfs
+++ b/util/mkrootfs
@@ -1,6 +1,7 @@
#!/bin/sh
OLDPWD="$PWD"
cd "$(dirname "$0")"
+BUSYBOX_SRC="$(realpath ../busybox)"
BUSYBOX_FS="$(realpath ../busybox/rootfs)"
OVERLAY_FS="$(realpath ../rootfs)"
cd "$OLDPWD"
@@ -9,7 +10,13 @@ cd "$OLDPWD"
cd "$1"
# scaffold folders
-for dir in bin dev etc home lib mnt opt proc root run sbin srv sys tmp usr var ; do
+for dir in \
+ bin dev etc home lib proc root sbin srv sys tmp usr var \
+ var/log var/run \
+ etc/network/if-down.d etc/network/if-post-down.d \
+ etc/network/if-pre-up.d etc/network/if-up.d \
+ usr/share/udhcpc
+do
mkdir -p "$dir"
done
@@ -28,10 +35,5 @@ cp $CPFLAGS "$OVERLAY_FS/." .
# setuid busybox
chmod a=xrs,u+w bin/busybox
-# create a root user
-! [ -e etc/passwd ] && echo "root:x:0:0::/root:/bin/sh" > etc/passwd
-! [ -e etc/shadow ] && echo "root:!:0:0:99999:0:::" > etc/shadow
-! [ -e etc/group ] && echo "root:x:0:root" > etc/shadow
-
# exit safely (continue makefile)
exit 0