CubieTruck + Lubuntu >
Instructions on getting Lubuntu (desktop) working for the CubieTruck.
NOTE - These instructions will wipe your MicroSD card!
- A revision of https://web.archive.org/web/20200922173543/http://docs.cubieboard.org/tutorials/ct1/installation/install_lubuntu_desktop_server_to_sd_card
-
I don't know if this version of Lubuntu, or whatever it turns into when updated, has systemd. I'm going to say no because 14.10 is so damned old.
- https://web.archive.org/web/20190825135430/https://wiki.linaro.org/FrontPage
- forum thread for 1.00
-
www.miniand.com/forums/forums/development--5/topics/linaro-ubuntu-custom-server-images-armhf
- Gone as of 2016-04-10, and archive.org has no cache.
- https://www.cnx-software.com/2012/12/09/cubieboard-unboxing-and-quick-start-guide/
2016-04-11 - 12.10 ∞
Because of my failure for [unsolved] Change the Lubuntu language from Chinese to English, I decided to fiddle a little. I downloaded new files, and did most of the other things in the same way. I also learned how to properly change the resolution.
\wget --continue dl.cubieboard.org/software/a20-cubietruck/lubuntu/ct-lubuntu-card0-v1.00/u-boot-sunxi-with-spl-ct-20131102.bin \wget --continue dl.cubieboard.org/software/a20-cubietruck/lubuntu/ct-lubuntu-card0-v1.03/EN/bootfs-part1.tar.gz \wget --continue dl.cubieboard.org/software/a20-cubietruck/lubuntu/ct-lubuntu-card0-v1.03/EN/rootfs-part2.tar.gz
--
notes:
-
Chromium
- Kept warning me about websites not being secure.
- Typing random stuff in the location bar goes to Google, which defaults to Chinese.
Fix the resolution ∞
With thanks to https://groups.google.com/forum/#!topic/cubieboard/r_rr3IUrN3k
Edit script.bin and change screen0_output_mode
0:480i 1:576i 2:480p 3:576p 4:720p50 5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60 11:pal 14:ntsc
After this change, and a reboot, the resolution was correct.
-
When at the console, I had some graphics bleed through into the top bar.
- I didn't troubleshoot this.
Spoiler
And if you only want to change the resolution, and are running a recent
kernel, it is also possible to specify the resolution as extra kernel
parameter in uEnv.txt/boot.scr instead of in script.bin
E.g. for 1024x768 DVI mode add to the bootargs line:
disp.screen0_output_mode=1024x768p60 hdmi.audio=0
Choose highest mode automatically using EDID, and fall back to HDMI 720p
mode if EDID is not available:
disp.screen0_output_mode=EDID:1280x720p60 hdmi.audio=EDID:0
---
Spoiler
Useful URLs:
- https://askubuntu.com/questions/19954/how-to-set-the-monitor-to-its-native-resolution-which-is-not-listed-in-the-resol
-
https://askubuntu.com/questions/186288/how-to-detect-and-configure-an-output-with-xrandr
(xrandr)
\xrandr
xrandr: Failed to get size of gamma for output default Screen 0: minimum 1280 x 720, current 1280 x 720, maximum 1280 x 720 default connected 1280x720+0+0 0mm x 0mm 1280x720 60.0*
In my case, my display is called "default"
TODO - automate that
. learn thing
First, notice the output of xrandr -q
:
xrandr: Failed to get size of gamma for output default Screen 0: minimum 1280 x 720, current 1280 x 720, maximum 1280 x 720 default connected 1280x720+0+0 0mm x 0mm 1280x720 60.0*
maximum 1280 x 720
Assuming I can ignore that, I explored:
width=1920 height=1080 refresh_rate=60 mode=${width}x${height}-${refresh_rate} \cvt $width $height $refresh_rate
- 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
TODO - automate the grabbing of that second line \xrandr --newmode $mode 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync notes: * Ignore any "gamma" messages, e.g. `xrandr: Failed to get size of gamma for output default` * You can see your list of modes with `xrandr -q` * If you screwed up, you can `xrandr --rmmode MODENAME` \xrandr --addmode default $mode \xrandr --output default --mode $mode {{{ xrandr: Configure crtc 0 failed
If they worked, you could add those last three commands to:
/etc/lightdm/lightdm.conf
I think alternate graphics drivers would help.
WHAT IF - 1280x720 really was the limitation of the video? Maybe it's the VGA port.
Rebooting with HDMI as my video did not solve this problem.
xrandr --props
shows the ideal maximum resolution.
Screen 0: minimum 1280 x 720, current 1280 x 720, maximum 1920 x 1080 default connected 1280x720+0+0 0mm x 0mm 1280x720 60.0* 1920x1080-60 60.0
Disabling the strobing lights ∞
for i in /sys/class/leds/* ; do ( echo 0 | sudo tee "$i"/brightness ) ; done
They are re-enabled when rebooted.
- I don't know how to re-enable them without rebooting.
-
"Permanently" disabling them could probably be done pretty easily via a startup script.
- This has not been explored.
-
https://web.archive.org/web/20180123142903/http://www.cubieforums.com/index.php?topic=1268.0
Disabling the red power light ∞
The red LED is connected directly to the 3.3V supply. It cannot be turned off.
- I don't know if you can safely de-solder it.
-
I have not tried black nail polish or black model/miniature paint.
2016-04-10 - 12.10 ∞
ct-lubuntu-card0-v1.03
Show stopper: I couldn't switch away from Chinese.
Files to download ∞
\wget --continue dl.cubieboard.org/software/a20-cubietruck/lubuntu/ct-lubuntu-card0-v1.00/u-boot-sunxi-with-spl-ct-20140107.bin \wget --continue dl.cubieboard.org/software/a20-cubietruck/lubuntu/ct-lubuntu-card0-v1.03/bootfs-part1.tar.gz \wget --continue dl.cubieboard.org/software/a20-cubietruck/lubuntu/ct-lubuntu-card0-v1.03/rootfs-part2.tar.gz
The basic setup ∞
card=/dev/sdx \sudo \umount ${card}* \sudo \dd bs=1024 seek=544 count=128 of=${card} if=/dev/zero \sudo \dd bs=1024 seek=8 of=${card} if=u-boot-sunxi-with-spl-ct-20140107.bin
partitioning ∞
\sudo \fdisk ${card}
d 1 d n p 1 2048 +64MB n p 2 (enter) (enter) wq
The instructions, explained:
- 1st partition starts from 2048 sectors, 64MB in size
-
2nd partition just keep it all default
An example p
Command (m for help): p Disk /dev/sdb: 1967 MB, 1967128576 bytes 61 heads, 62 sectors/track, 1015 cylinders, total 3842048 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 2048 126975 62464 83 Linux /dev/sdb2 126976 3842047 1857536 83 Linux
They recommend reading https://linux-sunxi.org/Bootable_SD_card but I'm ignoring that document.
\sudo \umount ${card}* \sudo \mkfs.ext2 ${card}1 \sudo \mkfs.ext4 ${card}2 \sudo \umount ${card}*
Copy the files ∞
_tmpdir=/tmp/cubietruck-lubuntu.$$ _bootfs=$_tmpdir/bootfs _rootfs=$_tmpdir/rootfs \mkdir $_tmpdir \mkdir $_bootfs \mkdir $_rootfs \sudo \mount ${card}1 $_bootfs \sudo \mount ${card}2 $_rootfs \sudo \tar --directory $_bootfs -xvf ./bootfs-part1.tar.gz # This will take a very long time: \sudo \tar --directory $_rootfs -xvf ./rootfs-part2.tar.gz \sudo \umount $_bootfs \sudo \umount $_rootfs \sudo \rmdir $_bootfs \sudo \rmdir $_rootfs \sudo \rmdir $_tmpdir
Bootup ∞
My connectors are like this:
- A power brick to my USB hub
- The CubieTruck's power cable from my USB hub to my CubieTruck
- A USB male-male cable from my CubieTruck to my USB hub.
-
An HDMI cable from the front of the CubieTruck to my monitor.
---
- Steps to boot your CubieTruck:
- Ensure the CubieTruck is powered-off.
- Remove the card from your computer.
-
Insert your card into the CubieTruck.
- The slot is at the "back", opposite the side where you plug in your video.
- It is small, silver and flat, and to the left of the black circular audio plug.
-
Ensure your CubieTruck has an HDMI connection to your monitor.
- This was not tested with VGA.
- I was told it used HDMI by default.
- However, my tests suggest it will use either and you don't need to worry.
-
Power on your CubieTruck.
- The power-button is the back-left corner. It is a very tiny black button in a very tiny white holder. It is labelled
PWR-ON
in white letters on the red motherboard.
- The power-button is the back-left corner. It is a very tiny black button in a very tiny white holder. It is labelled
- Hopefully your card is fairly fast and it will boot quickly.
- The default username is
linaro
-
The default password is
linaro
Other stuff ∞
fix apt-get update
∞
Either edit your /etc/apt/sources.list
or just overwrite it with:
\echo " deb http://old-releases.ubuntu.com/ubuntu/ raring main universe restricted multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ raring main universe restricted multiverse deb http://old-releases.ubuntu.com/ubuntu/ raring-security main universe restricted multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ raring-security main universe restricted multiverse deb http://old-releases.ubuntu.com/ubuntu/ raring-updates main universe restricted multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ raring-updates main universe restricted multiverse deb http://old-releases.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse " | \sudo \tee /etc/apt/sources.list
This was tested and works, but it takes forever! .. a microSD card is VERY slow.
I use a 2GB card, and this still worked without running out of space. I'm not sure how.
I didn't test apt-get dist-upgrade
Changing the default display cable ∞
Edit script.bin and change change screen0_output_type
to 4
Supposedly it would default to HDMI and you would have to make a change to VGA. However,
- This installation test did not need this change (
screen0_output_type
was already 4). - When I removed HDMI and only had VGA installed, it automagically used VGA!
-
Switching cables while powered on change screen0_output_type to 4
[unsolved] Change the Lubuntu language from Chinese to English ∞
https://askubuntu.com/questions/380746/changing-ubuntu-servers-language-to-english
# I already had manpages \sudo \apt-get install language-pack-en language-pack-en-base # manpages-zh was not installed \sudo \apt-get remove language-pack-zh-hans language-pack-zh-hans-base
You can check your available locales with:
\locale -a | \grep en_
Then edit your locale
with:
\echo 'LANG="en_GB.utf8"' | \sudo \tee /etc/default/locale
THESE INSTRUCTIONS DO NOT WORK
- All language-pack items are confirmed correct, with no zh stuff remaining.
- There was nothing with 'hans' in it that was installed.
- I edited my locale, confirming it existed in my
locale -a
list. -
I rebooted
--
\sudo \apt-get install language-selector-gnome
While installing, this gives me a listing for en_GB.UTF-8
so I tried the original edit suggestion:
\echo 'LANG="en_GB.UTF-8"'"' | \sudo \tee /etc/default/locale
(or just sudo nano /etc/default/locale
and make sure everything is okay)
However, running gnome-language-selector
spits out an error:
Spoiler
linaro@cubietruck:/$ gnome-language-selector
** (gnome-language-selector:3831): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-kXTUf9sJ5a: Connection refused Traceback (most recent call last): File "/usr/lib/python3/dist-packages/dbus/bus.py", line 175, in activate_name_owner return self.get_name_owner(bus_name) File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner 's', (bus_name,), **keywords) File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.freedesktop.Accounts': no such name During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/LanguageSelector/LocaleInfo.py", line 242, in getUserDefaultLanguage obj = bus.get_object('org.freedesktop.Accounts', '/org/freedesktop/Accounts') File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object follow_name_owner_changes=follow_name_owner_changes) File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 248, in __init__ self._named_service = conn.activate_name_owner(bus_name) File "/usr/lib/python3/dist-packages/dbus/bus.py", line 180, in activate_name_owner self.start_service_by_name(bus_name) File "/usr/lib/python3/dist-packages/dbus/bus.py", line 278, in start_service_by_name 'su', (bus_name, flags))) File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program /usr/lib/dbus-1.0/dbus-daemon-launch-helper: Permission denied During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/gnome-language-selector", line 22, in on_activate options=options) File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 199, in __init__ self.updateLocaleChooserCombo() File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 54, in wrapper res = f(*args, **kwargs) File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 814, in updateLocaleChooserCombo (defaultLangCode, languageString) = self._localeinfo.getUserDefaultLanguage() File "/usr/lib/python3/dist-packages/LanguageSelector/LocaleInfo.py", line 254, in getUserDefaultLanguage warnings.warn(msg.args[0].encode('UTF-8')) TypeError: can't use a string pattern on a bytes-like object
Fix the resolution ∞
It looks like I can make a correction in Changing the default display cable, but everything in there looked fine to me.
I guess there is a change in Lubuntu I can make, but I could not figure this out because everything was in Chinese. I think perhaps the correct software was not installed, but I could not install the correct software because my 2GB card was not big enough to do a proper update after fix apt-get update
.
Edit script.bin ∞
\sudo \mount /dev/mmcblk0p1 /mnt \cd /mnt \sudo \bin2fex ./script.bin ./1.fex \sudo \nano ./1.fex \sudo \fex2bin ./1.fex ./script.bin \cd - \sudo \umount /mnt
2014-09-23 - Lubuntu (version not recorded) ∞
ct-lubuntu-card0-v1.03
(no notes were taken)
I followed my #2013-12-23 instructions, but with updated downloads.
-
I remember having issues with Lubuntu "dying" on me, and I'd have to reinstall it on the card.
- I didn't troubleshoot at all.
-
I remember not being able to update.
- I didn't troubleshoot at all.
2013-12-23 - Lubuntu (version not recorded) ∞
ct-lubuntu-card0-v1.00
Spoiler
# https://web.archive.org/web/20200922173543/http://docs.cubieboard.org/tutorials/ct1/installation/install_lubuntu_desktop_server_to_sd_card # possibly: # https://web.archive.org/web/20201027010834/http://docs.cubieboard.org/tutorials/ct1/installation/cb3_lubuntu-12.10-desktop_nand_installation_v1.00 # FIXME - be root for this script card=/dev/sdb file=u-boot-sunxi-with-spl-ct-20131102.bin \dd if=/dev/zero of=${card} bs=1024 seek=544 count=128 \dd if=${file} of=${card} bs=1024 seek=8 :<'CONCEPT' # fdisk can do alignment too, but I forgot how and haven't bothered to look it up. # DO NOT USE CFDISK, THIS WILL FAIL \echo " d # delete whatever partitions d d d n # new p # primary 1 # first partition 2048 # start sector 133119 # end sector. Note, don't be tempted to do +64M n # new p # primary 2 # second partition # default start # default end p # print the results #w # write changes #q # quit q! # quit without saving " | \fdisk ${card} \sync CONCEPT # fdisk could theoretically do proper partition alignment, but I can't get this to work. # fdisk -c=nondos -u /dev/sdb # using cfdisk might be fucking things up! # Using the fdisk command to create 2 partitions on the SD Card, e.g. # 1st partitions start from 2048 sectors, 64MB in size # 2nd partitions just keep it all default # Device Boot Start End Blocks Id System #/dev/sdd1 2048 133119 65536 83 Linux #/dev/sdd2 133120 15278079 7572480 83 Linux \umount ${card}* # This one didn't boot \mkfs.ext2 ${card}1 -L cubie-boot # testing: #\mkfs.vfat ${card}1 -n cubie-boot \mkfs.ext4 ${card}2 -L cubie-root _extract(){ # TODO - just make this a tmpdir, need to find my other notes.. local tmpdir=/tmp/sdd$2 \umount $1$2 \umount $tmpdir \rmdir $tmpdir \mkdir $tmpdir \mount $1$2 $tmpdir \echo -n $4 # If the filesytem suddenly becomes read-only during extraction, and all the files you thought were getting written become 0-bytes, and tar simply explodes all over, then maybe you're using a shitty combination unpowered usb hub and card reader, and it's crapping out because you're using the mouse and keyboard at the same time.. # --verbose if you like. \tar --directory $tmpdir --extract --overwrite --file $3 \umount $tmpdir \rmdir $tmpdir } _extract ${card} 1 bootfs-part1.tar.gz "extracting..\n" _extract ${card} 2 rootfs-part2.tar.gz "extracting..\nthis will take a long time\n" # You can verify that everything was written correctly by mounting it, going there, becoming root and running: # the rootfs had 9 failed checksums.. # sha256sum -c SHA256SUMS # insert it and boot up # can ssh into it? (not sure) # Discover what to use. for i in {11..30}; \ssh 192.168.0.$i for i in {11..30}; ssh -o ConnectTimeout=1 192.168.0.$i \ssh linaro@192.168.0.$i # You may need to remove an existing key with: # \ssh-keygen -f "/home/user/.ssh/known_hosts" -R 192.168.0.23 # default user: linaro # default pass: linaro
Last updated 2021-07-29 at 18:23:39