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

Giuseppe Lippolis giu.lippolis at gmail.com
Mon Oct 3 01:24:50 PDT 2016

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.

> > 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

> > what shall I do to propagate the change effect in the 
> > target/linux/ramips/image/rt305x.mk
> b/target/linux/ramips/image/rt305x.mk?
> The contents of the lede-ramips-rt305x-dwr-512-b* files should be 
> different. Please ignore the remaining files in the directory. These 
> are generic files which are generated due to the fact that some rt305x 
> boards are still using the old build code. These files are _not_ 
> specific for your board.
> As written in my last mail. You will find the kernel generated for 
> your board in
> But at this point I would try to tftpboot the initramfs-kernel.bin 
> from uboot to check if everything works. Most bootloader do not 
> enforce a vendor specific header for images loaded via tftp.
> > Currently the only way I found to apply a change in the target/linux/...
> > Make distclean
> > Make menuconfig
> > Make

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

I'm able (after make distclean, make menuconfig, make) to find in
bin/targets/ramips/rt305x/ the image

This seems to be exactly what I'm looking for (vmlinux lzma compressed with
device tree embedded).

> make target/linux/{clean,install} should work.
This cmd works as expected.

I'm going to test the new fw.

More information about the Lede-dev mailing list