Ubuntu on Lime

Aus Wiki CCC Göttingen
Version vom 23. Februar 2014, 00:25 Uhr von Miga (Diskussion | Beiträge) (Zusätz: besser struktur)

Wechseln zu: Navigation, Suche

Preparation of image on another system

1. Made sunxi-boot and sunxi-kernel (with modules) in accord with Lime's tutorial for Debian:

https://olimex.wordpress.com/2013/12/13/building-debian-linux-image-for-a10-olinuxino-lime-with-kernel-3-4-67/

The following steps 2 and 3 are performed on a *rootfs* image after mounting on a host system.

2. Downloaded armhf versions of packages missing for network, and put them to /root on boot image.

   http://ports.ubuntu.com/ubuntu-ports/pool/main/b/busybox/busybox-static_1.21.0-1ubuntu1_armhf.deb
   http://ports.ubuntu.com/ubuntu-ports/pool/main/n/net-tools/net-tools_1.60-25ubuntu1_armhf.deb
   http://ports.ubuntu.com/ubuntu-ports/pool/main/b/busybox/udhcpc_1.21.0-1ubuntu1_armhf.deb


3. Configure serial almost in accord to:

https://help.ubuntu.com/community/SerialConsoleHowto

The only change is --autologin root parameter for getty.

   cat - > etc/init/ttyS0.conf <<EOF
   # ttyS0 - getty
   #
   # This service maintains a getty on ttyS0 from the point the system is
   # started until it is shut down again.
   
   start on stopped rc or RUNLEVEL=[12345]
   stop on runlevel [!12345]
   
   respawn
   exec /sbin/getty --autologin root -L 115200 ttyS0 vt102
   EOF


   cat - > etc/event.d/ttyS0 <<EOF
   # ttyS0 - getty
   #
   # This service maintains a getty on ttyS0 from the point the system is
   # started until it is shut down again.
   start on runlevel 1
   start on runlevel 2
   start on runlevel 3
   start on runlevel 4
   start on runlevel 5
   
   stop on runlevel 0
   stop on runlevel 6
   
   respawn
   exec /sbin/getty 115200 ttyS0
   EOF

After booting lime

4. After booting and logging through serial (screen /dev/ttyUSB0 115200):

   dpkg -i *.deb
   
   cat - > /etc/network/interfaces.d/eth0 <<EOF
   auto eth0
   iface eth0 inet dhcp
   EOF

5. Uncomment universe and multiverse repositories and then apt-get update and install whatever packages I need.

6. To have access to sunxi config tools, compile:

   git clone https://github.com/linux-sunxi/sunxi-tools

7. [Optional:] to get Mali drivers:

   git clone https://github.com/linux-sunxi/sunxi-mali.git && \
     git submodule init && \
     git submodule update

8. For GPIO:

   echo 'gpio_sunxi' >> /etc/modules
   modprobe gpio_sunxi