Debian

From Qi-Hardware
Revision as of 20:08, 29 December 2010 by NqpZ (Talk | contribs)
Jump to: navigation, search

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:

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.


Contents

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.

Prepare SD card

  1. umount /dev/sdb1
  2. fdisk /dev/sdb (make sure the /dev/sdb is your SD card. you can check that by 'dmesg' message)
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.
  1. sudo mkfs.ext2 /dev/sdb1

Install Debian to SD Card

  1. wget http://mister-muffin.de/nanonote/debian-sid-mipsel.tar.lzma
  2. tar xvf debian-sid-mipsel.tar.lzma -C /PATH/TO/YOUR/SDCARD/
  3. wget http://pyneo.org/downloads/nano/openwrt-xburst-qi_lb60-uImage.bin
  4. cp openwrt-xburst-qi_lb60-uImage.bin /PATH/TO/YOUR/SDCARD/boot/uImage

Prepare bootloader:

  1. refresh the last U-Boot(make sure your U-Boot is after 2010-09-14). after reflash uboot we can press [M] when power-on to boot from sd card. then "apt-get update" :-)
$ wget http://downloads.qi-hardware.com/software/images/NanoNote/Ben/testing/2010-09-14/openwrt-xburst-qi_lb60-u-boot.bin
$ sudo usbboot -c "boot;nprog 0 openwrt-xburst-qi_lb60-u-boot.bin 0 0 -n"

Alternative Installation Method

How to install Debian by running the Debian Installer on the Nanonote.

Setup swapfile

You will surely need it 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

Install Package

# apt-get install fbterm emacs23-nox

Screenshot

Emacs.debian.ben.nanonote.png Irc.emacs.debian.ben.nanonote.png Mult.windows.emacs.debian.ben.nanonote.png

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.

Compiling Kernel

Debian/Kernel using the openwrt toolchain

Personal tools
Namespaces
Variants
Actions
Navigation
interactive
Toolbox
Print/export