ramdisk: For MKEMBED, skip ext2, achi, and acpi

This commit is contained in:
Arun Thomas 2011-07-30 13:14:00 +02:00
parent 1a8cf59d04
commit fcc2c77af2
3 changed files with 54 additions and 10 deletions

View file

@ -2,13 +2,23 @@
.include <bsd.own.mk>
PROGRAMS=ahci at_wini bios_wini cdprobe dev2name floppy loadramdisk mount \
pci procfs sh service sysenv mfs ext2
PROGRAMS= at_wini bios_wini cdprobe dev2name floppy loadramdisk mount \
pci procfs sh service sysenv mfs
SCRIPTS=newroot
# acpi is not compiled with ack
.if ${COMPILER_TYPE} == "gnu"
PROGRAMS += acpi
.if ${MKEMBED} != "yes"
PROGRAMS+= ahci ext2
.endif
# acpi is not compiled with ack or if MKEMBED
.if ${COMPILER_TYPE} == "gnu" && ${MKEMBED} != "yes"
PROGRAMS+= acpi
.endif
.if ${MKEMBED} != "yes"
PROTO= proto
.else
PROTO= proto.embed
.endif
.if ${OBJECT_FMT} == "a.out"
@ -146,8 +156,8 @@ passwd: ../../etc/passwd
rs.single: ../../etc/rs.single
install ${STRIPFLAG} ../../etc/$@ $@
proto.gen: $(PROGRAMS) $(SCRIPTS) proto.sh proto
sh -e proto.sh >proto.gen
proto.gen: $(PROGRAMS) $(SCRIPTS) proto.sh ${PROTO}
sh -e proto.sh ${PROTO} >proto.gen
.if ${OBJECT_FMT} == "ELF"
proto.gen: elfstrip

View file

@ -0,0 +1,33 @@
boot
640 440
d--755 0 0
bin d--755 0 0
cdprobe ---755 0 0 cdprobe
dev2name ---755 0 0 dev2name
loadramdisk ---755 0 0 loadramdisk
mount ---755 0 0 mount
newroot ---755 0 0 newroot
sh ---755 0 0 sh
service ---755 0 0 service
sysenv ---755 0 0 sysenv
$
sbin d--755 0 0
@ACPI@
at_wini ---755 0 0 at_wini
bios_wini ---755 0 0 bios_wini
floppy ---755 0 0 floppy
pci ---755 0 0 pci
mfs ---755 0 0 mfs
procfs ---755 0 0 procfs
$
dev d--755 0 0
@DEV@
$
etc d--755 0 0
system.conf ---644 0 0 system.conf
mtab ---644 0 0 mtab
passwd ---644 0 0 passwd
rc ---755 0 0 rc
rs.single ---755 0 0 rs.single
$
$

View file

@ -3,12 +3,13 @@
set -e
PATH=/bin:/sbin:/usr/bin:/usr/sbin
sed -n '1,/@ACPI/p' <proto | grep -v @ACPI@
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@
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, | \
@ -16,4 +17,4 @@ 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@
sed -n '/@DEV/,$p' <${PROTO} | grep -v @DEV@