Updating Ben with usbboot
Contents |
Alternative to using the reflash_ben.sh script
Situation
I had tried to use the reflash_ben.sh script a number of times without a lot of success. I found myself having to run "reflash_ben.sh -b" to install the boot, then "reflash_ben.sh -k" to install the kernel, separately. One day even that didn't work.
Solution
Before beginning the following steps, ensure that you've downloaded the latest files into a working directory and that you execute the commands from that directory
- Take the battery out, unplug the USB cable, keep your NanoNote totally disconnected for a minute or so
- Use the carbonized rubber button to connect the usb boot pins in the battery compartment
- On your Linux machine, run 'watch lsusb'.
- Short the USB boot pins, connect the USB cable (don't use a hub)
- The numbers 601a:4740 should show up. if not, press the power button (still holding the USB boot pins closed/shorting)
- Now, from the working directory on the host, run 'usbboot'
- Next, type "boot"
- Then "nerase 0 4096 0 0" This will erase your device. you only need to do this once
- Next, we will flash u-boot Run "nprog 0 openwrt-xburst-u-boot.bin 0 0 -n" (u-boot goes to page 0, Linux kernel to page 1024, rootfs to page 2048)
- Next, we will flash the kernel Run "nprog 1024 openwrt-xburst-uImage.bin 0 0 -n"
- Finally, the rootfs Run "nprog 2048 openwrt-xburst-qi_lb60-root.ubi 0 0 -n" This will take a while, up to 15 minutes. As it is working, you will see usbboot's loooong output scrolling down, some numbers slowly increasing.
Notes
Usbboot is not very robust. Neither on the side of the code that is running on the NanoNote, nor how it implements the USB protocol, nor on how it handles NAND. It's much better to let the Linux kernel do this. Unless there is a real new feature in u-boot, leave u-boot unchanged on your NanoNote now
Known Errors
Error - no XBurst device found
- this means usbboot cannot find an xburst device (eg. the Ben NanoNote) attached to usb
- disconnect your device
- restart the device in usbboot mode and check with 'lsusb' if you can find the device