]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
flashimages: switch to single ext4 (wo journal)
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 10 Jun 2012 09:16:57 +0000 (11:16 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 10 Jun 2012 09:16:57 +0000 (11:16 +0200)
also support video out on pandaboard.

config/u-boot/boot.scr
config/u-boot/boot.script
lfs/flash-images
src/initscripts/init.d/fsresize
src/initscripts/init.d/partresize

index bdc4267f6fc38ab56821ed69483b249ee292777a..7174fae82855e49638e6af7bcd03bc8f802e610a 100755 (executable)
Binary files a/config/u-boot/boot.scr and b/config/u-boot/boot.scr differ
index e30615fbf4c14068430c3bbf71171acb08dc3481..6fccbf1351e0c17939d67c9fab342052650f006a 100755 (executable)
@@ -1,4 +1,4 @@
 fatload mmc 0:1 0x80000000 uImage-ipfire-omap
 fatload mmc 0:1 0x81600000 uInit-ipfire-omap
 fatload mmc 0:1 0x80000000 uImage-ipfire-omap
 fatload mmc 0:1 0x81600000 uInit-ipfire-omap
-setenv bootargs vram=32M console=ttyO2,115200n8 rootwait smsc95xx.macaddr=$usbethaddr root=/dev/mmcblk0p3 rw
+setenv bootargs vram=32M console=tty1 omapfb.mode=dvi:800x600MR-16@60 rootwait smsc95xx.macaddr=$usbethaddr root=/dev/mmcblk0p3 rw
 bootm 0x80000000 0x81600000
 bootm 0x80000000 0x81600000
index 4091322a593b926bff9552637a4622226deb93a5..075808b22ade81bc4bcfc9d7bad93728b5ff16f6 100644 (file)
@@ -44,20 +44,18 @@ md5 :
 ###############################################################################
 # Installation Details
 ###############################################################################
 ###############################################################################
 # Installation Details
 ###############################################################################
-IMGinst  := /install/images/$(SNAME)-$(VERSION).2gb-ext2.$(MACHINE)-full-core$(CORE).img
-IMGinsts := /install/images/$(SNAME)-$(VERSION).2gb-ext2-scon.$(MACHINE)-full-core$(CORE).img
+IMGinst  := /install/images/$(SNAME)-$(VERSION).1gb-ext4.$(MACHINE)-full-core$(CORE).img
+IMGinsts := /install/images/$(SNAME)-$(VERSION).1gb-ext4-scon.$(MACHINE)-full-core$(CORE).img
 MNThdd   := /install/harddisk
 IMGpart  := /install/images/part_area
 IMGboot  := /install/images/bootfs
 # don't change SIZEboot this without checking Image size
 SIZEboot := 50
 IMGroot  := /install/images/rootfs
 MNThdd   := /install/harddisk
 IMGpart  := /install/images/part_area
 IMGboot  := /install/images/bootfs
 # don't change SIZEboot this without checking Image size
 SIZEboot := 50
 IMGroot  := /install/images/rootfs
-SIZEroot := 1400
-IMGvar   := /install/images/varfs
-SIZEvar  := 400
+SIZEroot := 600
 
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
-       rm -rf $(MNThdd) $(IMGinst) $(IMGpart) $(IMGboot) $(IMGroot) $(IMGvar) && mkdir -p $(MNThdd)
+       rm -rf $(MNThdd) $(IMGinst) $(IMGpart) $(IMGboot) $(IMGroot) && mkdir -p $(MNThdd)
 
        # Create first 32 sectors of image
        dd bs=1k if=/dev/zero of=$(IMGpart) count=16
 
        # Create first 32 sectors of image
        dd bs=1k if=/dev/zero of=$(IMGpart) count=16
@@ -65,7 +63,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        # Create images for filesystems
        dd bs=1K if=/dev/zero of=$(IMGboot) count=51184  # 50MB-16K
        dd bs=1M if=/dev/zero of=$(IMGroot) count=$(SIZEroot)
        # Create images for filesystems
        dd bs=1K if=/dev/zero of=$(IMGboot) count=51184  # 50MB-16K
        dd bs=1M if=/dev/zero of=$(IMGroot) count=$(SIZEroot)
-       dd bs=1M if=/dev/zero of=$(IMGvar) count=$(SIZEvar)
 
        # Format them
 ifeq "$(MACHINE_TYPE)" "arm"
 
        # Format them
 ifeq "$(MACHINE_TYPE)" "arm"
@@ -73,8 +70,7 @@ ifeq "$(MACHINE_TYPE)" "arm"
 else
        mkfs.ext2 -F $(IMGboot)
 endif
 else
        mkfs.ext2 -F $(IMGboot)
 endif
-       mkfs.ext2 -F $(IMGroot)
-       mkfs.ext2 -F $(IMGvar)
+       mkfs.ext4 -O ^has_journal,extent -F $(IMGroot)
 
        # Mount Images
        mount -o loop $(IMGroot) $(MNThdd)
 
        # Mount Images
        mount -o loop $(IMGroot) $(MNThdd)
@@ -82,7 +78,6 @@ endif
        mkdir $(MNThdd)/var
        mkdir $(MNThdd)/var/log
        mount -o loop $(IMGboot) $(MNThdd)/boot
        mkdir $(MNThdd)/var
        mkdir $(MNThdd)/var/log
        mount -o loop $(IMGboot) $(MNThdd)/boot
-       mount -o loop $(IMGvar)  $(MNThdd)/var
 
        # Install MLO and uboot first
 ifeq "$(MACHINE_TYPE)" "arm"
 
        # Install MLO and uboot first
 ifeq "$(MACHINE_TYPE)" "arm"
@@ -111,8 +106,8 @@ ifeq "$(MACHINE_TYPE)" "arm"
 endif
        sed -i -e "s|DEVICE2|#DEVICE2|g" $(MNThdd)/etc/fstab
        sed -i -e "s|DEVICE3|UUID=$$(blkid -sUUID $(IMGroot) | cut -d'"' -f2)|g" $(MNThdd)/etc/fstab
 endif
        sed -i -e "s|DEVICE2|#DEVICE2|g" $(MNThdd)/etc/fstab
        sed -i -e "s|DEVICE3|UUID=$$(blkid -sUUID $(IMGroot) | cut -d'"' -f2)|g" $(MNThdd)/etc/fstab
-       sed -i -e "s|DEVICE4|UUID=$$(blkid -sUUID $(IMGvar) | cut -d'"' -f2)|g" $(MNThdd)/etc/fstab
-       sed -i -e "s|FSTYPE|ext2|g" $(MNThdd)/etc/fstab
+       sed -i -e "s|DEVICE4|#DEVICE4|g" $(MNThdd)/etc/fstab
+       sed -i -e "s|FSTYPE|ext4|g" $(MNThdd)/etc/fstab
 
 ifneq "$(MACHINE_TYPE)" "arm"
        sed -i -e "s|MOUNT|ro|g" $(MNThdd)/boot/grub/grub.conf
 
 ifneq "$(MACHINE_TYPE)" "arm"
        sed -i -e "s|MOUNT|ro|g" $(MNThdd)/boot/grub/grub.conf
@@ -127,14 +122,13 @@ endif
        # Setup symlink for partresize at first boot...
        ln -sf ../init.d/partresize $(MNThdd)/etc/rc.d/rcsysinit.d/S25partresize
        # Setup symlink for fsresize at second boot...
        # Setup symlink for partresize at first boot...
        ln -sf ../init.d/partresize $(MNThdd)/etc/rc.d/rcsysinit.d/S25partresize
        # Setup symlink for fsresize at second boot...
-       ln -sf ../init.d/fsresize $(MNThdd)/etc/rc.d/rcsysinit.d/S26fsresize
+       ln -sf ../init.d/fsresize $(MNThdd)/etc/rc.d/rcsysinit.d/S42fsresize
 
        # Unmount
        umount $(MNThdd)/proc
        umount $(MNThdd)/dev
        umount $(MNThdd)/sys
        umount $(MNThdd)/boot
 
        # Unmount
        umount $(MNThdd)/proc
        umount $(MNThdd)/dev
        umount $(MNThdd)/sys
        umount $(MNThdd)/boot
-       umount $(MNThdd)/var
        umount $(MNThdd)
 
        # zerofree the ext2 images to get better compression
        umount $(MNThdd)
 
        # zerofree the ext2 images to get better compression
@@ -144,21 +138,18 @@ ifneq "$(MACHINE_TYPE)" "arm"
        fsck.ext2 -f -y $(IMGboot)
 endif
        zerofree $(IMGroot)
        fsck.ext2 -f -y $(IMGboot)
 endif
        zerofree $(IMGroot)
-       -fsck.ext2 -f -y  $(IMGroot)
-       fsck.ext2 -f -y  $(IMGroot)
-       zerofree $(IMGvar)
-       -fsck.ext2 -f -y  $(IMGvar)
-       fsck.ext2 -f -y  $(IMGvar)
+       -fsck.ext4 -f -y  $(IMGroot)
+       fsck.ext4 -f -y  $(IMGroot)
 
        # Cat to an image
 
        # Cat to an image
-       cat $(IMGpart) $(IMGboot) $(IMGroot) $(IMGvar) > $(IMGinst)
+       cat $(IMGpart) $(IMGboot) $(IMGroot) > $(IMGinst)
 
        # Write Partition table
 ifneq "$(MACHINE_TYPE)" "arm"
 
        # Write Partition table
 ifneq "$(MACHINE_TYPE)" "arm"
-       echo -e ",$(SIZEboot),L,*\n,0,0\n,$(SIZEroot),L\n,$(SIZEvar),L\n" \
+       echo -e ",$(SIZEboot),L,*\n,0,0\n,$(SIZEroot),L\n,0,0\n" \
                | sfdisk -D -uM -H 64 -S 32 $(IMGinst)
 else
                | sfdisk -D -uM -H 64 -S 32 $(IMGinst)
 else
-       echo -e ",$(SIZEboot),c,*\n,0,0\n,$(SIZEroot),L\n,$(SIZEvar),L\n" \
+       echo -e ",$(SIZEboot),c,*\n,0,0\n,$(SIZEroot),L\n,0,0\n" \
                | sfdisk -D -uM -H 64 -S 32 $(IMGinst)
 endif
 
                | sfdisk -D -uM -H 64 -S 32 $(IMGinst)
 endif
 
@@ -187,6 +178,8 @@ ifneq "$(MACHINE_TYPE)" "arm"
        sed -i -e "s| panic=10 | console=ttyS0,115200n8 panic=10 |g" $(MNThdd)/boot/grub/grub.conf
 else
        sed -i -e "s| console=tty1 | console=ttyAMA0,115200n8 |g" $(MNThdd)/boot/cmdline.txt
        sed -i -e "s| panic=10 | console=ttyS0,115200n8 panic=10 |g" $(MNThdd)/boot/grub/grub.conf
 else
        sed -i -e "s| console=tty1 | console=ttyAMA0,115200n8 |g" $(MNThdd)/boot/cmdline.txt
+       sed -i -e "s| console=tty1 omapfb.mode=dvi:800x600MR-16@60 | console=ttyO2,115200n8 |g" $(MNThdd)/boot/boot.script
+       cd $(MNThdd)/boot && ./convert_bootscript
 endif
 
        sed -i -e "s|1:2345:respawn:|#1:2345:respawn:|g" $(MNThdd)/etc/inittab
 endif
 
        sed -i -e "s|1:2345:respawn:|#1:2345:respawn:|g" $(MNThdd)/etc/inittab
@@ -207,22 +200,19 @@ ifneq "$(MACHINE_TYPE)" "arm"
        fsck.ext2 -f -y  $(IMGboot)
 endif
        zerofree $(IMGroot)
        fsck.ext2 -f -y  $(IMGboot)
 endif
        zerofree $(IMGroot)
-       -fsck.ext2 -f -y  $(IMGroot)
-       fsck.ext2 -f -y  $(IMGroot)
-       zerofree $(IMGvar)
-       -fsck.ext2 -f -y  $(IMGvar)
-       fsck.ext2 -f -y  $(IMGvar)
+       -fsck.ext4 -f -y  $(IMGroot)
+       fsck.ext4 -f -y  $(IMGroot)
 
        # Cat to an image
 
        # Cat to an image
-       cat $(IMGpart) $(IMGboot) $(IMGroot) $(IMGvar) > $(IMGinsts)
-       rm -vf $(IMGpart) $(IMGboot) $(IMGroot) $(IMGvar)
+       cat $(IMGpart) $(IMGboot) $(IMGroot) > $(IMGinsts)
+       rm -vf $(IMGpart) $(IMGboot) $(IMGroot)
 
        # Write Partition table
 ifneq "$(MACHINE_TYPE)" "arm"
 
        # Write Partition table
 ifneq "$(MACHINE_TYPE)" "arm"
-       echo -e ",$(SIZEboot),L,*\n,0,0\n,$(SIZEroot),L\n,$(SIZEvar),L\n" \
+       echo -e ",$(SIZEboot),L,*\n,0,0\n,$(SIZEroot),L\n,0,0\n" \
                | sfdisk -D -uM -H 64 -S 32 $(IMGinsts)
 else
                | sfdisk -D -uM -H 64 -S 32 $(IMGinsts)
 else
-       echo -e ",$(SIZEboot),c,*\n,0,0\n,$(SIZEroot),L\n,$(SIZEvar),L\n" \
+       echo -e ",$(SIZEboot),c,*\n,0,0\n,$(SIZEroot),L\n,0,0\n" \
                | sfdisk -D -uM -H 64 -S 32 $(IMGinsts)
 endif
 
                | sfdisk -D -uM -H 64 -S 32 $(IMGinsts)
 endif
 
@@ -239,4 +229,4 @@ endif
        # Compress Image
        gzip -f9 $(IMGinsts)
 
        # Compress Image
        gzip -f9 $(IMGinsts)
 
-       rm -rf $(MNThdd) $(IMGpart) $(IMGboot) $(IMGroot) $(IMGvar)
+       rm -rf $(MNThdd) $(IMGpart) $(IMGboot) $(IMGroot)
index 8913eb991e7f831f55cd9162f7f6bff5a661c0ce..3dbd1addd50230fed436e5d919ccc1b7f9ac779b 100644 (file)
@@ -2,11 +2,11 @@
 ########################################################################
 # Begin $rc_base/init.d/fsresize
 #
 ########################################################################
 # Begin $rc_base/init.d/fsresize
 #
-# Description : Resize the /var filesystem
+# Description : Resize the root filesystem in the background
 #
 # Authors     : Arne Fitzenreiter - arne_f@ipfire.org
 #
 #
 # Authors     : Arne Fitzenreiter - arne_f@ipfire.org
 #
-# Version     : 1.00
+# Version     : 1.01
 #
 # Notes       :
 #
 #
 # Notes       :
 #
 
 case "${1}" in
        start)
 
 case "${1}" in
        start)
