Dear all it seems that the LEDE core developers do not like the way how we propose to install the fw and derfore they will not integrate the support for this board.
The best way to install the fw is to generate a factory image using the stock bootloader to apply the lede image.
Such image require a proper format. The oem binboy tool is able to generate this file.
Unfortunately there are no source code for the binboy tool and the LEDE system do not accept binary tool integrated in the toolchain.
You can check and contribute to the discussion here:
https://github.com/lede-project/source/pull/1279
Therefore the only solution is emulate the binboy process.
After some investigation and analysis this are my preliminary results:
The binboy tool concatenate the kernel (lzma compressed) and the rootfs file appending a proper header on the top.
The header is composed 0x88 byte long and the first 0x50 byte are used by the bootloader (to analyze/verify the fw file ?), the other 0x38 are stored in the flash with some modification.
Here an example:
the firmware for jboot:
xxd -g1 -l0x100 DWR-921_RevC_Firmware3.01b07.bin
00000000: 44 4c 4b 36 45 32 34 31 34 30 30 31 00 00 33 b9 DLK6E2414001..3.
00000010: 00 00 00 00 00 00 00 00 00 00 01 00 74 77 bd 08 ............tw..
00000020: 00 00 01 00 00 00 17 00 00 00 01 00 4c de 13 00 ............L...
00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000040: 42 48 02 00 00 00 04 04 00 00 00 00 24 6e 46 e6 BH..........$nF.
00000050: ff 04 24 2b 74 77 bd 08 3c de 13 00 38 b8 1d ba ..$+tw..<...8...
00000060: 24 21 03 02 00 00 00 80 14 de 13 00 7c 61 6e 69 $!..........|ani
00000070: 00 00 00 80 00 00 18 bc 00 a0 75 00 10 5a e6 1a ..........u..Z..
00000080: fb 8d 6b e6 28 00 00 00 5d 00 00 00 02 64 27 3a ..k.(...]....d': <- Start compressed LZMA data @0x88
00000090: 00 00 00 00 00 00 00 6f fd ff ff a3 b7 ff 47 3e .......o......G>
The flash image compared with the 2nd header section (starting from 0x50):
flash bootloader input file (from 0x50)
04 04 24 2b 2c 25 9f 08 01 df 13 00 38 cf be f4 ff 04 24 2b 74 77 bd 08 3c de 13 00 38 b8 1d ba
24 21 03 02 00 00 00 80 d9 de 13 00 2c 81 bc a8 24 21 03 02 00 00 00 80 14 de 13 00 7c 61 6e 69
00 00 00 80 00 00 18 bc 00 80 70 00 18 42 df 85 00 00 00 80 00 00 18 bc 00 a0 75 00 10 5a e6 1a
6e f3 c3 e9 28 00 00 00 5d 00 00 00 02 64 27 3a fb 8d 6b e6 28 00 00 00 5d 00 00 00 02 64 27 3a
If someone can contribute, can generate the fw for the binboy tool in this way:
after cloning my dwr921_binboy branch from the https://github.com/fid0did0/source.git repository, and generate the relevant image, go in a dedicated directory:
cd <IMAGE_DIR>
copy the binboy tool from the GPL distribution provided by dlink and generate the image file in this way:
cp <LEDE_DIR>/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/dwr-921-kernel.bin .
mv dwr-921-kernel.bin zImage.lzma
cp <LEDE_DIR>/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/root.squashfs .
mv root.squashfs squashfs.o
./binboy-static @linux
./binboy-static @rootfs
./binboy-static @mydlink
./binboy-static @all
If you find some important element share them here.
Bye.