[aadk-commits] qwell: uClinux/trunk r83 - in /uClinux/trunk/uClinux-dist: tools/ vendors/Dig...

aadk-commits at lists.digium.com aadk-commits at lists.digium.com
Wed Dec 27 12:20:25 MST 2006


Author: qwell
Date: Wed Dec 27 13:20:24 2006
New Revision: 83

URL: http://svn.digium.com/view/aadk?view=rev&rev=83
Log:
start of support for romfs

Modified:
    uClinux/trunk/uClinux-dist/tools/mkdevdir.sh
    uClinux/trunk/uClinux-dist/vendors/Digium/S800I/Makefile
    uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc

Modified: uClinux/trunk/uClinux-dist/tools/mkdevdir.sh
URL: http://svn.digium.com/view/aadk/uClinux/trunk/uClinux-dist/tools/mkdevdir.sh?view=diff&rev=83&r1=82&r2=83
==============================================================================
--- uClinux/trunk/uClinux-dist/tools/mkdevdir.sh (original)
+++ uClinux/trunk/uClinux-dist/tools/mkdevdir.sh Wed Dec 27 13:20:24 2006
@@ -15,8 +15,15 @@
 	[cb])
 	    x=`basename $filename`
 	    y=`dirname $filename`
-	    touch "$1$y/@$x,$type,$major,$minor"
-	    chmod $mode "$1$y/@$x,$type,$major,$minor"
+	    if [ "-" = "$start" -o "-" = "$inc" -o "-" = "$count" ]; then
+		touch "$1$y/@$x,$type,$major,$minor"
+		chmod $mode "$1$y/@$x,$type,$major,$minor"
+	    else
+		for i in `seq $start $inc $[$start + $count - 1]`; do
+		    touch "$1$y/@$x$i,$type,$major,$[$minor + $i - $start]"
+		    chmod $mode "$1$y/@$x$i,$type,$major,$[$minor + $i - $start]"
+		done
+	    fi
 	    ;;
     esac
 esac

Modified: uClinux/trunk/uClinux-dist/vendors/Digium/S800I/Makefile
URL: http://svn.digium.com/view/aadk/uClinux/trunk/uClinux-dist/vendors/Digium/S800I/Makefile?view=diff&rev=83&r1=82&r2=83
==============================================================================
--- uClinux/trunk/uClinux-dist/vendors/Digium/S800I/Makefile (original)
+++ uClinux/trunk/uClinux-dist/vendors/Digium/S800I/Makefile Wed Dec 27 13:20:24 2006
@@ -14,10 +14,11 @@
 MKFS_YAFFS2 = $(ROOTDIR)/user/blkfin-apps/yaffs-utils/utils/mkyaffs2image
 
 # Blocks must be a multiple of 1024
-BLOCKS   = 12288 # 8192
+#BLOCKS   = 12288 # 8192
+BLOCKS   = 9216
 INODES   = 1024
 
-ROMFS_DIRS = bin dev etc etc/dhcpc home lib mnt proc sys usr var root home tmp /etc/config  var/run var/log var/lock var/lib var/lib/asterisk/static-http var/spool var/spool/asterisk var/spool/asterisk/outgoing
+ROMFS_DIRS = bin dev etc etc/dhcpc ramfs home lib mnt proc sys usr var root home tmp /etc/config  var/run var/log var/lock var/lib var/lib/asterisk/static-http var/spool var/spool/asterisk var/spool/asterisk/outgoing
 #ROMFS_DIRS += var/run var/lib/misc var/log/boa etc/boa home/httpd home/httpd/cgi-bin 
 
 all:
@@ -56,13 +57,31 @@
 	( cd $(ROMFSDIR)/../defaults ; tar cvfz $(ROMFSDIR)/etc/defaults.tgz --exclude .svn * )
 	gzip -dc mini-sounds.tgz | ( cd $(ROMFSDIR)/var/lib/asterisk/sounds ; tar xvf - )
 	echo "$(VERSIONSTR) -- " `date` > $(ROMFSDIR)/etc/version
+	mkdir -p $(IMAGEDIR)
 
 BSS      = $$($(CROSS_COMPILE)objdump -h $(IMAGEDIR)/vmlinux | grep .bss | awk '{print "0x"$$4}')
 BSS_SIZE = $$($(CROSS_COMPILE)objdump -h $(IMAGEDIR)/vmlinux | grep .bss | awk '{print "0x"$$3}')
 ADDR     = $$(echo $$(($(BSS) + $(BSS_SIZE))))
 
 image:
-	mkdir -p $(IMAGEDIR)
+	( \
+		cd $(ROMFSDIR); \
+		mv etc/ ramfs/; \
+		mv var/ ramfs/; \
+		mv tmp/ ramfs/; \
+		$(ROMFSINST) -s ramfs/etc /etc; \
+		$(ROMFSINST) -s ramfs/var /var; \
+		$(ROMFSINST) -s ramfs/tmp /tmp; \
+		$(ROMFSINST) -s ../var/log/log /dev/log; \
+		cd ramfs/; \
+		tar czvf $(ROMFSDIR)/ramfs.tgz etc/ var/ tmp/; \
+		mv etc etc2; \
+		mkdir etc; \
+		cp etc2/rc etc/; \
+		cp etc2/inittab etc/; \
+		rm -r etc2/ var/ tmp/; \
+	)
+
 	rm -rf $(IMAGEDIR)/*
 #
 # make romfs.[fstype] images, and add them to linux(elf file) if possible
@@ -134,4 +153,10 @@
 		rm  $(IMAGEDIR)/vmlinux.bin.gz; \
 	fi
 
+	( \
+		cd $(ROMFSDIR); \
+		rm etc var tmp; \
+		rm -r ramfs/etc; \
+		tar zxf ramfs.tgz; \
+	)
 clean:

Modified: uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc
URL: http://svn.digium.com/view/aadk/uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc?view=diff&rev=83&r1=82&r2=83
==============================================================================
--- uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc (original)
+++ uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc Wed Dec 27 13:20:24 2006
@@ -1,3 +1,9 @@
+mount -t proc none /proc
+
+echo "Settup up ramfs..."
+mount -t ramfs none /ramfs
+( cd / ; gzip -dc ramfs.tgz | tar xf - -C ramfs/ )
+
 echo -n "Reading config..."
 if restore_config; then
 	echo "Done!"
@@ -9,7 +15,6 @@
 export PS1="[\\u@\\h \\w]\$ "
 
 hostname ${HOSTNAME}
-mount -t proc none /proc
 dhcpcd &
 modprobe bfin_cf_pcmcia
 modprobe orinoco_cs



More information about the aadk-commits mailing list