This is an old revision of the document!


RT3052F HOWTO.

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

Get kernel entry point:

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

cd to kernel build directory:

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

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

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

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

and start it:

bootm 0x80800000
  • mips/rt3052f.1302856666.txt.gz
  • Last modified: 2011/04/15 08:37
  • by AleksandrRybalko