I have a working kexeced system on a TP-Link TL-WR741ND. After making the USB mod, and additional experimenting, I ended up with a working kexeced system.
Download sources:
svn checkout svn://svn.openwrt.org/openwrt/branches/backfire
Change directory to bildroot, then update & install feeds:
cd backfire && ./scripts/feeds update && ./scripts/feeds install -a
Create defconfig and enter MenuConfig:
make V=s defconfig && make menuconfig
Target System <wrap em><wrap em>-></wrap></wrap> Atheros AR71xx/AR7240/AR913x
Target Profile <wrap em>-></wrap> TP-LINK TL-WR741ND v1
Target Images <wrap em>-></wrap> ramdisk <wrap em>-></wrap> Compression <wrap em>-></wrap> lzma
Target Images <wrap em>-></wrap> tar.gz
Kernel modules <wrap em>-></wrap> Filesystems <wrap em>-></wrap>kmod-fs-ext2
kmod-fs-ext3
Kernel modules <wrap em>-></wrap> USB Support <wrap em>-></wrap> kmod-usb-corekmod-usb-ohci
kmod-usb-storage
Utilities <wrap em>-></wrap> kexec tools <wrap em>-></wrap> Configuration <wrap em>-></wrap> (mips) Target name for kexec kernel
Exit from menu and save configuration
make V=s
Modify:
./build_dir/linux-ar71xx/linux-2.6.32.27/arch/mips/kernel/machine_kexec.c
Change Line 55 to: kexec_start_address = (unsigned long) phys_to_virt(image<wrap em>-></wrap>start);
./build_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/linux-2.6.32.27/arch/mips/kernel/machine_kexec.cChange Line 55 to: kexec_start_address = (unsigned long) phys_to_virt(image<wrap em>-></wrap>start);
./target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
Add new line 176 (under config AR71XX_MACH_TL_WR741ND): select AR71XX_DEV_USB
./target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.cAdd Line 22 (under includes): #include "dev-usb.h"
Add line 102 (under static void __init tl_wr741nd_setup(void)): ar71xx_add_device_usb();
make kernel_menuconfig
Select the following:
Kernel type <wrap em>-></wrap> Kexec system call
General setup <wrap em>-></wrap> Support initial ramdisks compressed using LZMABuilt-in initramfs compression mode <wrap em>-></wrap> LZMA
Device Drivers <wrap em>-></wrap> SCSI device support <wrap em>-></wrap> M SCSI device supportM SCSI disk support
Probe all LUNs on each SCSI device
Device Drivers <wrap em>-></wrap> USB support <wrap em>-></wrap> M Support for Host-side USBM OHCI HCD support <wrap em>-></wrap> USB OHCI support for Atheros AR71xx
M USB Mass Storage support
USB announce new devices
Kernel hacking <wrap em>-></wrap> Default kernel command string <wrap em>-></wrap> rootfstype=ext2 noinitrd console=ttyS0,115200 board=TL-WR741ND
Modify: ./package/base-files/files/etc/preinit
Below . /etc/diag.sh, add line: rootfs=/dev/sda1
./target/linux/generic-2.6/base-files/initmount $rootfs /mnt -o noatime
Blocks wear out faster if written to every time a file is accessed
make clean && make V=s
Repeat Step 5
Clean operation creates issues, however it's necessary for the USB patch to work
make V=s
Partition external storage, then format first partition as ext2
Extract contents of ./bin/ar71xx/openwrt-ar71xx-rootfs.tar.gz to root of file system
Copy ./bin/ar71xx/openwrt-ar71xx-vmlinux-initramfs.elf to root of file system
(to be continued)