Add support for Kasda KW6516

Hi to all the OpenWrt community, I'd like to add the support for this board.
It's based on MediaTek MT7621A with MediaTek MT7612E (an+ac) (2x2:2) for 5Ghz and MediaTek MT7603E (bgn) (2x2:2) for 2.4Ghz.
It has 16MB spi flash and 128MB ram.
WikiDevi page

UBoot log
U-Boot 1.1.3 (Nov 25 2016 - 09:05:05)


Board: Ralink APSoC DRAM:  128 MB

relocate_code Pointer at: 87fb8000


Config XHCI 40M PLL 

flash manufacture id: ef, device id 40 18

find flash: W25Q128BV

*** Warning - bad CRC, using default environment


============================================ 

Ralink UBoot Version: 4.3.0.0

-------------------------------------------- 

ASIC MT7621A DualCore (MAC to MT7530 Mode)

DRAM_CONF_FROM: Auto-Detection 

DRAM_TYPE: DDR3 

DRAM bus: 16 bit

Xtal Mode=5 OCP Ratio=1/3

Flash component: SPI Flash

Date:Nov 25 2016  Time:09:05:05

============================================ 

icache: sets:256, ways:4, linesz:32 ,total:32768

dcache: sets:256, ways:4, linesz:32 ,total:32768 


 ##### The CPU freq = 880 MHZ #### 

 estimate memory size =128 Mbytes

#Reset_MT7530


Please choose the operation: 

   1: Load system code to SDRAM via TFTP. 

   2: Load system code then write to Flash via TFTP. 

   3: Boot system code via Flash (default).

   4: Entr boot command line interface.

   7: Load Boot Loader code then write to Flash via Serial. 

   9: Load Boot Loader code then write to Flash via TFTP. 

 4  3  2  1  0 

   

3: System Boot system code via Flash.

## Booting image at bfc50000 ...

   Image Name:   OpenWrt Linux-3.10.14

   Image Type:   MIPS Linux Kernel Image (lzma compressed)

   Data Size:    1573191 Bytes =  1.5 MB

   Load Address: 80001000

   Entry Point:  80001000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

No initrd

## Transferring control to Linux (at address 80001000) ...

## Giving linux memsize in MB, 128


Starting kernel ...



LINUX started...
MTD
mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0
Creating 5 MTD partitions on "raspi":
0x000000000000-0x000001000000 : "ALL"
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "Config"
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x000001000000 : "firmware"
0x0000001d0187-0x000001000000 : "rootfs"
mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
mtd: partition "rootfs_data" created automatically, ofs=0x730000, len=0x8d0000
0x000000730000-0x000001000000 : "rootfs_data"

root@Kasda:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 01000000 00010000 "ALL"
mtd1: 00030000 00010000 "Bootloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd4: 00fb0000 00010000 "firmware"
mtd5: 00e2fe79 00010000 "rootfs"
mtd6: 008d0000 00010000 "rootfs_data"

Now what are the next steps? I am a bit lost.
I've already forked the OpenWrt repo, should I start writing a DTS for the board?
Then I have another question: if I build a ramdisk with the build system I should be able to load it via Uboot's option 1 (Load system code to SDRAM via TFTP), is that right?

Thank you for your help.

yes

First connect a serial port ( if possible )
Putty ...
SSH ...

After cat /proc/mtd -> save mtd
cat /dev/mtdx > mtdx.bin

WINSCP -> connect
Save all mtd in your computer

Version of original OpenWrt ??

If possible opkg or manually install dtc

run : dtc -I fs /proc/device-tree > old.dts & save in your computer
*
Use this file for generate a new OpenWrt dts file

Also you can test with WR1200JS Openwrt firmware ( similar hardware )

Yes, I've already gained access to the serial UART

There are 6 partitions, do I need to copy all of them?

root@Kasda:/# ls /dev/mtd*
/dev/mtd0       /dev/mtd2ro     /dev/mtd5       /dev/mtdblock1  /dev/mtdblock6
/dev/mtd0ro     /dev/mtd3       /dev/mtd5ro     /dev/mtdblock2
/dev/mtd1       /dev/mtd3ro     /dev/mtd6       /dev/mtdblock3
/dev/mtd1ro     /dev/mtd4       /dev/mtd6ro     /dev/mtdblock4
/dev/mtd2       /dev/mtd4ro     /dev/mtdblock0  /dev/mtdblock5

