Mer/Documentation/Installation

(Add booting from SD card)
Line 346: Line 346:
There is no battery check at the moment, look for the next release, I'm working in that.
There is no battery check at the moment, look for the next release, I'm working in that.
 +
 +
Don't forget to put a rootfs on your SD card and the kernel in /boot/linux-SMDK6410.bin !
[[Category:Mer]]
[[Category:Mer]]

Revision as of 21:05, 5 September 2009

This article sums up the different ways to install Mer on different types of computers (VMWare, chroot, on device, etc.). Please feel free to add/edit. The original information is taken from Mer/Releases/0.9.

Replace "<your version>" with the version you are going to install, e.g. "0.9".

Contents

Installation in VirtualBox

  1. Unzip zip file
  2. Open VirtualBox, create new machine (click New):
    • Name: Mer <your version>
    • OS type: Linux
    • Version: Ubuntu
    • RAM: 128MB (at least)
    • Disk: click "existing", find the mer-x86-generic-image-v<your version>.vmdk file, select, select
    • Next
  3. Finish
  4. Start the newly created virtual machine
  5. Installing all the needed packages for installing VirtualBox additions:
    • I had to install the following packages by:
    • sudo apt-get install build-essential linux-headers-*kernel-version*-generic
    • (replace *kernel-version* with the currently installed kernel-version on the virtual machine)
    • (you can simply find out which kernel-version you have, by executing "uname -r" in Mer's XTerminal)
  6. Installing the additions:
    • First of all you have to mount the CD-Image with the additions emulated as a cdrom-device into the virtual machine running mer.
    • Mount the VboxAdditions.iso by: Devices -> mount CD-ROM image -> select VboxGuestAdditions.iso
    • Create a new folder with root rights by:
    • sudo mkdir /media/cdrom
    • and mount the virtual device's filesystem to the new mountpoint by:
    • sudo mount /dev/scd0 /media/cdrom
    • If no errors are appearing you can install the additions by:
    • sudo /media/cdrom/VBoxLinuxAdditions-x86.run
  7. Rebooting the virtual machine:
    • Now, when the installation of the additions has finished, you can reboot the vm simply by:
    • sudo init 6
  8. Finished

Installation (chroot)

mkdir mer-<your version>
cd mer-<your version> && sudo tar xzf mer-x86-generic-image-v<your version>.tar.gz
sudo mkdir -p tmp/.X11-unix home/$USER/.osso
sudo mv usr/bin/maemo-invoker usr/bin/maemo-invoker.real
echo -e '#!/bin/sh\nPROG="$1"\nshift\nexec "$PROG" "$@"' | sudo tee usr/bin/maemo-invoker
sudo chmod 755 usr/bin/maemo-invoker
echo 'nameserver <mynameresolver>' | sudo tee -a etc/resolv.conf

Start-up (from within mer-<your version> directory)

Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite 2>/dev/null 1>&2 &
sudo mount --bind /tmp/.X11-unix tmp/.X11-unix
sudo mount --bind /dev/pts dev/pts
sudo mount -t proc proc proc
sudo mount -t sysfs sysfs sys
sudo chroot .
export DISPLAY=:2.0
/etc/init.d/dbus start
start-hildon

x86 Install

See Making x86 Mer Bootable

N8x0 Install

The Installer

The developers of Mer implemented an installer, which leads through all the steps of installation. In order to use the installer you need to open: .install file with your device, which will prompt you to install the file (about 2.5MB) and add the Extras, Extras-devel and tspre.org repositories if they were not added already.

After the download and the installation go to Settings -> Application Manager -> Utilities -> Browse Installable Applications -> Other and system and you will find a program "Install Bootmenu" and "Merinstaller". If you did not install those by pressing "OK" before, do it now.

The Simple Install will create a bootmenu entry for you. However, for more advanced installations - eg if you already have multiple booting OSes - you might want to read about its configuration - you may need to make a .item if you have a clone-to-SD copy of Maemo or Deblet. You can also find out how to change the default boot menu item and other bootmenu tricks.

Assuming you created all the .item files you wanted, go ahead, and start the bootmenu installer from Utilities -> Install Bootmenu. Its advised to close all other applications and network connections, but the installer will tell you all relevant information.

  • "Are you sure to continue?" - yes
  • "Create backup of current initfs" - yes/no
  • "Remove unneeded extra (and factory testing) stuff?" - yes
  • "install telnet server for network recovery?" - yes/no
  • "install dropbear ssh server for advanced network recovery?" - yes/no
  • "/etc/bootmenu.conf found, do you want to add it to initfs?" - yes
  • "Ready for flashing this image?" - yes/no

After a successfull flash, the device will reboot and you should see the bootmenu, where you can select the partition you want to boot. Choose the operating system where you just installed the installer for Mer and boot it.

Now start the Merinstaller via Utilities -> Install Mer. Follow the instructions. When prompted for the URL= you can point it to any rootfs image you want. Check at Mer/Releases or ask at #mer.

Once the installer puts the extracted rootfs to your device you can reboot and chose the partition where you put Mer. Please contribute by filing bugs on bugs.maemo.org

Flashable Image

NOTE: Very experimental, because it doesn't use the Maemo initfs; only install if you want to help test it.

Grab a kernel and rootfs image of Mer and flash them directly to the device by:

  ./flasher-3.0-static -k mer-armel-n8x0-kernel-v<your version>.zImage -r mer-armel-n8x0-image-v<your version>.jffs2 -f -R

You might want a MMC card swap partition.

770 Install

(these instructions need testing)

You will need at least a 1gb MMC, and these instructions are based on OS2008HE kernel. 48mhz kernel is highly recommended

Partition MMC to:

  • p1: Large ext3 partition first
  • p2: 256 MB swap partition second

Grab http://packages.tspre.org/pool/user/b/bootmenu/bootmenu_1.5-2_armel.deb and install it.

  • Open the main menu and tap Utilities -> Install Bootmenu to start the bootmenu install process.
    • If nothing happens, install xterm
    • If window appears and then goes away, gainroot is not installed
      • Alternative method with dropbear client / server installed, start xterm, run dbclient root@0, password 'rootme', run /usr/sbin/install_bootmenu
  • First, say yes to removing "unneeded extra (and factory testing) stuff"
  • say yes to including bootmenu.conf (important). Reboot when done flashing.
  • This is a special boot menu where boot menu items are made in /etc/bootmenu.d/*.item and refresh_bootmenu.d will flash this to initfs. If you are cloning or booting other OS'es, you'll need to make such .item files. See Mer/Documentation/Bootmenu

Grab e2fsprogs and install it - grab gnutar as well

  • From x-terminal, root: insmod /mnt/initfs/lib/modules/current/mbcache.ko
  • insmod /mnt/initfs/lib/modules/current/jbd.ko
  • insmod /mnt/initfs/lib/modules/current/ext3.ko
  • mkfs.ext3 /dev/mmcblk0p1
  • mkswap /dev/mmcblk0p2
  • swapon /dev/mmcblk0p2
  • mkdir -p /mnt/mer
  • mkdir -p /etc/bootmenu.d
  • mount -t ext3 /dev/mmcblk0p1 /mnt/mer
  • cd /mnt/mer; wget http://stskeeps.subnetmask.net/mer/<your version>/mer-armel-770-image-v<your version>.tar.gz
  • tar pzxvf mer-armel-770-image-v<your version>.tar.gz
  • rm mer-armel-770-image-v<your version>.tar.gz
  • umount /mnt/mer
  • Make /etc/bootmenu.d/mer.item with the following contents:
ITEM_NAME="Mer"
ITEM_ID="mer"
ITEM_DEVICE="mmcblk0p1"
ITEM_MODULES="mbcache jbd ext3"
ITEM_FSTYPE="ext3"
ITEM_FSOPTIONS="noatime,ro"
ITEM_LINUXRC="linuxrc"
  • refresh_bootmenu.d (say yes to reflashing, no to backup of initfs. reboot)
  • Hold down Menu key when prompted while booting and select Mer in the boot menu.

BeagleBoard port

  • Make sure you are running a RECENT uBoot, and you have USB input devices like keyboard or mouse, if you don't own a touchscreen..
  • Make a SD card, partitioned with 50mb FAT as first partition, extract boot fs on this, and the rest Linux partition, format this as ext3, and extract rootfs on this.
  • In uBoot, use the following commands (you may have to adjust video= parameter to match your display screen:

Note: The format of the video bootargs parameter has changed for the new 2.6.28 kernel in 0.9. You'll likely have to update the bootargs line.

setenv bootcmd 'mmcinit; fatload mmc 0:1 0x80300000 uImage; bootm 0x80300000'
setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait omapfb.video_mode=1024x768MR16@60'
saveenv
boot
  • The tablet should output kernel output on serial and on video, and on HDMI out it will eventually start X and show the First Boot Wizard. Good luck.

Pocket Loox 720 port (experimental)

  • Set up a SD card with a logical partition, and inside this logical partition, make a 50mb or so FAT partition (p5), and put the zImage file on this filesystem, name it zImage. After the logical partition, make a ext3 partition (p2), and untar rootfs on it.
  • Grab HaRET and put it on the FAT partition, HaRET.exe.
  • Make a file, startup.txt, with the following contents:
set kernel "zImage"
set mtype "617"
set RAMADDR "0xa8000000"
set cmdline "mem=128M rootdelay=1 root=b302 rw console=tty0"
boot
  • Unmount all filesystems, insert SD card into Pocket Loox, boot by running HaReT.exe. If HaRET stops with "Jumping to kernel..." then grab HaRET from www.postnuklear.de/linuxloox.
  • Experimental release, if you want to play with this - come hang out on #mer on irc.freenode.net and we'll try to guide you along. It is a 640x480 screen so our theme won't fit.
  • For using ssh between loox and desktop box :

- You need to grab an ssh enabled rootfs.

- extract it on your sd card (ext3 partition)

- connect the Loox with the sync cable to your desktop box. And power on loox.

- on your desktop box check for USB network interface (usualy usb0) with : ifconfig

- configure the USB network interface : sudo ifconfig usb0 192.168.2.1

- ssh to loox : ssh root@192.168.2.2

- root password is 'rootme'

  • If touchscreen is not calibrated MER v0.11:

- download tslib-bin to your desktop box.

- scp the deb file to loox : scp libts-bin_1.0-4ubuntu2_armel.deb root@192.168.2.2:/root

- on loox : dpkg -i libts-bin*.deb

- run ts_calibrate (all in one line) :

TSLIB_CONFFILE=/etc/ts.conf TSLIB_TSDEVICE=/dev/input/event0 TSLIB_FBDEVICE=/dev/fb0 TSLIB_CONSOLEDEVICE=none TSLIB_CALIBFILE=/etc/pointercal ts_calibrate

- you can test your touchscreen with ts_test

  • If touchscreen is not working under Xorg MER v0.11 :

remove xorg synaptics driver

apt-get remove xserver-xorg-input-synaptics
  • Internet on Loox

- Configure MASQUERADE on you desktop

iptables -A FORWARD -s 192.168.2.0/24 -j ACCEPT
iptables -A FORWARD -d 192.168.2.0/24 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.2.0/24 -j MASQUERADE
echo 1 >/proc/sys/net/ipv4/ip_forward

SmartQ

Dual booting doesn't seem to work at the moment.

You'll need an SD card with a FAT32 as the first partition and more than 140MB free.

Download the correct firmware image and rootfs image from the Released Images table. Copy both of them to the root of the FAT32 partition on the SD card.

Rename the firmware image to either 'SmartQ5' or 'SmartQ7' according to your device.

You may also want to download some additional software to our SD card for after Mer is installed.
To use Wifi, you'll need the Marvell Wifi Firmware blobs

  • Browse here to agree the download license and get a zip file
  • Extract the downloaded zip file, then extract SD-8686-FEDORA26FC6-SYSKT-GPL-9.70.3.p24-26409.P45.tar within it. Extract the FwImage folder to your PC.
  • Inside there are two files, helper_sd.bin and sd8686.bin. Rename helper_sd.bin to sd8686_helper.bin and copy to your SD card

The commands to extract and copy it might look like this:

cd /tmp
unzip SD-8686-LINUX26-SYSKT-9.70.3.p24-26409.P45-GPL.zip
tar xf SD-8686-FEDORA26FC6-SYSKT-GPL-9.70.3.p24-26409.P45.tar
cp FwImage/helper_sd.bin /path_to_SD_CARD/sd8686_helper.bin
cp FwImage/sd8686.bin /path_to_SD_CARD/sd8686.bin


Wifi WPA2 fix

Now unmount the SD card and eject it.

Power off the SmartQ totally (wait for the LED to go out) and insert the SD card.

SmartQ5

Press and hold the + button and insert the charger. The device will begin to boot; the LED will be green/yellow. A series of chinese characters will appear ending with '...' if all is going well. Once you see them, you can release the + button. Next there will be a progress bar. Once it completes, the device will automatically reboot.

SmartQ7

Press and hold the 'menu' key (bottom key on front) and insert the charger. The device will begin to boot; the LED will be a different colour - green/yellow. You can release the menu key. Some chinese symbols appear and then a progress bar ticks (slowly) up to 100%. Once it completes, the device will automatically reboot.

both

After this a calibration screen will appear and shortly after you are in Mer.

If you have connected it to a computer via USB, it will be accessible over USB networking on IP 192.168.2.15 (see instructions here) with a SSH server, login root, password rootme

It will not show a splash screen, but it will after darkness then make the screen white, and eventually, show the Mer background and first boot wizard.

To mount your SD card

In Mer on SmartQ, open X-Terminal and type (tab-completion is your friend):

$  sudo mount -t vfat /dev/mmcblk1p1 /media

When prompted for a password, enter the one you set when you first started. Note that the above device name has one lower-case L character and then two number one characters (these can look quite similar in some fonts).

To get wireless networking (including WPA2) to work

In order to get wireless networking to work, you are going to have to install the Marvell firmware you copied onto your SD card, and to get WPA2 working, you'll also need to install the .deb. The first step is to mount your SD card (see the section just above this, if you haven't already mounted it).

So, in Mer on SmartQ, open X-Terminal and type (tab-completion is your friend):

$ sudo cp /media/sd8686.bin /lib/firmware/
(if prompted, the password is the one you set when you first started)
$ sudo cp /media/sd8686_helper.bin /lib/firmware/

And then either, for the SmartQ5

$ sudo dpkg -i /media/kernel-smartq5-modules_2.6.24.7-smartq5-*_all.deb

or for the SmartQ7

$ sudo dpkg -i /media/kernel-smartq7-modules_2.6.24.7-smartq7-*_all.deb

Next you should reboot.

$ sudo /sbin/reboot

Once it reboots, you should be able to see wireless networks on the menu and select them.

Booting from SD card

(this was taken from zenvoid's blog)

I made a modified Qi bootloader for the SmartQ 5 MID that can boot from the external SD card, as a convenient way of developing or testing OS, or for system rescue purposes in case of internal flash corruption.

This is the bootloader operation:

  • Search for a valid ext2/ext3 partition in the SD card (4 primary partitions).
  • If the file /boot/noboot-SDMK6410 exists, it will skip that partition and try the next one. Useful for disabling partitions temporary.
  • Load and run the kernel image from file /boot/linux-SMDK6410.bin (if it exists). It should be in uImage or zImage format.
  • The optional file /boot/append-SMDK6410 can be used to specify additional kernel arguments.

The SmartQ Qi bootloader is written to the end of the SD card. Create partitions to suit your preferences, make at least one ext2/ext3 partition to install the root filesystem and optionally a swap partition, but always remember to reserve 1 MiB of free, unpartitioned space at the end of the SD card. To be precise, at least the latest 1042 blocks (512 bytes each) must be reserved.


A precompiled bootloader (Q5/Q7) and a kernel (Q5 only), installation script and source code are here:

http://zenvoid.org/software/qi-smartq


Look at the script install-smartq-qi.sh in order to make a bootable SD card:

./install-smartq-qi.sh /dev/SD_CARD_DEVICE qi-smartq-20090603.bin

To boot from the SD card, keep the "move" (also known as fullscreen) button pressed and then press the "power" button.

  • Red LED: First stage - bootloader is loading itself into memory.
  • Yellow LED: Second stage - bootloader running, trying to locate and loading a kernel image.
  • Green LED: Linux kernel loaded and running.
  • Blinking yellow LED: A critical error while reading from the SD card.
  • Blinking green LED: No kernel found.

Keep in mind that the LEDs are switched on the Q7, i.e. the green LED on the Q5 is the red one on the Q7 (the list above is for the Q5)

There is no battery check at the moment, look for the next release, I'm working in that.

Don't forget to put a rootfs on your SD card and the kernel in /boot/linux-SMDK6410.bin !