Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
debian_uboot [2012/01/22 10:44] – Correct double dash paulf | debian_uboot [2012/02/06 09:14] – [Tips] dmix by default, per-app softvol trick paulf |
---|
| ====== Debian hardfloat with upstream U-Boot ====== |
| |
Here I'm documenting my progress on using my ac100-116 "the right way". Feel free to reach me on [[help#irc]], my nick is PaulFertser. | Here I'm documenting my progress on using my ac100-116 "the right way". Feel free to reach me on [[help#irc]], my nick is PaulFertser. |
| |
| ===== Status ===== |
| ==== What works ==== |
| * Booting (currently fetching kernel+rootfs is a bit slow due to u-boot bug, ~15s) |
| * Display (both text console and X.org fbdev), keyboard, touchpad |
| * Wifi |
| * Bluetooth |
| * GSM/UMTS data transfer |
| * Stereo sound both on internal speakers and the headphones |
| * Webcam |
| * Integrated digital microphone |
| * External stereo headset with microphone |
| |
| ==== What doesn't ==== |
| * LCD and keyboard in u-boot (pending upstream patches and paz00 integration, http://news.gmane.org/group/gmane.comp.boot-loaders.u-boot/thread=122864, for keyboard NVEC support would be needed) |
| * Boot from USB in u-boot (http://news.gmane.org/group/gmane.comp.boot-loaders.u-boot/thread=122484) |
| * Resume from suspend-to-ram (pending u-boot warmboot patches, see http://news.gmane.org/group/gmane.comp.boot-loaders.u-boot/thread=122760) |
| * Suspend-to-disk/hibernation (not anytime soon, no upstream support for ARMs) |
| * tegra_wdt watchdog resets the system but it doesn't boot after that for the reasons unknown |
| * Proprietary drivers for X and OMX-accelerated sound/video decoding (never tried, see https://build.pub.meego.com/package/files?package=nvidia-tegra2&project=home%3Acxl000%3Atrimslice%3AMer%3Atesting , http://ppa.launchpad.net/ac100/ppa/ubuntu/pool/restricted/n/nvidia-graphics-drivers-tegra/ , mplayer-omx, gst-omx etc) |
| |
| ===== Installation and initial configuration story ===== |
U-boot doesn't support the display yet. Kernel initialises and uses the integrated panel and the backlight properly. It's possible that you'll manage this with a specially prepared bootloader that will boot from external SD automatically without a serial console. | U-boot doesn't support the display yet. Kernel initialises and uses the integrated panel and the backlight properly. It's possible that you'll manage this with a specially prepared bootloader that will boot from external SD automatically without a serial console. |
| |
Logged in, set password to 1, start ''wpa_supplicant -Dnl80211 -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf &'', then ''dhclient eth0''. Installed ''openssh-server'' and switched to that (because the serial console sometimes stops to function). | Logged in, set password to 1, start ''wpa_supplicant -Dnl80211 -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf &'', then ''dhclient eth0''. Installed ''openssh-server'' and switched to that (because the serial console sometimes stops to function). |
| |
Installed ''gdisk'' and repartitioned from scratch ''/dev/mmcblk0'', creating two partitions there (one for /boot, 32M should be enough), another for LVM pv. Created LVM there, with two (for now) volumes: 1G for swap, and everything else for the rootfs. ''mkfs.nilfs /dev/emmc-lvm/rootfs''. Mounted it, and started to Debootstrap debian armhf according to the official manual (you'll need to read both installing debian and armhf chroot). | Installed ''gdisk'' and repartitioned from scratch ''/dev/mmcblk0'', creating two partitions there (one for /boot, 32M should be enough), another for LVM pv. Created LVM there, with two (for now) volumes: 1G for swap, and everything else for the rootfs. ''mkfs.nilfs /dev/emmc-lvm/rootfs''. Mounted it, and started to Debootstrap debian armhf according to the official manual (you'll need to read both installing debian and armhf chroot, though debian-ports.org repositories are not needed). |
| |
Copied ''/lib/firmware/rt2870.bin'' to the newly established system, configured ''/etc/network/interfaces'' to bring up wlan0 for my home wlan automatically. Created a symlink from ''/bin/true'' to ''/usr/sbin/mkfs.nilfs2'' to make the boot happy. | Copied ''/lib/firmware/rt2870.bin'' to the newly established system, configured ''/etc/network/interfaces'' to bring up wlan0 for my home wlan automatically. Created a symlink from ''/bin/true'' to ''/usr/sbin/mkfs.nilfs2'' to make the boot happy. |
| |
Initramfs is a bit tricky: a workaround from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649288 is needed (it has a typo where .. is used instead of . and also the script should be made +x), and also you need to pay attention to using ''/dev/mapper/emmc%%--%%lvm-rootfs'' and not ''/dev/emmc-lvm/rootfs'' for the ''root='' kernel command line argument (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612402) or else initramfs won't call ''vgchange -ay automatically''. Add ''nilfs2'' to ''/etc/initramfs-tools/modules''. Make a symlink from ''initrd-3.0.8'' to ''initramfs'' in ''/boot''. | Initramfs is a bit tricky: a workaround from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649288 is needed (it has a typo where .. is used instead of . and also the script should be made +x), and also you need to pay attention to using ''/dev/mapper/emmc%%--%%lvm-rootfs'' and not ''/dev/emmc-lvm/rootfs'' for the ''root='' kernel command line argument (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612402) or else initramfs won't call ''vgchange -ay automatically''. Add ''nilfs2'' to ''/etc/initramfs-tools/modules'' (if you're using ''MODULES=most''). Make a symlink from ''initrd-3.0.8'' to ''initramfs'' in ''/boot''. You'll also need a custom initramfs-tools addon script to add nilfs_cleanerd to the initramfs or you'll need to start it later from e.g. /etc/rc.local. |
| |
The resulting system should be bootable with | The resulting system should be bootable with |
</code> | </code> |
| |
To manage lid event i'm using https://github.com/gandro/input-event-daemon, it should listen on /dev/input/event4 for LID:0 and LID:1 events. | ===== Tips ===== |
| * To manage lid event i'm using https://github.com/gandro/input-event-daemon, it should listen on /dev/input/event4 for LID:0 and LID:1 events. |
| * I added this to ~/.mplayer/config |
| <code> |
| ao=alsa |
| mixer-channel=Master |
| vo=x11 |
| zoom=1 |
| sws=0 |
| hardframedrop=1 |
| lavdopts=fast=1:skiploopfilter=all |
| </code> |
| * For watching youtube i use |
| <code> |
| #!/bin/sh |
| cookies_file=`mktemp /tmp/youtube-cookies.XXXXXX` |
| rm $cookies_file |
| url="`youtube-dl --cookies=$cookies_file -g --max-quality 35 $1`" |
| mplayer -cookies -cookies-file $cookies_file -cache 2048 $url |
| rm $cookies_file |
| </code> |
| * To have automatic software mixing of sound streams copy this to ''/usr/share/alsa/cards/tegra-alc5632.conf'': |
| <code> |
| # default with dmix/dsnoop |
| tegra-alc5632.pcm.default { |
| @args [ CARD ] |
| @args.CARD { |
| type string |
| } |
| type asym |
| playback.pcm { |
| type plug |
| slave.pcm { |
| @func concat |
| strings [ "dmix:CARD=" $CARD ",RATE=44100" ] |
| } |
| } |
| capture.pcm { |
| type plug |
| slave.pcm { |
| @func concat |
| strings [ "dsnoop:CARD=" $CARD ",RATE=44100" ] |
| } |
| } |
| } |
| |
Playing mp3's (with libmad-based players) currently is buggy due to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656814 , fix available. | </code> |
| * To provide additional dedicated sound volume controls without PA add this to ''~/.asoundrc'': |
| <code> |
| pcm.softvol { |
| @args [ NAME ] |
| @args.NAME.type string |
| type softvol |
| slave.pcm "default" |
| control.name $NAME |
| } |
| </code> |
| And use softvol:<custom name> for the ALSA device, like this: ''aplay -Dsoftvol:"Aplay Dedicated" testmusic.wav'' |
| * [[http://linuxwireless.org/en/users/Download|compat-wireless]] provides newer wireless drivers that work better but wireless extensions will not be enabled until the kernel is compiled with support for some old pre-mac80211 driver (to select ''CONFIG_WIRELESS_EXT''). |
| * ''iw dev wlan0 set power_save off'' to improve interactivity when a power-saving compatible AP is used |