No. It's a fork from Barrier Breaker.

BusyBox v1.22.1 (2017-05-24 11:15:33 CST) built-in shell (ash)

 BARRIER BREAKER (Barrier Breaker, unknown)
 -----------------------------------------------------
 MTK OpenWrt SDK V3.4
 revision :  benchmark : APSoC SDK 5.0.1.0
 kernel : 144992
 -----------------------------------------------------
root@Kasda:/# uname -ae
Linux Kasda 3.10.14 #46 SMP Wed Dec 13 17:57:26 CST 2017 mips GNU/Linux

There is no device-tree under /proc

ls -l /proc
root@Kasda:/# ls -l /proc/
-r--r--r--    1 root     root             0 Dec 13 14:38 buddyinfo
dr-xr-xr-x    3 root     root             0 Dec 13 14:38 bus
-r--r--r--    1 root     root             0 Dec 13 14:38 cmdline
-r--r--r--    1 root     root             0 Dec 13 14:38 consoles
-r--r--r--    1 root     root             0 Dec 13 14:38 cpuinfo
-r--r--r--    1 root     root             0 Dec 13 14:38 crypto
-r--r--r--    1 root     root             0 Dec 13 14:38 devices
-r--r--r--    1 root     root             0 Dec 13 14:38 diskstats
dr-xr-xr-x    2 root     root             0 Dec 13 14:38 driver
-r--r--r--    1 root     root             0 Dec 13 14:38 execdomains
-r--r--r--    1 root     root             0 Dec 13 14:38 filesystems
dr-xr-xr-x    3 root     root             0 Dec 13 14:38 fs
-r--r--r--    1 root     root             0 Dec 13 14:38 interrupts
-r--r--r--    1 root     root             0 Dec 13 14:38 iomem
-r--r--r--    1 root     root             0 Dec 13 14:38 ioports
dr-xr-xr-x   66 root     root             0 Dec 13 14:38 irq
-r--r--r--    1 root     root             0 Dec 13 14:38 kallsyms
-r--------    1 root     root     2147278848 Dec 13 14:38 kcore
-r--------    1 root     root             0 Dec 13 10:36 kmsg
-r--r--r--    1 root     root             0 Dec 13 14:38 loadavg
-r--r--r--    1 root     root             0 Dec 13 14:38 locks
-r--r--r--    1 root     root             0 Dec 13 14:38 meminfo
-r--r--r--    1 root     root             0 Dec 13 14:38 misc
-r--r--r--    1 root     root             0 Dec 13 14:38 modules
lrwxrwxrwx    1 root     root            11 Dec 13 14:38 mounts -> self/mounts
dr-xr-xr-x    2 root     root             0 Dec 13 14:38 mt7621
-r--r--r--    1 root     root             0 Dec 13 14:38 mtd
lrwxrwxrwx    1 root     root             8 Dec 13 14:38 net -> self/net
-r--r--r--    1 root     root             0 Dec 13 14:38 pagetypeinfo
-r--r--r--    1 root     root             0 Dec 13 14:38 partitions
dr-xr-xr-x    3 root     root             0 Dec 13 14:38 scsi
lrwxrwxrwx    1 root     root             0 Jan  1  1970 self -> 24499
-r--------    1 root     root             0 Dec 13 14:38 slabinfo
-r--r--r--    1 root     root             0 Dec 13 14:38 softirqs
-r--r--r--    1 root     root             0 Dec 13 14:38 stat
-r--r--r--    1 root     root             0 Dec 13 14:38 swaps
dr-xr-xr-x    1 root     root             0 Dec 13 10:36 sys
--w-------    1 root     root             0 Dec 13 14:38 sysrq-trigger
-r--r--r--    1 root     root             0 Dec 13 14:38 timer_list
dr-xr-xr-x    4 root     root             0 Dec 13 14:38 tty
-r--r--r--    1 root     root             0 Dec 13 14:38 uptime
-r--r--r--    1 root     root             0 Dec 13 14:38 version
-r--------    1 root     root             0 Dec 13 14:38 vmallocinfo
-r--r--r--    1 root     root             0 Dec 13 14:38 vmstat
-r--r--r--    1 root     root             0 Dec 13 14:38 zoneinfo

Yes, I'm going to test with the WR1200JS image.