-               boot_mesg "Mounting root file system in read/write mode ..."
-               mount -o remount,rw / > /dev/null
-               evaluate_retval
-
-               boot_mesg "Autoresize /var partition to use the whole drive ..."
+               boot_mesg "Background Autoresize root partition to use the whole drive"
                # Detect device
                ROOT=`mount | grep -m1 " / " | cut -d" " -f1`;
                DRV=${ROOT::`expr length $ROOT`-1}
                # Detect device
                ROOT=`mount | grep -m1 " / " | cut -d" " -f1`;
                DRV=${ROOT::`expr length $ROOT`-1}
-               boot_mesg " * check filesystem on ${DRV}4 before resize ..."
-               fsck -f -y ${DRV}4
 
 
-               boot_mesg " * resize ${DRV}4 ..."
-               resize2fs -p ${DRV}4
-               evaluate_retval
+               boot_mesg "resize ${DRV}3 ..."
+               nice -n 19 $0 background ${DRV}3 > /dev/null &
+               ;;
+       background)
+               resize2fs -p $2
 
                # Erase symlink, it should run only once
 
                # Erase symlink, it should run only once
-               rm -f /etc/rc.d/rcsysinit.d/S26fsresize
+               rm -f /etc/rc.d/rcsysinit.d/S42fsresize
                sync
                sync
