RT3052F HOWTO.

RT3050F/RT3052F TODO

PPE NAT h/w acceleration

PPE special target on if_rt

PPE PPPoE h/w acceleration

same

if_rt instance support

it have GMAC1 and GMAC2, so we can use it w/o sw VLANs

if_rt Scatter/Gather support

automatic Scatter/Gather packets, may help to faster replace packets header

Invoke GDMA

we can use generic DMA for memcpy

Fix usb

Fix rt2872 wireless

HOST SIDE

Get a fresh copy of your "head" :)

svn co svn://svn.freebsd.org/base/head

cd to it:

cd head

Build mipsel toolchain and then kernel:

make KERNCONF=RT305X TARGET=mips TARGET_ARCH=mipsel kernel-toolchain buildkernel

cd to kernel build directory:

cd /usr/obj/mips.mipsel/${PATH_TO_DIR_WITH_HEAD}/sys/RT305X

Get kernel entry point:

readelf -h kernel | grep 'Entry point address:'
  Entry point address:               0x80001120

Next steps related for most D-Link boxes, but not always related to other devices

Make binary kernel from elf:

/usr/obj/mips.mipsel/${PATH_TO_DIR_WITH_HEAD}/tmp/usr/bin/objcopy -O binary kernel kernel.bin

Compress kernel with oldlzma (oldlzma - LZMA 4.17)

oldlzma e kernel.bin kernel.bin.oldlzma

Make U-Boot image:

uboot_mkimage -A mips -O linux -T kernel  -C lzma  -a 0x80001120  -e 0x80001120  -n 'FreeBSD Kernel Image'  -d kernel.bin.oldlzma  kernel.oldlzma.uboot

Then copy U-Boot kernel image to tftp server path (I use /tftpboot/ )

cp kernel.oldlzma.uboot /tftpboot/DIR-620/kernel.oldlzma.uboot

DEVICE SIDE

Break U-Boot to prompt, then load kernel image:

tftpboot 0x80800000 DIR-620/kernel.oldlzma.uboot

and start it:

bootm 0x80800000

mips/RT3052F (last edited 2019-09-07T07:55:59+0000 by LorenzoSalvadore)