|
|
@ -3,7 +3,7 @@ |
|
|
|
#
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
MKFSFLAGS = -U -D $(BUILD_DIR)/devtable-$(BOXSERIES).txt -r $(ROOTFS) |
|
|
|
MKFSFLAGS = -U -D $(BUILD_DIR)/devtable-$(BOXSERIES).txt -r $(ROOTFS_DIR) |
|
|
|
ifeq ($(BOXSERIES),hd1) |
|
|
|
MKFSFLAGS += -p |
|
|
|
endif |
|
|
@ -81,7 +81,7 @@ endif |
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
flash-image-coolstream: IMAGE_DATE=$(shell cat $(ROOTFS)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-) |
|
|
|
flash-image-coolstream: IMAGE_DATE=$(shell cat $(ROOTFS_DIR)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-) |
|
|
|
flash-image-coolstream: | $(IMAGE_DIR) |
|
|
|
make devtable |
|
|
|
mkfs.jffs2 -e $(ERASE_SIZE) $(MKFSFLAGS) -o $(IMAGE_DIR)/$(IMAGE_NAME).img |
|
|
@ -119,13 +119,13 @@ endif |
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
flash-image-hd5x: IMAGE_DATE=$(shell cat $(ROOTFS)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-) |
|
|
|
flash-image-hd5x: IMAGE_DATE=$(shell cat $(ROOTFS_DIR)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-) |
|
|
|
flash-image-hd5x: | $(IMAGE_DIR) |
|
|
|
rm -rf $(IMAGE_BUILD_DIR) |
|
|
|
$(INSTALL) -d $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR) |
|
|
|
cp $(KERNEL_ZIMAGE_DTB) $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/kernel.bin |
|
|
|
$(CD) $(ROOTFS); \
|
|
|
|
tar -cvf $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar -C $(ROOTFS) . >/dev/null 2>&1; \
|
|
|
|
$(CD) $(ROOTFS_DIR); \
|
|
|
|
tar -cvf $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar -C $(ROOTFS_DIR) . >/dev/null 2>&1; \
|
|
|
|
bzip2 $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar |
|
|
|
# Create minimal image |
|
|
|
$(CD) $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR); \
|
|
|
@ -154,45 +154,68 @@ BOOT_PARTITION_SIZE = 3072 |
|
|
|
KERNEL_PARTITION_OFFSET = "$(shell expr $(IMAGE_ROOTFS_ALIGNMENT) \+ $(BOOT_PARTITION_SIZE))" |
|
|
|
KERNEL_PARTITION_SIZE = 8192 |
|
|
|
|
|
|
|
ALL_KERNEL_PARTITION_SIZE = $(shell expr 4 \* $(KERNEL_PARTITION_SIZE)) |
|
|
|
|
|
|
|
SWAP_PARTITION_SIZE = 262144 |
|
|
|
|
|
|
|
# just needed for MULTI_ROOTFS_PARTITION_SIZE; STORAGE_PARTITION uses remaining flash memory
|
|
|
|
STORAGE_PARTITION_SIZE = 262144 |
|
|
|
|
|
|
|
ROOTFS_PARTITION_OFFSET = "$(shell expr $(KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE))" |
|
|
|
ROOTFS_PARTITION_SIZE = 1048576 |
|
|
|
ifeq ($(IMAGE_LAYOUT),subdirboot) |
|
|
|
ROOTFS_PARTITION_SIZE = 1048576 |
|
|
|
|
|
|
|
SECOND_KERNEL_PARTITION_OFFSET = "$(shell expr $(ROOTFS_PARTITION_OFFSET) \+ $(ROOTFS_PARTITION_SIZE))" |
|
|
|
THIRD_KERNEL_PARTITION_OFFSET = "$(shell expr $(SECOND_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE))" |
|
|
|
FOURTH_KERNEL_PARTITION_OFFSET = "$(shell expr $(THIRD_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE))" |
|
|
|
SECOND_KERNEL_PARTITION_OFFSET = "$(shell expr $(ROOTFS_PARTITION_OFFSET) \+ $(ROOTFS_PARTITION_SIZE))" |
|
|
|
THIRD_KERNEL_PARTITION_OFFSET = "$(shell expr $(SECOND_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE))" |
|
|
|
FOURTH_KERNEL_PARTITION_OFFSET = "$(shell expr $(THIRD_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE))" |
|
|
|
|
|
|
|
LINUX_SWAP_PARTITION_OFFSET = "$(shell expr $(FOURTH_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE))" |
|
|
|
LINUX_SWAP_PARTITION_SIZE = 262144 |
|
|
|
SWAP_PARTITION_OFFSET = "$(shell expr $(FOURTH_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE))" |
|
|
|
|
|
|
|
# USERDATA_PARTITION values
|
|
|
|
MULTI_ROOTFS_PARTITION_OFFSET = "$(shell expr $(LINUX_SWAP_PARTITION_OFFSET) \+ $(LINUX_SWAP_PARTITION_SIZE))" |
|
|
|
MULTI_ROOTFS_PARTITION_SIZE = 2206720 # 2731008 - 262144 - 262144 |
|
|
|
# USERDATA_PARTITION values |
|
|
|
MULTI_ROOTFS_PARTITION_OFFSET = "$(shell expr $(SWAP_PARTITION_OFFSET) \+ $(SWAP_PARTITION_SIZE))" |
|
|
|
MULTI_ROOTFS_PARTITION_SIZE = $(shell expr $(EMMC_IMAGE_SIZE) \- $(BLOCK_SECTOR) \* $(IMAGE_ROOTFS_ALIGNMENT) \- $(BOOT_PARTITION_SIZE) \- $(ALL_KERNEL_SIZE) \- $(SWAP_PARTITION_SIZE) \- $(ROOTFS_PARTITION_SIZE) \- $(STORAGE_PARTITION_SIZE)) |
|
|
|
|
|
|
|
STORAGE_PARTITION_OFFSET = "$(shell expr $(MULTI_ROOTFS_PARTITION_OFFSET) \+ $(MULTI_ROOTFS_PARTITION_SIZE))" |
|
|
|
else |
|
|
|
ROOTFS_PARTITION_SIZE = 768000 |
|
|
|
|
|
|
|
STORAGE_PARTITION_OFFSET = "$(shell expr $(MULTI_ROOTFS_PARTITION_OFFSET) \+ $(MULTI_ROOTFS_PARTITION_SIZE))" |
|
|
|
#STORAGE_PARTITION_SIZE = 262144 # remaining flash memory
|
|
|
|
SECOND_KERNEL_PARTITION_OFFSET = $(shell expr $(ROOTFS_PARTITION_OFFSET) \+ $(ROOTFS_PARTITION_SIZE)) |
|
|
|
SECOND_ROOTFS_PARTITION_OFFSET = $(shell expr $(SECOND_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) |
|
|
|
|
|
|
|
THIRD_KERNEL_PARTITION_OFFSET = $(shell expr $(SECOND_ROOTFS_PARTITION_OFFSET) \+ $(ROOTFS_PARTITION_SIZE)) |
|
|
|
THIRD_ROOTFS_PARTITION_OFFSET = $(shell expr $(THIRD_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) |
|
|
|
|
|
|
|
FOURTH_KERNEL_PARTITION_OFFSET = $(shell expr $(THIRD_ROOTFS_PARTITION_OFFSET) \+ $(ROOTFS_PARTITION_SIZE)) |
|
|
|
FOURTH_ROOTFS_PARTITION_OFFSET = $(shell expr $(FOURTH_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) |
|
|
|
|
|
|
|
SWAP_PARTITION_OFFSET = $(shell expr $(FOURTH_ROOTFS_PARTITION_OFFSET) \+ $(ROOTFS_PARTITION_SIZE)) |
|
|
|
|
|
|
|
STORAGE_PARTITION_OFFSET = $(shell expr $(SWAP_PARTITION_OFFSET) \+ $(SWAP_PARTITION_SIZE)) |
|
|
|
endif |
|
|
|
|
|
|
|
flash-image-hd5x-multi: | $(IMAGE_DIR) |
|
|
|
rm -rf $(IMAGE_BUILD_DIR) |
|
|
|
$(INSTALL) -d $(IMAGE_BUILD_DIR) |
|
|
|
# Create a sparse image block |
|
|
|
dd if=/dev/zero of=$(IMAGE_BUILD_DIR)/$(HD5X_IMAGE_LINK) seek=$(shell expr $(ROOTFS_PARTITION_SIZE) \* $(BLOCK_SECTOR)) count=0 bs=$(BLOCK_SIZE) |
|
|
|
mkfs.ext4 -v -F $(IMAGE_BUILD_DIR)/$(HD5X_IMAGE_LINK) -d $(ROOTFS)/.. |
|
|
|
mkfs.ext4 -v -F $(IMAGE_BUILD_DIR)/$(HD5X_IMAGE_LINK) -d $(ROOTFS_BASE) |
|
|
|
# Error codes 0-3 indicate successfull operation of fsck (no errors or errors corrected) |
|
|
|
fsck.ext4 -pvfD $(IMAGE_BUILD_DIR)/$(HD5X_IMAGE_LINK) || [ $? -le 3 ] |
|
|
|
dd if=/dev/zero of=$(EMMC_IMAGE) bs=$(BLOCK_SIZE) count=0 seek=$(shell expr $(EMMC_IMAGE_SIZE) \* $(BLOCK_SECTOR)) |
|
|
|
parted -s $(EMMC_IMAGE) mklabel gpt |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart boot fat16 $(IMAGE_ROOTFS_ALIGNMENT) $(shell expr $(IMAGE_ROOTFS_ALIGNMENT) \+ $(BOOT_PARTITION_SIZE)) |
|
|
|
ifeq ($(IMAGE_LAYOUT),subdirboot) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart linuxkernel $(KERNEL_PARTITION_OFFSET) $(shell expr $(KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart linuxrootfs ext4 $(ROOTFS_PARTITION_OFFSET) $(shell expr $(ROOTFS_PARTITION_OFFSET) \+ $(ROOTFS_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart linuxkernel2 $(SECOND_KERNEL_PARTITION_OFFSET) $(shell expr $(SECOND_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart linuxkernel3 $(THIRD_KERNEL_PARTITION_OFFSET) $(shell expr $(THIRD_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart linuxkernel4 $(FOURTH_KERNEL_PARTITION_OFFSET) $(shell expr $(FOURTH_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart swap linux-swap $(LINUX_SWAP_PARTITION_OFFSET) $(shell expr $(LINUX_SWAP_PARTITION_OFFSET) \+ $(LINUX_SWAP_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart swap linux-swap $(SWAP_PARTITION_OFFSET) $(shell expr $(SWAP_PARTITION_OFFSET) \+ $(SWAP_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart userdata ext4 $(MULTI_ROOTFS_PARTITION_OFFSET) $(shell expr $(MULTI_ROOTFS_PARTITION_OFFSET) \+ $(MULTI_ROOTFS_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart storage ext4 $(STORAGE_PARTITION_OFFSET) 100% |
|
|
|
dd if=/dev/zero of=$(IMAGE_BUILD_DIR)/$(HD5X_BOOT_IMAGE) bs=$(BLOCK_SIZE) count=$(shell expr $(BOOT_PARTITION_SIZE) \* $(BLOCK_SECTOR)) |
|
|
|
mkfs.msdos -S 512 $(IMAGE_BUILD_DIR)/$(HD5X_BOOT_IMAGE) |
|
|
|
ifeq ($(BOXMODEL), e4hdultra) |
|
|
|
ifeq ($(BOXMODEL),e4hdultra) |
|
|
|
echo "boot emmcflash0.linuxkernel 'brcm_cma=504M@264M brcm_cma=192M@768M brcm_cma=1024M@2048M root=/dev/mmcblk0p3 rootsubdir=linuxrootfs1 kernel=/dev/mmcblk0p2 rw rootwait $(BOXMODEL)_4.boxmode=5'" > $(IMAGE_BUILD_DIR)/STARTUP |
|
|
|
echo "boot emmcflash0.linuxkernel 'brcm_cma=504M@264M brcm_cma=192M@768M brcm_cma=1024M@2048M root=/dev/mmcblk0p3 rootsubdir=linuxrootfs1 kernel=/dev/mmcblk0p2 rw rootwait $(BOXMODEL)_4.boxmode=5'" > $(IMAGE_BUILD_DIR)/STARTUP_1 |
|
|
|
echo "boot emmcflash0.linuxkernel2 'brcm_cma=504M@264M brcm_cma=192M@768M brcm_cma=1024M@2048M root=/dev/mmcblk0p8 rootsubdir=linuxrootfs2 kernel=/dev/mmcblk0p4 rw rootwait $(BOXMODEL)_4.boxmode=5'" > $(IMAGE_BUILD_DIR)/STARTUP_2 |
|
|
@ -204,6 +227,33 @@ else |
|
|
|
echo "boot emmcflash0.linuxkernel2 'root=/dev/mmcblk0p8 rootsubdir=linuxrootfs2 kernel=/dev/mmcblk0p4 rw rootwait $(BOXMODEL)_4.boxmode=1'" > $(IMAGE_BUILD_DIR)/STARTUP_2 |
|
|
|
echo "boot emmcflash0.linuxkernel3 'root=/dev/mmcblk0p8 rootsubdir=linuxrootfs3 kernel=/dev/mmcblk0p5 rw rootwait $(BOXMODEL)_4.boxmode=1'" > $(IMAGE_BUILD_DIR)/STARTUP_3 |
|
|
|
echo "boot emmcflash0.linuxkernel4 'root=/dev/mmcblk0p8 rootsubdir=linuxrootfs4 kernel=/dev/mmcblk0p6 rw rootwait $(BOXMODEL)_4.boxmode=1'" > $(IMAGE_BUILD_DIR)/STARTUP_4 |
|
|
|
endif |
|
|
|
else # ($(IMAGE_LAYOUT),single)
|
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart kernel1 $(KERNEL_PARTITION_OFFSET) $(shell expr $(KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart rootfs1 ext4 $(ROOTFS_PARTITION_OFFSET) $(shell expr $(ROOTFS_PARTITION_OFFSET) \+ $(ROOTFS_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart kernel2 $(SECOND_KERNEL_PARTITION_OFFSET) $(shell expr $(SECOND_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart rootfs2 ext4 $(SECOND_ROOTFS_PARTITION_OFFSET) $(shell expr $(SECOND_ROOTFS_PARTITION_OFFSET) \+ $(ROOTFS_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart kernel3 $(THIRD_KERNEL_PARTITION_OFFSET) $(shell expr $(THIRD_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart rootfs3 ext4 $(THIRD_ROOTFS_PARTITION_OFFSET) $(shell expr $(THIRD_ROOTFS_PARTITION_OFFSET) \+ $(ROOTFS_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart kernel4 $(FOURTH_KERNEL_PARTITION_OFFSET) $(shell expr $(FOURTH_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart rootfs4 ext4 $(FOURTH_ROOTFS_PARTITION_OFFSET) $(shell expr $(FOURTH_ROOTFS_PARTITION_OFFSET) \+ $(ROOTFS_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart swap linux-swap $(SWAP_PARTITION_OFFSET) $(shell expr $(SWAP_PARTITION_OFFSET) \+ $(SWAP_PARTITION_SIZE)) |
|
|
|
parted -s $(EMMC_IMAGE) unit KiB mkpart storage ext4 $(STORAGE_PARTITION_OFFSET) 100% |
|
|
|
dd if=/dev/zero of=$(IMAGE_BUILD_DIR)/$(HD5X_BOOT_IMAGE) bs=$(BLOCK_SIZE) count=$(shell expr $(BOOT_PARTITION_SIZE) \* $(BLOCK_SECTOR)) |
|
|
|
mkfs.msdos -S 512 $(IMAGE_BUILD_DIR)/$(HD5X_BOOT_IMAGE) |
|
|
|
ifeq ($(BOXMODEL),e4hdultra) |
|
|
|
echo "boot emmcflash0.kernel1 'brcm_cma=504M@264M brcm_cma=192M@768M brcm_cma=1024M@2048M root=/dev/mmcblk0p3 rw rootwait $(BOXMODEL)_4.boxmode=5'" > $(IMAGE_BUILD_DIR)/STARTUP |
|
|
|
echo "boot emmcflash0.kernel1 'brcm_cma=504M@264M brcm_cma=192M@768M brcm_cma=1024M@2048M root=/dev/mmcblk0p3 rw rootwait $(BOXMODEL)_4.boxmode=5'" > $(IMAGE_BUILD_DIR)/STARTUP_1 |
|
|
|
echo "boot emmcflash0.kernel2 'brcm_cma=504M@264M brcm_cma=192M@768M brcm_cma=1024M@2048M root=/dev/mmcblk0p5 rw rootwait $(BOXMODEL)_4.boxmode=5'" > $(IMAGE_BUILD_DIR)/STARTUP_2 |
|
|
|
echo "boot emmcflash0.kernel3 'brcm_cma=504M@264M brcm_cma=192M@768M brcm_cma=1024M@2048M root=/dev/mmcblk0p7 rw rootwait $(BOXMODEL)_4.boxmode=5'" > $(IMAGE_BUILD_DIR)/STARTUP_3 |
|
|
|
echo "boot emmcflash0.kernel4 'brcm_cma=504M@264M brcm_cma=192M@768M brcm_cma=1024M@2048M root=/dev/mmcblk0p9 rw rootwait $(BOXMODEL)_4.boxmode=5'" > $(IMAGE_BUILD_DIR)/STARTUP_4 |
|
|
|
else |
|
|
|
echo "boot emmcflash0.kernel1 'brcm_cma=520M@248M brcm_cma=192M@768M root=/dev/mmcblk0p3 rw rootwait $(BOXMODEL)_4.boxmode=12'" > $(IMAGE_BUILD_DIR)/STARTUP |
|
|
|
echo "boot emmcflash0.kernel1 'root=/dev/mmcblk0p3 rw rootwait $(BOXMODEL)_4.boxmode=1'" > $(IMAGE_BUILD_DIR)/STARTUP_1 |
|
|
|
echo "boot emmcflash0.kernel2 'root=/dev/mmcblk0p5 rw rootwait $(BOXMODEL)_4.boxmode=1'" > $(IMAGE_BUILD_DIR)/STARTUP_2 |
|
|
|
echo "boot emmcflash0.kernel3 'root=/dev/mmcblk0p7 rw rootwait $(BOXMODEL)_4.boxmode=1'" > $(IMAGE_BUILD_DIR)/STARTUP_3 |
|
|
|
echo "boot emmcflash0.kernel4 'root=/dev/mmcblk0p9 rw rootwait $(BOXMODEL)_4.boxmode=1'" > $(IMAGE_BUILD_DIR)/STARTUP_4 |
|
|
|
endif |
|
|
|
endif |
|
|
|
mcopy -i $(IMAGE_BUILD_DIR)/$(HD5X_BOOT_IMAGE) -v $(IMAGE_BUILD_DIR)/STARTUP :: |
|
|
|
mcopy -i $(IMAGE_BUILD_DIR)/$(HD5X_BOOT_IMAGE) -v $(IMAGE_BUILD_DIR)/STARTUP_1 :: |
|
|
@ -219,9 +269,12 @@ endif |
|
|
|
$(INSTALL) -d $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR) |
|
|
|
cp $(EMMC_IMAGE) $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR) |
|
|
|
cp $(SUPPORT_DIR)/splash-images/ni-splash.bmp $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/splash.bin |
|
|
|
ifeq ($(BOXMODEL),e4hdultra) |
|
|
|
cp $(SUPPORT_DIR)/splash-images/lcdflashing_220x176.bmp $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/lcdflashing.bmp |
|
|
|
endif |
|
|
|
cp $(KERNEL_ZIMAGE_DTB) $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/kernel.bin |
|
|
|
$(CD) $(ROOTFS); \
|
|
|
|
tar -cvf $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar -C $(ROOTFS) . >/dev/null 2>&1; \
|
|
|
|
$(CD) $(ROOTFS_DIR); \
|
|
|
|
tar -cvf $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar -C $(ROOTFS_DIR) . >/dev/null 2>&1; \
|
|
|
|
bzip2 $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar |
|
|
|
echo $(IMAGE_PREFIX) > $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/imageversion |
|
|
|
$(CD) $(IMAGE_BUILD_DIR); \
|
|
|
@ -230,13 +283,13 @@ endif |
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
flash-image-hd6x: IMAGE_DATE=$(shell cat $(ROOTFS)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-) |
|
|
|
flash-image-hd6x: IMAGE_DATE=$(shell cat $(ROOTFS_DIR)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-) |
|
|
|
flash-image-hd6x: | $(IMAGE_DIR) |
|
|
|
rm -rf $(IMAGE_BUILD_DIR) |
|
|
|
$(INSTALL) -d $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR) |
|
|
|
cp $(KERNEL_UIMAGE) $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/uImage |
|
|
|
$(CD) $(ROOTFS); \
|
|
|
|
tar -cvf $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar -C $(ROOTFS) . >/dev/null 2>&1; \
|
|
|
|
$(CD) $(ROOTFS_DIR); \
|
|
|
|
tar -cvf $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar -C $(ROOTFS_DIR) . >/dev/null 2>&1; \
|
|
|
|
bzip2 $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar |
|
|
|
# Create minimal image |
|
|
|
$(CD) $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR); \
|
|
|
@ -285,8 +338,8 @@ flash-image-hd6x-multi-recovery: | $(IMAGE_DIR) |
|
|
|
unzip -o $(DL_DIR)/$(HD6X_BOOTARGS_SOURCE) -d $(IMAGE_BUILD_DIR) |
|
|
|
unzip -o $(DL_DIR)/$(HD6X_PARTITONS_SOURCE) -d $(IMAGE_BUILD_DIR) |
|
|
|
unzip -o $(DL_DIR)/$(HD6X_RECOVERY_SOURCE) -d $(IMAGE_BUILD_DIR) |
|
|
|
$(INSTALL_EXEC) $(IMAGE_BUILD_DIR)/bootargs-8gb.bin $(ROOTFS)$(datadir)/bootargs.bin |
|
|
|
$(INSTALL_EXEC) $(IMAGE_BUILD_DIR)/fastboot.bin $(ROOTFS)$(datadir)/fastboot.bin |
|
|
|
$(INSTALL_EXEC) $(IMAGE_BUILD_DIR)/bootargs-8gb.bin $(ROOTFS_DIR)$(datadir)/bootargs.bin |
|
|
|
$(INSTALL_EXEC) $(IMAGE_BUILD_DIR)/fastboot.bin $(ROOTFS_DIR)$(datadir)/fastboot.bin |
|
|
|
dd if=/dev/zero of=$(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/$(HD6X_BOOT_IMAGE) bs=1024 count=$(HD6X_BOOTOPTIONS_PARTITION_SIZE) |
|
|
|
mkfs.msdos -S 512 $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/$(HD6X_BOOT_IMAGE) |
|
|
|
echo "bootcmd=setenv bootargs \$$(bootargs) \$$(bootargs_common); mmc read 0 0x1000000 0x3BD000 0x8000; bootm 0x1000000; run bootcmd_fallback" > $(IMAGE_BUILD_DIR)/STARTUP |
|
|
@ -398,7 +451,7 @@ flash-image-multibox-multi-recovery: | $(IMAGE_DIR) |
|
|
|
unzip -o $(DL_DIR)/$(MULTIBOX_FASTBOOT_SOURCE) -d $(IMAGE_BUILD_DIR) |
|
|
|
unzip -o $(DL_DIR)/$(MULTIBOX_PARAM_SOURCE) -d $(IMAGE_BUILD_DIR) |
|
|
|
unzip -o $(DL_DIR)/$(MULTIBOX_RECOVERY_SOURCE) -d $(IMAGE_BUILD_DIR) |
|
|
|
$(INSTALL_EXEC) $(IMAGE_BUILD_DIR)/update_bootargs_$(BOXMODEL).bin $(ROOTFS)$(datadir)/update_bootargs_$(BOXMODEL).bin |
|
|
|
$(INSTALL_EXEC) $(IMAGE_BUILD_DIR)/update_bootargs_$(BOXMODEL).bin $(ROOTFS_DIR)$(datadir)/update_bootargs_$(BOXMODEL).bin |
|
|
|
dd if=/dev/zero of=$(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/$(MULTIBOX_BOOT_IMAGE) bs=1024 count=$(MULTIBOX_BOOTOPTIONS_PARTITION_SIZE) |
|
|
|
mkfs.msdos -S 512 $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/$(MULTIBOX_BOOT_IMAGE) |
|
|
|
echo "bootcmd=setenv bootargs \$$(bootargs) \$$(bootargs_common); mmc read 0 0x1000000 0x3BD000 0x8000; bootm 0x1000000; run bootcmd_fallback" > $(IMAGE_BUILD_DIR)/STARTUP |
|
|
@ -456,8 +509,8 @@ flash-image-hd6x-single: | $(IMAGE_DIR) |
|
|
|
rm -rf $(IMAGE_BUILD_DIR) |
|
|
|
$(INSTALL) -d $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR) |
|
|
|
cp $(KERNEL_UIMAGE) $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/uImage |
|
|
|
$(CD) $(ROOTFS); \
|
|
|
|
tar -cvf $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar -C $(ROOTFS) . >/dev/null 2>&1; \
|
|
|
|
$(CD) $(ROOTFS_DIR); \
|
|
|
|
tar -cvf $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar -C $(ROOTFS_DIR) . >/dev/null 2>&1; \
|
|
|
|
bzip2 $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar |
|
|
|
echo $(IMAGE_NAME) > $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/imageversion |
|
|
|
echo "$(IMAGE_NAME)_single_mmc.zip" > $(IMAGE_BUILD_DIR)/unforce_$(BOXMODEL).txt |
|
|
@ -470,13 +523,13 @@ flash-image-hd6x-single: | $(IMAGE_DIR) |
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# armbox vu+
|
|
|
|
flash-image-vuplus: IMAGE_DATE=$(shell cat $(ROOTFS)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-) |
|
|
|
flash-image-vuplus: IMAGE_DATE=$(shell cat $(ROOTFS_DIR)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-) |
|
|
|
flash-image-vuplus: | $(IMAGE_DIR) |
|
|
|
rm -rf $(IMAGE_BUILD_DIR) |
|
|
|
$(INSTALL) -d $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR) |
|
|
|
cp $(KERNEL_ZIMAGE) $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/kernel_auto.bin |
|
|
|
$(CD) $(ROOTFS); \
|
|
|
|
tar -cvf $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar -C $(ROOTFS) . >/dev/null 2>&1; \
|
|
|
|
$(CD) $(ROOTFS_DIR); \
|
|
|
|
tar -cvf $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar -C $(ROOTFS_DIR) . >/dev/null 2>&1; \
|
|
|
|
bzip2 $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar |
|
|
|
# Create minimal image |
|
|
|
$(CD) $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR); \
|
|
|
@ -496,8 +549,8 @@ flash-image-vuplus-multi: | $(IMAGE_DIR) |
|
|
|
cp $(KERNEL_ZIMAGE) $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/kernel3_auto.bin |
|
|
|
cp $(KERNEL_ZIMAGE) $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/kernel4_auto.bin |
|
|
|
echo Dummy for update. > $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs.tar.bz2 |
|
|
|
$(CD) $(ROOTFS); \
|
|
|
|
tar -cvf $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs1.tar -C $(ROOTFS) . >/dev/null 2>&1; \
|
|
|
|
$(CD) $(ROOTFS_DIR); \
|
|
|
|
tar -cvf $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs1.tar -C $(ROOTFS_DIR) . >/dev/null 2>&1; \
|
|
|
|
bzip2 $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs1.tar |
|
|
|
echo Dummy for update. > $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs2.tar.bz2 |
|
|
|
echo Dummy for update. > $(IMAGE_BUILD_DIR)/$(IMAGE_SUBDIR)/rootfs3.tar.bz2 |
|
|
|