X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=lfs%2Fflash-images;h=e43d53eb27cce5046352bc162f87022da19e689a;hp=8fab6e31af484ff8720b05d84f4b750c4725d245;hb=4a8dc4556aed707286cf3930f57d62362d85a6f8;hpb=9831c245f0955f9b5bdbd46777c5fed427a7f540 diff --git a/lfs/flash-images b/lfs/flash-images index 8fab6e31af..e43d53eb27 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -44,28 +44,25 @@ md5 : ############################################################################### # 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 +SIZEboot := 64 IMGroot := /install/images/rootfs -SIZEroot := 1400 -IMGvar := /install/images/varfs -SIZEvar := 400 +SIZEroot := 600 $(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 images for filesystems - dd bs=1K if=/dev/zero of=$(IMGboot) count=51184 # 50MB-16K + dd bs=1K if=/dev/zero of=$(IMGboot) count=65520 # 64MB-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" @@ -73,8 +70,11 @@ ifeq "$(MACHINE_TYPE)" "arm" else mkfs.ext2 -F $(IMGboot) endif - mkfs.ext2 -F $(IMGroot) - mkfs.ext2 -F $(IMGvar) + mkfs.ext4 -O ^has_journal,extent -F $(IMGroot) + + # Most systems that use Flashimages has no RTC at boot + # so the interval check should disables + tune2fs -i0 $(IMGroot) # Mount Images mount -o loop $(IMGroot) $(MNThdd) @@ -82,7 +82,6 @@ endif 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" @@ -111,8 +110,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 - 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 @@ -127,14 +126,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... - 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 - umount $(MNThdd)/var umount $(MNThdd) # zerofree the ext2 images to get better compression @@ -144,21 +142,18 @@ ifneq "$(MACHINE_TYPE)" "arm" 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 $(IMGpart) $(IMGboot) $(IMGroot) $(IMGvar) > $(IMGinst) + cat $(IMGpart) $(IMGboot) $(IMGroot) > $(IMGinst) # 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 - 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 @@ -185,6 +180,10 @@ ifneq "$(MACHINE_TYPE)" "arm" sed -i -e "s|#serial|serial|g" $(MNThdd)/boot/grub/grub.conf sed -i -e "s|#terminal|terminal|g" $(MNThdd)/boot/grub/grub.conf 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 @@ -205,22 +204,19 @@ ifneq "$(MACHINE_TYPE)" "arm" 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 $(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" - 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 - 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 @@ -237,4 +233,4 @@ endif # Compress Image gzip -f9 $(IMGinsts) - rm -rf $(MNThdd) $(IMGpart) $(IMGboot) $(IMGroot) $(IMGvar) + rm -rf $(MNThdd) $(IMGpart) $(IMGboot) $(IMGroot)