[cauldron] r94 committed - Begin to try to improve document organization before I re-crunch some ...

1 view
Skip to first unread message

caul...@googlecode.com

unread,
Jul 28, 2010, 12:33:50 PM7/28/10
to cauldr...@googlegroups.com
Revision: 94
Author: seklecki
Date: Wed Jul 28 09:33:17 2010
Log: Begin to try to improve document organization before I re-crunch some
binaries
so that I can follow this easier next time ~BAS


http://code.google.com/p/cauldron/source/detail?r=94

Modified:
/trunk/framework/misc/configsets/crunchgen_recipes/bascrunch_notes.txt

=======================================
--- /trunk/framework/misc/configsets/crunchgen_recipes/bascrunch_notes.txt
Mon Aug 3 15:01:59 2009
+++ /trunk/framework/misc/configsets/crunchgen_recipes/bascrunch_notes.txt
Wed Jul 28 09:33:17 2010
@@ -1,35 +1,55 @@
+=== Intro ===
+
+This document tentatively outlines an example crunchgen process for a
generic
+netbsd-5/i386 cauldron image (netbsd-5_STABLE 2009 -> netbsd-5_5.1_RC3
2010)
+
+In this example, we're crunchgen as much of /sbin and /bin as possible to
shave
+half a quid off the top.
+
+=== Original File Lists ===
+
Early netbsd-5 original sbin/ ls(1) listing:
-progs apmlabel mount_fdesc mount_ptyfs newfs_msdos route sysctl atactl
fdisk ldconfig mount_ffs ttyflags bioctl fsck mbrlabel mount_filecore
tunefs fsck_ffs mknod mount_kernfs mount_tmpfs rtsol umount disklabel
fsck_msdos modload mount_udf ping scan_ffs veriexecctl dkctl modunload
mount_msdos ping6 setkey wdogctl dkscan_bsdlabel gpt mount mount_null
mount_umap shutdown wsconsctl dmesg mount_ados mount_overlay mount_union
rcorder drvctl ifconfig mount_cd9660 reboot swapctl init mount_efs
mount_procfs newfs rndctl
+
+ * progs apmlabel mount_fdesc mount_ptyfs newfs_msdos route sysctl atactl
fdisk
+ ldconfig mount_ffs ttyflags bioctl fsck mbrlabel mount_filecore tunefs
+ fsck_ffs mknod mount_kernfs mount_tmpfs rtsol umount disklabel
fsck_msdos
+ modload mount_udf ping scan_ffs veriexecctl dkctl modunload mount_msdos
ping6
+ setkey wdogctl dkscan_bsdlabel gpt mount mount_null mount_umap shutdown
+ wsconsctl dmesg mount_ados mount_overlay mount_union rcorder drvctl
ifconfig
+ mount_cd9660 reboot swapctl init mount_efs mount_procfs newfs rndctl
+
+(this list overlaps / complments rd_prune.txt)

==============================================================
-Additional prunes/removals (Augments rd_prune.txt work at crunch time):
-rdump fsirand fsdb mount_efs mount_portal slattach moutn_sysvbfs
resize_lfs fsck_lfs clri pppoectl scan_ffs dchpd svhlabel routed newbtconf
ipppctl
-
-Don't crunch for now:
+
+Additional prunes/removals (Augments rd_prune.txt work at crunch time)
that we wont even both crunch:
+
+ * rdump fsirand fsdb mount_efs mount_portal slattach moutn_sysvbfs
resize_lfs
+ fsck_lfs clri pppoectl scan_ffs dchpd svhlabel routed newbtconf ipppctl
+
+Don't crunch for now (Linking issues):
- pfctl
- pflogd

-Hard Links Duplicate (~7):
+Hard Links which appear as duplicate files (~7 files):
- swapctl = swapon,
- reboot = halt, poweroff
-==============================================================
-
-=============================================================
+
Bourne scripts to leave in place:

