Pull to refresh

Установка Ubuntu Jaunty на Nokia N800/N810

Reading time6 min
Views4.8K
image

Вступление


Предлагаю вашему вниманию перевод этой инструкции по установке Ubuntu Jaunty на Nokia N800/N810.
Что работает:
  • Dsme
  • Hal (частично)
  • Screen diming
  • Xserver-xorg
  • Простые эффекты Compiz
  • Управление питанием
  • Usbnet emergency talend
  • Powersave
  • Bluetooth
  • Right click
  • Беспроводная сеть
  • keymapping (аппаратные клавиши и виртуальная клавиатура)

Подробности под катом.

Что не работает:
  • Usplash (не запускается, возможно наше ядро его не поддерживает?)
  • Звук (закрытый исходный код)

Установочный процесс потребует наличия следующего:
  • easyroot / rootsh / becomeroot
  • debootstrap
  • базовые знания командной строки
  • e2fsprogs
  • 2-4Гб карта mmc — 4 Гб+ если вы планируете установить ubuntu-desktop.
  • Bootmenu form deblet
  • binutils

Шаг первый: подготовка карты памяти


Для этого выполним следующее в терминале под root'ом (Я использую 4GB mmc с 356мб fat16 разделом и 3.6гб для linux83 — нашим корневым разделом)

umount /dev/mmcblk0p1
sfdisk -uM /dev/mmcblk0
356,6
,,L
,,
,,


Шаг второй: форматирование разделов


umount /dev/mmcblk0p1
mkdosfs /dev/mmcblk0p1
mkfs.ext3 /dev/mmcblk0p2

Шаг третий: переход в свежеустанавливаемую систему


Создадим директорию, куда будем устанавливать систему:

mkdir -p /mnt/jaunty

Далее скачаем скрипт bootstrap-script.tar.gz, уберем симлинк rm -f /usr/share/debootstrap/scripts/jaunty, и распакуем наш скрипт в /usr/share/debootstrap/scripts под пользователем root.

Далее мы должны добавить md5sum в наш /bin каталог для правильной работы debootstrap. Скачаем md5sum и распакуем в /bin под пользователем root.

Далее смонтируем наш ubuntu раздел в /mnt/jaunty и начнём установку(это может занять много времени):

insmod /mnt/initfs/lib/modules/`uname -r`/mbcache.ko
insmod /mnt/initfs/lib/modules/`uname -r`/ext2.ko
insmod /mnt/initfs/lib/modules/`uname -r`/jbd.ko
insmod /mnt/initfs/lib/modules/`uname -r`/ext3.ko
mount /dev/mmcblk0p2 /mnt/jaunty -o noatime
debootstrap --include="language-pack-en,language-pack-en-base,dmsetup,cryptsetup,hashalot,nano,sudo" --components=main,multiverse,universe,restricted --verbose --arch=armel jaunty /mnt/jaunty ports.ubuntu.com /usr/share/debootstrap/scripts/jaunty


И, наконец, chroot'имся в установленную систему и создаём устройства консоли:

mount /proc /mnt/jaunty/proc
mount /sys /mnt/jaunty/sys
chroot /mnt/jaunty
cd /dev; /sbin/MAKEDEV fb0 fb1 fb2 fb3 fb4 fb5 fb6 fb7
exit


Шаг четвертый: подготовка базовой системы к загрузке


Примонтируем нужные каталоги:

mount /dev /mnt/jaunty/dev
mount /dev/pts /mnt/jaunty/dev/pts
mount /tmp /mnt/jaunty/tmp
chroot /mnt/jaunty
export LC_ALL=C


Добавим пароль пользователя root:

passwd root

Настроим репозиторий, изменив файл /etc/apt/sorces.lst:

#Ubuntu jaunty alpha
deb http://ports.ubuntu.com jaunty main restricted universe multiverse
deb-src http://ports.ubuntu.com jaunty main restricted universe multiverse

#Mer alpha
deb http://repository.mer.tspre.org/ alpha contrib main non-free
deb-src http://repository.mer.tspre.org/ alpha contrib main non-free

#Deblet sid
deb http://packages.tspre.org/ sid main contrib non-free
deb-src http://packages.tspre.org/ sid main contrib non-free

#Ubuntu N8x0
deb http://www.bman.maemobox.org/repository alpha contrib main non-free
deb-src http://www.bman.maemobox.org/repository alpha contrib main non-free


Далее настроим apt-get:

touch /etc/apt/preferences

Добавим следующее в /etc/apt/preferences:

Package: *
Pin: release a=jaunty
Pin-Priority: 900

Package: *
Pin: release a=alpha
Pin-Priority: 340

Package: *
Pin: release a=sid
Pin-Priority: 300


