commit 244b5e6d9885d2b95aa04413e97e6d5799314c54
parent 9228690add1c471652c4284c86e558005f4410c5
Author: sin <sin@2f30.org>
Date: Thu, 5 Sep 2013 12:58:51 +0100
Add fs package
Diffstat:
M | build | | | 47 | ----------------------------------------------- |
A | pkgs/fs | | | 13 | +++++++++++++ |
2 files changed, 13 insertions(+), 47 deletions(-)
diff --git a/build b/build
@@ -41,53 +41,6 @@ done
wget -c http://dl.2f30.org/morpheus-pkgs/bzImage -O kernel/bzImage
wget -c http://dl.2f30.org/morpheus-pkgs/bzImage-config -O kernel/bzImage-config
-# Dummy hotplug event handler
-cat << EOF > $root/bin/hotplug
-#!/bin/sh
-
-env >> /tmp/hotplug-events
-EOF
-
-chmod +x $root/bin/hotplug
-
-# Our init script
-cat << EOF > $root/init
-#!/bin/sh
-
-export PATH=/bin:/sbin
-
-mount -t sysfs sysfs /sys
-mount -t proc proc /proc
-echo /bin/smdev > /proc/sys/kernel/hotplug
-smdev -s
-hostname morpheus
-ifconfig eth0 up && sdhcp eth0
-
-while :; do
- sh
-done
-EOF
-
-chmod +x $root/init
-
-# Basic group/passwd files
-cat << EOF > $root/etc/group
-root:x:0:root
-bin:x:1:root,bin,daemon
-daemon:x:2:root,bin,daemon
-sys:x:3:root,bin
-adm:x:4:root,daemon
-tty:x:5:
-disk:x:6:root
-cdrom:x:7:root
-EOF
-
-cat << EOF > $root/etc/passwd
-root:x:0:0:root:/root:/bin/mksh
-bin:x:1:1:bin:/bin:/bin/false
-daemon:x:2:2:daemon:/sbin:/bin/false
-EOF
-
pushd $root
find . | cpio --quiet -H newc -o | gzip -9 -n > ../rootfs.img
popd
diff --git a/pkgs/fs b/pkgs/fs
@@ -0,0 +1,13 @@
+file=$pkg.tar.gz
+url=$mirror/$file
+
+# Fetch package
+wget -c $url -O src/$file
+
+# Unpack package
+pushd src
+tar xzf $file
+popd
+
+# Install package
+cp -r src/$pkg/* $root/