Differences between revisions 23 and 24
Revision 23 as of 2014-01-08 08:16:20
Size: 15189
Editor: ?dukzcry
Comment:
Revision 24 as of 2014-04-11 04:23:44
Size: 14617
Editor: ?dukzcry
Comment:
Deletions are marked like this. Additions are marked like this.
Line 35: Line 35:
|| Wireless/Wifi || X-( || || Wireless/Wifi || {OK} ||
Line 140: Line 140:
chroot ${MNT} apt-get install -y firmware-libertas wicd-daemon wicd-cli \ chroot ${MNT} apt-get install -y wicd-daemon wicd-cli \
Line 169: Line 169:
# Copy the non-free firmware for the wifi device:
mkdir -p ${MNT}/lib/firmware/mrvl
cp /lib/firmware/mrvl/sd8797_uapsta.bin ${MNT}/lib/firmware/mrvl
Line 185: Line 188:
 * --(This same sequence of steps using a USB flash drive instead of the SD card failed to boot for reasons currently unknown.)-- Worked for me using a generic USB 2.0 Transcend 8 Gb flash drive.
 * /boot is no more on recent stable releases of ChromeOS. Please use following method for obtaining kernel from now: https://forums.kali.org/showthread.php?4197-Installing-Kali-on-Samsung-Chromebook-Series-3-on-Internal-Memory&p=27229&viewfull=1#post27229 An initial non-signed kernel may also be taken from fat-formatted EFI system partition (usually number 12, vmlinuz.A).
 * This same sequence of steps using a USB flash drive instead of the SD card failed to boot for reasons currently unknown.
Line 192: Line 194:
There is a driver for X11: xf86-video-armsoc. It was created from xf86-video-omap one but forked quite long time ago. May be taken from ChromeOS: /usr/lib/xorg/modules/drivers/armsoc_drv.so. Here are it's [[https://chromium.googlesource.com/chromiumos/third_party/xf86-video-armsoc|sources]] at Chromium git server. There is a driver for X11: xf86-video-armsoc. It was created from xf86-video-omap one but forked quite long time ago. There is [[http://git.linaro.org/gitweb?p=arm/xorg/driver/xf86-video-armsoc.git;a=summary|armsoc]] driver at Linaro git server but it does not have Mali T604 support at all.
Line 226: Line 228:
Here are rough instructions on how to get acceleration working in an easy way: http://pastebin.com/yjerTTND There is a package in my Ubuntu PPA which automates it and provides everything to get it working instead of Mesa. Did not tested under Debian yet.
Line 232: Line 234:
UCM profile from ChromeOS is now included in Debian. Be sure to update system (there must be a /usr/share/alsa/ucm/DAISY-I2S folder, if you have ALSA installed). You may also copy /usr/share/alsa/ucm/ directory contents from ChromeOS if you're unwilling to update.
If you still hear nothing, do: `alsaucm -c DAISY-I2S set _verb HiFi`
UCM profiles from Chromium OS are on a way to be included in Debian. In meantime copy /usr/share/alsa/ucm/ directory contents from Chromium OS.
Line 239: Line 240:
 * xf86-input-cmt used by Chromium. There is still no Debian package. Requires libevdev, libgestures, libbase-* to be created.
 * xserver-xorg-input-mtrack

For the second option you may use a xorg.conf snippet for better touchpad sensitiveness:
 * xf86-input-cmt used by Chromium. Requires libevdev, libgestures, libbase-* to be created.
 * xf86-input-multitouch

Second option requires small xorg.conf snippet:
Line 246: Line 247:
   Identifier "Touchpad"
   MatchIsTouchpad "on"
   Option "FingerHigh" "5"
   Option "FingerLow" "5"
 Identifier "touchpad"
 MatchIsTouchpad "on"
Line 355: Line 354:
 * [[https://launchpad.net/~hrw/+archive/my-own-packages|Ubuntu PPA with supporting packages]]

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 owner 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.

Models covered
Samsung Chromebook (2012 ARM one)

Sub-models options :
- CPU: Samsung Exynos5 Dual
- Video card: Mali T604
- Screen size: 11.6"

Overall Status

Core Components

[ATTACH]

Boot Standard Kernel:

[?] (used Chromium kernel binary so far)

Detect hard drives:

{OK}

Extra Features

CPU Frequency Scaling

{OK}

Hibernation

[?]

Sleep / Suspend

{OK}

Xorg

{OK}

- OpenGLES

X-(

- Resize-and-Rotate(randr)

{OK}

Switch to External Screen

{OK}

Mouse

- Built-in (Touchpad)

{i}

Wireless/Wifi

{OK}

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

There are several methods of installation other operating systems on Chromebook.

TODO: add some information about them

Preparing for the installation

Enabling Developer Mode

All of the installation techniques described require that the Chromebook be switched into Developer Mode. There are disadvantages to making this switch - see the link for more details, but it is currently a hard requirement.

Simply, developer mode can be enabled by first entering Recovery Mode (hold the ESC and Refresh keys then press the Power key). The system will reboot and show the Recovery Mode screen. Press Control-D or wait 30 seconds. The system will boot and ask you to confirm that you wish to make the change.

Switching to recovery mode will delete any content or data stored on your system.

Enabling Developer Mode proceeds and may take over 10 minutes to complete.

Enabling USB/SD card boot

All of the installation techniques described require that the Chromebook be able to boot from either a USB device or an SD card.

To enable this, first enable Developer Mode, then boot the system and start crosh. This can be done by pressing the Control, Shift and T keys simultaneously. A new window will open showing a terminal-style prompt. Here it is necessary to type shell, followed by sudo -s. You should now have a root shell prompt.

Enable developer firmware with chromeos-firmwareupdate --mode=todev You will receive confirmation output that the firmware has been updated and that booting via USB and from an SD card is now possible.

Enable USB/SD card boot with crossystem dev_boot_usb=1, followed by reboot.

At the Developer Mode boot screen (which you will see every time you restart the system), USB/SD card boot can be selected by pressing Control-U.

Installing to an SD card using the ChromeOS kernel

This approach requires the enabling of both Developer Mode and USB/SD card boot. It uses the ChromeOS kernel and modules rather than the normal Debian kernel.

First, we prepare the SD card on a desktop machine. These instructions are for an 8G card, which affects on the third cgpt add call - you can adjust as required.

Three partitions are created on the disk. In time, the intention is that these be used for:

  1. a copy of nv-uboot that is chainloaded by the standard firmware,

  2. a /boot filesystem containing the standard (non-ChromeOS) kernel, read by nv-uboot,

  3. the root filesystem.

Currently nv-uboot is not used, and so the arrangement is:

  1. a copy of the ChromeOS kernel that is loaded by the standard firmware,
  2. a /boot filesystem that is used only to contain the ChromeOS kernel (which is not used during booting, just during the preparation of the previous partition),

  3. the root filesystem.

# On a desktop machine (does not need to be ARM):
#
DEV=/dev/mmcblk0
MNT=/mnt
# Partitioning the device:
parted --script ${DEV} mklabel gpt
cgpt create ${DEV}
cgpt add -t kernel -l uboot/kernel -b 34 -s 16384 ${DEV}
cgpt add -t data -l /boot -b 16418 -s 32768 ${DEV}
cgpt add -t data -l / -b 49186 -s 15474621 ${DEV}
blockdev --rereadpt ${DEV}
# Create the boot filesystem:
mkfs.ext2 ${DEV}p2
# Create the root filesystem:
mkfs.ext4 ${DEV}p3
# Install the bootstrap packages in the root filesystem:
mkdir -p ${MNT}
mount ${DEV}p3 ${MNT}
mkdir -p ${MNT}/boot
mount ${DEV}p2 ${MNT}/boot
debootstrap --arch=armhf --foreign jessie ${MNT} http://http.debian.net/debian
# Unmount the filesystems:
umount ${MNT}/boot
umount ${MNT}

Now move the SD card to the Chromebook which is already booted with ChromeOS:

# On the Chromebook:
#
DEV=/dev/mmcblk1
MNT=/mnt
# Unmount from wherever ChromeOS decided to mount the device,
# remount where we want:
umount ${DEV}p2
umount ${DEV}p3
mount ${DEV}p3 ${MNT}
mount ${DEV}p2 ${MNT}/boot
# Complete the bootstrap:
chroot ${MNT} /debootstrap/debootstrap --second-stage
# Set up fstab:
cat > ${MNT}/etc/fstab <<EOF
${DEV}p3 / ext4 errors=remount-ro 0 1
${DEV}p2 /boot ext2 errors=remount-ro 0 1
EOF
# Set up the apt sources and update:
cat > ${MNT}/etc/apt/sources.list <<EOF
deb http://ftp.uk.debian.org/debian jessie main non-free contrib
deb-src http://ftp.uk.debian.org/debian jessie main non-free contrib
EOF
# Update the package list:
chroot ${MNT} apt-get update
# Install useful packages:
chroot ${MNT} apt-get install -y cgpt vboot-utils \
        vboot-kernel-utils
chroot ${MNT} apt-get install -y wicd-daemon wicd-cli \
   wicd-curses console-setup
# Set the root password to blank:
chroot ${MNT} passwd -d root
# Set the hostname:
echo "wowbagger" > ${MNT}/etc/hostname
# Copy the ChromeOS kernel to the root filesystem:
cp /boot/vmlinuz ${MNT}/boot/vmlinuz
# Declare the kernel flags:
cat > ${MNT}/boot/kernel.flags <<EOF
console=tty1 printk.time=1 nosplash rootwait root=${DEV}p3 rw rootfstype=ext4 lsm.module_locking=0
EOF
# Sign the kernel:
cat > ${MNT}/boot/sign-kernel.sh <<EOF
vbutil_kernel --pack /boot/vmlinuz.signed --keyblock \
  /usr/share/vboot/devkeys/kernel.keyblock --version 1 \
  --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \
  --config /boot/kernel.flags --vmlinuz /boot/vmlinuz \
  --arch arm
EOF
chroot ${MNT} sh /boot/sign-kernel.sh
# Write the signed kernel to the kernel partition:
dd if=${MNT}/boot/vmlinuz.signed of=${DEV}p1 bs=4M
# Mark the newly written kernel partition as good and set the
# priority:
cgpt add -i 1 -S 1 -T 5 -P 12 ${DEV}
# Copy the ChromeOS kernel modules into the root filesystem:
mkdir -p ${MNT}/lib/modules
cp -r /lib/modules/* ${MNT}/lib/modules
# Copy the non-free firmware for the wifi device:
mkdir -p ${MNT}/lib/firmware/mrvl
cp /lib/firmware/mrvl/sd8797_uapsta.bin ${MNT}/lib/firmware/mrvl
# Umount the filesystems:
umount ${MNT}/boot
umount ${MNT}

You should now be able to reboot your system and press Control-U at the boot screen to boot from the SD card. There is no root password - you should set one.

A downloadable image of the end result is available. Uncompress this and write it to an 8G SD card. At the command line: gunzip debian-chromebook.20130625.img.gz dd if=debian-chromebook.20130625.img of=<PUT YOUR OUTPUT DEVICE HERE>

Notes

  • wicd-curses needs a patch to be useful as of 2013-06-19. (Not required as of 2013-06-25.)

  • This same sequence of steps using a USB flash drive instead of the SD card failed to boot for reasons currently unknown.

Configuration

Display

There is a driver for X11: xf86-video-armsoc. It was created from xf86-video-omap one but forked quite long time ago. There is armsoc driver at Linaro git server but it does not have Mali T604 support at all.

Xorg.conf snippet (taken from Chromium OS):

Section "Device"
        Identifier      "Mali FBDEV"
        Driver          "armsoc"
        Option          "fbdev"                 "/dev/fb0"
        Option          "Fimg2DExa"             "false"
        Option          "DRI2"                  "true"
        Option          "DRI2_PAGE_FLIP"        "false"
        Option          "DRI2_WAIT_VSYNC"       "true"
#       Option          "Fimg2DExaSolid"        "false"
#       Option          "Fimg2DExaCopy"         "false"
#       Option          "Fimg2DExaComposite"    "false"
        Option          "SWcursorLCD"           "false"
EndSection

Section "Screen"
        Identifier      "DefaultScreen"
        Device          "Mali FBDEV"
        DefaultDepth    24
EndSection

OpenGL ES

To get OpenGL ES working several files from Chromium OS needs to be copied from /usr/lib/:

  • libmali*
  • libEGL*
  • libGLES*

There is a package in my Ubuntu PPA which automates it and provides everything to get it working instead of Mesa. Did not tested under Debian yet.

Audio

Do not play with ALSA mixer - you may fry your speakers!

UCM profiles from Chromium OS are on a way to be included in Debian. In meantime copy /usr/share/alsa/ucm/ directory contents from Chromium OS.

Touchpad

Two choices exists:

  • xf86-input-cmt used by Chromium. Requires libevdev, libgestures, libbase-* to be created.
  • xf86-input-multitouch

Second option requires small xorg.conf snippet:

Section "InputClass"
        Identifier "touchpad"
        MatchIsTouchpad "on"
EndSection

Power Management

Suspend to memory works but looks like battery usage is higher than expected.

Not tested hibernation.

WiFi

Works fine.


System Summary

lsusb

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

Bus 001 Device 002: ID 0424:3503 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 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  bDeviceClass            9 Hub
  bDeviceProtocol         0 Full speed (or root) hub
  iProduct                2 S5P EHCI Host Controller
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  bDeviceClass            9 Hub
  bDeviceProtocol         0 Full speed (or root) hub
  iProduct                2 EXYNOS OHCI Host Controller
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  bDeviceClass            9 Hub
  bDeviceProtocol         1 Single TT
  iProduct                2 xHCI Host Controller
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
  bDeviceClass            9 Hub
  bDeviceProtocol         3
  iProduct                2 xHCI Host Controller
Bus 001 Device 003: ID 2232:1037
  bDeviceClass          239 Miscellaneous Device
  bDeviceProtocol         1 Interface Association
  iProduct                1 WebCam SC-03FFM12339N
      (Bus Powered)
  bDeviceClass          239 Miscellaneous Device
  bDeviceProtocol         1 Interface Association
  (Bus Powered)

Resources

List of loaded modules

Module                  Size  Used by
hidp                   12084  1
isl29018                6412  0
industrialio           14340  1 isl29018
uvcvideo               59681  0
videobuf2_vmalloc       2732  1 uvcvideo
sbs_battery             6441  0
joydev                  8277  0
rfcomm                 21424  12
mwifiex_sdio           11492  0
mwifiex               102827  1 mwifiex_sdio
cfg80211              159128  1 mwifiex
btmrvl_sdio             7952  0
btmrvl                 11681  1 btmrvl_sdio
bluetooth             165503  25 hidp,btmrvl,rfcomm,btmrvl_sdio
spidev                  4304  0

Attachments

Some configuration files and sample outputs.

sound:

add

load-module module-alsa-sink device=sysdefault

to /etc/pulse/default.pa

Credits