Restoring the original Buffalo firmware
Restoring the original Buffalo firmware is easy because Debian was installed to SATA disk whereas the Buffalo firmware is stored in flash and flash was not changed during the installation of Debian. The only change was to the configuration environment of u-boot in order to boot from disk rather than flash memory.
In order to boot the original Buffalo firmware again, you simply have to
configure the u-boot environment so the device will boot from flash. First
of all, install the Debian package uboot-envtools
which allows you to
manipulate the u-boot environment. You then have to copy the configuration
file kurobox-pro.config
from /usr/share/doc/uboot-envtools/examples
to
/etc/fw_env.config
:
cp /usr/share/doc/uboot-envtools/examples/kurobox-pro.config /etc/fw_env.config
Now you can change the variable bootcmd
so the device will boot from
flash:
fw_setenv bootcmd 'nboot ${default_kernel_addr} 0 20000; setenv bootargs ${bootargs_base} ${bootargs_root} ${buffalo_ver}; bootm ${default_kernel_addr}'
When you next boot, the device will run the original Buffalo firmware from MTD flash.
If you then want to go back and use the Debian system on hard disk, you can issue the following command from the Buffalo firmware:
nvram -c set bootcmd 'ide reset; ext2load ide 0:1 ${default_kernel_addr} /${kernel}; ext2load ide 0:1 ${default_initrd_addr} /${initrd}; setenv bootargs ${bootargs_base}; bootm ${default_kernel_addr} ${default_initrd_addr}'