[LEDE-DEV] Adding support for dlink dwr-512

Mathias Kresin dev at kresin.me
Mon Oct 3 01:37:50 PDT 2016

03.10.2016 10:24, Giuseppe Lippolis:
> Hi Mathias,
>>> use the "KERNEL := kernel-bin | patch-dtb | lzma" config  instead?
>> Well, that is exactly the KERNEL line I've send in my last mail. Not
>> sure
> if I get
>> what you are asking here. But such a kernel works for most of the
>> rt305x devices.
> In your previous email your advice was:
>    KERNEL := kernel-bin | append-dtb | lzma
> The difference is patch-dtb against append-dtb.

My bad, you are right. The default for ramips boards is:

KERNEL_DTB = kernel-bin | patch-dtb | lzma

as it can be seen in 

>>> 1) From my understanding the append-dtb seems to append the dtb
>>> after the kernel. But in this way in my opinion the kernel cannot
>>> point to the dbt (remember that currently It seems that the oem
>>> bootloader cannot pass kernel parameter).
>>> In the
>>> build_dir/target-mipsel_24kc_musl-1.1.15/linux-ramips_rt305x/linux-4
>>> .4 .23/ar ch/mips/ralink/of.c the __dt_setup_arch(&__image_dtb);
>>> point to the __image_dtb area embedded in the kernel. This area
>>> should be populated after the compilation process by the patch-dtb
>>> tool. Shall I use the "KERNEL := kernel-bin | patch-dtb | lzma"
>>> config  instead?
> Can you please confirm my understanding

Sorry I'm to busy to have a closer look at the code.

> With the current change in the target/linux/ramips/image/rt305x.mk :
> +  KERNEL := kernel-bin | patch-dtb | lzma  IMAGES := factory.bin
> + IMAGE/factory.bin := \
> +       append-kernel

Am I right that the missing line break before IMAGES is a typo in the mail?

> I'm able (after make distclean, make menuconfig, make) to find in
> bin/targets/ramips/rt305x/ the image
> lede-ramips-rt305x-dwr-512-b-squashfs-factory.bin
> This seems to be exactly what I'm looking for (vmlinux lzma compressed with
> device tree embedded).

Sure, that is exactly your build recipe. Append the kernel to the 
factory image and nothing more. The content of the image should be 
identical to the kernel build artefact in 

But it isn't yet a complete image since rootfs etc. is missing.

Again, please have a closer look at "make target/linux/install V=s" and 
the files I mentioned in my last mails. They should explain and show 
what happens behind the scene.


More information about the Lede-dev mailing list