X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=lfs%2Fflash-images;h=aeaace26e4bae40dff9129b3e53dc5501f31f53b;hb=2404450b403607c9f08745b16b04eaf2bd1dac83;hp=7baec7c2eec6db70299e38d0c50deb372aa9a276;hpb=a24546794d1cecac2b929ce6493f4bda3fbb8a16;p=ipfire-2.x.git diff --git a/lfs/flash-images b/lfs/flash-images index 7baec7c2ee..aeaace26e4 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -79,6 +79,8 @@ endif S_BOOT := $(shell echo $$(( 131072 - $(S_OFFSET) ))) S_ROOT := 1433600 +PADDING = 100 # MB + $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) # Stop if $(MNThdd) is still mounted mountpoint $(MNThdd) && exit 1 || exit 0 @@ -165,7 +167,7 @@ endif ifeq "$(BOOTLOADER)" "grub" ifeq "$(SCON)" "1" # Enable serial console on GRUB - echo "GRUB_TERMINAL=\"serial console\"" >> $(MNThdd)/etc/default/grub + echo "GRUB_TERMINAL=\"serial\"" >> $(MNThdd)/etc/default/grub echo "GRUB_SERIAL_COMMAND=\"serial --unit=0 --speed=115200\"" >> $(MNThdd)/etc/default/grub sed -i -e "s|panic=10|& console=ttyS0,115200n8|g" $(MNThdd)/etc/default/grub @@ -207,6 +209,10 @@ endif kpartx -d -v $(DEVICE) losetup -d $(DEVICE) + # Add padding at the end of the image (to fix alignment issues if the image is + # not copied to a block device) + dd if=/dev/zero bs=1M count=$(PADDING) >> $(IMG) + # Compress Image pigz -f9 < $(IMG) > $(IMAGE_FILE) rm -rf $(IMG) $(MNThdd)