Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
61
target/linux/imx/image/common.mk
Normal file
61
target/linux/imx/image/common.mk
Normal file
@@ -0,0 +1,61 @@
|
||||
define Build/imx-combined-image-prepare
|
||||
rm -rf $@.boot
|
||||
mkdir -p $@.boot
|
||||
endef
|
||||
|
||||
define Build/imx-combined-image-clean
|
||||
rm -rf $@.boot $@.fs
|
||||
endef
|
||||
|
||||
define Build/imx-combined-image
|
||||
$(CP) $(IMAGE_KERNEL) $@.boot/uImage
|
||||
|
||||
$(foreach dts,$(DEVICE_DTS), \
|
||||
$(CP) \
|
||||
$(DTS_DIR)/$(dts).dtb \
|
||||
$@.boot/;
|
||||
)
|
||||
|
||||
mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
|
||||
-n '$(DEVICE_ID) OpenWrt bootscript' \
|
||||
-d bootscript-$(DEVICE_NAME) \
|
||||
$@.boot/boot.scr
|
||||
|
||||
cp $@ $@.fs
|
||||
|
||||
$(SCRIPT_DIR)/gen_image_generic.sh $@ \
|
||||
$(CONFIG_TARGET_KERNEL_PARTSIZE) \
|
||||
$@.boot \
|
||||
$(CONFIG_TARGET_ROOTFS_PARTSIZE) \
|
||||
$@.fs \
|
||||
1024
|
||||
endef
|
||||
|
||||
define Build/imx-sdcard
|
||||
$(Build/imx-combined-image-prepare)
|
||||
|
||||
if [ -f $(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.img ]; then \
|
||||
$(CP) $(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.img \
|
||||
$@.boot/u-boot.img; \
|
||||
fi
|
||||
|
||||
if [ -f $(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot-dtb.img ]; then \
|
||||
$(CP) $(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot-dtb.img \
|
||||
$@.boot/u-boot-dtb.img; \
|
||||
fi
|
||||
|
||||
$(Build/imx-combined-image)
|
||||
dd if=$(STAGING_DIR_IMAGE)/$(UBOOT)-SPL of=$@ bs=1024 seek=1 conv=notrunc
|
||||
|
||||
$(Build/imx-combined-image-clean)
|
||||
endef
|
||||
|
||||
define Build/imx-sdcard-raw-uboot
|
||||
$(Build/imx-combined-image-prepare)
|
||||
|
||||
$(Build/imx-combined-image)
|
||||
dd if=$(STAGING_DIR_IMAGE)/$(UBOOT)-SPL of=$@ bs=1024 seek=1 conv=notrunc
|
||||
dd if=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot-dtb.img of=$@ bs=1024 seek=69 conv=notrunc
|
||||
|
||||
$(Build/imx-combined-image-clean)
|
||||
endef
|
||||
Reference in New Issue
Block a user