-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imx8m: Add imx-mkimage for i.MX8M (mScale)
Support to combine images: HDMI FW, DDR PHY FW, SPL, u-boot.img, ARM trusted firmware (BL31), and HDMI CSF. Plugin and DCD support are verified but so far not valiable for mScale. Signed-off-by: Ye Li <[email protected]>
- Loading branch information
Ye Li
committed
Jul 7, 2017
1 parent
95607e8
commit 625c5c9
Showing
3 changed files
with
3,448 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
MKIMG = mkimage_imx8 | ||
OUTIMG = flash.bin | ||
DCD_CFG_SRC = imx8mq_dcd.cfg | ||
DCD_CFG = imx8mq_dcd.cfg.tmp | ||
|
||
CC ?= gcc | ||
CFLAGS ?= -O2 -Wall -std=c99 -static | ||
INCLUDE = ./lib | ||
|
||
$(MKIMG): mkimage_imx8.c | ||
@echo "Compiling mkimage_imx8" | ||
$(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) -lz | ||
|
||
$(DCD_CFG): $(DCD_CFG_SRC) | ||
@echo "Converting iMX8M DCD file" | ||
$(CC) -E -Wp,-MD,.imx8mq_dcd.cfg.cfgtmp.d -nostdinc -Iinclude -I$(INCLUDE) -x c -o $(DCD_CFG) $(DCD_CFG_SRC) | ||
|
||
u-boot-spl-ddr.bin: u-boot-spl.bin lpddr4_pmu_train_imem.bin lpddr4_pmu_train_dmem.bin | ||
@objcopy -I binary -O binary --pad-to 0x8000 --gap-fill=0x0 lpddr4_pmu_train_imem.bin lpddr4_pmu_train_imem_pad.bin | ||
@cat lpddr4_pmu_train_imem_pad.bin lpddr4_pmu_train_dmem.bin > lpddr4_pmu_train_fw.bin | ||
@cat u-boot-spl.bin lpddr4_pmu_train_fw.bin > u-boot-spl-ddr.bin | ||
@rm -f lpddr4_pmu_train_fw.bin lpddr4_pmu_train_imem_pad.bin | ||
|
||
u-boot-atf.bin: u-boot.bin bl31.bin | ||
@cp bl31.bin u-boot-atf.bin | ||
@dd if=u-boot.bin of=u-boot-atf.bin bs=1K seek=128 | ||
|
||
.PHONY: clean | ||
clean: | ||
@rm -f $(MKIMG) $(DCD_CFG) .imx8mq_dcd.cfg.cfgtmp.d u-boot-atf.bin u-boot-spl-ddr.bin $(OUTIMG) | ||
|
||
flash_hdmi_spl_uboot: $(MKIMG) hdmi.bin u-boot-spl-ddr.bin u-boot-atf.bin csf_hdmi.bin | ||
./mkimage_imx8 -hdmi hdmi.bin -loader u-boot-spl-ddr.bin 0x7E1000 -csf_hdmi csf_hdmi.bin -second_loader u-boot-atf.bin 0x40001000 0x60000 -out $(OUTIMG) | ||
|
||
|
||
flash_spl_uboot: $(MKIMG) u-boot-spl-ddr.bin u-boot-atf.bin | ||
./mkimage_imx8 -loader u-boot-spl-ddr.bin 0x7E1000 -second_loader u-boot-atf.bin 0x40001000 0x60000 -out $(OUTIMG) | ||
|
||
#flash_dcd_uboot: $(MKIMG) $(DCD_CFG) u-boot-atf.bin | ||
# ./mkimage_imx8 -dcd $(DCD_CFG) -loader u-boot-atf.bin 0x40001000 -out $(OUTIMG) | ||
|
||
#flash_plugin: $(MKIMG) plugin.bin u-boot-spl-for-plugin.bin | ||
# ./mkimage_imx8 -plugin plugin.bin 0x912800 -loader u-boot-spl-for-plugin.bin 0x7F0000 -out $(OUTIMG) |
Oops, something went wrong.