Do a build using one of the working configuration files. It appears that binutils 2.17 and gcc 4.1.2 work, and it's plausible that some of the problems we've had are related to using other toolchain versions -- beware of them, is my advice. Configurations are in source:trunk/openwrt-configs for your convenience. Revision 9382 works, we cannot swear to anything later.
Thanks to Xavier Duret, in recent OpenWRT configurations you can build all the necessary kernel modules up front. Just select kmod-ide-aec62xx and kmod-ide-core under Kernel modules, Block Devices,
In order to recognize the hard disk, you have to get it spinning. This doesn't happen by default on the WL-700gE; the disk is physically activated using GPIO pins 3 or 6. OpenWRT does this during device initialization from userspace, by insmodding a kernel module "diag.ko" that comes from the broadcom-diag openwrt package. There's no real reason I can see that this shouldn't happen at boot time, but that's not how OpenWRT does it so we might as well follow suit.
root:/lib/modules/2.6.23.16nb4/kernel/misc# insmod diag.ko
Sleep for a few extra seconds after loading diag so that the hard disk can complete its spinup. (diag waits for five seconds, which is not quite long enough.) dmesg should report:
diag: Detected 'ASUS WL-700gE' diag: Spinning up HDD and enabling leds
After booting, before you load the aec62xx module, you must enable the IDE interface, which is PCI device 1191 (vendor), 0008 (device). That shows up as /sys/devices/pci0000:00/0000:00:02.0 on my box. You might as well enable all the PCI devices at once, though, with:
cd /sys/devices/pci0000:00
for FILE in */enable
do
echo -n 1 > $FILE
done
For me, the first device (the PCI to SSB bridge) fails with a resource conflict error. Huh. As long as it enables 02.0, you're doing OK.
Sleep for a few seconds after enabling the PCI devices.
Grab the following kernel modules -- you can wget them from the freesa box console prompt over the wired network. Of course you have to have networking turned on. At 9382, random was able to turn on networking by doing:
ifconfig eth0.0 down ifconfig eth0.0 192.168.236.150/24 up
The modules you need are:
ide-core.ko ide-disk.ko aec62xx.ko
insmod them in the order given above, sleeping for a couple of seconds after each one.
ide-core.ko should say something like:
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ide-disk.ko will not say anything until you load the aec62xx driver, but unless ide-disk.ko is loaded, the disk won't be recognized.
aec62xx.ko should say something like:
AEC6280: IDE controller at PCI slot 0000:00:02.0
AEC6280: chipset revision 16
AEC6280: ROM enabled at 0x40000000
AEC6280: 100% native mode on irq 6
ide2: BM-DMA at 0x0180-0x0187, BIOS settings: hde:pio, hdf:pio
ide3: BM-DMA at 0x0188-0x018f, BIOS settings: hdg:pio, hdh:pio
hde: HDT722516DLAT80, ATA DISK drive
hde: host side 80-wire cable detection failed, limiting max speed to UDMA33
ide2 at 0x100-0x107,0x10a on irq 6
hde: max request size: 512KiB
hde: 321672960 sectors (164696 MB) w/7674KiB Cache, CHS=20023/255/63, UDMA(33)
hde: cache flushes supported
hde: hde1 hde2 hde3 hde4
Of course, you won't have hde1..4 until you partition the disk. The last four lines are actually from ide-disk.ko.
Now it is time to drink a kamikaze, and dance the dance of geek victory.
eric's fdisk results
Device Boot Start End Blocks Id System /dev/hde1 1 20023 160834747 5 Extended /dev/hde5 1 13 104421+ 83 Linux /dev/hde6 14 257 1959929+ 82 Linux swap / Solaris /dev/hde7 258 501 1959929+ 82 Linux swap / Solaris /dev/hde8 502 988 3911827 83 Linux /dev/hde9 989 1718 5863724+ 83 Linux /dev/hde10 1719 10871 73521472 83 Linux /dev/hde11 10872 20023 73513439+ 83 Linux
planned: /boot, swap, swap, /var, /var/spool, /home, /
