Differences between revisions 15 and 16
Revision 15 as of 2011-08-15 10:56:22
Size: 14610
Editor: XTaran
Comment: Link to SOSBOOT
Revision 16 as of 2011-08-15 11:05:39
Size: 14644
Editor: XTaran
Comment: Add cross-reference to SOSBOOT entry elsewhere on that page.
Deletions are marked like this. Additions are marked like this.
Line 165: Line 165:
Boot into [[http://gitorious.org/ac100/sosboot|SOSBOOT]]. Boot into [[http://gitorious.org/ac100/sosboot|SOSBOOT]]. (See also SOSBOOT section above.)

Installation

Currently the best installation instructions and software are here: http://lists.debian.org/debian-arm/2011/07/msg00049.html

Translation(s): none

DebianOn is an effort to document how to install, configure and use Debian on some specific hardware. Therefore potential buyers would know if that hardware is supported and owners would know how get the best out of that hardware.

The purpose is not to duplicate the Debian Official Documentation, but to document how to install Debian on some specific hardware.

If you need help to get Debian running on your hardware, please have a look at our user support channels where you may find specific channels (mailing list, IRC channel) dedicated to certain types of hardware.

Models covered
Toshiba AC100

~
- Video card NVidia (adapt this list to actually match options available. Common features are listed below)
- Screen size: 10" wide
- Wireless card
- Disk and Ram size, optical device
- Other options, like fingerprint reader, bluetooth... -~

Overall Status

Core Components

[ATTACH]

Boot Standard Kernel:

[-] (Needs kernel from external repository)

LAN network card:

[-]

Detect CD/DVD:

[-]

Detect hard drives:

[?]

Extra Features

CPU Frequency Scaling

[?]

Hibernation

[?]

Sleep / Suspend

[?]

Xorg

[?]

- OpenGL

[?]

- Resize-and-Rotate(randr)

[?]

Switch to External Screen

[?]

Mouse

- Built-in (Trackpoint)

[?]

- Built-in (Touchpad)

[?]

Modem

[-]

Wireless/Wifi

[?]

Keyboard's Hotkeys

[?]

Legend :
{OK} = OK ; {X} Unsupported(No Driver) ; /!\ = Error (Couldn't get it working); [?] Unknown, Not Test ; [-] Not-applicable
{i} = Configuration Required; X-( = Only works with a non-free driver and or firmware

Important Note

{X} This describes installing Debian on SD card. In order to boot Debian you will need overwrite your Android boot image (but we will make a backup so you can restore it later). Android OS itself and its configuration should stay intact, but you are strongly advised to make a backup of the internal eMMC flash before starting.

Debian armhf installation HOWTO

This describes the steps required to install Debian armhf (arm hard float) on SD card. I believe that similar steps would be sufficient to install armel, but I didn't try.

You will need:

  • an SD card (2 Gb or larger)
  • a USB type A to USB mini type B cable
  • root access to i386 or amd64 PC running Debian
  • a cardreader for the PC (internal or external) -- the PC should be able to read/write the SD card
  • Internet access on the PC

Having a WiFi network with Internet access will help you during last steps of installation.

How Toshiba AC100 boots

(This can be inaccurate in details, but accurate enough to understand the installation process)

  1. When you press Power the bootloader from the Tegra ROM starts.
  2. If this bootloader detects that Ctrl-ESC is pressed, the device is put into recovery mode (black screen, but you can manipulate the data from your PC with nvflash utility).
  3. ... the bootloader reads fuse bits, reads and starts next bootloader from eMMC, ...
  4. At least we are at the point where some bootloader has read the partition table. LNX (number 6) partition is read. It should contain an Android-style boot image that consists of a kernel and initramfs along with boot parameters (kernel load addresses and kernel boot parameters).
  5. The kernel is started. Kernel starts initramfs scripts that find and mount root file system.

(This description is based on http://www.muromec.org.ua/2011/03/blog-post.html)

The most important (for us) part of boot process is the boot image.

nvflash

nvflash is a (closed-source) utility that allows you to read and write internal eMMC flash from recovery mode.

Make a backup

See http://gitorious.org/ac100/pages/Installation

SOSBOOT

Sosboot http://gitorious.org/ac100/sosboot is a boot image (goes to the LNX partition) with a minimalistic kernel and initramfs that includes an interactive shell. Download prebuilt image from: http://share.grandou.net/ac100/sosboot/ It can be used to mount your SD card and chroot into its file system to fix anything.

To write SOSBOOT to LNX partition boot AC100 in recovery mode and run on your PC:

root@pc# LD_LIBRARY_PATH=. ./nvflash --bl fastboot.stock.bin --download 6 sosboot-r3.img --go

After that hold Power until AC100 shuts down. Boot and verify that SOSBOOT works.

Bootstrap Debian armhf on PC

The goal of this step is to create a directory that will contain all files for the root directory.

root@pc# apt-get install debootstrap qemu-user-static debian-ports-archive-keyring
root@pc# mkdir armhf_root
root@pc# debootstrap --foreign --arch=armhf --keyring=/usr/share/keyrings/debian-ports-archive-keyring.gpg sid armhf_root $MIRROR

Where $MIRROR is a debian-ports mirror, for example use main site http://ftp.debian-ports.org/debian or select from http://www.debian-ports.org/mirrors

Because our PC can't run arm binaries we use debootstrap in foreign mode. First stage just unpacked the packages. Second stage runs configuration scripts:

root@pc# cp /usr/bin/qemu-arm-static armhf_root/usr/bin
root@pc# chroot armhf_root /debootstrap/debootstrap --second-stage

Now add /etc/apt/sources.list and install kernel:

root@pc# cat > armhf_root/etc/apt/sources.list
deb http://ftp.debian-ports.org/debian unstable main
#deb http://ftp.debian-ports.org/debian unreleased main
#deb http://ftp.debian-ports.org/debian experimental main

deb http://people.debian.org/~jak/ac100/ unreleased main non-free
#deb-src http://people.debian.org/~jak/ac100/ unreleased main non-free
root@pc# chroot armhf_root apt-get update
[...]
root@pc# chroot armhf_root apt-get install abootimg flashkernel linux-image-ac100
[...]

Add bootimg.cfg to create a proper boot image:

root@pc# cat > armhf_root/boot/bootimg.cfg
bootsize = 0x800000
pagesize = 0x800
kerneladdr = 0x10008000
ramdiskaddr = 0x11000000
secondaddr = 0x10f00000
tagsaddr = 0x10000100
name = jak-ac100
cmdline = root=/dev/mmcblk1p1 mem=448M@0M nvmem=64M@448M vmalloc=320M video=tegrafb console=tty0 usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=recovery:700:a00:800,boot:1100:1000:800,mbr:2100:200:800,system:2300:25800:800,cache:27b00:32000:800,misc:59b00:400:800,userdata:5a000:9a600:800

Kernel command line shown above works for my AC100-117 (8 Gb internal flash). It should work for ather models apart form tegrapart= option that specifies the partition table for internal flash (?) See http://gitorious.org/ac100/pages/CommandLine for command lines for other models.

Edit /etc/initramfs-tools/initramfs.conf to make initrd images smaller (to fit into LNX partition):

root@pc# vim armhf_root/etc/initramfs-tools/initramfs.conf
...
MODULES=dep
...

Partition SD card

Create a root partition and run mkfs. (TODO: explain how to align ext4 to SD card erase block)

Copy prepared files to root partition

root@pc# cp -ax armhf_root/* /media/sdcard/

Write kernel to internal flash (LNX partition)

Boot into SOSBOOT. (See also SOSBOOT section above.)

root@(none)# mount /dev/mmcblk1p1 /mnt
root@(none)# mount --bind /dev /mnt/dev
root@(none)# mount --bind /proc /mnt/proc
root@(none)# mount --bind /sys /mnt/sys
root@(none)# chroot /mnt /bin/bash

Regenerate initramfs and verify that it is small (should be less than 2 Mb)

root@host# update-initramfs -u
root@host# ls -lh /boot/initrd*
-rw-r--r-- 1 root root 1.7M Aug 13 05:02 /boot/initrd.img-2.6.38-ac1-ac100

Write boot image to internal flash:

root@host# flash-kernel

Exit chroot and umount fs:

root@host# exit
root@(none)# umount /mnt/sys
root@(none)# umount /mnt/proc
root@(none)# umount /mnt/dev
root@(none)# umount /mnt

Reboot. Debian should boo.

If it didn't work...

If the kernel didn't boot you can write SOSBOOT with nvflash again and examine SD card contents, read logs etc.

Configuration

Display

  • (not covered yet)

Audio

  • (not covered yet)

Mouse

  • (not covered yet)

Power Management

  • (not covered yet)

WiFi

  • (not covered yet)

Modem

  • (not covered yet)


System Summary

/proc/cpuinfo

Toshiba AC100-117

cat /proc/cpuinfo

Processor       : ARMv7 Processor rev 0 (v7l)
processor       : 0
BogoMIPS        : 1998.84

processor       : 1
BogoMIPS        : 19.45

Features        : swp half thumb fastmult vfp edsp thumbee vfpv3 vfpv3d16 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x1
CPU part        : 0xc09
CPU revision    : 0

Hardware        : Toshiba AC100 / Dynabook AZ
Revision        : 0000
Serial          : 0000000000000000

lspci

No PCI (?)

lsusb

Toshiba AC100-117

lsusb -v | grep -E '\<(Bus|iProduct|bDeviceClass|bDeviceProtocol)' 2>/dev/null

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  bDeviceClass            9 Hub
  bDeviceProtocol         1 Single TT
  iProduct                2 Tegra EHCI Host Controller
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  bDeviceClass            9 Hub
  bDeviceProtocol         1 Single TT
  iProduct                2 Tegra EHCI Host Controller
Bus 001 Device 002: ID 0424:2512 Standard Microsystems Corp. USB 2.0 Hub
  bDeviceClass            9 Hub
  bDeviceProtocol         2 TT per port
  iProduct                0 
  bDeviceClass            9 Hub
  bDeviceProtocol         0 Full speed (or root) hub
Bus 002 Device 002: ID 0424:2513 Standard Microsystems Corp. 
  bDeviceClass            9 Hub
  bDeviceProtocol         2 TT per port
  iProduct                0 
  bDeviceClass            9 Hub
  bDeviceProtocol         0 Full speed (or root) hub
Bus 001 Device 003: ID 0db0:3871 Micro Star International 
  bDeviceClass            0 (Defined at Interface level)
  bDeviceProtocol         0 
  iProduct                2 802.11 n WLAN
      (Bus Powered)
  bDeviceClass            0 (Defined at Interface level)
  bDeviceProtocol         0 
  (Bus Powered)
Bus 001 Device 004: ID 0db0:a871 Micro Star International 
  bDeviceClass          224 Wireless
  bDeviceProtocol         1 Bluetooth
  iProduct                0 
Bus 002 Device 003: ID 0bda:58f2 Realtek Semiconductor Corp. 
  bDeviceClass          239 Miscellaneous Device
  bDeviceProtocol         1 Interface Association
  iProduct                1 USB Camera
      (Bus Powered)
  bDeviceClass          239 Miscellaneous Device
  bDeviceProtocol         1 Interface Association
  (Bus Powered)

USB Host controllers entries (without OHCI, UHCI, EHCI) are removed too.

Resources

Attachments

Some configuration files and sample outputs.

Credits

Julian Andres Klode wrote

Installation guide (all on the device itself):

  1. Bootstrap Debian on USB stick, SD, or eMMC
  2. Install busybox and initramfs-tools
  3. Set MODULES=dep in /etc/initramfs-tools/initramfs.conf
  4. Copy /boot/bootimg.cfg to Debian and configure cmdline
  5. (bind) mount /proc and /dev
  6. Install abootimg flash-kernel linux-image-ac100

Alternatively, you can also do all steps on another machine, reboot with the Ubuntu kernel into the Debian system and then run flash-kernel manually to install the Debian kernel.

It's a bit complicated currently, because there's no boot.img available that you could nvflash to the target device. But that's actually the most complicated part, the rest is fairly easy.