I'm sorry to bring up what appears to be a dead thread, but I've been trying to get OpenWRT on this router and I've made some progress I wanted to share. So first of all, I have the WNR1000v2-VC version that was handed out by comcast. I'm not sure what the differences are between the VC and normal version. Someone above me mentioned something about not being able to upgrade the firmware, but I downloaded v1.0.0.12 from netgear's site and was able to update to it. In any case, what I really want is OpenWRT running on this router. Towards that end, I've actually made some progress, and I have a WNR1000v2-VC-OpenWRT.img file you can upload through the router's web interface. It boots the OpenWRT kernel but right now I'm stuck trying to determine the correct boot arguments. But before I get to that part, let me tell you guys how to build the image file yourselves.
First, download and extract the GPL sources from netgear;s gpl source site. I used this toolchain http://www.downloads.netgear.com/files/ … l_src.zip. Now, I wasn't actually able to compile any kind of firmware with this toolchain, but that's not why we need it. The important parts are the programs in the 'tools' directory. Follow the build directions in the toolchain and make changes as needed (I had to make several, and unfortunately I didn't document some of them) until the mkimage and mksquashfs-lzma programs are built. That's all you need from this toolchain.
Next, checkout the latest OpenWRT attitude_adjustment toolchain from subversion. I configured the toolchain using the console based menu, but for brevity here's a tinypaste link to the configuration file I used http://tny.cz/04cc1b8b. Go ahead and build the images using "make". Now what we have to do is use the filesystem tools from netgear's toolchain to assemble an image containing the kernel and rootfs created by the OpenWRT toolchain. Here's a script I wrote to accomplish this. Make sure to update the NETGEAR and OPENWRT variables to point to the respective SDKs.
#!/bin/bash
# settings
MODULE_NAME=WNR1000v2-VC
FW_VERSION=V1.0.0.3
FW_REGION=NA
HEAD_LENGTH=128
MAX_IMAGE_SIZE=3473408
NETGEAR=~/wnr1000v2/netgear/WNR1000v2-VC-V1.0.0.3_gpl_src
OPENWRT=~/wnr1000v2/openwrt
# copy tools
cp ${NETGEAR}/tool_build/squashfs3.0/squashfs-tools/mksquashfs-lzma .
cp ${NETGEAR}/tool_build/mkimage/mkimage .
cp ${NETGEAR}/tools/appendsum .
# kernel image
cp ${OPENWRT}/build_dir/linux-ar71xx_generic/vmlinux.elf .
KERNEL_LOAD=0x80060000
KERNEL_ENTRY=`readelf -a vmlinux.elf | grep "Entry"|cut -d":" -f 2`
rm vmlinux.elf
cp ${OPENWRT}/build_dir/linux-ar71xx_generic/vmlinux.bin.lzma .
./mkimage -A mips -O linux -T kernel -C lzma -n "Linux Kernel Image" -a ${KERNEL_LOAD} -e ${KERNEL_ENTRY} -d vmlinux.bin.lzma uImage
rm vmlinux.bin.lzma
# filesystem
cp ${OPENWRT}/build_dir/linux-ar71xx_generic/squashfs-64k/rootfs_image rootfs.squash
unsquashfs rootfs.squash
rm rootfs.squash
mkdir -p squashfs-root/image
cp uImage squashfs-root/image/uImage
./mksquashfs-lzma squashfs-root rootfs.squash -nopad -noappend -root-owned -be
rm -rf squashfs-root
./mkimage -A mips -O linux -T filesystem -C none -a 0x9f050000 -e 0x9f050000 -name "${MODULE_NAME}-${FW_VERSION}" -d rootfs.squash rootfs.bin
# firmware header
dd bs=${HEAD_LENGTH} if=/dev/zero count=1 of=head.pad
echo "device:${MODULE_NAME}" > head_info.pad
echo "version:${FW_VERSION}" >> head_info.pad
echo "region:${FW_REGION}" >> head_info.pad
cat head_info.pad head.pad | head -c ${HEAD_LENGTH} > header.bin
rm head.pad head_info.pad
# create the firmware image
cat header.bin rootfs.bin > firmware.bin
./appendsum firmware.bin ${MODULE_NAME}-OpenWRT.img
Please note that for right now the kernel load address (KERNEL_LOAD) is hardcoded into the script. I'm not sure if there's a way to auto-detect it, but I got that address from the output of the 'readelf -a vmlinux.elf' command. Once you run this script, you should have a file 'WNR1000v2-VC-OpenWRT.img'. You can upload that through the router's firmware upgrade page.
Now here's the part I'm stuck on. The kernel boots but can't find the the root partition. Here's a tinypaste link to my boot log http://tny.cz/3e8f1d20. Obviously, the boot arguments that worked for the netgear firmware aren't working for OpenWRT. I've tried to omit the root and rootfstype options hoping for some kind of auto-detect, but I get the same error (with block (0,0)). I've also tried guessing several variations, and no luck there either. Guys, we're like one step away from running OpenWRT on this router, and I could use your help.
Does anyone have any idea how we can find out the proper boot arguments to use? Also, if there's an OpenWRT developer reading this, I'd like to eventually update the OpenWRT image builder to make proper images for this board (hopefully without the outdated utilities from the netgear dsk), but I don't know how to go about doing that. Help!?
(Last edited by ctrlc-root on 5 Mar 2013, 02:54)