Use a _install directory for each boot package. Don't just use a whole
authorMichael Brown <mcb30@dolphin.home>
Mon, 19 Nov 2007 01:03:57 +0000 (01:03 +0000)
committerMichael Brown <mcb30@dolphin.home>
Mon, 19 Nov 2007 01:03:57 +0000 (01:03 +0000)
load of filename mappings for policy.bp, because we need to cpio entries
for the directories themselves as well.

Makefile
policy/.gitignore [new file with mode: 0644]

index 62de8bc..354ec09 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -32,11 +32,12 @@ SKEL_DEVS += /dev/mem
 SKEL_DEVS += /dev/urandom
 
 skeleton.bp : $(BOOTPACK)
 SKEL_DEVS += /dev/urandom
 
 skeleton.bp : $(BOOTPACK)
-       rm -rf skeleton
-       mkdir -p skeleton/{bin,dev,etc,lib/modules,mnt,proc,sbin,sys}
-       mkdir -p skeleton/{usr/{bin,sbin,share}}
-       mkdir -p skeleton/{var/{lock,log,run}}
-       $(BOOTPACK) -o $@ skeleton=/ $(SKEL_DEVS)
+       mkdir -p skeleton
+       rm -rf skeleton/_install
+       mkdir -p skeleton/_install/{bin,dev,etc,lib/modules,mnt,proc,sbin,sys}
+       mkdir -p skeleton/_install/{usr/{bin,sbin,share}}
+       mkdir -p skeleton/_install/{var/{lock,log,run}}
+       $(BOOTPACK) -o $@ skeleton/_install=/ $(SKEL_DEVS)
 
 BOOTPACKS += skeleton.bp
 
 
 BOOTPACKS += skeleton.bp
 
@@ -67,8 +68,13 @@ POL_FILES += policy/usr/share/udhcpc/default.script
 POL_FILES += policy/bin/welcome.sh
 
 policy.bp : $(POL_FILES) $(BOOTPACK)
 POL_FILES += policy/bin/welcome.sh
 
 policy.bp : $(POL_FILES) $(BOOTPACK)
-       $(BOOTPACK) -o $@ \
-               `echo $(POL_FILES) | sed 's/policy\(\S*\)/policy\1=\1/g'`
+       rm -rf policy/_install
+       mkdir -p policy/_install/{etc/init.d,bin,usr/share/udhcpc}
+       for file in $(POL_FILES) ; do \
+               cp -p $$file \
+                 `echo $$file | sed 's/^policy\//policy\/_install\//'` ; \
+       done
+       $(BOOTPACK) -o $@ policy/_install=/
 
 BOOTPACKS += policy.bp
 
 
 BOOTPACKS += policy.bp
 
diff --git a/policy/.gitignore b/policy/.gitignore
new file mode 100644 (file)
index 0000000..2342c92
--- /dev/null
@@ -0,0 +1 @@
+_install