-dhclient-script: POSIX shell script text executable
-fastboot: POSIX shell script text executable
-fasthalt: POSIX shell script text executable
-newbtconf: POSIX shell script text executable
-nologin: POSIX shell script text executable
- - for a in nologin fastboot fasthalt newbtconf dhclient-script; do
cp ../../sbin/${a} . ; done
-=============================================================
-
-=============================================================
-Progs to hard ln(1):
-
-for a in apmlabel mount_fdesc mount_ptyfs newfs_msdos route sysctl atactl
fdisk ldconfig mount_ffs ttyflags bioctl fsck mbrlabel mount_filecore
tunefs fsck_ffs mknod mount_kernfs mount_tmpfs rtsol umount disklabel
fsck_msdos modload mount_udf ping scan_ffs veriexecctl dkctl modunload
mount_msdos ping6 setkey wdogctl dkscan_bsdlabel gpt mount mount_null
mount_umap shutdown wsconsctl dmesg mount_ados mount_overlay mount_union
rcorder drvctl ifconfig mount_cd9660 reboot swapctl init mount_efs
mount_procfs newfs rndctl swapon halt poweroff ; do ln bascrunch_sbin $a;
done
-==============================================================
+ - dhclient-script: POSIX shell script text executable
+ - fastboot: POSIX shell script text executable
+ - fasthalt: POSIX shell script text executable
+ - newbtconf: POSIX shell script text executable
+ - nologin: POSIX shell script text executable
+ - Run this command:
+ # for a in nologin fastboot fasthalt newbtconf dhclient-script; do
cp ../../sbin/${a} . ; done
+
+==== Progs to hard ln(1) to Crunched Binary ====
+
+After the build of the cunchgen binary:
+
+# for a in apmlabel mount_fdesc mount_ptyfs newfs_msdos route sysctl
atactl fdisk ldconfig mount_ffs ttyflags bioctl fsck mbrlabel
mount_filecore tunefs fsck_ffs mknod mount_kernfs mount_tmpfs rtsol umount
disklabel fsck_msdos modload mount_udf ping scan_ffs veriexecctl dkctl
modunload mount_msdos ping6 setkey wdogctl dkscan_bsdlabel gpt mount
mount_null mount_umap shutdown wsconsctl dmesg mount_ados mount_overlay
mount_union rcorder drvctl ifconfig mount_cd9660 reboot swapctl init
mount_efs mount_procfs newfs rndctl swapon halt poweroff ; do ln
bascrunch_sbin $a; done

==============================================================
Original prune list:
@@ -69,14 +89,22 @@
sbin/badsect


----------------------
-
-Walk through:
-
-
---------------------
-
-Copy the recipies in place:
+=== Walk Through ===
+
+==== General Process Interaction ====
+
+The cauldron update/buld process is as so
+
+ * Update / Patch Source
+ * Build your custom release binaries
+ * Extract binaries into destdir
+ * Run Scripts: fsimages/make_dir_mdrd.sh fsimages/make_dir_cfrd.sh
+ ** [Substitute your Crunched Binaries Here]
+ * Run Scripts: fsimages/rd_image.sh fsimages/cf_image.sh
+ * Burn Image
+
+
+==== Copy the recipies in place ====

# cd $BASE/src-netbsd5/bin
# cp
$BASE/cauldron/misc/configsets/crunchgen_recipies/bascrunch_bin.conf .
@@ -84,10 +112,10 @@
# cd $BASE/src-netbsd5/sbin
# cp
$BASE/cauldron/misc/configsets/crunchgen_recipies/bascrunch_sbin.conf .

-Compile the crunch conf into a makefile:
+==== Compile the crunch conf into a makefile ====

# crunchgen -m Makefile-crunch bascrunch_sbin.conf
- bascrunch_sbin.conf:10: no prog swapon previously declared, skipping link.
+ warning: bascrunch_sbin.conf:10: no prog swapon previously declared,
skipping link.
Run "make -f Makefile-crunch objs exe" to build crunched binary.

Build the resulting binary:
@@ -102,7 +130,6 @@

MD5 (bascrunch_sbin) = 8f77543ed57f925e8fdd4f51ebacd27c

-
Get ready to replace sbin/ and bin/ within
$BASE/fsimages/rd_root/{bin,sbin}
- Remove the old stale orig binary directory
../fsmages# rm -rf bin
@@ -116,7 +143,6 @@
# cp /home/netbsd/src/bin/bascrunch_bin /home/fsimages/rd_root/bin/
# cp /home/netbsd/src/sbin/bascrunch_sbin /home/fsimages/rd_root/sbin/

-
Make the various symlinks:

[See TXT File Above]
@@ -137,3 +163,5 @@
1.7M rd_root/sbin
900K bin/
1.2M rd_root/bin
+
+Congratulations, you saved 500K in sbin/ and 300K in bin/ !

Reply all
Reply to author
Forward
0 new messages