16844
Comment: now armhf is in debian standard distribution
|
16845
commented out repo not working
|
Deletions are marked like this. | Additions are marked like this. |
Line 122: | Line 122: |
deb http://ftp.debian-ports.org/debian unstable main | #deb http://ftp.debian-ports.org/debian unstable main |
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 |
||
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) |
Works at random times |
|
Modem |
[-] |
|
Wireless/Wifi |
|
|
Keyboard's Hotkeys |
[?] |
Legend :
= OK ; Unsupported(No Driver) ; = Error (Couldn't get it working); [?] Unknown, Not Test ; [-] Not-applicable
= Configuration Required; = Only works with a non-free driver and or firmware
Important Note
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.
Toshiba AC100 boot process
(This may be inaccurate in certain details, but should be accurate enough to understand the installation process.)
- When you press Power the bootloader from the Tegra ROM starts.
- 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).
- ... the bootloader reads fuse bits, reads and starts next bootloader from eMMC, ...
- 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).
- 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 proprietary, closed-source tool that allows you to read and write to the internal eMMC flash on the AC100 in recovery mode. You can download the nvflash tool along with other tools from nVidia here: http://developer.nvidia.com/content/linux-tegra-release-12-alpha-1-released
Make a backup
Before proceeding with the Debian installation, it is wise to make a back up of the current OS. 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 on our local machine that will contain all files for the root directory of the AC100.
root@pc# apt-get install debootstrap qemu-user-static binfmt-support qemu root@pc# mkdir armhf_root root@pc# debootstrap --foreign --arch=armhf sid armhf_root $MIRROR
Where $MIRROR is a debian-ports mirror, for example use main site ftp://ftp.debian.org/debian/ or select from http://www.debian.org/mirrors/list
Presumably the processor in your PC is an x86, this means it cannot run binaries that are compiled for another architecture, like ARM. The AC100 has an ARM chip so we'll have to use the "foreign" mode with debootstrap. From the debootstrap man page; "foreign mode just does the initial unpack phase of bootstrapping only. A copy of debootstrap sufficient for completing the bootstrap process will be installed as /debootstrap/debootstrap in the target filesystem." The second stage runs the 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 a kernel to the chroot:
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://ftp.debian.org/debian/ sid main non-free contrib 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 flash-kernel linux-image-ac100 [...]
Also install the driver and tools to make the network card work:
root@pc# chroot armhf_root apt-get install firmware-ralink wireless-tools wpasupplicant [...]
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 other models apart from the 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 ...
Populate /etc/fstab (change filesystem and mount options as appropriate):
root@pc# cat >> armhf_root/etc/fstab /dev/mmcblk1p1 / ext4 rw,noatime,commit=30,barrier=1,data=ordered 0 0
Populate /etc/network/interfaces:
root@pc# cat >> armhf_root/etc/network/interfaces auto lo iface lo inet loopback
Partition SD card
Create a root partition and run mkfs (separate /boot is not needed). It is recommended to align the partition to SD card erase block. The simplest way to do this is to use GPT partition table (instead of MSDOS-style partition table) and let gdisk (GPT fdisk) do the alignment for you: gdisk creates partitions aligned to 1 Mb boundary by default. Detailed instructions are available here: https://wiki.archlinux.org/index.php/Solid_State_Drives#Using_GPT_-_RECOMMENDED_METHOD
Create ext4 filesystem with:
# mkfs -t ext4 -v -b 4096 -E stride=32,stripe-width=32,resize=32G /dev/sdX1
ext4 block size is set to 4K. 4K * 32 = 128K, which is a common SD erase block size.
See also: http://lwn.net/Articles/428584/
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 boot.
Configuration
Run dpkg-reconfigure locales to set locale, dpkg-reconfigure tzdata to choose timezone, dpkg-reconfigure console-setup to set console font.
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
Bring the interface up:
root@host# ip link set dev wlan0 up
and then configure the wifi as explained at WiFi/HowToUse.
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.
Useful Links
http://gitorious.org/ac100/ (Kernel and other AC100 software)
https://launchpad.net/~ac100/+archive/ppa (PPA for Ubuntu's AC100 kernel)
http://lists.debian.org/debian-arm/2011/07/msg00049.html (Installation information)
Credits
Julian Andres Klode wrote
Installation guide (all on the device itself):
- Bootstrap Debian on USB stick, SD, or eMMC
- Install busybox and initramfs-tools
- Set MODULES=dep in /etc/initramfs-tools/initramfs.conf
- Copy /boot/bootimg.cfg to Debian and configure cmdline
- (bind) mount /proc and /dev
- 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.