-
Notifications
You must be signed in to change notification settings - Fork 1
Odroid U3 Debian Wheezy setup
TODO: This article is getting long and probably needs to bee broken up into a sequential series of checklists
As much as Rigel, and especially Kodos, is supposed to be a different distro from ODroid's Debian Wheezy distro, sometimes you still need to know what to do when you are starting over again.
The Odroid U3 is a SBC with 16x more CPU power than the Raspberry Pi B+. With a 1.7GHz Samsung Exynos 4412 Quad Core processor and 2 GB DRAM, it is totally worth paying the $35 if you get if shipped from Korea. (The shipping might be cheaper now that there are distributors in the EU, US, and UK now.) The praises of this credit-card-size device are worth repeating.
It should be noted as of debian-wheezey-lxde-20140910.img, you DO NOT need an Ethernet cable to establish the initial internet connection with the device. Although, if Wifi doesn't launch in the begining, you should probably unplug the Wifi dongle and plug it back in..
- [Burn Debian Wheezy to SD Card](SD Card formatting and image mounting).
- Plug the SD card into the Odroid.
- Boot it up.
- Login. The default user name is "odroid" and the default password is "odroid". Your system will log you into an LXDE session. We'll eventually change this to Fluxbox later.
- If you have a Wifi Dongle and a wireless network, plug it in! I highly recommend setting up WiFi first so you aren't tethered to a modem just to do the rest of this. (Conspire to unwire!) Yes you can do this without a wired connection.
- Click on the Wifi bars icon if it shows up. If it doesn't try unplugging and replugging it in. Then left click on the bars icon, select the local Wifi network you are familiar with, and enter the password. (BTW, if your password on you Wifi modem is "admin", change your modem password! And don't make it something easy for outsiders to guess, but do write it down! Most password cracks are single-word dictionary hacks. So Always use more than one word and add a number between 10 and 1000. I should probably move this password discussion to another page.)
- Open up a terminal and run
sudo odroid-utility.shto download the latest headers. Don't click on the desktop icon, we'll need to do more stuff later so open an LXTerminal (LXDE Menu -> Accessories -> LXTerminal). Since I'm using an Odroid U3+ (which if you have a U3 or a U3+, will still use the same software as the U2), this program that mdrjr created will look for Debian Wheezy packages especially if they have an armhf architecture. Don't let a different architecture discourage you from installing new software. If anything you can compile software from source and try to see if it runs on the ODroid later. - A textual user interface should show up eventually. Let's start with option number 1: HDMI configuration. Select 1 then enter. There are several ways to configure HDMI. If you are using a Motorola Atrix Lapdock, select option 5 (
1280x720 (720p) Using generic timings (NO-EDID)) then press enter to select OK and press enter again to select OK again. The pitfall with using this is that you won't have sound working. (I still need to talk to mdrjr about this.) The good new is that everything will look right at the next restart. (NOTE: You may have to do this again just before you restart otherwise this setting will not change!) -
Update your Kernel/Firmware. That's item 2. Select it and press enter. - Select item 1
Update Kerneland press enter. Wait for the update to complete. Then press enter. -
Install the firmware files to /lib/firmware. Item number 2. Select it and press enter. The firmware files will be put in/lib/firmware. Wait for this to complete. Then press enter. -
Update boot scripts. Item 3. Select it and press enter. Wait. Then press enter. -
Update udev rules for ODROID subdevices (mali, cec..). Item 4. This should update how Odroid uses its drivers, especially the Mali video drivers. Select it and press enter. Wait (if you need to). Then press enter. -
Update the bootloader. Item 5. Select it and press enter. Since you booted from an SDcard (microSD more precisely) selectYesthen press enter. Wait, then press enter. - Select item 6 to return to the main menu. Press enter.
-
Resize your root partition. Item 4. If you didn't notice, your SD card only allocated about 4GB of space for your system. This option expands the root partition so you can use the rest of it. (By the way, If you're wondering why we aren't selecting item 3 it is because we won't be installing XBMC, since this is Debian.) Selectyes. You're root partition is mounted on/dev/mmcblk0p2in case you are wondering. Rootfs should now be extended. Press enter. You will notice there being more room at the next restart. - Select
Xorg On/Off. Item 5.Enable Xorg, Item 1, then press enter. This will enable the use of the X11. It was on by default but it's just nice to have it on. - Select
Rebuild Xorg DDX. Item 6. This should fix any ABI errors and update Mali. Press enter. Wait. This should build Mali DDX and any binaries from Github. The build log will be stored to/root/armsoc-update-<timestamp>.txt, look it up later if you want. Press enter when it is done. (Possible error! See below!) - Change the host name. Item 7. Press enter. Read the prompt. Press enter. Change your hostname, which is really the name of your computer. The default is
odroid-wheezy. Press enter. - Press right arrow twice to select exit. Press Enter. You'll get a message saying that you'll need to reboot for the changes to take effect but we're not done yet. Press enter.
- Change your password. If you need help thinking of one, you can do this later. Just remember to change the password for both your regular user name (odroid) and the adminstrator account (root). The default passwords for both accounts are
odroid. To change passwords, us thepasswdprogram. (TODO: What about user names?) -
Change your timezone. There are two things that the Odroid Utility script does not cover that are very important. The first being time zone the second keyboard set up. In this step, we deal with that first issue.
sudo dpkg-reconfigure tzdata. Enter your password. Select your geographic area. If you live in the United States, scroll down toUS. Select the time zone local to your area. Since I am in St. Louis, Missouri, I'll selectCentral. (UTC-6/UTC-5 during DST). Press enter. The time should now be set. LXDE might not recognize that change yet, or it might take a minute. It should definitely after restart. -
Change your keyboard. This one is really important because the default keyboard is set up to use some weird British layout. (In America, SHIFT+2 = @). In this step, I've chosen to the English (US) keyboard with the International AltGr keys so I can add accent marks so I can type words in French and Spanish like-a-boss!
sudo dpkg-reconfigure keyboard-configuration. SelectGeneric 105-key (Intl) PCand press enter. If you are seeing nothing but settings for UK keyboards, selectOtherthen press enter. Now you can select a country of origin for the keyboard. Scroll down and selectEnglish (US)if you are in the United States then press enter. A new list of keyboard layouts should now appear. Let's scroll toEnglish (US) - English (international AltGr dead keys)(NOTEnglish (US) - English (US, international AltGr dead keys)!) then press enter. This will allow us to use the Right Alt Key, also known as the Alt Greater (AltGr) key to combine accent characters with specific letters or to use alternate letters. Generally, you will get the n-tidle if you pressAltGr+n. AddingSHIFTwill make it uppercase. For vowels in this layout, the acute symbols used with Mexican Spanish are made available automatically if you press AltGr with a vowel letter key. For the next prompt, the key we want to act as AltGr should be AltGr, so we can selectThe default for the keyboard layoutand press enter. The next prompt asks if we want to assign a Compose key (a.k.a. Multi_key). This isn't the same as theMetakey that some people have considered the Window key on a windows keyboard. The Compose key will not work in the text console in Unicode mode. It is also not the same as our AltGr key we are using for special characters, although it could be used for other characters that do not show up using the AltGr hack. The prompt says that we can input composite characters usingCTRL+period. For now let's selectNo compose keyand press enter. The last prompt asks if we want to useCTRL+ALT+Backspaceto terminate X11. SelectNoand press enter. That concludes keyboard setup. - Restart.
- Create the folders in the Create these folders section. I'll make a bash script that does this that you can download later.
- Set up git. See the Set up git section.
- Disable screen saver.
- Set the terminal configuration
- Install tmux from source.
- Install vim from source.
- Get Fluxbox installed to use as GUI.
- Change the user name
- Is SSH installed?
- Install URXVT
- Install Weechat
- SDR stuff for AX.25
- Change the locale?
There are several ways to configure HDMI. If you are using a Motorola Atrix Lapdock, select option 5 (1280x720 (720p) Using generic timings (NO-EDID)) then press enter to select OK and press enter again to select OK again. The pitfall with using this is that you won't have sound working. (I still need to tak to mdrjr about this.) The good new is that everything will look right.
While this isn't a problem, I'll need to look into it. you see two lines that occur just before a dialog shows up
/usr/local/bin/armsoc.sh: line 117: cd: mali: No such file or directory
cp: cannot stat `config/xorg.conf`: No such file or directory
Create the following folders in your home directory and use them for the following purporses
- Audio - Sound projects of your own, or recordings.
- Books - Store PDF or DJVU files that contain digital versions of books.
- Music - Music, mainly that which you didn't create.
- Documents - Office documents, text files, work stuff.
- Downloads - All that junk you like to Save As from the web. Software packages probably should go in the Software folder. You should put the photos you took in the Photos folder.
- Photos - Photos you took. You should probably leave the ones that you didn't take in the Downloads folder.
- Projects - A place to download your Github or Bitbucket projects. Other people's projects should go in Software, unless you fork them.
- Sandbox - Try out code here
- Software - Software you have installed, namely anything that will find itself installed in
/usr/localor/optlater. If you download stuff from Github or Bitbucket, create a folder first containing the software you plan on downloading that uses the user name of the person who made that software. This will entsure that if two software developers each creates a 'fonts' project, one will not overwrite the other. - Torrents - Stuff you picked up from a Bit Torrent website...you pirate you. ;-)
- Videos - Video projects of your own
- Wallpapers - Backgrounds Consider it a recommended alternative to Photos/Wallpapers
There are other folders that will be created that we'll talk about later.
You can check to see what is currently installed by typing
dpkg --list | grep -i '<query>'
where <query> is the string you are looking for. ii means that that software is installed.
Update the repo list and upgrade any install software.
sudo apt-get update && sudo apt-get upgrade
The first time that you do this EVER, you will want to just run sudo apt-get upgrade, because the repo lists won't update properly.
TODO: Move this section later
git config --global user.name "Your Name"
git config --global user.email "you@mail.com'
git config --global credential.helper memory cache # remember your password for 15 minutes
git config --global color.ui true # use colors
git config --global core.autocrlf false
This should set up ~/.gitconfig which you'll need if you have a Github account.
Use nano for the moment. Eventually we'll get vim installed.
nano ~/.bashrc
Enable 256 colors by adding this line to the begining of ~/.bashrc below the header.
export TERM="xterm-256color"
You'll also want to enable color for the prompt line. I recommend it if scroll back after a lot of lines. Find this line
#force_color_prompt=yes
and uncomment it
force_color_prompt=yes
Save the changes (CTRL+O and press enter) then exit (CTRL+X), then close the console then reopen it.
If it worked, tput colors should return 256 instead of 8 and 'echo $TERMshould showxterm-256color`.
There's one last thing you will want to do, and it is in regards to using anything that connects online: Unset the GNOME Keyring control variable.
Leaving it set will give you this annoying warning
WARNING: gnome-keyring:: couldn't connect to: /home/odroid/.cache/keyring-DAKugz/pkcs11: No such file or directory
The keyring changes, so it will never find what it is looking for if you shutdown and startup the next day or something.
In `~/bashrc, add these lines.
# unset gnome keyring to avoid warning errors
unset GNOME_KEYRING_CONTROL
A copy of my ~/.bashrc will be included in my Lunarize github.
Odroid's Debian Wheezy does come with perl, but not perl5. We're going to do something I've been eager to do: Install Perl from source for Linux!
I know what you are thinking "There's already perl installed. It's installed by default." True, but check the version, and find out where is perl or even perl5
cd ~/Software
curl -SL http://www.cpan.org/src/5.0/perl-5.20.1.tar.gz | tar xzv
cd perl-5.20.1
./Configure -des -Dprefix=/usr/local
make && make test && sudo make install
cd ..
RXVT-Unicode, or URXVT, requires perl 5. If you haven't done that yet go back to the previous section.
# rxvt-unicode (urxvt)
# TODO: perl needs to be upgraded before rxvt-unicode is installed. (why don't we have perl 5.20?)
curl -SL http://dist.schmorp.de/rxvt-unicode/rxvt-unicode-9.21.tar.bz2 | tar xjv
rxvt-unicode-9.21
./configure && make && sudo make install && sudo ldconfig
cd ..
This program will be run as urxvt. When we get Fluxbox installed, use it as your default Terminal Emulator. But right now you are not done yet. We want to add features to URXVT and establish some settings.
TODO: Also, there was something about urxvt-perls I saw eariler, find out what that is. It sounds like it could add functionality to urxvt. (https://github.com/muennich/urxvt-perls). Also take a look at this article. http://trembits.blogspot.com/2009/09/clipboard-from-command-line-xclip.html
Before we run this we need to get ~/.Xresources set up for URXVT!
Fortunately, I have a ~/.Xresources file set up as part of my Lunarize project. Clone it to your ~/Software directory. Lunarize also fixes a few issues reguarding keybindings.
cd ~/Software
mkdir jrcharney
cd jrcharney
git clone https://github.com/jrcharney/lunarize.git
cd lunarize
xrdb -query -all > ~/.Xresources.backup # I'll just back up what you have.
mv Xresources ~/.Xresources # Replace it with my own
xrdb ~/.Xresources # And use my settings.
cd ..
If there is something specific you would like to use, feel free to include it in the ~/.Xresources file.
This program will be run as urxvt. When we get Fluxbox installed, use it as your default Terminal Emulator.
Odroid will use Debian's Tmux (1.6), which is so old it gets a Social Security check in the mail. We need to uninstall and use a newer version.
Use The version of Tmux from Sourceforge rather than the one that comes with Odroid.
sudo apt-get remove tmux- We need to install Libevent and Ncurses. Do not uninstall the existing ncurses stuff as that us being used for something vital for the system that needs them. Ours will be used for something much nicer.
cd ~/Software/
# libevent is required for tmux
curl -SL https://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz | tar xzv
cd libevent-2.0.22-stable/
./configure && make && sudo make install && sudo ldconfig
cd ..
# ncurses is requires for tmux
curl -SL ftp://invisible-island.net/ncurses/ncurses.tar.gz | tar xzv
cd ncurses-5.9/
./configure && make && sudo make install && sudo ldconfig
cd ..
# Tmux the terminal multiplexer
curl -SL http://sourceforge.net/projects/tmux/files/tmux/tmux-1.9/tmux-1.9a.tar.gz/download | tar xzv
tmux-1.9a
./configure && make && sudo make install && sudo ldconfig
cd ..
Tmux is used as a terminal multiplexer that we will use except for Ruby, Java, and OCaml installation.
TODO: Do we need to do anything special for Tmux if we use URXVT? http://unix.stackexchange.com/questions/77355/tmux-xclip-copy-no-longer-working
TODO: Include an ~/.tmux.conf with Lunarized
When we create our ~/.tmux.conf file, let's start out with setting up a few simple settings. We'll have a more complex configuration file to share here later or on the Tmux page.
Use nano to create ~/.tmux.conf.
nano ~/.tmux.conf
# File: ~/.tmux.conf
# Info: Configure tmux
# NOTE: This file won't work if you installed tmux using a distro's binary package for tmux.
# This is why we install tmux from source.
# Use vi(m) keys instead of emacs keys
# See https://awhan.wordpress.com/2010/06/20/copy-paste-in-tmux/ for advice
set-window-option -g mode-keys vi
# Use a 256 color scheme
# TODO: Why do we use screen-256color for tmux and xterm-256color for urxvt?
set -g default-terminal "screen-256color"
Save (CTRL+O, press enter) and Exit (CTRL+X) These changes will be applied the next time Tmux starts up.
I'll have a copy of that file in my Lunarize git repo. Just move it to the home directory and rename it.
mv tmux.conf ~/.tmux.conf
TODO: What about powerline features? We'll get to them soon! https://github.com/erikw/tmux-powerline
We'll next want to install Vim. We want to use Mercurial to install Vim rather than use the distro's old version of Vim. As an added bonus to set up all sorts of features that Vim uses, we'll add Pathogen
cd ~/Software/
# Mercurial (For vim and Bitbucket projects)
# curl -SL http://mercurial.selenic.com/release/mercurial-3.3-rc.tar.gz | tar xzv
# cd mercurial-3.3-rc/
# You know what, let the distro handle this one.
sudo apt-get install mercurual mercurial-common
There are two desktop environments worth installing. Each of which has components I think are ideal for a my hacktop.
The first one is MATE (pronounced "mah-teh"). Mate is a fork of GNOME 2. One of the features of MATE that has piqued my interest is the file manager Caja (pronounced "Kah-ha" which is spanish for "Box") which is a fork of GNOME's Nautillus. There are other features that make MATE such a great desktop for laptops and desktops including some of the widgets GNOME discarded.
The MATE folks has blessed Debian Wheezy with a backport of the MATE Desktop Environment. Even if things don't turn out as well as I hope, having Caja instead of PC
However, more hefty versions may include the Compiz compositor, which has a history of turning my Desktop running Ubuntu into a slow machine despite all the things I've done to optimize it. Using Compton or Pasadena would be better.
I'd really like to use a new hard drive this year and use this tutorial as a guide to start anew with Ubuntu but without Unity and Compiz gumming up everything. Maybe go straight Debian, but then I probably won't get to enjoy Steam or Netflix. (I wish those guys at Riot Games would port League of Legends to Linux.) But enough rambling. Let's get down to the brass tax.
Open sources.list as root.
sudo nano /etc/apt/sources.list
Add this line. Save (CTRL+O and press enter) and exit (CTRL+X).
deb http://ftp.debian.org/debian wheezy-backports main contrib non-free
Update your packages.
sudo apt-get update
Get the minimial version of MATE. DO NOT install the regular or extras version! We do not want to install Compiz or Marco or any of the CPU hogging stuff!
sudo apt-get install mate-desktop-environment-core
MATE's Marco window manager is just as soul sucking as GNOME's Metacity which Marco is a fork of. Marco (like Metacity) relies on the Compiz compositor to operate. And big compositors like Compiz spend more time taking up computing resources than actually being used.
This is why we want to install Fluxbox. Fluxbox is a stacking window manager much like Openbox which is installed on Odroid's Debian Wheezy but is about as dull as dating a rock. Fluxbox is Openbox's older sister. The difference between them is that with Fluxbox, you are not tied down to the monotone, GNOMEish theme that Openbox uses, nor Openbox's lack of configurability.
Fluxbox almost seemed like it had died off until at the beginning of 2015, a new version was announced. I'd like to introduce a new generation of computer geeks who like to make their desktop look awesome (like KDE kinda promises) but without killing your CPU!
Fluxbox still is one of my favorite desktops especially if you are looking for an alternative to the big three (GNOME, Unity, and KDE). Google "Fluxbox Screenshots", and you'll know what I mean.
I want to install this from source.
cd ~/Software
curl -SL http://sourceforge.net/projects/fluxbox/files/fluxbox/1.3.6/fluxbox-1.3.6.tar.xz | tar xJv
cd fluxbox-1.3.6/
./configure && make && sudo make install && sudo ldconfig
cd ..
TODO: Create a desktop theme that looks rad. ;-)
Before we close out this section, there is one more thing we'll need to do to get Fluxbox up and running. We need to add a Fluxbox.desktop file to /usr/share/xsessions/. This is where LightDM gets it's list of desktop managers.
I was going to say that we would need to do this for MATE, but there is a /usr/share/xsessions/mate.desktop installed thankes to the backport setup we used.
We will also want to set Fluxbox as the default desktop.
Open nano as root and create the fluxbox.desktop file.
sudo nano /usr/share/xsessions/fluxbox.desktop
Write this to the file.
[Desktop Entry]
Encoding=UTF-8
Name=Fluxbox
Comment=This session logs you into Fluxbox
Exec=startfluxbox
Type=Application
Save and exit.
Hopefully Fluxbox will appear as one of the options in the LightDM desktop sessions menu.
TODO: Do I need to look out for this bug? http://askubuntu.com/questions/486949/fluxbox-lightdm-nautilus
TODO: Is there any way we can customize LightDM? (See the files in /etc/lightdm) Also look at http://askubuntu.com/questions/75755/how-to-change-the-lightdm-theme-greeter (we don't need to change that, but it is worth read). But do look at https://wiki.archlinux.org/index.php/LightDM for changing the background. (Hence, it might be ideal to have a Wallpaper folder!)
TODO: What about Xscreensaver? https://wiki.archlinux.org/index.php/XScreenSaver#Disabling_XScreenSaver_for_Media_Applications
cd ~/Software/
# Vim (via Mercurial)
hg clone https://vim.googlecode.com/hg/ vim
# Update to the latest version of vim
cd vim/
hg pull
hg update
# Build and install Vim as usual. If you are happy with the defaults
cd src/
# make distclean # if you build Vim before
make && sudo make install
Those were the instructions on the Vim website, but here's how I actually did it.
# The first step may take some time so be patient.
# I added -v on a couple of Mercurial (hg) commands to make their output more verbose.
hg clone -v https://vim.googlecode.com/ vim
cd vim/
hg pull -v
hg update
cd src/
./configure && make && sudo make install && sudu ldconfig
We'll need to create/edit a ~/.vimrc file so that when we use Vim as our editor instead of nano we can use it without trouble. We do this anyway because we will want to copy ~/.vimrc to /root/.vimrc so when we use Vim as root, root will have a settings file rather than using Vim's messy settings. You will need this file, otherwise arrow keys and backspace won't work like they should.
Let's start with a simple file.
nano ~/.vimrc
Here's our simple file.
" File: ~/.vimrc
" Info: Vim startup settings. (Use this for root. If you have SPF13 or Janus installed, don't use this
" use ~/.vimrc.local instead otherwise, you can use this file.
set nocp " Use Vim defaults
set shell=/bin/bash " Set the shell to Bash
set bg=dark " set background to dark
filetype plugin indent on " Automatically detect file types
syntax on " Use code syntax
set showmode " Show the current mode in the status line
set nu " Enable line numbers
set ai " Enable auto-indent
set sc " Show partial commands
set noincsearch " Do not search as you time. (Learn RegEx, it is better.)
set noexpandtab " Do not expand tabs into spaces
set backspace=indent,eol,start " Have backspace work like in most other applications
A copy of this file will be included in my Lunarized github repo. If you don't install SPF13 or Janus, you can use this ~/.vimrc file as your regular account and as root.
cd ~/Software/jrcharney/lunarize/
cp vimrc ~/.vimrc
sudo vimrc /root/.vimrc
Pathogen is kinda difficult to explain, so we've install this separately from vim.
cd ~/Software/
mkdir tpope/
cd tpope/
git clone https://github.com/tpope/vim-pathogen.git
cd vim-pathogen/
# TODO: Finish this part. Explain SPF13
TODO: We'll need a ~/.vimrc.local (or a ~/.vimrc file if we choose not to use SPF13) file to set up Vim! That .vimrc file will need to be copied for Root to use. (It will be ideal for regular user to use SPF13 ~/.vimrc.local and root user to use ~/.vimrc)
We'll also need to get the powerline fonts and set up fonts on URXVT https://github.com/powerline/fonts
Initially I was a fan of IRSSI. But there is so much about WeeChat that make it so much better than IRSSI. 256 color support. Script that can not only be written in Perl, but Lua, Python, Ruby, etc.
TODO:
- What do we do about audio? (It's still a mess on ODroid U3+!)