Debian
Qi-hardware's OpenWRT fork seems to be a faster and a better fit for the NanoNote Ben than Debian-based distributions. That being said, Debian-based distros do have advantages: more packages, more familiarity, and so on.
This page documents how to install Debian onto the NanoNote, and how to get sound and an X server functioning properly. There are three ways to do this:
- Download an image and a kernel
- Debootstrap Debian from scratch, see Debootstrap
- Install Debian by running the Debian Installer on the Nanonote, see Debian/Installer
The easiest and most reliable way seems to be the first way. Debootstrapping takes time and can go wrong, and using the Debian installer isn't that fast a process either.
There are currently two sites which have created Debian images: mister-muffin.de and pyneo.org. There does not seem to be any explanation as to how these images were created, but it was probably debootstrap or something similar.
Debian can both be run directly on the NanoNote (on its NAND memory) or on a microSD card. If you choose to run it on a microSD card, you only have to copy the Debian files to your microSD card; if you choose to run it on the NAND, you'll have to use the usbboot program -- see Xburst-tools.
This page shows how to install Debian Lenny and Debian sid. What you should choose depends on various things. Debian Lenny is stable but is getting old, while sid is unstable (or: can be unstable) but has the newest packages.
Contents |
Step 1: Download the necessary files
No matter what you choose, you will need a kernel and a u-boot image. Both OpenWRT and LibreWRT kernels will do. The ones from Qi-hardware naturally works:
wget http://downloads.qi-hardware.com/software/images/NanoNote/Ben/latest/openwrt-xburst-qi_lb60-u-boot.bin wget http://downloads.qi-hardware.com/software/images/NanoNote/Ben/latest/openwrt-xburst-qi_lb60-uImage.bin
Debian sid
Debian sid images are provided by mister-muffin.de.
- for microSD Card
wget http://mister-muffin.de/nanonote/debian-sid-mipsel.tar.lzma
- for NAND
wget http://mister-muffin.de/nanonote/debian-sid.ubi
Debian Lenny
Debian Lenny images are provided by pyneo.org.
- for microSD Card
wget http://pyneo.org/downloads/nano/debian-lenny.tgz
- for NAND
wget http://pyneo.org/downloads/nano/debian-lenny.ubi
If you would like a smaller Lenny, try downloading debian-lenny-mini.{tgz|ubi} instead.
Step 2: Install onto the NanoNote
for microSD card
First untar your downloaded rootfs into the first partition of your microSD card (if your microSD card has only one partition, use that). This is done in one of these two ways (depending on what Debian version you downloaded):
tar xvf debian-sid-mipsel.tar.lzma -C /path/to/sdcard/
or
tar xzf debian-lenny.tgz -C /path/to/sdcard/
After that, run:
mkdir -p /path/to/sdcard/boot/ cp openwrt-xburst-qi_lb60-uImage.bin /path/to/sdcard/boot/uImage
For NAND
Make sure you have usbboot installed, see Xburst-tools. Then run this:
usbboot -c "boot" # This will bootup the NanoNote usbboot -c "nerase 0 4096 0 0" # This will *erase* everything usbboot -c "nprog 0 openwrt-xburst-qi_lb60-u-boot.bin 0 0 -n" usbboot -c "nprog 1024 openwrt-xburst-qi_lb60-uImage.bin 0 0 -n"
Now you only need to transfer the rootfs ubi file. The exact command depends on what Debian version you downloaded:
usbboot -c "nprog 2048 debian-sid.ubi 0 0 -n"
or
usbboot -c "nprog 2048 debian-lenny.ubi 0 0 -n"
When usbboot is done, you can turn off your NanoNote by pressing the reset button on the back or by taking out the battery and disconnecting the usb cable.
Step 3: Configuring your system
Once you have installed your system, it will not work very well in the beginning.
Getting internet and fixing the SSH server
The first thing that may bother you is that the ssh server may not work. To fix this, you need internet (or maybe you don't? Alternative suggestions welcome), so start by taking a look at Ethernet over USB. After that, run this:
apt-get install --reinstall openssh-server ifconfig usb0 192.168.254.101
Now SSH should work.
Setup swapfile
Debian is a bit more hungry for memory than e.g. OpenWRT. You will surely need swap since you'll get a lot of complains when, for instance, depackaging stuff.
# dd if=/dev/zero of=/swapfile bs=1024 count=65536 # mkswap /swapfile # swapon /swapfile
To enable it at boot time, edit /etc/fstab to include:
/swapfile swap swap defaults 0 0
- Note: It might not be possible to create a swapfile on the NAND memory (or is it?), but it seems to work fine on microSD cards.
Install packages
# apt-get install fbterm emacs23-nox
Screenshots
Framebuffer utils
apt-get install fbterm
gives you a slightly smaller font.
fbterm --font-size=8
for me is in the readability limit :)
apt-get install fbi
nice image viewer.
apt-get install tudu apt-get install tina
todo managers
For PIM: I tried abook, but it needs minimum terminal size of 70x20. You can get it with fbterm --font-size=7, but it is hardly readable.
gmu on debian
After some fiddling with libraries, got it working on debian. A very nice and lightweight music player. Runs very smoothly :)
an important final detail was to add the correct fb mode to /etc/fb.modes: (just the output of fbset)
mode "320x240-103"
# D: 19.884 MHz, H: 27.090 kHz, V: 103.005 Hz
geometry 320 240 320 240 32
timings 50291 140 273 20 2 1 1
rgba 8/16,8/8,8/0,8/24
endmode
Working on packaging in - calamarz
Mplayer
apt-get install mplayer
Use this script to transcode video. Holy cow, it works!
TODO: package ingenic patched version that profits the IPU.
Quick flash install
Connect your NanoNote to your host computer and boot the NanoNote into USB Boot mode as you would normally perform a flash. Run the script below to install Debian Lenny mini on your NanoNote:
#!/bin/sh -e # This script flashes Debian Lenny mini onto a Ben Nanonote. # Niklas A. Femerstrand <qnrq@pipemail.org> echo 'Finding attached Nanonote...' lsusb | grep 601a:4740 echo 'Fetching requirements...' wget http://downloads.qi-hardware.com/software/images/NanoNote/Ben/latest/openwrt-xburst-qi_lb60-u-boot.bin wget http://pyneo.org/downloads/nano/openwrt-xburst-qi_lb60-uImage.bin wget http://pyneo.org/downloads/nano/debian-lenny-mini.ubi echo 'Flashing...' usbboot -c "boot" usbboot -c "nerase 0 4096 0 0" usbboot -c "boot" usbboot -c "nprog 0 openwrt-xburst-qi_lb60-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-mini.ubi 0 0 -n" echo 'Done!'
When the script has finished its execution, simply reboot your NanoNote. 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.
How to Prepare the microSD card using fdisk
Run this:
# umount /dev/sdb1 # fdisk /dev/sdb (make sure the /dev/sdb is your SD card. you can check that by 'dmesg' message)
Do this:
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): d
Selected partition 1
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (2-129651, default 2):
Using default value 2
Last cylinder, +cylinders or +size{K,M,G} (2-129651, default 129651): +2G
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (67653-129651, default 67653):
Using default value 67653
Last cylinder, +cylinders or +size{K,M,G} (67653-129651, default 129651):
Using default value 129651
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
Then run this:
# sudo mkfs.ext2 /dev/sdb1
Compiling a Kernel
Debian/Kernel using the openwrt toolchain


