build: use genimage tool to create sd image

Signed-off-by: carbon <carbon@milkv.io>
This commit is contained in:
carbon
2024-06-15 20:23:16 +08:00
parent 1dcebfe13e
commit a7f4602e49
2 changed files with 20 additions and 0 deletions

View File

@ -580,6 +580,19 @@ ifneq ($(STORAGE_TYPE), sd)
endif
endif
sd_image:
$(call print_target)
-${Q}rm $(OUTPUT_DIR)/fs
ifeq ($(CONFIG_BUILDROOT_FS),y)
${Q}rm -rf $(OUTPUT_DIR)/br-rootfs
${Q}ln -s $(OUTPUT_DIR)/br-rootfs $(OUTPUT_DIR)/fs
${Q}mkdir $(OUTPUT_DIR)/br-rootfs
${Q}tar xvf $(BR_DIR)/output/$(BR_BOARD)/images/rootfs.tar.xz -C $(OUTPUT_DIR)/br-rootfs
else
${Q}ln -s $(OUTPUT_DIR)/rootfs $(OUTPUT_DIR)/fs
endif
$(TOP_DIR)/device/gen_burn_image_sd.sh $(OUTPUT_DIR)
jffs2:
$(call print_target)
ifeq ($(STORAGE_TYPE),spinor)

View File

@ -265,6 +265,13 @@ function pack_burn_image
popd
)}
function pack_sd_image
{(
pushd "$BUILD_PATH"
make sd_image || return "$?"
popd
)}
function pack_prog_img
{(
local tmp_dir