Updating Ben with usbboot
Contents |
[edit] Alternative to using the reflash_ben.sh script
after the release_2010-12-14, the openwrt-xburst-qi_lb60-root.ubi file compress as openwrt-xburst-qi_lb60-root.ubi.bz2. so when you do it manually make sure bunzip it first.
[edit] Situation
In case you have trouble with the reflash_ben.sh script, manually executing the steps below is going to give you more insight in what is happening. You could also run "reflash_ben.sh -b" to install the boot-loader, then "reflash_ben.sh -k" to install the kernel, separately.
In case you're not able to enter usb-boot mode by pressing On+U at boot, have a look at the hardware usb-boot mode.
[edit] 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 Note that for ease, you can copy commands with Ctrl-c and Paste into a graphical terminal with Shift-Ctrl-V. Make sure not to include quotes.
- Make sure NanoNote is booted in USB-Mode
- To boot in USB-Mode, follow these steps:
- 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)
- (As an alternative to the above, press the power button while holding the 'U' key for the same result) currently unverified
- 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'
$ usbboot
- Boot the device
$ usbboot# boot
- Erase it
$ usbboot# nerase 0 4096 0 0
- This will erase your whole NAND. you only need to do this once theoretically if don’t want lost data in the whole NAND
- Next, we will flash u-boot. (u-boot goes to page 0, Linux kernel to page 1024, rootfs to page 2048)
$ usbboot# nprog 0 openwrt-xburst-qi_lb60-u-boot.bin 0 0 -n
- Next, we will flash the kernel.
$ usbboot# nprog 1024 openwrt-xburst-qi_lb60-uImage.bin 0 0 -n
- Finally, the rootfs. This will take a while, up to 15 minutes. I, Jane, always run 'bunzip2' on the downloaded file before flashing it. As it is working, you will see usbboot's loooong output scrolling down, some numbers slowly increasing.
$ usbboot# nprog 2048 openwrt-xburst-qi_lb60-root.ubi 0 0 -n
- You must use "nerase 16 1024 0 0" if you avoid step 9, this just will only erase rootfs related blocks
- For a sense of finality, quit usbboot with 'exit'
$ usbboot# exit
[edit] 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. To look at how the Ben can be updated from within Linux, see Updating_Ben_with_an_SD.
- Unless there is a real new feature in u-boot, it is safer not to update it.
- If one of the
nprogsteps doesn't work right away, just try again; or exit and restart usbboot, then issue the samenprogcommand again.
[edit] 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