mirror of
git://git.2f30.org/morpheus.git
synced 2024-06-28 19:21:22 +00:00
Add fs package
This commit is contained in:
parent
9228690add
commit
244b5e6d98
47
build
47
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
|
||||
|
13
pkgs/fs
Normal file
13
pkgs/fs
Normal file
@ -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/
|
Loading…
Reference in New Issue
Block a user