fdt/Makefile: make u-boot-dtb.bin 8-byte aligned
The dts/kern.dtb is appended after u-boot-dtb.bin for U-disk boot. Make sure u-boot-dtb.bin is 8-byte aligned to avoid data-abort on calling: fdt_check_header(gd->fdt_blob_kern). Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: Id5f2daf0c5446e7ea828cb970d3d4879e3acda86
This commit is contained in:
parent
9f8dc1751f
commit
369e944c84
5
Makefile
5
Makefile
|
|
@ -887,6 +887,9 @@ endif
|
|||
quiet_cmd_copy = COPY $@
|
||||
cmd_copy = cp $< $@
|
||||
|
||||
quiet_cmd_truncate = ALIGN $@
|
||||
cmd_truncate = truncate -s "%8" $@
|
||||
|
||||
ifeq ($(CONFIG_MULTI_DTB_FIT),y)
|
||||
|
||||
fit-dtb.blob: dts/dt.dtb FORCE
|
||||
|
|
@ -909,11 +912,13 @@ u-boot-dtb.bin: u-boot-nodtb.bin dts/dt-spl.dtb FORCE
|
|||
ifneq ($(wildcard dts/kern.dtb),)
|
||||
u-boot-dtb-kern.bin: u-boot-dtb.bin FORCE
|
||||
$(call if_changed,copy)
|
||||
$(call if_changed,truncate)
|
||||
u-boot.bin: u-boot-dtb-kern.bin dts/kern.dtb FORCE
|
||||
$(call if_changed,cat)
|
||||
else
|
||||
u-boot.bin: u-boot-dtb.bin FORCE
|
||||
$(call if_changed,copy)
|
||||
$(call if_changed,truncate)
|
||||
endif
|
||||
else
|
||||
|
||||
|
|
|
|||
|
|
@ -1286,8 +1286,8 @@ int fdtdec_setup(void)
|
|||
gd->fdt_blob = (ulong *)&_end;
|
||||
|
||||
# ifdef CONFIG_USING_KERNEL_DTB
|
||||
gd->fdt_blob_kern =
|
||||
(ulong *)((ulong)gd->fdt_blob + fdt_totalsize(gd->fdt_blob));
|
||||
gd->fdt_blob_kern = (ulong *)((ulong)gd->fdt_blob +
|
||||
ALIGN(fdt_totalsize(gd->fdt_blob), 8));
|
||||
# endif
|
||||
# endif
|
||||
# elif defined(CONFIG_OF_BOARD)
|
||||
|
|
|
|||
Loading…
Reference in New Issue