Установим базовую систему:

wget http://packages.tspre.org/repo.key
apt-key add repo.key
apt-get update
apt-get -t alpha install cx3110x-module cx3110x-umac-module ke-recv-l10n-public kernel-diablo-modules-fbcon kernel-diablo mce-dummy nokia-n8x0-firmware nokia-tablets-pointercal omap-fb-console omap-fb-tools usbnet-emergency-telnetd utelnetd xresponse-visualize tablet-wireless xserver-xorg-video-omapfb synaptic aptitude console-tools
apt-get install ubuntu-rescue-menu ubuntu-omap-fb-splash nit-bootmenu-compat
apt-get install xserver-xorg-input-tslib=0.0.5-1mer7
apt-get remove xserver-xorg-input-all xserver-xorg-input-synaptics


Установим файл boottime.kmap.gz для работы клавиатуры:

cp /path/to/boottime.kmap.gz /mnt/jaunty/etc/

Далее отредактируем ряд файлов:

/etc/X11/xorg.conf

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "tslib"
Driver "tslib"
Option "ScreenNumber" "0"
Option "Width" "800"
Option "Height" "480"
Option "Rotate" "NONE"
Option "TslibDevice" "/dev/input/event3"
Option "CorePointer"
EndSection

Section "Device"
Identifier "Configured Video Device"
# Option "UseFBDev" "true"
Driver "omapfb"
Option "fb" "/dev/fb0"
EndSection

Section "Monitor"
Identifier "Configured Monitor"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
EndSection


/etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/sbin/fb_update_mode auto
exit 0


/etc/fstab

rootfs / rootfs defaults,errors=remount-ro,noatime,nodiratime 0 1
proc /proc proc defaults 0 0
/dev/mtdblock4 /mnt/rootfs jffs2 defaults 0 0
/dev/mmcblk0p1 swap swap defaults 0 0
/dev/mmcblk1p1 /media/mmc1 vfat defaults 0 0


/etc/X11/Xwrapper.config

# Xwrapper.config (Debian X Window System server wrapper configuration file)
#
# This file was generated by the post-installation script of the x11-common
# package using values from the debconf database.
#
# See the Xwrapper.config(5) manual page for more information.
#
# This file is automatically updated on upgrades of the x11-common package
# *only* if it has not been modified since the last upgrade of that package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command as root:
# dpkg-reconfigure x11-common
allowed_users=anybody
nice_value=-1


В файле /etc/init.d/hwclock.sh HWCLOCKPARS= изменим на HWCLOCKPARS="--directisa" и добавим это в /etc/default/rcS:

echo 'HWCLOCKPARS=--directisa' >> /etc/default/rcS

Уменьшим время загрузки:

apt-get install insserv
echo 'CONCURRENCY=shell' >> /etc/default/rcS


Если вы не заинтересованы в установке ubuntu-desktop то можете выполнить следующее и сразу перейти к шагу 7.

exit
exit
umount /mnt/jaunty/dev/pts
umount /mnt/jaunty/dev
umount /mnt/jaunty/proc
umount /mnt/jaunty/sys
umount /mnt/jaunty/tmp
fuser -m /mnt/jaunty -k
umount /mnt/jaunty


Шаг пятый: установка ubuntu-desktop


Выполните следующее в терминале, это может занять несколько часов:

apt-get install ubuntu-desktop matchbox-keyboard
apt-get clean


Поправим файл /etc/gdm/gdm.conf-costom для автоматического логина:

[daemon]
# Automatic login, if true the first attached screen will automatically logged
# in as user as set with AutomaticLogin key.
AutomaticLoginEnable=true
AutomaticLogin=user


Шаг шестой: активация файла подкачки


Выполним следующее в терминале:

mkswap /dev/mmcblk1p3

Добавим в /etc/fstab следующую строку:

/dev/mmcblk1p3 swap swap defaults 0 0

Шаг седьмой: создание меню загрузки



Создайте файл /etc/bootmenu.d/ubuntu.item и добавьте туда следующее(в случае раздела Ubuntu в /dev/mmcblk0p2):

ITEM_NAME="Ubuntu on mmcblk0p2"
ITEM_ID="Ubuntu on mmcblk0p2"
ITEM_DEVICE="mmcblk0p2"
ITEM_MODULES="mbcache jbd ext3"
ITEM_FSTYPE="ext3"
ITEM_FSOPTIONS="noatime,ro"
ITEM_LINUXRC="linuxrc"


И выполните следующую команду в терминале:

refresh_bootmenu.d

Всё, теперь у вас есть установленная система Ubuntu Jaunty!
Скриншоты можно посмотреть здесь.
Tags:
Hubs:
+55
Comments39

Articles