瀏覽代碼

apm821xx: sata: boot-part feature integration

This patch adds the boot-part feature to the apm82181 sata target.
This makes it possible to configure the boot partition size with
the generic CONFIG_TARGET_KERNEL_PARTSIZE symbol.

Please note: For people using custom images: Just like with
CONFIG_TARGET_ROOTFS_PARTSIZE changing the value can cause
sysupgrade to repartition the device!

Signed-off-by: Christian Lamparter <[email protected]>
Christian Lamparter 6 年之前
父節點
當前提交
257de1b01f
共有 3 個文件被更改,包括 6 次插入4 次删除
  1. 1 0
      config/Config-images.in
  2. 4 3
      target/linux/apm821xx/image/Makefile
  3. 1 1
      target/linux/apm821xx/sata/target.mk

+ 1 - 0
config/Config-images.in

@@ -269,6 +269,7 @@ menu "Target Images"
 	config TARGET_KERNEL_PARTSIZE
 		int "Kernel partition size (in MB)"
 		depends on GRUB_IMAGES || USES_BOOT_PART
+		default 8 if TARGET_apm821xx_sata
 		default 16
 
 	config TARGET_ROOTFS_PARTSIZE

+ 4 - 3
target/linux/apm821xx/image/Makefile

@@ -15,7 +15,9 @@ define Build/boot-img
 	$(CP) $(IMAGE_KERNEL).dtb [email protected]/boot/$(DEVICE_DTB)
 	$(CP) $(IMAGE_KERNEL) [email protected]/boot/uImage
 
-	genext2fs --block-size $(BLOCKSIZE:%k=%Ki) --size-in-blocks $$((1024 * $(BOOT_SIZE))) --root [email protected] [email protected]
+	genext2fs --block-size $(BLOCKSIZE:%k=%Ki) \
+		--size-in-blocks $$((1024 * $(CONFIG_TARGET_KERNEL_PARTSIZE))) \
+		--root [email protected] [email protected]
 
 	# convert it to revision 1 - needed for u-boot ext2load
 	$(STAGING_DIR_HOST)/bin/tune2fs -O filetype [email protected]
@@ -49,7 +51,7 @@ define Build/export-dtb
 endef
 
 define Build/hdd-img
-	./mbl_gen_hdd_img.sh $@ [email protected] $(IMAGE_ROOTFS) $(BOOT_SIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
+	./mbl_gen_hdd_img.sh $@ [email protected] $(IMAGE_ROOTFS) $(CONFIG_TARGET_KERNEL_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
 endef
 
 define Build/MerakiAdd-dtb
@@ -230,7 +232,6 @@ define Device/wd_mybooklive
   DTB_SIZE := 16384
   KERNEL := kernel-bin | dtb | gzip | uImage gzip
   KERNEL_INITRAMFS := kernel-bin | gzip | dtb | MuImage-initramfs gzip
-  BOOT_SIZE := 8
   IMAGES := factory.img.gz kernel.dtb sysupgrade.img.gz
   ARTIFACTS := kernel.dtb
   DEVICE_DTB := apollo3g.dtb

+ 1 - 1
target/linux/apm821xx/sata/target.mk

@@ -1,5 +1,5 @@
 BOARDNAME := Devices which boot from SATA (NAS)
-FEATURES += ext4 usb ramdisk squashfs rootfs-part
+FEATURES += ext4 usb ramdisk squashfs rootfs-part boot-part
 DEFAULT_PACKAGES += badblocks block-mount e2fsprogs \
 		    kmod-dm kmod-md-mod partx-utils mkf2fs f2fsck