[LEDE-DEV] [RFC] at91: fix build of legacy target
Hauke Mehrtens
hauke at hauke-m.de
Mon Oct 16 14:18:42 PDT 2017
On 10/16/2017 10:03 AM, Mathias Kresin wrote:
> 16.10.2017 00:44, Hauke Mehrtens:
>> Changing the order of the devices fixes the build problem seen by the
>> build bot. I do not understand why this is making any difference at all,
>> this is probably only hiding a different bug.
>>
>> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
>> ---
>>
>> Without this patch I am getting the following error message:
>>
>> cat
>> /home/hauke/openwrt/lede/build_dir/target-arm_arm926ej-s_musl_eabi/linux-at91_legacy/tmp/lede-at91-legacy-tny_a9260-squashfs-factory.bin.dtb
>> >>
>> /home/hauke/openwrt/lede/build_dir/target-arm_arm926ej-s_musl_eabi/linux-at91_legacy/tmp/lede-at91-legacy-tny_a9260-squashfs-factory.bin
>>
>> dd
>> if=/home/hauke/openwrt/lede/build_dir/target-arm_arm926ej-s_musl_eabi/linux-at91_legacy/tmp/lede-at91-legacy-tny_a9260-squashfs-factory.bin
>> of=/home/hauke/openwrt/lede/build_dir/target-arm_arm926ej-s_musl_eabi/linux-at91_legacy/tmp/lede-at91-legacy-tny_a9260-squashfs-factory.bin.new
>> bs= conv=sync
>> dd: invalid number: ''
>> Makefile:74: recipe for target
>> '/home/hauke/openwrt/lede/build_dir/target-arm_arm926ej-s_musl_eabi/linux-at91_legacy/tmp/lede-at91-legacy-tny_a9260-squashfs-factory.bin'
>> failed
>> make[5]: ***
>> [/home/hauke/openwrt/lede/build_dir/target-arm_arm926ej-s_musl_eabi/linux-at91_legacy/tmp/lede-at91-legacy-tny_a9260-squashfs-factory.bin]
>> Error 1
>> make[5]: Leaving directory
>> '/home/hauke/openwrt/lede/target/linux/at91/image'
>> Makefile:24: recipe for target 'install' failed
>
> Hey Hauke,
>
> your issue is:
>
> define Device/Default
> DTB_SIZE :=
> endef
>
> define Device/production-dtb
> $(Device/production)
> $(Device/dtb)
> DTB_SIZE := 128k
> IMAGE/factory.bin := append-dtb | pad-to $$$$(DTB_SIZE) \
> | append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
> endef
>
> The pad-to $$$$(DTB_SIZE) references the DTB_SIZE variable from
> Device/Default instead of Device/production-dtb.
>
> The best would be to move DTB_SIZE := 128k to Device/Default (which is
> safe since we don't have different DTB_SIZE values). Another way to fix
> the issue is to change the pad-to parameter to pad-to $$(DTB_SIZE).
>
> But I've to admit, I fail to see why it works as intended if you change
> the order of the build code and it's most likely the reason why I didn't
> noticed the issue at the time I merged
> c2f052acaeb480e89d3ce39c47f49ad16b3464ac.
>
> Mathias
Hi Mathias,
thanks for the help, I created a fix and pushed it with that fix it
builds at least for me, lest see if the build bot is fixed now too.
Probably this depends on the order these two variables have in some
internal representation and this gets affected by other things.
Hauke
More information about the Lede-dev
mailing list