53f94f8ed4
See UPDATING about upgrading clang for dynamic linking. . allow executables on ramdisk to be dynamically linked; this means putting a few required shared libraries and ld.elf_so on the ramdisk. . this makes the ramdisk (usage) smaller when they are dynamic, but bigger when they're not. . also we can safely ditch newroot and call mount directly as that is all newroot does. . create proto.common to share a bunch of entries between small/nonsmall cases
25 lines
647 B
Bash
25 lines
647 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
|
PROTO=${1:-proto}
|
|
sed -n '1,/@ACPI/p' <${PROTO} | grep -v @ACPI@
|
|
if [ -e acpi ]
|
|
then
|
|
echo " acpi ---755 0 0 acpi"
|
|
fi
|
|
sed -n '/@ACPI/,/@DEV/p' <${PROTO} | grep -v -e @ACPI@ -e @DEV@
|
|
(
|
|
cd /dev
|
|
ls -aln | grep '^[bc]' | egrep -v ' (fd1|fd0p|tcp|eth|ip|udp|tty[pq]|pty)' | grep -v 13, | \
|
|
sed -e 's/^[bc]/& /' -e 's/rw-/6/g' -e 's/r--/4/g' \
|
|
-e 's/-w-/2/g' -e 's/---/0/g' | \
|
|
awk '{ printf "\t\t%s %s--%s %d %d %d %d \n", $11, $1, $2, $4, $5, $6, $7; }'
|
|
)
|
|
sed -n '/@DEV/,$p' <${PROTO} | grep -v @DEV@
|
|
cat proto.common.etc
|
|
if [ -x /libexec/ld.elf_so ]
|
|
then cat proto.common.dynamic
|
|
fi
|
|
echo '$'
|