]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - lfs/flash-images
flash-image: Increase size of root partition
[ipfire-2.x.git] / lfs / flash-images
index f4558222d6c439db861d3a232925893b5e5f291a..07547966c0fbe6544b0d6131d39914d660623dc3 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2014  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2016  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -75,9 +75,9 @@ else
 endif
 
 # /boot:  64MB - OFFSET
-# /    : 750MB
+# /    : 850MB
 S_BOOT := $(shell echo $$(( 131072 - $(S_OFFSET) )))
-S_ROOT := 1536000
+S_ROOT := 1740800
 
 PADDING = 100 # MB
 
@@ -121,9 +121,14 @@ ifeq "$(MACHINE_TYPE)" "arm"
        cp -v /boot/MLO $(MNThdd)/boot/
        cp -v /boot/u-boot.img $(MNThdd)/boot/
        cp -v /boot/zImage-ipfire-multi $(MNThdd)/boot/
+       cp -v /boot/uInit-ipfire-multi $(MNThdd)/boot/
+       cp -v /boot/uImage-ipfire-kirkwood $(MNThdd)/boot/
+       cp -v /boot/uInit-ipfire-kirkwood $(MNThdd)/boot/
+       cp -v /boot/uEnv.txt $(MNThdd)/boot/
        # work around a u-boot bug not find the folders sometimes
        mkdir -pv $(MNThdd)/boot/dtb-$(KVER)-ipfire-multi
        mkdir -pv $(MNThdd)/boot/dtb-$(KVER)-ipfire-kirkwood
+       
        sync
        umount $(MNThdd)/boot
        mount $(PART_BOOT) $(MNThdd)/boot
@@ -185,13 +190,16 @@ endif
        # Insert the UUID because grub-mkconfig often fails to
        # detect that correctly
        sed -i $(MNThdd)/boot/grub/grub.cfg \
-               -e "s/root=[A-Za-z0-9=-\/]*/root=UUID=$$(blkid -o value -s UUID $(PART_ROOT))/g"
+               -e "s/root=[A-Za-z0-9\/=-]*/root=UUID=$$(blkid -o value -s UUID $(PART_ROOT))/g"
 
        # Install GRUB
-       grub-install --force --recheck --no-floppy \
+       grub-install --force --recheck --no-floppy --target=i386-pc \
                --root-directory=$(MNThdd) $(DEVICE)
 endif
 
+       # Set ramdisk mode to automatic
+       echo RAMDISK_MODE=2 > $(MNThdd)/etc/sysconfig/ramdisk
+
        # Automatically resize the root partition to its maximum size at first boot
        touch $(MNThdd)/.partresize