Hmm, still not getting a good boot from NAND. Here's the result when I do the flash and update the setenv bootcmd data.
https://paste.c-net.org/RosaryProduced
Not sure what's happening there. Interesting that it notifies about the magic bitmask only the first time after flashing. Subsequent reboots just note that the primary kernel is missing and proceeds to boot the secondary.
I can probably set things up so you can remote into one of my laptops attached to the AP with a wifi smart switch available for hard reboots or something. Let me know if you think something like that would be useful.
As a note, when I go back to try straight up running the boot command provided from uboot, it gives me this:
Boot (PRI)-> cp.b 0xEC000000 0x2000000 0x2000000; interrupts off; bootm start 0x2000000; bootm loados; bootm ramdisk; fdt resize; fdt boardsetup; fdt chosen; bootm prep; bootm go
Wrong Image Format for bootm command
ERROR: can't get kernel image!
XIP Invalid Image ... OK
OK
EDIT:
So, if I do a clean setup, flash the kernel, and interrupt uboot before it can start messing with things, the bootcmd provided works to load the kernel from NAND. If you reboot without interrupting uboot, it kills it again. Seems to be having trouble setting and retaining the setenv bootcmd variable. Any ideas?
EDIT2:
Ok, I figured out where I'm messing up. I needed to run a "saveenv" command right after setting the variables in uboot. By the way, there's a lot of junk in there.
Here's the default environment environment variables for reference.
AC_HOSTNAME=Controller
AP_FLAG=0
AP_MODE=0
BOOT_BOOTROM="U-Boot 2010.12.6 (Mar 09 2016 - 19:56:30)"
BOOT_KERNEL=primary
CRYPTO_FLAG=3
CURR_VER=U-Boot 2010.12.6 (Mar 09 2016 - 19:56:30) (primary)
DEFAULT_SETTING=0
HW_RELEASE=513
LOGHDR=0xfffec00
LOGHDRRREASON=0xfffec24
MODEL=AP3825i-1
MOSTRECENTKERNEL=0
NUM_ANTENNAS=6
RADIOADDR0=D8:84:66:73:6C:10
RADIOADDR1=D8:84:66:73:6C:18
REBOOT_PATTERN_WDG=0x5A5A5A5A
REGION=NA
SERIAL#=16453819085M0000
SERVICEATTRS=ac_manager,ru_manager
SERVICETYPE=siemens
VERSIONBASE=0
WATCHDOG_COUNT=0x00000001
WATCHDOG_LIMIT=3
WLAN_ORDER_STRING=10
baudrate=115200
boot_diag=if fsload 0x0A000000 diag.gz.uImage; then if imi 0x0A000000; then bootm 0x0A000000 - -; exit; fi; fi;echo ERROR: Problem with diag image, dropping to interactive shell
boot_flash=source boot_kernel
boot_net=tftpboot 0x0a000000 vmlinux.gz.uImage.3825; bootm 0x0a000000 - -
bootargs=console=ttyS0,115200n81 panic=30 ro mtdparts=ec000000.nor:62848K(FS),128K(CALIB),512K(BootPRI),128K(NVRAM1),128K(NVRAM2),128K(NVRAM3),128K(NVRAM4),128K(NVRAM5),128K(NVRAM6),128K(NVRAM7),128K(NVRAM8),128K(CFG2),128K(CFG1) BOOT_KERNEL=primary BOOT_BOOTROM="U-Boot 2010.12.6 (Mar 09 2016 - 19:56:30)"
bootcmd=run boot_flash
bootdelay=2
eth1addr=D8:84:66:78:DC:F5
ethact=eTSEC1
ethaddr=D8:84:66:78:DC:F6
filesize=74
mem=261632k
menucmd=run boot_diag
mtddevname=FS
mtddevnum=0
mtdids=nor0=ec000000.nor
mtdparts=mtdparts=ec000000.nor:62848K(FS),128K(CALIB),512K(BootPRI),128K(NVRAM1),128K(NVRAM2),128K(NVRAM3),128K(NVRAM4),128K(NVRAM5),128K(NVRAM6),128K(NVRAM7),128K(NVRAM8),128K(CFG2),128K(CFG1)
netdev=eth0
partition=nor0,0
static_bootargs=console=ttyS0,115200n81 panic=30 ro
stderr=serial
stdin=serial
stdout=serial
uboot=u-boot.bin
ver=U-Boot 2010.12.6 (Mar 09 2016 - 19:56:30) (primary)
Environment size: 1871/65531 bytes
For anyone following along, here's the complete process (though you'll need to specify your own IP addresses for your tftp server)
-------
Setup
-------
setenv ipaddr 192.168.2.45
setenv serverip 192.168.2.30
setenv bootcmd 'cp.b 0xEC000000 0x2000000 0x2000000; interrupts off; bootm start 0x2000000; bootm loados; bootm ramdisk; fdt resize; fdt boardsetup; fdt chosen; bootm prep; bootm go'
saveenv
tftpboot 0x2000000 openwrt-mpc85xx-p1020-extreme-networks_ws-ap3825i-initramfs-kernel.bin
interrupts off; bootm start 0x2000000; bootm loados; bootm ramdisk; fdt resize; fdt boardsetup; fdt chosen; bootm prep; bootm go
-------
Network Config
-------
uci set network.lan.ipaddr="192.168.2.45"
uci set network.lan.gateway="192.168.2.1"
uci set network.lan.dns="192.168.2.1"
uci commit
/etc/init.d/network restart
-------
Flash
-------
mkdir /tmp/sysupgrade
cd /tmp/sysupgrade
wget https://downloads.laboratoryb.org/releases/snapshot/targets/mpc85xx/p1020/openwrt-mpc85xx-p1020-extreme-networks_ws-ap3825i-squashfs-sysupgrade.bin
sysupgrade -v /tmp/sysupgrade/openwrt-mpc85xx-p1020-extreme-networks_ws-ap3825i-squashfs-sysupgrade.bin
Following that, you should let openwrt start up and then run these (with your chosen IPs again)
uci set network.lan.ipaddr="192.168.2.45"
uci set network.lan.gateway="192.168.2.1"
uci set network.lan.dns="192.168.2.1"
uci commit
/etc/init.d/network restart
reboot
After rebooting, then you can install luci with these commands:
opkg update
opkg install luci
Everything seems to work just fine from there, other than the previously listed limitations of course.