#!/bin/sh

# boot kernel from bad block aware partition
cp /dev/nand0.kernel.bb /dev/mem.kernel
bootargs="quiet console=ttyS0,115200 panic=10 mem=64M"
bootargs="$bootargs root=/dev/mtdblock1 rootfstype=jffs2 ro"
bootargs="$bootargs wr_nic.macaddr=$macaddr"
bootz /dev/mem.kernel

# If it don't boot, show the menu
echo "Can't boot from NAND"
# Sleep 2 seconds so you can see the message and return to menu
sleep 2
menu -s boot
