Update of /cvsroot/leaf/src/bering-uclibc4/source/initrd
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv617
Modified Files:
buildtool.cfg buildtool.mk common.cfg root.linuxrc
Added Files:
root.helper
Log Message:
Switched back to tmpfs as root fs. Default size is 40MB.
Index: common.cfg
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc4/source/initrd/common.cfg,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** common.cfg 12 Dec 2010 17:33:10 -0000 1.9
--- common.cfg 20 Jan 2011 22:41:45 -0000 1.10
***************
*** 114,117 ****
--- 114,123 ----
</File>
<File>
+ Source = var/lib/lrpkg/root.helper
+ Filename = var/lib/lrpkg/root.helper
+ Type = binary
+ Permissions = 755
+ </File>
+ <File>
Filename = init
Target = var/lib/lrpkg/root.linuxrc
Index: root.linuxrc
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc4/source/initrd/root.linuxrc,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** root.linuxrc 18 Nov 2010 22:50:28 -0000 1.16
--- root.linuxrc 20 Jan 2011 22:41:45 -0000 1.17
***************
*** 15,18 ****
--- 15,20 ----
# Modified Eric Wolzak april 2002 for cdrom, module loading
# Major changes by Charles Steinkuehler, Mar. 2004
+ # Major changes due migration to 2.6 kernel by Andrew Denisenko, Mar.-Oct.
2010
+ # Switch back to root in tmpfs by Andrew Denisenko, Jan. 2011
#
***************
*** 24,28 ****
# **** Adjust if needed ****
! #DEF_syst_size=16M # Size of root partition
DEF_log_size=3M # Size of /var/log partition
usb_wait=1 # Wait time in sec. for USB drive
--- 26,30 ----
# **** Adjust if needed ****
! DEF_syst_size=40M # Size of root partition
DEF_log_size=3M # Size of /var/log partition
usb_wait=1 # Wait time in sec. for USB drive
***************
*** 172,176 ****
# Set config variables, falling back to defaults
! for i in LRP PKGPATH CONFIGDB MODDB tmp_size log_size ; do
eval $i=\"\${$i:-\${KCMD_$i:-\$DEF_$i}}\"
done
--- 174,178 ----
# Set config variables, falling back to defaults
! for i in LRP PKGPATH CONFIGDB MODDB tmp_size syst_size log_size ; do
eval $i=\"\${$i:-\${KCMD_$i:-\$DEF_$i}}\"
done
***************
*** 349,358 ****
# qt umount /proc
- [ ! $VERBOSE ] && rm /linuxrc.err
-
Lecho "Loaded Packages"
#exec /usr/sbin/chroot . sh -c 'umount /initrd; freeramdisk /dev/ram0; exec
/sbin/init' <dev/console >dev/console 2>&1
! exec /sbin/init
exit 0
--- 351,384 ----
# qt umount /proc
Lecho "Loaded Packages"
#exec /usr/sbin/chroot . sh -c 'umount /initrd; freeramdisk /dev/ram0; exec
/sbin/init' <dev/console >dev/console 2>&1
! #exec /sbin/init
!
! [ "$VERBOSE" ] && Lecho "Creating new rootfs..."
! mkdir /newroot
! qt mount -t tmpfs root /newroot -o size=$syst_size
! mkdir /newroot/tmp
! mkdir -p /newroot/var/log
! qt mount -t tmpfs tmpfs /newroot/tmp -o defaults${tmp_size:+,size=$tmp_size}
! qt mount -t tmpfs tmpfs /newroot/var/log -o size=$log_size
!
! for i in `ls /`; do
! case $i in
! proc) ;;
! sys) ;;
! newroot) ;;
! *) cp -a $i /newroot ;;
! esac
! done
! qt umount /tmp
! qt umount /var/log
!
! [ "$VERBOSE" ] && Lecho "Switch_root into new rootfs..."
!
! [ ! $VERBOSE ] && rm /linuxrc.err
!
! umount /sys /proc
! exec switch_root -c /dev/console /newroot /var/lib/lrpkg/root.helper
exit 0
Index: buildtool.cfg
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc4/source/initrd/buildtool.cfg,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** buildtool.cfg 6 Nov 2010 22:06:34 -0000 1.9
--- buildtool.cfg 20 Jan 2011 22:41:45 -0000 1.10
***************
*** 23,26 ****
--- 23,32 ----
</File>
+ <File root.helper>
+ Server = cvs4-sourceforge
+ Revision = HEAD
+ Directory = initrd
+ </File>
+
<File README>
Server = cvs4-sourceforge
Index: buildtool.mk
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc4/source/initrd/buildtool.mk,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** buildtool.mk 31 Oct 2010 23:11:43 -0000 1.15
--- buildtool.mk 20 Jan 2011 22:41:45 -0000 1.16
***************
*** 31,34 ****
--- 31,35 ----
cp -a README $(INITRD_TARGET_DIR)/boot/etc
cp -a root.linuxrc $(INITRD_TARGET_DIR)/var/lib/lrpkg
+ cp -a root.helper $(INITRD_TARGET_DIR)/var/lib/lrpkg
cp -a $(INITRD_TARGET_DIR)/* $(BT_STAGING_DIR)
touch $(INITRD_DIR)/.build
--- NEW FILE: root.helper ---
#!/bin/busybox sh
#
# Helper for switch_root
# Mounts /proc and /sys after switch_root and calls init
#
# Copyright Andrew Denisenko - LRP GPL2
mkdir /proc
mount -nt proc /proc /proc
mkdir /sys
mount -nt sysfs sysfs /sys
exec /sbin/init
exit 0
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits