[U-Boot] dtb build issue on U-Boot

Bin Meng bmeng.cn at gmail.com
Tue Jun 13 07:28:19 UTC 2017


Hi Masahiro,

On Tue, Jun 13, 2017 at 2:03 PM, Masahiro Yamada
<yamada.masahiro at socionext.com> wrote:
> Hi Kever, Simon,
> Sorry for my late reply.
>
> 2017-06-07 6:16 GMT+09:00 Simon Glass <sjg at chromium.org>:
>> +Masahiro
>>
>> On 6 June 2017 at 05:45, Kever Yang <kever.yang at rock-chips.com> wrote:
>>>
>>> I notice that the dtb content in spl/u-boot-spl.bin and u-boot.bin not
>>>
>>> able to update after I modify the dts file and make again, I have to
>>>
>>> "make clean" first, and then the "make" can update the dtb content
>>>
>>> to output binary, which lead to bad efficiency when try to modify dts.
>>>
>>> I have try below command, the dtb file also not updated before "make clean".
>>>
>>> dtc -I dtb -O dts spl/u-boot-spl.dtb
>>>
>>> Is there any one can help fix this issue?
>>
>> I have noticed this too, and also that changing a .dtsi file is not noticed.
>>
>> Probably it is missing a dependency in the makefile.
>
>
> I could not reproduce the issue for me.
>
> Editing a DT file and re-compiling gave me the expected result.
>
>
> masahiro at pug:~/ref/u-boot$ make -s mrproper
> masahiro at pug:~/ref/u-boot$ make -s CROSS_COMPILE=aarch64-linux-gnu-
> uniphier_v8_defconfig all
> masahiro at pug:~/ref/u-boot$ nano arch/arm/dts/uniphier-ld20.dtsi
> (add hello-world property)
> masahiro at pug:~/ref/u-boot$ make  CROSS_COMPILE=aarch64-linux-gnu-
>   CHK     include/config/uboot.release
>   CHK     include/generated/version_autogenerated.h
>   CHK     include/generated/timestamp_autogenerated.h
>   UPD     include/generated/timestamp_autogenerated.h
>   CHK     include/generated/generic-asm-offsets.h
>   CHK     include/generated/asm-offsets.h
>   HOSTCC  tools/mkenvimage.o
>   HOSTLD  tools/mkenvimage
>   HOSTCC  tools/fit_image.o
>   HOSTCC  tools/image-host.o
>   HOSTCC  tools/dumpimage.o
>   HOSTLD  tools/dumpimage
>   HOSTCC  tools/mkimage.o
>   HOSTLD  tools/mkimage
>   CC      arch/arm/cpu/armv8/fwcall.o
>   LD      arch/arm/cpu/armv8/built-in.o
>   CC      cmd/version.o
>   CHK     cmd/config_data_gz.h
>   CHK     cmd/config_data_size.h
>   LD      cmd/built-in.o
>   CC      common/main.o
>   LD      common/built-in.o
>   CC      lib/efi_loader/helloworld.o
>   LD      lib/efi_loader/helloworld.so
>   OBJCOPY lib/efi_loader/helloworld.efi
>   CC      lib/smbios.o
>   CC      lib/display_options.o
>   LD      lib/built-in.o
>   LD      u-boot
>   OBJCOPY u-boot.srec
>   OBJCOPY u-boot-nodtb.bin
> start=$(aarch64-linux-gnu-nm u-boot | grep __rel_dyn_start | cut -f 1
> -d ' '); end=$(aarch64-linux-gnu-nm u-boot | grep __rel_dyn_end | cut
> -f 1 -d ' '); tools/relocate-rela u-boot-nodtb.bin 0x84000000 $start
> $end
>   DTC     arch/arm/dts/uniphier-ld20-ref.dtb
> make[2]: 'arch/arm/dts/uniphier-ld20-ref.dtb' is up to date.
>   SHIPPED dts/dt.dtb
>   CAT     u-boot-dtb.bin
>   COPY    u-boot.bin
>   SYM     u-boot.sym
>   MKIMAGE u-boot.img
>   COPY    u-boot.dtb
>   MKIMAGE u-boot-dtb.img
>   CFGCHK  u-boot.cfg
> masahiro at pug:~/ref/u-boot$ dtc -I dtb -O dts  u-boot.dtb | grep hello-world
> hello-world;
>
>
>
> If I am missing something,
> could you tell me the command
> you used for reproducing the problem?

I just tried on x86 minnowmax, and looks the problem exists.

$ vim arch/x86/dts/minnowmax.dts
$ make -j
  CHK     include/config/uboot.release
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CHK     include/generated/version_autogenerated.h
  CHK     include/generated/generic-asm-offsets.h
  CHK     include/generated/asm-offsets.h
  HOSTCC  tools/mkenvimage.o
  HOSTCC  tools/fit_image.o
  HOSTCC  tools/image-host.o
  HOSTCC  tools/dumpimage.o
  HOSTCC  tools/mkimage.o
  HOSTLD  tools/mkenvimage
  HOSTLD  tools/dumpimage
  HOSTLD  tools/mkimage
  HOSTLD  tools/fit_info
  HOSTLD  tools/fit_check_sign
  CC      cmd/version.o
  CC      common/main.o
  LD      cmd/built-in.o
  LD      common/built-in.o
  CC      lib/smbios.o
  CC      lib/display_options.o
  CC      lib/efi_loader/helloworld.o
  LD      lib/efi_loader/helloworld.so
  OBJCOPY lib/efi_loader/helloworld.efi
  LD      lib/built-in.o
  LD      u-boot
  OBJCOPY u-boot.srec
  OBJCOPY u-boot-nodtb.bin
  SYM     u-boot.sym
  OBJCOPY u-boot-x86-16bit.bin
  DTC     arch/x86/dts/minnowmax.dtb
make[2]: `arch/x86/dts/minnowmax.dtb' is up to date.
  SHIPPED dts/dt.dtb
  CAT     u-boot-dtb.bin
  COPY    u-boot.dtb
  COPY    u-boot.bin
  BINMAN  u-boot.rom
  CFGCHK  u-boot.cfg

Regards,
Bin


More information about the U-Boot mailing list