|
@@ -19,12 +19,6 @@ define Build/dtb
|
|
$(call Image/BuildDTB,$(DTS_DIR)/$(DEVICE_DTS).dts,[email protected])
|
|
$(call Image/BuildDTB,$(DTS_DIR)/$(DEVICE_DTS).dts,[email protected])
|
|
endef
|
|
endef
|
|
|
|
|
|
-# SD-Card Images:
|
|
|
|
-# these values are optimized for a 4GB labeled sdcard that actually holds 7744512 sectors of 512 byte
|
|
|
|
-# MBR: 2048 sectors
|
|
|
|
-# Partition 1: 32768 sectors
|
|
|
|
-# Partition 2: 98304 sectors (configurable)
|
|
|
|
-
|
|
|
|
define Build/boot-scr
|
|
define Build/boot-scr
|
|
rm -f [email protected]
|
|
rm -f [email protected]
|
|
sed -e 's#@ROOT@#$(SIGNATURE)#g' \
|
|
sed -e 's#@ROOT@#$(SIGNATURE)#g' \
|
|
@@ -34,7 +28,7 @@ endef
|
|
|
|
|
|
define Build/boot-img
|
|
define Build/boot-img
|
|
rm -f [email protected]
|
|
rm -f [email protected]
|
|
- mkfs.fat -C [email protected] 16384
|
|
|
|
|
|
+ mkfs.fat -C [email protected] $$(( $(CONFIG_TARGET_KERNEL_PARTSIZE) * 1024 ))
|
|
$(foreach dts,$(DEVICE_DTS), mcopy -i [email protected] $(DTS_DIR)/$(dts).dtb ::$(dts).dtb;)
|
|
$(foreach dts,$(DEVICE_DTS), mcopy -i [email protected] $(DTS_DIR)/$(dts).dtb ::$(dts).dtb;)
|
|
mcopy -i [email protected] $(IMAGE_KERNEL) ::$(KERNEL_NAME)
|
|
mcopy -i [email protected] $(IMAGE_KERNEL) ::$(KERNEL_NAME)
|
|
-mcopy -i [email protected] [email protected] ::boot.scr
|
|
-mcopy -i [email protected] [email protected] ::boot.scr
|
|
@@ -46,26 +40,28 @@ define Build/boot-img-ext4
|
|
$(foreach dts,$(DEVICE_DTS), $(CP) $(DTS_DIR)/$(dts).dtb [email protected];)
|
|
$(foreach dts,$(DEVICE_DTS), $(CP) $(DTS_DIR)/$(dts).dtb [email protected];)
|
|
$(CP) $(IMAGE_KERNEL) [email protected]/$(KERNEL_NAME)
|
|
$(CP) $(IMAGE_KERNEL) [email protected]/$(KERNEL_NAME)
|
|
-$(CP) [email protected] [email protected]/boot.scr
|
|
-$(CP) [email protected] [email protected]/boot.scr
|
|
- make_ext4fs -J -l 16384K [email protected] [email protected]
|
|
|
|
|
|
+ make_ext4fs -J -l $(CONFIG_TARGET_KERNEL_PARTSIZE)M [email protected] [email protected]
|
|
endef
|
|
endef
|
|
|
|
|
|
define Build/sdcard-img
|
|
define Build/sdcard-img
|
|
if [ -n "$(UBOOT)" ]; then UBOOT="$(STAGING_DIR_IMAGE)/$(UBOOT)"; fi; \
|
|
if [ -n "$(UBOOT)" ]; then UBOOT="$(STAGING_DIR_IMAGE)/$(UBOOT)"; fi; \
|
|
|
|
+ BOOTFS_SIZE=$$(( $(CONFIG_TARGET_KERNEL_PARTSIZE) * 1024 * 2 )); \
|
|
ROOTFS_SIZE=$$(( $(CONFIG_TARGET_ROOTFS_PARTSIZE) * 1024 * 2 )); \
|
|
ROOTFS_SIZE=$$(( $(CONFIG_TARGET_ROOTFS_PARTSIZE) * 1024 * 2 )); \
|
|
SIGNATURE="$(SIGNATURE)" \
|
|
SIGNATURE="$(SIGNATURE)" \
|
|
./gen_mvebu_sdcard_img.sh $@ \
|
|
./gen_mvebu_sdcard_img.sh $@ \
|
|
$$UBOOT \
|
|
$$UBOOT \
|
|
- c 32768 [email protected] \
|
|
|
|
|
|
+ c $$BOOTFS_SIZE [email protected] \
|
|
83 $$ROOTFS_SIZE $(IMAGE_ROOTFS)
|
|
83 $$ROOTFS_SIZE $(IMAGE_ROOTFS)
|
|
endef
|
|
endef
|
|
|
|
|
|
define Build/sdcard-img-ext4
|
|
define Build/sdcard-img-ext4
|
|
if [ -n "$(UBOOT)" ]; then UBOOT="$(STAGING_DIR_IMAGE)/$(UBOOT)"; fi; \
|
|
if [ -n "$(UBOOT)" ]; then UBOOT="$(STAGING_DIR_IMAGE)/$(UBOOT)"; fi; \
|
|
|
|
+ BOOTFS_SIZE=$$(( $(CONFIG_TARGET_KERNEL_PARTSIZE) * 1024 * 2 )); \
|
|
ROOTFS_SIZE=$$(( $(CONFIG_TARGET_ROOTFS_PARTSIZE) * 1024 * 2 )); \
|
|
ROOTFS_SIZE=$$(( $(CONFIG_TARGET_ROOTFS_PARTSIZE) * 1024 * 2 )); \
|
|
SIGNATURE="$(SIGNATURE)" \
|
|
SIGNATURE="$(SIGNATURE)" \
|
|
./gen_mvebu_sdcard_img.sh $@ \
|
|
./gen_mvebu_sdcard_img.sh $@ \
|
|
$$UBOOT \
|
|
$$UBOOT \
|
|
- 83 32768 [email protected] \
|
|
|
|
|
|
+ 83 $$BOOTFS_SIZE [email protected] \
|
|
83 $$ROOTFS_SIZE $(IMAGE_ROOTFS)
|
|
83 $$ROOTFS_SIZE $(IMAGE_ROOTFS)
|
|
endef
|
|
endef
|
|
|
|
|