Gentoo [26 September 2018] [deadline, encrypted home, squashed portage]

Started by khumarahn, November 20, 2017, 07:13:26 PM

Previous topic - Next topic


Hi all, I am new here!

I have built a Gentoo image for Teres 1. It runs the amazing LXDE, has chromium, latex, libreoffice, vlc, etc.

It is fun to build, even though it is a rather long process and there are quite a few complications. I set up a repo with the configs and the local overlay:
(there is a torrent with a pre-built image if you want to try it out)

P.S.: is this the first community image for Teres? :-)


This is great! What was the biggest difficulty?

BTW, the users of Chromium who care about their privacy should try Brave (


Nothing was particularly difficult. It's just many smaller things.

Like setting up a cross tool chain, distcc, qemu, figuring out what works and what does not.

Specific things were: battery indication, disabling the keyboard when the lid is closed, setting up vdpau. I still do not know how to set up the audio so that with the headphones plugged in, there is no sound on the speakers.

There is quite a lot information available on the internet, for example for pine64 and cubieboard. It was really helpful.

There is quite a lot of browsers. Why Brave?


Thanks for that image! It's really fast and a lot more suitable for such laptop than ubuntu mate in terms of lightweight OS.

I only have that problem with the touchpad(left click = right click, no right click) but I guess it doesn't depend on the linux distribution so I am waiting for new keyboard firmware.



I found that I forgot to save/restore the sound on suspend. Arghhh. It is not enough to rebuild the image, but if you downloaded it and would like to fix it, then change two files:
/etc/acpi/actions/ and /etc/acpi/actions/
They should be as here:
Related commit:

P.S.: There is a thread here on the touchpad buttons. I had this problem and, at least in my case, it was hardware. Wasn't difficult to solve, but I used a soldering iron + hot air station, which you may or may not have. Look into the topic, try the diagnosis with a multimeter.

P.P.S.: Can it be that haveged helps wifi? I have strange problems, sometimes cannot connect to eduroam, and later it works perfectly with the same config. The signal is very strong and numerous other devices work well.


So, what do you suggest? Should I burn the image again on the sd card and fix it then or I can only fixed these files directly.

In fact I just now realized that I don't have audio :-) even after shutdown/restart. It was there initially.



uh, no need to burn the image again.
to get the sound back, open the terminal and:
1. become root (root password was "olimex"):
# su -
2. download the sound state:
# wget
3. apply it:
# alsactl -f asound.state restore

To fix this sound loss on suspend, you can run (also as root):
# cd /etc/acpi/actions
# rm
# wget
# wget
# chmod 755
# chmod 755

I will update the image also :-)


Great! Thanks, it works  8)


cool, thanks, fixed. Also, you may want to rebuild the LED control program, it had an annoying bug fixed. Just run as root:
emerge -av teres1-ledctrl
(and later maybe cleanup the disproportionately large download by running rm -r /usr/portage/distfiles/*)

I uploaded a new version where these things are fixed.


did it! thanks!

Something that I tried and you may help here, should be easy cause I did it under ubuntu mate.

I am really interested to install kicad on teres but on Gentoo I am not sure how to fix the dependencies below:

emerge -av kicad

emerge: there are no ebuilds to satisfy ">=dev-libs/boost-1.61[context,nls,threads,python?,python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),python_single_target_python2_7(+)]".
(dependency required by "sci-electronics/kicad-4.0.7::gentoo" [ebuild])
(dependency required by "kicad" [argument])

I resolved that under ubuntu by adding temporary the debian repos. Mainly the problem here is how to install the correct python version.

Many thanks!


About what you mentioned earlier for the audio:

QuoteI still do not know how to set up the audio so that with the headphones plugged in, there is no sound on the speakers.

Check what we uploaded here, it was missing previously:

Best regards,
Technical support and documentation manager at Olimex


With kicad on gentoo, it seems to be OK with python, but it required boost built with context support, which is masked by default:
Code (/usr/portage/profiles/arch/base/package.use.mask) Select

# Sergey Popov <> (27 Dec 2013)
# Mask because Boost.Context library does not work on most of arches
dev-libs/boost context

(you can see this if you do emerge -pv boost, then the context use flag with be in parenthesis, i.e. most probably masked)

You can install kicad by first unmasking context:
Code (/etc/portage/profile/package.use.mask) Select

dev-libs/boost -context

Then emerge -av kicad complains about keywords and use flags, so add a few likes to respective files:
Code (/etc/portage/package.keywords) Select

# kicad
sci-electronics/electronics-menu amd64 ~amd64
sci-electronics/kicad amd64 ~amd64

(this allows use of the versions which are stable or testing for amd64)

Code (/etc/portage/package.use) Select

# kicad
sci-electronics/kicad examples github
x11-libs/wxGTK opengl
dev-libs/boost context
dev-python/wxpython opengl

(not sure if you want kicad with examples and github support though)

Then emerge -av kicad works, though it may take quite some time and you need a lot of disk space (roughly 2.5 GB for build, 2.5 GB for the installed files, 500MB for the source files archives. I mounted /usr/portage and /var/tmp/portage out on a large and fast sd card so I can build large packages.

And after all this, kicad may or may not work :-) Let me try to install it, I will write back.


Kicad works, here is the noisy inductor:


WOW! Magic  :D

Can you share step-by-step how to install kicad on Teres? I think it will be very useful and may be we can move this discussion into new topic - Kicad on Gentoo..



You need to make changes to files in /etc/portage/, as in

Then run emerge -av kicad, and let it work for a few hours. Set up distcc on a big computer if you want to speed it up.

You may run out of space, so if you are running on an sd card, you should use 16 gb or larger, and resize the system partition (with gparted for example).