-
                exit 0;
                exit 0;
+
                ;;
                ;;
+
        *)
                echo "Usage: ${0} {start}"
                exit 1
        *)
                echo "Usage: ${0} {start}"
                exit 1
index ae70ff99b85f153e055f2079a6f7acc3009dc8c9..c78c0c52c6ee290dd57a3e0e8bd0d377b90658b5 100644 (file)
@@ -2,11 +2,11 @@
 ########################################################################
 # Begin $rc_base/init.d/partresize
 #
 ########################################################################
 # Begin $rc_base/init.d/partresize
 #
-# Description : Resize the /var partition to the drivesize
+# Description : Resize the root partition to the drivesize
 #
 # Authors     : Arne Fitzenreiter - arne_f@ipfire.org
 #
 #
 # Authors     : Arne Fitzenreiter - arne_f@ipfire.org
 #
-# Version     : 1.00
+# Version     : 1.01
 #
 # Notes       :
 #
 #
 # Notes       :
 #
@@ -30,8 +30,8 @@ case "${1}" in
                        DRV=${ROOT::`expr length $ROOT`-1}
                fi
 
                        DRV=${ROOT::`expr length $ROOT`-1}
                fi
 
-               boot_mesg "Change Partition 4 to all free space ..."
-               echo -e 'd\n4\nn\np\n4\n\n\nw\nq\n' | fdisk ${DRV}
+               boot_mesg "Change Partition $(DRV)3 to all free space ..."
+               echo -e 'd\n3\nn\np\n3\n\n\nw\nq\n' | fdisk ${DRV}
 
                # Erase symlink, it should run only once
                rm -f /etc/rc.d/rcsysinit.d/S25partresize
 
                # Erase symlink, it should run only once
                rm -f /etc/rc.d/rcsysinit.d/S25partresize