[U-Boot] [U-Boot, v3, 3/3] kbuild: fix build rule of u-boot-spl.dtb
Masahiro Yamada
yamada.masahiro at socionext.com
Tue Feb 23 03:57:08 CET 2016
Hi Michal, Tom, Simon
2016-02-23 1:16 GMT+09:00 Tom Rini <trini at konsulko.com>:
> On Mon, Feb 22, 2016 at 04:51:47PM +0100, Michal Simek wrote:
>> Hi,
>>
>> On 8.2.2016 21:49, Tom Rini wrote:
>> > On Fri, Feb 05, 2016 at 05:55:14PM +0900, Masahiro Yamada wrote:
>> >
>> >> The build command of u-boot-spl.dtb is not constant, but dependent
>> >> on CONFIG_OF_SPL_REMOVE_PROPS. Use $(call if_changed,...) so that
>> >> the change of CONFIG_OF_SPL_REMOVE_PROPS is detected.
>> >>
>> >> Also, add tools/fdtgrep to the dependency to make sure u-boot-spl.dtb
>> >> is generated by the up-to-date fdtgrep in case the tool is modified.
>> >>
>> >> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
>> >> Reviewed-by: Simon Glass <sjg at chromium.org>
>> >
>> > Applied to u-boot/master, thanks!
>>
>> This patch is breaking build for Microblaze SPL.
>> make microblaze-generic_defconfig && make -j
>
> Can you poke around a bit more at what rule is likely needing an update
> here? FWIW, when this was merged microblaze was broken due to the
> eth-uclass.c problem so that's how I missed it, sorry!
This breakage is not due to this commit.
Even if I revert commit 35b786780f3 ("kbuild: fix build rule of
u-boot-spl.dtb"), this board is still broken.
I suspect the problem is in the fdtgrep tool itself.
This is my log:
yamada at beagle:~/workspace/u-boot$ git clean -d -f -x
yamada at beagle:~/workspace/u-boot$ git pull
Already up-to-date.
yamada at beagle:~/workspace/u-boot$ git describe
v2016.03-rc2-84-g595af9d
yamada at beagle:~/workspace/u-boot$ git checkout -b revert_test
Switched to a new branch 'revert_test'
yamada at beagle:~/workspace/u-boot$ git revert 35b78678
[revert_test b0dbed5] Revert "kbuild: fix build rule of u-boot-spl.dtb"
1 file changed, 2 insertions(+), 2 deletions(-)
yamada at beagle:~/workspace/u-boot$ make microblaze-generic_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
yamada at beagle:~/workspace/u-boot$ make CROSS_COMPILE=microblaze-linux-
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
UPD include/config.h
GEN include/autoconf.mk
GEN include/autoconf.mk.dep
GEN spl/include/autoconf.mk
CHK include/config/uboot.release
UPD include/config/uboot.release
CHK include/generated/version_autogenerated.h
UPD include/generated/version_autogenerated.h
CHK include/generated/timestamp_autogenerated.h
UPD include/generated/timestamp_autogenerated.h
CC lib/asm-offsets.s
CHK include/generated/generic-asm-offsets.h
UPD include/generated/generic-asm-offsets.h
HOSTCC tools/envcrc.o
WRAP tools/lib/crc32.c
HOSTCC tools/lib/crc32.o
WRAP tools/common/env_embedded.c
HOSTCC tools/common/env_embedded.o
WRAP tools/lib/sha1.c
HOSTCC tools/lib/sha1.o
HOSTLD tools/envcrc
HOSTCC tools/gen_eth_addr
HOSTCC tools/img2srec
HOSTCC tools/mkenvimage.o
HOSTCC tools/os_support.o
HOSTLD tools/mkenvimage
HOSTCC tools/aisimage.o
HOSTCC tools/atmelimage.o
WRAP tools/common/bootm.c
HOSTCC tools/common/bootm.o
HOSTCC tools/default_image.o
WRAP tools/lib/fdtdec_common.c
HOSTCC tools/lib/fdtdec_common.o
WRAP tools/lib/fdtdec.c
HOSTCC tools/lib/fdtdec.o
HOSTCC tools/fit_common.o
HOSTCC tools/fit_image.o
HOSTCC tools/gpimage.o
HOSTCC tools/gpimage-common.o
WRAP tools/common/image-fit.c
HOSTCC tools/common/image-fit.o
HOSTCC tools/image-host.o
WRAP tools/common/image.c
HOSTCC tools/common/image.o
HOSTCC tools/imagetool.o
HOSTCC tools/imximage.o
HOSTCC tools/kwbimage.o
WRAP tools/lib/md5.c
HOSTCC tools/lib/md5.o
HOSTCC tools/lpc32xximage.o
HOSTCC tools/mxsimage.o
HOSTCC tools/omapimage.o
HOSTCC tools/pblimage.o
HOSTCC tools/pbl_crc32.o
WRAP tools/lib/rc4.c
HOSTCC tools/lib/rc4.o
HOSTCC tools/rkcommon.o
HOSTCC tools/rkimage.o
HOSTCC tools/rksd.o
HOSTCC tools/rkspi.o
HOSTCC tools/socfpgaimage.o
WRAP tools/lib/sha256.c
HOSTCC tools/lib/sha256.o
WRAP tools/common/hash.c
HOSTCC tools/common/hash.o
HOSTCC tools/ublimage.o
HOSTCC tools/zynqimage.o
WRAP tools/lib/libfdt/fdt.c
HOSTCC tools/lib/libfdt/fdt.o
WRAP tools/lib/libfdt/fdt_ro.c
HOSTCC tools/lib/libfdt/fdt_ro.o
WRAP tools/lib/libfdt/fdt_rw.c
HOSTCC tools/lib/libfdt/fdt_rw.o
WRAP tools/lib/libfdt/fdt_strerror.c
HOSTCC tools/lib/libfdt/fdt_strerror.o
WRAP tools/lib/libfdt/fdt_wip.c
HOSTCC tools/lib/libfdt/fdt_wip.o
WRAP tools/lib/libfdt/fdt_region.c
HOSTCC tools/lib/libfdt/fdt_region.o
HOSTCC tools/dumpimage.o
HOSTLD tools/dumpimage
HOSTCC tools/mkimage.o
HOSTLD tools/mkimage
HOSTCC tools/ncb
HOSTCC tools/proftool
HOSTCC tools/fdtgrep.o
HOSTLD tools/fdtgrep
AS arch/microblaze/cpu/irq.o
CC arch/microblaze/cpu/interrupts.o
CC arch/microblaze/cpu/cache.o
CC arch/microblaze/cpu/exception.o
CC arch/microblaze/cpu/timer.o
LD arch/microblaze/cpu/built-in.o
AS arch/microblaze/cpu/start.o
CC arch/microblaze/lib/bootm.o
CC arch/microblaze/lib/muldi3.o
LD arch/microblaze/lib/built-in.o
CC board/xilinx/microblaze-generic/microblaze-generic.o
LD board/xilinx/microblaze-generic/built-in.o
CC cmd/boot.o
CC cmd/bootm.o
CC cmd/help.o
CC cmd/version.o
CC cmd/source.o
CC cmd/bdinfo.o
CC cmd/console.o
CC cmd/echo.o
CC cmd/elf.o
CC cmd/exit.o
CC cmd/fdt.o
CC cmd/flash.o
CC cmd/gpio.o
CC cmd/irq.o
CC cmd/itest.o
CC cmd/jffs2.o
CC cmd/load.o
CC cmd/mem.o
CC cmd/mfsl.o
CC cmd/mii.o
CC cmd/mdio.o
CC cmd/misc.o
CC cmd/mtdparts.o
CC cmd/net.o
CC cmd/pcmcia.o
CC cmd/test.o
CC cmd/ubi.o
CC cmd/ximg.o
CC cmd/spl.o
CC cmd/nvedit.o
CC cmd/disk.o
LD cmd/built-in.o
CC common/init/board_init.o
LD common/init/built-in.o
CC common/main.o
CC common/exports.o
CC common/hash.o
CC common/cli_hush.o
CC common/autoboot.o
CC common/board_f.o
CC common/board_r.o
CC common/bootm.o
CC common/bootm_os.o
CC common/env_attr.o
CC common/env_callback.o
CC common/env_flags.o
CC common/env_flash.o
CC common/fdt_support.o
CC common/miiphyutil.o
CC common/flash.o
CC common/splash.o
CC common/env_common.o
CC common/console.o
CC common/dlmalloc.o
CC common/malloc_simple.o
CC common/image.o
CC common/image-fdt.o
CC common/image-fit.o
CC common/memsize.o
CC common/stdio.o
CC common/cli_simple.o
CC common/cli.o
CC common/cli_readline.o
CC common/command.o
CC common/s_record.o
CC common/xyzModem.o
LD common/built-in.o
CC common/env_embedded.o
CC disk/part.o
LD disk/built-in.o
LD drivers/adc/built-in.o
CC drivers/block/disk-uclass.o
LD drivers/block/built-in.o
CC drivers/core/device.o
CC drivers/core/lists.o
CC drivers/core/root.o
CC drivers/core/uclass.o
CC drivers/core/util.o
CC drivers/core/device-remove.o
CC drivers/core/simple-bus.o
CC drivers/core/dump.o
LD drivers/core/built-in.o
CC drivers/crypto/fsl/sec.o
LD drivers/crypto/fsl/built-in.o
LD drivers/crypto/rsa_mod_exp/built-in.o
LD drivers/crypto/built-in.o
LD drivers/dfu/built-in.o
LD drivers/hwmon/built-in.o
CC drivers/input/input.o
CC drivers/input/key_matrix.o
LD drivers/input/built-in.o
LD drivers/memory/built-in.o
LD drivers/misc/built-in.o
CC drivers/pcmcia/tqm8xx_pcmcia.o
LD drivers/pcmcia/built-in.o
LD drivers/pwm/built-in.o
CC drivers/rtc/date.o
LD drivers/rtc/built-in.o
LD drivers/soc/built-in.o
LD drivers/sound/built-in.o
LD drivers/thermal/built-in.o
LD drivers/timer/built-in.o
LD drivers/tpm/built-in.o
LD drivers/twserial/built-in.o
LD drivers/video/bridge/built-in.o
LD drivers/video/built-in.o
CC drivers/watchdog/xilinx_tb_wdt.o
LD drivers/watchdog/built-in.o
LD drivers/built-in.o
LD drivers/dma/built-in.o
CC drivers/gpio/xilinx_gpio.o
LD drivers/gpio/built-in.o
LD drivers/i2c/built-in.o
LD drivers/mmc/built-in.o
CC drivers/mtd/mtdcore.o
CC drivers/mtd/mtd_uboot.o
CC drivers/mtd/mtdpart.o
CC drivers/mtd/cfi_flash.o
CC drivers/mtd/cfi_mtd.o
LD drivers/mtd/built-in.o
LD drivers/mtd/onenand/built-in.o
LD drivers/mtd/spi/built-in.o
CC drivers/mtd/ubi/attach.o
CC drivers/mtd/ubi/build.o
CC drivers/mtd/ubi/vtbl.o
CC drivers/mtd/ubi/vmt.o
CC drivers/mtd/ubi/upd.o
CC drivers/mtd/ubi/kapi.o
CC drivers/mtd/ubi/eba.o
CC drivers/mtd/ubi/io.o
CC drivers/mtd/ubi/wl.o
CC drivers/mtd/ubi/crc32.o
CC drivers/mtd/ubi/misc.o
CC drivers/mtd/ubi/debug.o
LD drivers/mtd/ubi/built-in.o
CC drivers/net/netconsole.o
CC drivers/net/xilinx_axi_emac.o
CC drivers/net/xilinx_emaclite.o
LD drivers/net/built-in.o
CC drivers/net/phy/phy.o
CC drivers/net/phy/atheros.o
CC drivers/net/phy/broadcom.o
CC drivers/net/phy/davicom.o
CC drivers/net/phy/lxt.o
CC drivers/net/phy/marvell.o
CC drivers/net/phy/micrel.o
CC drivers/net/phy/natsemi.o
CC drivers/net/phy/realtek.o
CC drivers/net/phy/vitesse.o
LD drivers/net/phy/built-in.o
LD drivers/pci/built-in.o
LD drivers/power/built-in.o
LD drivers/power/battery/built-in.o
LD drivers/power/fuel_gauge/built-in.o
LD drivers/power/mfd/built-in.o
LD drivers/power/pmic/built-in.o
LD drivers/power/regulator/built-in.o
CC drivers/serial/serial-uclass.o
CC drivers/serial/ns16550.o
CC drivers/serial/serial_xuartlite.o
LD drivers/serial/built-in.o
CC drivers/spi/spi.o
LD drivers/spi/built-in.o
LD drivers/usb/dwc3/built-in.o
LD drivers/usb/emul/built-in.o
LD drivers/usb/eth/built-in.o
LD drivers/usb/gadget/built-in.o
LD drivers/usb/gadget/udc/built-in.o
LD drivers/usb/host/built-in.o
LD drivers/usb/musb-new/built-in.o
LD drivers/usb/musb/built-in.o
LD drivers/usb/phy/built-in.o
LD drivers/usb/ulpi/built-in.o
DTC arch/microblaze/dts/microblaze-generic.dtb
SHIPPED dts/dt.dtb
DTB dts/dt.dtb.S
AS dts/dt.dtb.o
LD dts/built-in.o
CC fs/fs.o
LD fs/fat/built-in.o
CC fs/jffs2/compr_rtime.o
CC fs/jffs2/compr_rubin.o
CC fs/jffs2/compr_zlib.o
CC fs/jffs2/jffs2_1pass.o
CC fs/jffs2/mini_inflate.o
LD fs/jffs2/built-in.o
LD fs/built-in.o
CC lib/libfdt/fdt.o
CC lib/libfdt/fdt_ro.o
CC lib/libfdt/fdt_rw.o
CC lib/libfdt/fdt_strerror.o
CC lib/libfdt/fdt_sw.o
CC lib/libfdt/fdt_wip.o
CC lib/libfdt/fdt_empty_tree.o
CC lib/libfdt/fdt_addresses.o
CC lib/libfdt/fdt_region.o
LD lib/libfdt/built-in.o
CC lib/zlib/zlib.o
LD lib/zlib/built-in.o
CC lib/crc7.o
CC lib/crc8.o
CC lib/crc16.o
CC lib/fdtdec_common.o
CC lib/fdtdec.o
CC lib/gunzip.o
CC lib/initcall.o
CC lib/lmb.o
CC lib/ldiv.o
CC lib/md5.o
CC lib/net_utils.o
CC lib/qsort.o
CC lib/rc4.o
CC lib/sha1.o
CC lib/sha256.o
CC lib/strmhz.o
CC lib/rbtree.o
CC lib/list_sort.o
CC lib/hashtable.o
CC lib/errno.o
CC lib/display_options.o
CC lib/crc32.o
CC lib/ctype.o
CC lib/div64.o
CC lib/hang.o
CC lib/linux_compat.o
CC lib/linux_string.o
CC lib/membuff.o
CC lib/slre.o
CC lib/string.o
CC lib/time.o
CC lib/vsprintf.o
CC lib/panic.o
CC lib/strto.o
LD lib/built-in.o
CC net/checksum.o
CC net/arp.o
CC net/bootp.o
CC net/eth-uclass.o
CC net/eth_common.o
CC net/net.o
CC net/nfs.o
CC net/ping.o
CC net/tftp.o
LD net/built-in.o
LD test/built-in.o
CC test/dm/cmd_dm.o
LD test/dm/built-in.o
CC examples/standalone/stubs.o
LD examples/standalone/libstubs.o
CC examples/standalone/hello_world.o
LD examples/standalone/hello_world
OBJCOPY examples/standalone/hello_world.srec
OBJCOPY examples/standalone/hello_world.bin
LDS u-boot.lds
LD u-boot
OBJCOPY u-boot.srec
OBJCOPY u-boot-nodtb.bin
COPY u-boot.bin
SYM u-boot.sym
CFG u-boot.cfg
AS spl/arch/microblaze/cpu/irq.o
CC spl/arch/microblaze/cpu/interrupts.o
CC spl/arch/microblaze/cpu/cache.o
CC spl/arch/microblaze/cpu/exception.o
CC spl/arch/microblaze/cpu/timer.o
CC spl/arch/microblaze/cpu/spl.o
LD spl/arch/microblaze/cpu/built-in.o
AS spl/arch/microblaze/cpu/start.o
CC spl/arch/microblaze/lib/bootm.o
CC spl/arch/microblaze/lib/muldi3.o
LD spl/arch/microblaze/lib/built-in.o
CC spl/board/xilinx/microblaze-generic/microblaze-generic.o
LD spl/board/xilinx/microblaze-generic/built-in.o
CC spl/common/spl/spl.o
CC spl/common/spl/spl_nor.o
LD spl/common/spl/built-in.o
CC spl/common/init/board_init.o
LD spl/common/init/built-in.o
CC spl/common/env_flash.o
CC spl/common/env_common.o
CC spl/common/console.o
CC spl/common/dlmalloc.o
CC spl/common/malloc_simple.o
CC spl/common/image.o
CC spl/common/image-fdt.o
CC spl/common/image-fit.o
CC spl/common/memsize.o
CC spl/common/stdio.o
CC spl/common/cli_simple.o
CC spl/common/cli.o
CC spl/common/cli_readline.o
CC spl/common/command.o
CC spl/common/s_record.o
CC spl/common/xyzModem.o
LD spl/common/built-in.o
CC spl/cmd/nvedit.o
CC spl/cmd/disk.o
LD spl/cmd/built-in.o
CC spl/drivers/core/device.o
CC spl/drivers/core/lists.o
CC spl/drivers/core/root.o
CC spl/drivers/core/uclass.o
CC spl/drivers/core/util.o
CC spl/drivers/core/simple-bus.o
CC spl/drivers/core/dump.o
LD spl/drivers/core/built-in.o
CC spl/drivers/serial/serial-uclass.o
CC spl/drivers/serial/ns16550.o
CC spl/drivers/serial/serial_xuartlite.o
LD spl/drivers/serial/built-in.o
LD spl/drivers/built-in.o
AS spl/dts/dt.dtb.o
LD spl/dts/built-in.o
LD spl/fs/built-in.o
CC spl/lib/libfdt/fdt.o
CC spl/lib/libfdt/fdt_ro.o
CC spl/lib/libfdt/fdt_rw.o
CC spl/lib/libfdt/fdt_strerror.o
CC spl/lib/libfdt/fdt_sw.o
CC spl/lib/libfdt/fdt_wip.o
CC spl/lib/libfdt/fdt_empty_tree.o
CC spl/lib/libfdt/fdt_addresses.o
CC spl/lib/libfdt/fdt_region.o
LD spl/lib/libfdt/built-in.o
CC spl/lib/fdtdec_common.o
CC spl/lib/fdtdec.o
CC spl/lib/hashtable.o
CC spl/lib/errno.o
CC spl/lib/display_options.o
CC spl/lib/crc32.o
CC spl/lib/ctype.o
CC spl/lib/div64.o
CC spl/lib/hang.o
CC spl/lib/linux_compat.o
CC spl/lib/linux_string.o
CC spl/lib/membuff.o
CC spl/lib/slre.o
CC spl/lib/string.o
CC spl/lib/time.o
CC spl/lib/vsprintf.o
CC spl/lib/panic.o
CC spl/lib/strto.o
LD spl/lib/built-in.o
LDS spl/u-boot-spl.lds
LD spl/u-boot-spl
OBJCOPY spl/u-boot-spl-nodtb.bin
FDTGREP spl/u-boot-spl.dtb
Error: FDT_ERR_BADMAGIC
make[1]: *** [spl/u-boot-spl.dtb] Error 1
make: *** [spl/u-boot-spl] Error 2
I saw this problem before when I was porting my new ARMv8 SoC.
See below:
http://lists.denx.de/pipermail/u-boot/2016-February/245870.html
I hope Simon could help us figure out the root cause.
--
Best Regards
Masahiro Yamada
More information about the U-Boot
mailing list