Difference between revisions of "Parallella Linaro Nano"
(Created page with "= How to Install Linaro nano 14.01 (minimal headless system) = Copied here from [http://forums.parallella.org/viewtopic.php?f=9&t=844&start=10#p5989 Shodruk's forum post]. ==...") |
m |
||
(27 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | = How to Install Linaro | + | = How to Install Linaro Saucy Nano (minimal headless system) = |
− | |||
== Requirements == | == Requirements == | ||
− | Ubuntu PC, SD Card, SD Card adapter, Parallella | + | Ubuntu PC, SD Card, SD Card adapter, Parallella board |
On the PC's terminal: | On the PC's terminal: | ||
== Download the files == | == Download the files == | ||
+ | |||
+ | Find the kernel tarball and the FPGA bitstream file that are suitable for your board. | ||
+ | |||
+ | http://www.parallella.org/create-sdcard/ | ||
+ | |||
+ | Note: If you want to use "headless bitstream" and "headless kernel", first install Linaro using "HDMI bitstream" and "HDMI kernel", then replace them with the headless one. (A HDMI monitor and a keyboard are needed for installing process.)<br> | ||
+ | These files are in the partition 1 (FAT32), so you can easily replace them using ordinary PC. | ||
<pre> | <pre> | ||
− | + | wget --no-check-certificate https://[THE_URL_OF_THE_KERNEL_TARBALL] | |
− | + | wget --no-check-certificate -O parallella.bit.bin https://[THE_URL_OF_THE_BITSTREAM] | |
− | + | wget http://releases.linaro.org/14.04/ubuntu/saucy-images/nano/linaro-saucy-nano-20140410-652.tar.gz | |
</pre> | </pre> | ||
− | + | <pre>md5sum linaro-saucy-nano-20140410-652.tar.gz</pre> | |
+ | <blockquote> | ||
<pre> | <pre> | ||
− | + | cded44187fb762ba7ea7b1ee092a0998 linaro-saucy-nano-20140410-652.tar.gz | |
− | |||
− | |||
</pre> | </pre> | ||
+ | </blockquote> | ||
== Determine the device name of the SD Card == | == Determine the device name of the SD Card == | ||
<pre> | <pre> | ||
− | + | sudo parted -l | |
</pre> | </pre> | ||
In case of a 2GB SD Card: | In case of a 2GB SD Card: | ||
+ | <blockquote> | ||
<pre> | <pre> | ||
Model: SD/MM Reader | Model: SD/MM Reader | ||
Line 44: | Line 51: | ||
2 49.3MB 2042MB 1992MB primary ext4 | 2 49.3MB 2042MB 1992MB primary ext4 | ||
</pre> | </pre> | ||
+ | </blockquote> | ||
− | "/dev/sdX" is the device name of the SD Card | + | "/dev/sdX" is the device name of the SD Card<br /> |
− | (e.g. sdb, sdc, sdd, sde, ... and, Don't partition HDD!!!) | + | (e.g. sdb, sdc, sdd, sde, mmcblk0, mmcblk1, ... and, Beware! Don't partition HDD!!!)<br /> |
+ | sdX : an example of the device name (e.g. sde, mmcblk0)<br /> | ||
+ | sdX1 : partition 1 of the device (e.g. sde1, mmcblk0p1)<br /> | ||
+ | sdX2 : partition 2 of the device (e.g. sde2, mmcblk0p2)<br /> | ||
== Partition the SD Card == | == Partition the SD Card == | ||
Line 53: | Line 64: | ||
<pre> | <pre> | ||
− | + | sudo parted -a optimal /dev/sdX | |
(parted) print | (parted) print | ||
Line 60: | Line 71: | ||
If there are two partitions on the SD Card, | If there are two partitions on the SD Card, | ||
+ | <blockquote> | ||
<pre> | <pre> | ||
Number Start End Size Type File system Flags | Number Start End Size Type File system Flags | ||
Line 65: | Line 77: | ||
2 99.6MB 2042MB 1942MB primary | 2 99.6MB 2042MB 1942MB primary | ||
</pre> | </pre> | ||
+ | </blockquote> | ||
Delete all existing partition | Delete all existing partition | ||
<pre> | <pre> | ||
− | (parted) | + | (parted) mklabel msdos |
− | + | Warning: The existing disk label on /dev/sdX will be destroyed | |
+ | and all data on this disk will be lost. Do you want to continue? | ||
+ | Yes/No? yes | ||
</pre> | </pre> | ||
Line 76: | Line 91: | ||
<pre> | <pre> | ||
− | (parted) mkpart p fat32 2048s | + | (parted) mkpart p fat32 2048s 256MB |
− | (parted) mkpart p ext2 | + | (parted) mkpart p ext2 256MB -2MB |
(parted) q | (parted) q | ||
</pre> | </pre> | ||
Line 84: | Line 99: | ||
<pre> | <pre> | ||
− | + | sudo fdisk -l /dev/sdX | |
</pre> | </pre> | ||
+ | <blockquote> | ||
<pre> | <pre> | ||
Device Boot Start End Blocks Id System | Device Boot Start End Blocks Id System | ||
− | /dev/sdX1 2048 | + | /dev/sdX1 2048 499711 248832 c W95 FAT32 (LBA) |
− | /dev/sdX2 | + | /dev/sdX2 499712 3887103 1693696 83 Linux |
</pre> | </pre> | ||
+ | </blockquote> | ||
Format the partition | Format the partition | ||
<pre> | <pre> | ||
− | + | sudo mkfs.vfat -n BOOT /dev/sdX1 | |
− | + | sudo mkfs.ext4 -L rootfs /dev/sdX2 | |
</pre> | </pre> | ||
Line 103: | Line 120: | ||
<pre> | <pre> | ||
− | + | sudo mkdir /tmp/mnt1 /tmp/mnt2 | |
− | + | sudo mount /dev/sdX2 /tmp/mnt2 | |
− | + | sudo tar --strip-components=1 -C /tmp/mnt2 -xzpf linaro-saucy-nano-20140410-652.tar.gz | |
− | + | sudo sync | |
− | + | sudo umount /tmp/mnt2 | |
</pre> | </pre> | ||
Line 113: | Line 130: | ||
<pre> | <pre> | ||
− | + | sudo mount -o umask=000 -t vfat /dev/sdX1 /tmp/mnt1 | |
− | + | sudo tar --no-same-owner -C /tmp/mnt1 -xzf [THE_FILENAME_OF_THE_KERNEL_TARBALL] | |
− | + | sudo cp parallella.bit.bin /tmp/mnt1/ | |
− | + | sudo sync | |
− | + | sudo umount /tmp/mnt1 | |
− | |||
− | |||
− | |||
− | |||
</pre> | </pre> | ||
== Edit some configuration files == | == Edit some configuration files == | ||
+ | ==== Preventing to install unnecessary packages ==== | ||
<pre> | <pre> | ||
− | + | sudo mount /dev/sdX2 /tmp/mnt2 | |
− | + | sudo nano /tmp/mnt2/etc/apt/apt.conf.d/00InstallRecommends | |
</pre> | </pre> | ||
− | + | (Edit and save.) | |
+ | <blockquote> | ||
<pre> | <pre> | ||
APT::Install-Recommends "false"; | APT::Install-Recommends "false"; | ||
</pre> | </pre> | ||
+ | </blockquote> | ||
− | + | ==== Network configuration ==== | |
− | |||
− | Network configuration | ||
If your router's IP address is 192.168.0.1 and the Parallella's IP address is 192.168.0.2, | If your router's IP address is 192.168.0.1 and the Parallella's IP address is 192.168.0.2, | ||
<pre> | <pre> | ||
− | + | sudo nano /tmp/mnt2/etc/network/interfaces | |
</pre> | </pre> | ||
− | + | (Edit and save.) | |
+ | <blockquote> | ||
<pre> | <pre> | ||
source-directory /etc/network/interfaces.d | source-directory /etc/network/interfaces.d | ||
Line 152: | Line 167: | ||
auto eth0 | auto eth0 | ||
+ | |||
+ | # static network settings | ||
iface eth0 inet static | iface eth0 inet static | ||
address 192.168.0.2 | address 192.168.0.2 | ||
Line 157: | Line 174: | ||
gateway 192.168.0.1 | gateway 192.168.0.1 | ||
up sleep 3; mii-tool -F 1000baseT-FD | up sleep 3; mii-tool -F 1000baseT-FD | ||
+ | |||
+ | # If you prefer DHCP, comment out the above 5 lines, uncomment the below. | ||
+ | #iface eth0 inet dhcp | ||
+ | # up sleep 3; mii-tool -F 1000baseT-FD | ||
</pre> | </pre> | ||
− | + | </blockquote> | |
+ | NOTE: Linaro Quantal and Linaro Raring would not boot if "source-directory /etc/network/interfaces.d" was left in the file. --[[User:Gamedrummer|Gamedrummer]] ([[User talk:Gamedrummer|talk]]) 14:08, 10 July 2014 (UTC) | ||
<pre> | <pre> | ||
− | + | sudo nano /tmp/mnt2/etc/resolv.conf | |
</pre> | </pre> | ||
+ | <blockquote> | ||
<pre> | <pre> | ||
nameserver 192.168.0.1 | nameserver 192.168.0.1 | ||
</pre> | </pre> | ||
+ | </blockquote> | ||
<pre> | <pre> | ||
− | + | sudo sync | |
− | + | sudo umount /tmp/mnt2 | |
</pre> | </pre> | ||
− | + | Insert the SD Card to the Parallella,<br /> | |
− | + | power-on,<br /> | |
− | + | Wait 30 seconds,<br /> | |
− | + | You'll see a root terminal.<br /> | |
− | + | If it doesn't boot, press the reset button and try again.<br /> | |
− | + | ||
− | + | ==== Install openssh-server ==== | |
On the Parallella: | On the Parallella: | ||
<pre> | <pre> | ||
− | + | apt-get update | |
− | + | apt-get install openssh-server | |
+ | sync | ||
</pre> | </pre> | ||
− | Now you can login the Parallella from your PC. | + | Now you can login the Parallella from your PC.<br /> |
− | On the PC | + | On the PC, |
<pre> | <pre> | ||
− | + | ssh linaro@192.168.0.2 | |
password: linaro | password: linaro | ||
</pre> | </pre> | ||
− | Let's see how lightweight it is | + | ==== Create device nodes ==== |
+ | |||
+ | <pre> | ||
+ | sudo mknod -m 600 /dev/ttyPS0 c 251 0 | ||
+ | sudo chown root:tty /dev/ttyPS0 | ||
+ | </pre> | ||
+ | |||
+ | ==== Let's see how lightweight it is ==== | ||
<pre> | <pre> | ||
− | + | free | |
</pre> | </pre> | ||
+ | <blockquote> | ||
<pre> | <pre> | ||
− | total used free shared buffers cached | + | total used free shared buffers cached |
− | Mem: 992452 | + | Mem: 992452 38356 954096 0 1816 13076 |
− | -/+ buffers/cache: | + | -/+ buffers/cache: 23464 968988 |
− | Swap: 0 0 0 | + | Swap: 0 0 0 |
</pre> | </pre> | ||
+ | </blockquote> | ||
+ | |||
+ | The memory consumption is only 23MB !! :D | ||
− | + | <pre> | |
+ | df | ||
+ | </pre> | ||
+ | <blockquote> | ||
<pre> | <pre> | ||
− | + | Filesystem 1K-blocks Used Available Use% Mounted on | |
+ | /dev/root 30348232 311108 28472452 2% / | ||
+ | none 99248 68 99180 1% /run | ||
+ | none 5120 0 5120 0% /run/lock | ||
+ | none 496224 0 496224 0% /run/shm | ||
+ | none 102400 0 102400 0% /run/user | ||
</pre> | </pre> | ||
+ | </blockquote> | ||
+ | |||
+ | The disk consumption is only 304MB !! | ||
+ | |||
+ | == Additional Installation == | ||
+ | |||
+ | ==== Recommended Packages ==== | ||
<pre> | <pre> | ||
− | + | sudo apt-get install vim-tiny nano fake-hwclock wget less unzip | |
− | |||
− | |||
− | |||
− | |||
− | |||
</pre> | </pre> | ||
− | + | ==== Epiphany SDK ==== | |
<pre> | <pre> | ||
− | + | sudo apt-get install build-essential man-db manpages-dev git libmpc-dev libmpc2 libgmp3-dev libmpfr-dev ca-certificates | |
+ | |||
+ | wget http://ftp.parallella.org/esdk/esdk.5.13.09.10_linux_armv7l.tgz | ||
+ | |||
+ | md5sum esdk.5.13.09.10_linux_armv7l.tgz | ||
</pre> | </pre> | ||
+ | <blockquote> | ||
<pre> | <pre> | ||
− | + | 52e3b60185c882c7641115993b6a72b5 esdk.5.13.09.10_linux_armv7l.tgz | |
− | |||
− | |||
− | |||
− | |||
− | 5 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | 13 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</pre> | </pre> | ||
+ | </blockquote> | ||
<pre> | <pre> | ||
− | + | sudo mkdir -p /opt/adapteva/ | |
+ | sudo tar xzf esdk.5.13.09.10_linux_armv7l.tgz -C /opt/adapteva/ | ||
+ | sudo ln -sTf /opt/adapteva/esdk.5.13.09.10 /opt/adapteva/esdk | ||
+ | |||
+ | touch ~/.nano_history | ||
+ | nano ~/.bashrc | ||
</pre> | </pre> | ||
+ | (add to the bottom of the file) | ||
+ | <blockquote> | ||
<pre> | <pre> | ||
− | + | EPIPHANY_HOME=/opt/adapteva/esdk | |
− | + | . ${EPIPHANY_HOME}/setup.sh | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</pre> | </pre> | ||
+ | </blockquote> | ||
+ | |||
+ | ==== Disable sshd hostname look-up ==== | ||
+ | (To fix slow SSH connections) | ||
+ | <pre> | ||
+ | sudo nano /etc/ssh/sshd_config | ||
+ | </pre> | ||
+ | (add to the bottom of the file) | ||
+ | <blockquote> | ||
+ | <pre> | ||
+ | UseDNS no | ||
+ | </pre> | ||
+ | </blockquote> | ||
+ | |||
+ | ==== Enable devtmpfs ==== | ||
+ | (and disable serial console: they are incompatible) | ||
+ | <pre> | ||
+ | sudo mknod -m 660 /dev/mmcblk0 b 179 0 | ||
+ | sudo mknod -m 660 /dev/mmcblk0p1 b 179 1 | ||
+ | sudo mknod -m 660 /dev/mmcblk0p2 b 179 2 | ||
+ | |||
+ | sudo apt-get install device-tree-compiler nano | ||
+ | |||
+ | sudo mount /dev/mmcblk0p1 /mnt | ||
+ | cd /mnt | ||
+ | sudo cp devicetree.dtb devicetree.dtb.bak | ||
+ | |||
+ | sudo dtc -I dtb -O dts -o devicetree.dts devicetree.dtb | ||
+ | |||
+ | sudo nano devicetree.dts | ||
+ | </pre> | ||
+ | (Search and Edit the "bootargs" line) | ||
+ | <blockquote> | ||
+ | <pre> | ||
+ | bootargs = "root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"; | ||
+ | </pre> | ||
+ | </blockquote> | ||
+ | |||
+ | <pre> | ||
+ | sudo dtc -I dts -O dtb -o devicetree.dtb devicetree.dts | ||
+ | cd / | ||
+ | sync | ||
+ | sudo reboot | ||
+ | </pre> | ||
+ | |||
+ | That's all! Below are installation instructions of lightweight desktop environment. | ||
+ | |||
+ | = How to Install lightweight X environment = | ||
+ | |||
+ | Demo video: | ||
+ | http://youtu.be/6gpM57qB-I8 | ||
+ | |||
+ | ==== Install LXDE ==== | ||
+ | |||
+ | <pre> | ||
+ | sudo apt-get install alsa-base alsa-utils libasound2-plugins lxde x11-xserver-utils xserver-xorg xserver-xorg-video-fbdev xserver-xorg-video-modesetting feh xinit | ||
+ | </pre> | ||
+ | |||
+ | ==== Disable PCManFM Desktop mode ==== | ||
+ | (for faster displaying) | ||
+ | <pre> | ||
+ | sudo nano /etc/xdg/lxsession/LXDE/autostart | ||
+ | </pre> | ||
+ | (Delete the line "@pcmanfm --desktop --profile LXDE" and save.) | ||
+ | |||
+ | ==== Set a background image ==== | ||
+ | |||
+ | Put a background image file in your home directory.<br /> | ||
+ | (e.g. /home/linaro/background.png)<br /> | ||
+ | |||
+ | <pre> | ||
+ | sudo nano /etc/xdg/lxsession/LXDE/autostart | ||
+ | </pre> | ||
+ | (Append this line to the bottom of the file) | ||
+ | |||
+ | <blockquote> | ||
+ | <pre> | ||
+ | @feh --bg-fill /home/linaro/background.png | ||
+ | </pre> | ||
+ | </blockquote> | ||
+ | |||
+ | ==== xorg configuration ==== | ||
+ | |||
+ | <pre> | ||
+ | sudo nano /etc/X11/xorg.conf | ||
+ | </pre> | ||
+ | |||
+ | <blockquote> | ||
+ | <pre> | ||
+ | Section "Device" | ||
+ | Identifier "Card0" | ||
+ | Driver "modesetting" | ||
+ | Option "ShadowFB" "True" | ||
+ | Option "SWCursor" "True" | ||
+ | Option "HWCursor" "False" | ||
+ | EndSection | ||
+ | Section "Screen" | ||
+ | Identifier "Screen0" | ||
+ | Device "Card0" | ||
+ | SubSection "Display" | ||
+ | #---- Uncomment your preferred mode ---- | ||
+ | #Modes "1920x1200" | ||
+ | #Modes "1920x1080" | ||
+ | #Modes "1280x720" | ||
+ | #Modes "640x480" | ||
+ | EndSubSection | ||
+ | EndSection | ||
+ | </pre> | ||
+ | </blockquote> | ||
+ | |||
+ | ==== ALSA configuration ==== | ||
+ | |||
+ | <pre> | ||
+ | nano ~/.asoundrc | ||
+ | </pre> | ||
+ | (copy, paste and save) | ||
+ | <blockquote> | ||
+ | <pre> | ||
+ | pcm.!default { | ||
+ | type rate | ||
+ | slave { | ||
+ | pcm "hw:0" | ||
+ | rate 48000 | ||
+ | } | ||
+ | converter "samplerate" | ||
+ | } | ||
+ | </pre> | ||
+ | </blockquote> | ||
+ | |||
+ | <pre> | ||
+ | sync | ||
+ | sudo reboot | ||
+ | </pre> | ||
+ | |||
+ | ==== How to login as a normal user ==== | ||
+ | |||
+ | After booting, press Ctrl+Alt+F2 | ||
+ | <pre> | ||
+ | login: linaro | ||
+ | Password: linaro | ||
+ | </pre> | ||
+ | |||
+ | Or, (easier way)<br /> | ||
+ | In the root prompt,<br /> | ||
+ | <pre> | ||
+ | su linaro | ||
+ | cd | ||
+ | </pre> | ||
+ | |||
+ | ==== Start X environment ==== | ||
+ | |||
+ | <pre> | ||
+ | startx | ||
+ | </pre> | ||
+ | |||
+ | ==== Install Firefox ==== | ||
+ | |||
+ | <pre> | ||
+ | sudo apt-get install firefox | ||
+ | </pre> | ||
+ | |||
+ | ==== Speed up Firefox ==== | ||
+ | |||
+ | Launch Firefox, Type "about:config" in the URL bar, Type "browser.cache.disk.enable" in the "Search:" bar, Change the value true->false by double-clicking. | ||
+ | |||
+ | Type "mousewheel.acceleration.start" in the "Search:" bar, Double click, set [2]. | ||
+ | |||
+ | ==== Install media player ==== | ||
+ | |||
+ | <pre> | ||
+ | sudo apt-get install smplayer | ||
+ | </pre> | ||
+ | |||
+ | Launch smplayer,<br /> | ||
+ | Options->Preferences->Video->Output driver: x11<br /> | ||
+ | Options->Preferences->Audio->Output driver: alsa<br /> | ||
+ | |||
+ | ==== How to force framebuffer resolution to 1280x720 ==== | ||
+ | This increases desktop performance on a full-HD monitor.<br /> | ||
+ | <br /> | ||
+ | The preferred resolution is 1280x720, however you can set another resolution.<br /> | ||
+ | <br /> | ||
+ | To check the available resolutions, type this command on a terminal. (with HDMI connected, on native X Window, not in ssh)<br /> | ||
+ | |||
+ | <pre> | ||
+ | cat /sys/class/drm/card0-HDMI-A-1/modes | ||
+ | </pre> | ||
+ | |||
+ | '''Note: The resolution settings of the xorg.conf (Modes "1280x720") must match with the bootargs settings (video=HDMI-A-1:1280x720).''' | ||
+ | |||
+ | Edit bootargs and update dtb file.<br /> | ||
+ | How to: [[Parallella_Linaro_Nano#Enable_devtmpfs]] | ||
+ | <pre> | ||
+ | bootargs = "root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait video=HDMI-A-1:1280x720"; | ||
+ | </pre> | ||
+ | Edit xorg.conf<br /> | ||
+ | How to: [[Parallella_Linaro_Nano#xorg_configuration]] | ||
+ | <pre> | ||
+ | Modes "1280x720" | ||
+ | # In the Section "Screen" | ||
+ | </pre> | ||
+ | |||
+ | {{Template:Parallella Navbox}} |
Latest revision as of 23:45, 17 January 2015
Contents
- 1 How to Install Linaro Saucy Nano (minimal headless system)
- 2 How to Install lightweight X environment
- 2.1 Install LXDE
- 2.2 Disable PCManFM Desktop mode
- 2.3 Set a background image
- 2.4 xorg configuration
- 2.5 ALSA configuration
- 2.6 How to login as a normal user
- 2.7 Start X environment
- 2.8 Install Firefox
- 2.9 Speed up Firefox
- 2.10 Install media player
- 2.11 How to force framebuffer resolution to 1280x720
How to Install Linaro Saucy Nano (minimal headless system)
Requirements
Ubuntu PC, SD Card, SD Card adapter, Parallella board
On the PC's terminal:
Download the files
Find the kernel tarball and the FPGA bitstream file that are suitable for your board.
http://www.parallella.org/create-sdcard/
Note: If you want to use "headless bitstream" and "headless kernel", first install Linaro using "HDMI bitstream" and "HDMI kernel", then replace them with the headless one. (A HDMI monitor and a keyboard are needed for installing process.)
These files are in the partition 1 (FAT32), so you can easily replace them using ordinary PC.
wget --no-check-certificate https://[THE_URL_OF_THE_KERNEL_TARBALL] wget --no-check-certificate -O parallella.bit.bin https://[THE_URL_OF_THE_BITSTREAM] wget http://releases.linaro.org/14.04/ubuntu/saucy-images/nano/linaro-saucy-nano-20140410-652.tar.gz
md5sum linaro-saucy-nano-20140410-652.tar.gz
cded44187fb762ba7ea7b1ee092a0998 linaro-saucy-nano-20140410-652.tar.gz
Determine the device name of the SD Card
sudo parted -l
In case of a 2GB SD Card:
Model: SD/MM Reader Disk /dev/sdX: 2042MB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 49.3MB 48.2MB primary fat16 2 49.3MB 2042MB 1992MB primary ext4
"/dev/sdX" is the device name of the SD Card
(e.g. sdb, sdc, sdd, sde, mmcblk0, mmcblk1, ... and, Beware! Don't partition HDD!!!)
sdX : an example of the device name (e.g. sde, mmcblk0)
sdX1 : partition 1 of the device (e.g. sde1, mmcblk0p1)
sdX2 : partition 2 of the device (e.g. sde2, mmcblk0p2)
Partition the SD Card
Unmount the SD Card if it was automounted, then,
sudo parted -a optimal /dev/sdX (parted) print
If there are two partitions on the SD Card,
Number Start End Size Type File system Flags 1 1049kB 99.6MB 98.6MB primary fat16 lba 2 99.6MB 2042MB 1942MB primary
Delete all existing partition
(parted) mklabel msdos Warning: The existing disk label on /dev/sdX will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No? yes
Make new partitions
(parted) mkpart p fat32 2048s 256MB (parted) mkpart p ext2 256MB -2MB (parted) q
Check the partition
sudo fdisk -l /dev/sdX
Device Boot Start End Blocks Id System /dev/sdX1 2048 499711 248832 c W95 FAT32 (LBA) /dev/sdX2 499712 3887103 1693696 83 Linux
Format the partition
sudo mkfs.vfat -n BOOT /dev/sdX1 sudo mkfs.ext4 -L rootfs /dev/sdX2
Extract rootfs
sudo mkdir /tmp/mnt1 /tmp/mnt2 sudo mount /dev/sdX2 /tmp/mnt2 sudo tar --strip-components=1 -C /tmp/mnt2 -xzpf linaro-saucy-nano-20140410-652.tar.gz sudo sync sudo umount /tmp/mnt2
Extract BOOT partition
sudo mount -o umask=000 -t vfat /dev/sdX1 /tmp/mnt1 sudo tar --no-same-owner -C /tmp/mnt1 -xzf [THE_FILENAME_OF_THE_KERNEL_TARBALL] sudo cp parallella.bit.bin /tmp/mnt1/ sudo sync sudo umount /tmp/mnt1
Edit some configuration files
Preventing to install unnecessary packages
sudo mount /dev/sdX2 /tmp/mnt2 sudo nano /tmp/mnt2/etc/apt/apt.conf.d/00InstallRecommends
(Edit and save.)
APT::Install-Recommends "false";
Network configuration
If your router's IP address is 192.168.0.1 and the Parallella's IP address is 192.168.0.2,
sudo nano /tmp/mnt2/etc/network/interfaces
(Edit and save.)
source-directory /etc/network/interfaces.d auto lo iface lo inet loopback auto eth0 # static network settings iface eth0 inet static address 192.168.0.2 netmask 255.255.255.0 gateway 192.168.0.1 up sleep 3; mii-tool -F 1000baseT-FD # If you prefer DHCP, comment out the above 5 lines, uncomment the below. #iface eth0 inet dhcp # up sleep 3; mii-tool -F 1000baseT-FD
NOTE: Linaro Quantal and Linaro Raring would not boot if "source-directory /etc/network/interfaces.d" was left in the file. --Gamedrummer (talk) 14:08, 10 July 2014 (UTC)
sudo nano /tmp/mnt2/etc/resolv.conf
nameserver 192.168.0.1
sudo sync sudo umount /tmp/mnt2
Insert the SD Card to the Parallella,
power-on,
Wait 30 seconds,
You'll see a root terminal.
If it doesn't boot, press the reset button and try again.
Install openssh-server
On the Parallella:
apt-get update apt-get install openssh-server sync
Now you can login the Parallella from your PC.
On the PC,
ssh linaro@192.168.0.2 password: linaro
Create device nodes
sudo mknod -m 600 /dev/ttyPS0 c 251 0 sudo chown root:tty /dev/ttyPS0
Let's see how lightweight it is
free
total used free shared buffers cached Mem: 992452 38356 954096 0 1816 13076 -/+ buffers/cache: 23464 968988 Swap: 0 0 0
The memory consumption is only 23MB !! :D
df
Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 30348232 311108 28472452 2% / none 99248 68 99180 1% /run none 5120 0 5120 0% /run/lock none 496224 0 496224 0% /run/shm none 102400 0 102400 0% /run/user
The disk consumption is only 304MB !!
Additional Installation
Recommended Packages
sudo apt-get install vim-tiny nano fake-hwclock wget less unzip
Epiphany SDK
sudo apt-get install build-essential man-db manpages-dev git libmpc-dev libmpc2 libgmp3-dev libmpfr-dev ca-certificates wget http://ftp.parallella.org/esdk/esdk.5.13.09.10_linux_armv7l.tgz md5sum esdk.5.13.09.10_linux_armv7l.tgz
52e3b60185c882c7641115993b6a72b5 esdk.5.13.09.10_linux_armv7l.tgz
sudo mkdir -p /opt/adapteva/ sudo tar xzf esdk.5.13.09.10_linux_armv7l.tgz -C /opt/adapteva/ sudo ln -sTf /opt/adapteva/esdk.5.13.09.10 /opt/adapteva/esdk touch ~/.nano_history nano ~/.bashrc
(add to the bottom of the file)
EPIPHANY_HOME=/opt/adapteva/esdk . ${EPIPHANY_HOME}/setup.sh
Disable sshd hostname look-up
(To fix slow SSH connections)
sudo nano /etc/ssh/sshd_config
(add to the bottom of the file)
UseDNS no
Enable devtmpfs
(and disable serial console: they are incompatible)
sudo mknod -m 660 /dev/mmcblk0 b 179 0 sudo mknod -m 660 /dev/mmcblk0p1 b 179 1 sudo mknod -m 660 /dev/mmcblk0p2 b 179 2 sudo apt-get install device-tree-compiler nano sudo mount /dev/mmcblk0p1 /mnt cd /mnt sudo cp devicetree.dtb devicetree.dtb.bak sudo dtc -I dtb -O dts -o devicetree.dts devicetree.dtb sudo nano devicetree.dts
(Search and Edit the "bootargs" line)
bootargs = "root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait";
sudo dtc -I dts -O dtb -o devicetree.dtb devicetree.dts cd / sync sudo reboot
That's all! Below are installation instructions of lightweight desktop environment.
How to Install lightweight X environment
Demo video: http://youtu.be/6gpM57qB-I8
Install LXDE
sudo apt-get install alsa-base alsa-utils libasound2-plugins lxde x11-xserver-utils xserver-xorg xserver-xorg-video-fbdev xserver-xorg-video-modesetting feh xinit
Disable PCManFM Desktop mode
(for faster displaying)
sudo nano /etc/xdg/lxsession/LXDE/autostart
(Delete the line "@pcmanfm --desktop --profile LXDE" and save.)
Set a background image
Put a background image file in your home directory.
(e.g. /home/linaro/background.png)
sudo nano /etc/xdg/lxsession/LXDE/autostart
(Append this line to the bottom of the file)
@feh --bg-fill /home/linaro/background.png
xorg configuration
sudo nano /etc/X11/xorg.conf
Section "Device" Identifier "Card0" Driver "modesetting" Option "ShadowFB" "True" Option "SWCursor" "True" Option "HWCursor" "False" EndSection Section "Screen" Identifier "Screen0" Device "Card0" SubSection "Display" #---- Uncomment your preferred mode ---- #Modes "1920x1200" #Modes "1920x1080" #Modes "1280x720" #Modes "640x480" EndSubSection EndSection
ALSA configuration
nano ~/.asoundrc
(copy, paste and save)
pcm.!default { type rate slave { pcm "hw:0" rate 48000 } converter "samplerate" }
sync sudo reboot
How to login as a normal user
After booting, press Ctrl+Alt+F2
login: linaro Password: linaro
Or, (easier way)
In the root prompt,
su linaro cd
Start X environment
startx
Install Firefox
sudo apt-get install firefox
Speed up Firefox
Launch Firefox, Type "about:config" in the URL bar, Type "browser.cache.disk.enable" in the "Search:" bar, Change the value true->false by double-clicking.
Type "mousewheel.acceleration.start" in the "Search:" bar, Double click, set [2].
Install media player
sudo apt-get install smplayer
Launch smplayer,
Options->Preferences->Video->Output driver: x11
Options->Preferences->Audio->Output driver: alsa
How to force framebuffer resolution to 1280x720
This increases desktop performance on a full-HD monitor.
The preferred resolution is 1280x720, however you can set another resolution.
To check the available resolutions, type this command on a terminal. (with HDMI connected, on native X Window, not in ssh)
cat /sys/class/drm/card0-HDMI-A-1/modes
Note: The resolution settings of the xorg.conf (Modes "1280x720") must match with the bootargs settings (video=HDMI-A-1:1280x720).
Edit bootargs and update dtb file.
How to: Parallella_Linaro_Nano#Enable_devtmpfs
bootargs = "root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait video=HDMI-A-1:1280x720";
Edit xorg.conf
How to: Parallella_Linaro_Nano#xorg_configuration
Modes "1280x720" # In the Section "Screen"
|