How to Get the Best Operating System for Mobile – Debian

Pyneo & Debian goes Nano-Note

Prepare Host System

You have to install the tool “usbboot” to flash the Nano-Note:

wget http://projects.qi-hardware.com/media/upload/xburst-tools/files/xburst-tools_0.0+201002-1_i386.deb
dpkg -i xburst-tools_0.0+201002-1_i386.deb

Download what you need

You need an u-boot, kernel and rootfs. Use my kernel because the openwrt kernel is missing some options (inotify, fpu-emu, no splash, full size root partition). Use the official u-boot for the Nano-Note Ben with lb60-board, mine is made for the avt2-board.

wget http://downloads.qi-hardware.com/software/images/Ben_NanoNote_2GB_NAND/latest/openwrt-xburst-u-boot.bin
wget https://pyneo.org/downloads/nano/openwrt-xburst-qi_lb60-uImage.bin
# and one of
wget https://pyneo.org/downloads/nano/debian-lenny-mini.ubi
wget https://pyneo.org/downloads/nano/debian-lenny.ubi

There are some advantages in mine avt2-u-boot (kernel logging to tty1, usb-ether-mac address constant), you can get it from:

wget https://pyneo.org/downloads/nano/openwrt-xburst-u-boot.bin

Prepare the Nano-Note

Put the Nano into usb-boot-mode (see here for instructions how to do that). I encoutered lots of problems with nand so I do a nand full erase before any operation:

usbboot -c "boot"
sed -i 's/NAND_FORCEERASE = .*/NAND_FORCEERASE = 1/' /etc/xburst-tools/usbboot.cfg
usbboot -c "nerase 0 4096 0 0"

Hints for flashing:

  • The nano is in usbboot mode if you see the folloing when issues on the host:
    # lsusb | grep 601a:4740
    Bus 001 Device 038: ID 601a:4740
    
  • When usbboot says:
    Device unboot! Boot it first!
    

    issue a `usbboot -c boot`.

  • Sometimes the software booted on the nano seems to crash. You will see the following message in that case:
    Error - can't read bulk data from Ingenic device:
    

    (or similar). Just disconnect, wait a while (about 30sec) and reconnect the nano, reboot & try again.

  • When i did a full erase my nano was most often gone on the bus and the usbboot-program was unable to contact it afterwords (see above). i disconnected usb & battery and started all over. If you do so leave the nano off for quite a while, just re-plugging immediatly did not work for me.
  • If you see any messages about bad blocks or messages from usbboot without a newline at the end that where hints that flashing did not take place correctly. Start over with a full nand erase and reflash everything.
    Skip a old bad block !
    
  • Flash with battery removed
  • If you use the avt2-switch to toggle to usbboot mode redo the switching
  • If you encounter errors try another usb cable.
  • Use a direct usb connection, no hub inbetween.

I hope qi-hardware or sharism will come up with a solution of a more reliable flashing instead of this set of esoteric hints that changed the behaviour of usbboot for me.

Flash!

Flashing is straight forward:

usbboot -c "boot"
usbboot -c "nprog 0 openwrt-xburst-u-boot.bin 0 0 -n"
usbboot -c "nprog 1024 openwrt-xburst-qi_lb60-uImage.bin 0 0 -n"
usbboot -c "nprog 2048 debian-lenny.ubi 0 0 -n"

You can also just flash the rootfs but i encountered another problem with the dedicated erase – sometimes it also trashed kernel and/or u-boot. The commands would be

usbboot -c "boot"
usbboot -c "nerase 16 4079 0 0"
usbboot -c "nprog 2048 debian-lenny.ubi 0 0 -n"

Again if you see strange messages do a full erase as described above.

Reboot.

10 sec later…

Using Debian on the Nano-Note

Console

You may use your Nano-Note via console & keyboard. The keyboard is tiny but it has all keys that were needed to use a Unix-like system.

In the setup tty1 (the active console after boot) is dedicated to logging and does not show a login. Activate the second console (Alt-F2 or Alt-Right) to get a login prompt.

The root-user has an empty password, a user named “user” is dedecated for running programs non-root. If you are fed up with the keyboard you may step over to the next chapter.

Network

Your nano will get the ip 192.168.0.204 and expects your host to be a dns and gateway into the internet with ip 192.168.0.197 (See networked concept here). ssh is listening and the root-pwd is empty. It will start X via nodm under user “user” and a rxvt inside (which doesn’t help you much because the keymappings are missing). Also pyneod and gsm-muxer are running already which could lead to memory problems on a lb60-board.

The commands to setup the host network would be (assuming networkinterface usb0):

ifconfig usb0 192.168.0.197 up
route add 192.168.0.204 usb0
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -j MASQUERADE

Building / Compiling

If you need a package that is not build for your platform you can now do:

apt-get install build-essential debhelper cdbs python-dev libgwenhywfar47-dev libaqbanking29-dev
dget --build -u http://mister-muffin.de/pyneo/deb-sources/pyneo-pybankd_1.26-1.dsc
dpkg -i pyneo-pybankd_1.26-1_mipsel.deb

If you ever do a `du` and a `df -sch /` and compare the numbers you will see a huge difference (du is 50% of df here). Don’t be scared, this is ubifs’s on-the-fly compression feature.

Ending

Try to shutdown the Nano orderly always. Ubifs has no fsck or the like to repair a corrupted filesystem. So always issue an `halt` or `shutdown` when done.

0
Comments

Leave a Reply

Your email address will not be published. Required fields are marked *