[LEDE-DEV] Adding support for dlink dwr-512
Giuseppe Lippolis
giu.lippolis at gmail.com
Sun Oct 2 12:10:16 PDT 2016
Hi all,
I'm trying to port lede to the dwr-512.
I'm using the latest trunk downloaded with
git clone https://git.lede-project.org/source.git
The dwr-512 oem bootloader accept a firmware image that shall be processed
with a dlink tool called binboy and need the binary_kernel_image (lzma
compressed) + the sqashfs_root.
In addition, using the oem bootloader, I'm unable to pass kernel param and
device tree.
More detail here: https://wiki.openwrt.org/inbox/d-link/d-link_dwr-512_b in
the section FW installation.
I start some discussion in the bug report but I realize it is better to use
the mailing list.
According with the latest advice of Mathias Kresin I should use the default
strategy to generate an Image, therefore I add the following path:
diff --git a/target/linux/ramips/image/rt305x.mk
b/target/linux/ramips/image/rt305x.mk
index be21ac4..e830675 100644
--- a/target/linux/ramips/image/rt305x.mk
+++ b/target/linux/ramips/image/rt305x.mk
@@ -168,6 +168,13 @@ endef
TARGET_DEVICES += dir-620-d1
+define Device/dwr-512-b
+ DTS := DWR-512-B
+ DEVICE_TITLE := D-Link DWR-512 B
+endef
+TARGET_DEVICES += dwr-512-b
+
+
define Device/esr-9753
DTS := ESR-9753
BLOCKSIZE := 64k
Then I add the dwr-512-b in the
/target/linux/ramips/base-files/lib/ramips.sh
b/target/linux/ramips/base-files/lib/ramips.sh and in
target/linux/ramips/base-files/etc/board.d/02_network
b/target/linux/ramips/base-files/etc/board.d/02_network and, clearly, I add
the device tree file target/linux/ramips/dts/DWR-512-B.dts:
/dts-v1/;
/include/ "rt5350.dtsi"
/ {
compatible = "ralink,rt5350-soc";
model = "D-Link DWR-512";
memory at 0 {
device_type = "memory";
reg = <0x0 0x2000000>;
};
palmbus at 10000000 {
spi at b00 {
status = "okay";
mx25l6405d at 0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "macronix,mx25l6405d",
"jedec,spi-nor";
reg = <0>;
spi-max-frequency = <30000000>;
fast-read;
partition at 0 {
label = "bootloader";
reg = <0x0 0x10000>;
read-only;
};
partition at 10000 {
label = "Kernel";
reg = <0x10000 0x140000>;
read-only;
};
partition at 150000 {
label = "rootfs";
reg = <0x150000 0x5c0000>;
read-only;
};
partition at 710010 {
label = "ui";
reg = <0x710000 0xe0000>;
};
partition at 7f0000 {
label = "config";
reg = <0x7f0000 0x10000>;
};
};
};
uart: uart at 500 {
status = "okay";
};
};
After the compilation in the bin/targets/ramips/rt305x/, I get:
2544 Oct 2 11:12 lede-ramips-rt305x-device-dwr-512-b.manifest
2892686 Oct 2 11:12 lede-ramips-rt305x-dwr-512-b-initramfs-kernel.bin
3145732 Oct 2 11:12 lede-ramips-rt305x-dwr-512-b-squashfs-sysupgrade.bin
1835008 Oct 2 11:12 lede-ramips-rt305x-root.squashfs
2891100 Oct 2 11:12 lede-ramips-rt305x-uImage-initramfs.bin
1201869 Oct 2 11:12 lede-ramips-rt305x-uImage.bin
5460316 Oct 2 11:12 lede-ramips-rt305x-vmlinux-initramfs.bin
5465328 Oct 2 11:12 lede-ramips-rt305x-vmlinux-initramfs.elf
3792868 Oct 2 11:12 lede-ramips-rt305x-vmlinux.bin
3797880 Oct 2 11:12 lede-ramips-rt305x-vmlinux.elf
I do not seems that I get the kernel image I was looking for.
It seems that I get the lede-ramips-rt305x-dwr-512-b-initramfs-kernel.bin
but embedding the initramfs is not an option, the size is too big.
Some advices?
Thanks and bye.
More information about the Lede-dev
mailing list