]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - lfs/flash-images
Revert "core123: Ship updated usbutils"
[ipfire-2.x.git] / lfs / flash-images
index 57d600cf0cd2ea42ffbd4907b5a34266246b48eb..40aca53770481b766795b6c683d176163eadbe60 100644 (file)
@@ -33,7 +33,7 @@ DEVICE     = $(shell losetup -f)
 PART_BOOT  = /dev/mapper/$(patsubst /dev/%,%,$(DEVICE))p1
 PART_ROOT  = /dev/mapper/$(patsubst /dev/%,%,$(DEVICE))p3
 
-IMAGE_FILE = /install/images/$(SNAME)-$(VERSION).2gb-ext4.$(BUILD_ARCH)-full-core$(CORE).img.gz
+IMAGE_FILE = /install/images/$(SNAME)-$(VERSION).2gb-ext4.$(BUILD_ARCH)-full-core$(CORE).img.xz
 
 FSTAB_FMT = UUID=%s %-8s %-4s %-10s %d %d\n
 
@@ -70,9 +70,9 @@ else
  PART_TYPE = L
 endif
 
-# /boot:  100MB - OFFSET
+# /boot:  128MB - OFFSET
 # /    : 1200 MB
-S_BOOT := $(shell echo $$(( 204800 - $(S_OFFSET) )))
+S_BOOT := $(shell echo $$(( 262144 - $(S_OFFSET) )))
 S_ROOT := 2477600
 
 PADDING = 100 # MB
@@ -114,7 +114,7 @@ endif
        mount $(PART_BOOT) $(MNThdd)/boot
 
        # Install Pandaboard MLO and uboot first
-ifeq "$(BUILD_PLATFORM)" "arm"
+ifeq "$(BUILD_ARCH)" "armv5tel"
        cp -v /boot/MLO $(MNThdd)/boot/
        cp -v /boot/u-boot.img $(MNThdd)/boot/
        sync
@@ -128,10 +128,6 @@ ifneq "$(BUILD_PLATFORM)" "arm"
 else
        tar -x -C $(MNThdd)/ -f /install/cdrom/distro.img
 endif
-       echo "LANGUAGE=en" >> $(MNThdd)/var/ipfire/main/settings
-       echo "HOSTNAME=$(SNAME)" >> $(MNThdd)/var/ipfire/main/settings
-       echo "THEME=ipfire" >> $(MNThdd)/var/ipfire/main/settings
-
        -touch $(MNThdd)/lib/modules/$(KVER)-ipfire/modules.dep
        mkdir $(MNThdd)/proc
        mount --bind /proc $(MNThdd)/proc
@@ -153,7 +149,6 @@ ifeq "$(BOOTLOADER)" "grub"
        # Enable also serial console on GRUB
        echo "GRUB_TERMINAL=\"serial console\"" >> $(MNThdd)/etc/default/grub
        echo "GRUB_SERIAL_COMMAND=\"serial --unit=0 --speed=115200\"" >> $(MNThdd)/etc/default/grub
-       echo "GRUB_TIMEOUT=-1" >> $(MNThdd)/etc/default/grub
 
        # Add additional entry for Serial console
        cp $(DIR_SRC)/config/flash-images/grub/11_linux_scon \
@@ -163,6 +158,9 @@ ifeq "$(BOOTLOADER)" "grub"
        mkdir -pv $(MNThdd)/boot/grub
        chroot $(MNThdd) grub-mkconfig -o /boot/grub/grub.cfg
 
+       # Boot the first kernel by default
+       chroot $(MNThdd) grub-set-default 0
+
        # Insert the UUID because grub-mkconfig often fails to
        # detect that correctly
        sed -i $(MNThdd)/boot/grub/grub.cfg \
@@ -208,11 +206,11 @@ endif
        # not copied to a block device)
        dd if=/dev/zero bs=1M count=$(PADDING) >> $(IMG)
 
-ifeq "$(BUILD_PLATFORM)" "arm"
+ifeq "$(BUILD_ARCH)" "armv5tel"
        # Install u-boot for Orangepi Zero/Nanopi DUO into image 8KB
        dd if=/usr/share/u-boot/orangepi_zero/u-boot-sunxi-with-spl.bin of=$(IMG) bs=1K seek=8 conv=notrunc
 endif
 
        # Compress Image
-       pigz -f9 < $(IMG) > $(IMAGE_FILE)
+       xz $(XZ_OPT) < $(IMG) > $(IMAGE_FILE)
        rm -rf $(IMG) $(MNThdd)