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

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

Previous topic - Next topic

khumarahn

Quote from: LubOlimex on November 24, 2017, 09:44:16 AM
https://github.com/OLIMEX/DIY-LAPTOP/tree/master/SOFTWARE/A64-TERES/teres1-audioselect

It seems to work! I made a few cosmetic changes, will create a PR. E.g. there has to be the check for read()>0 again.
Thank you!

khumarahn

Quote from: LubOlimex on November 24, 2017, 09:44:16 AM
https://github.com/OLIMEX/DIY-LAPTOP/tree/master/SOFTWARE/A64-TERES/teres1-audioselect

@LubOlimex,

is there a way to query whether the headphones are plugged in or not? The audioselect program does not receive events if the headphones are removed while the computer is powered off or suspended, and then on poweron or resume, this may results in a no sound situation.

khumarahn

Gcc-7.2.0 is now "testing" in Gentoo. I rebuilt the image using the new compiler, links are updated on Github. It probably does not make any noticeable difference performance-wise, but why not upgrade.

Brian


Brian

I have tested that reading memory at address 0x01c22c00,0x319 return 0 when no headset is plugged and 0x0f/0x1f when headphones/headset is plugged. I tryed to add this check to teres1-audioselect service but this was not that  easy as look at first sight because this service is started before alsa state restoring, so will search for another way.

khumarahn

Maybe you can use "After=alsa-restore.service" in the systemd service file?

How did you find the address 0x01c22c00,0x319, and is it variable?

Brian

#21
I found this address in Allwinner_A64_User_Manual page 323 3.20.5.52.
0x318 HMIC Status Register(Default Value: 0x00000000) bit 6:Jack Detect Status
I'ts readable for sure via /dev/mem and this is enough  8)

khumarahn

There is an update available:
https://github.com/khumarahn/teres1-gentoo

Changes are substantial, but probably not easy to notice by a user.

  • Updated to profile 17.0 (C++14, PIE)
  • Fixed headphones detection issues
  • Many programs updated to most recent versions

Some bugs (e.g. with chromium https://bugs.gentoo.org/636758) have been fixed, and the build is now simpler. Most things just work.

I updated the headphones detection as in here: https://github.com/d3v1c3nv11/teres1-audioselect. It seems to work perfectly, if run as a daemon, and not-as-daemon after each resume.

d3f

I've downloaded the last version and it seems faster and better.

Nevertheless I find some strange issue with Google Chrome, it doesn't load youtube or google.com - errors out with Ah, snap! ... that was not the case with thr previous image.

I see same error with Google Chrome and Olimex Ubuntu mate image.

khumarahn

yes, there is this strange issue. I could not figure out where it comes from, but when I updated the system again, the issue was gone... I will upload a new image soon.

I learned how to make a binary package repo for gentoo (easy). If anyone is interested, I could open it to the internet, so the packages can be downloaded binary without compilation.

d3f

That would be great.

I am really interested for binary repo cause right now any time I am trying to install/compile something I am getting an error that I couldn't resolve... I've just tried to install firefox and I got compile error pointing something MALLOC..

khumarahn

#26
I also cannot compile firefox, probably hitting this bug:
https://bugs.gentoo.org/649540

But chromium I use without any issues. Here is my repo:

teres ~
# cat /etc/portage/repos.conf/gentoo.conf
[DEFAULT]
main-repo = gentoo

[gentoo]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://163.172.132.71/teres-portage
#sync-uri = rsync://rsync.gentoo.org/gentoo-portage
auto-sync = yes
sync-rsync-verify-metamanifest = yes
sync-openpgp-key-path = /var/lib/gentoo/gkeys/keyrings/gentoo/release/pubring.gpg



teres ~
# cat /etc/portage/make.conf
CHOST=aarch64-linux-gnu
CHOST_arm64="${CHOST}"

...

PORTAGE_BINHOST="rsync://163.172.132.71/teres-portage-full/packages"

...


To use the repo:

Then you should be able to install chromium-65 as a binary package with
emerge -av --getbinpkg chromium

The main recent changes are CHOST_arm64="${CHOST}" in make.conf (needed for correct clang prefix), and the patch for eselect-mesa (or opengl would silently fail, I spent two days searching the source of the problem).

khumarahn

Finally I updated the image :-)

I gave up on compiling things on Teres. It is too slow, and I want to use it for other things. So I compile in a cross arch chroot, and pull compiled packages from a binary repo. I set up the image to sync and pull binaries from my repo. (Comment out the respective lines in /etc/portage/make.conf and /etc/portage/repos.d/gentoo to disable this.)

Now to install kicad-4.0.7, run

emerge -av --getbinpkg kicad

and there is no compilation involved.

I am looking forward to the mainline kernel! If I have some spare time, I will experiment with what is available.

d3f

Great work, works nice and smooth, many thanks!

khumarahn

I experimented a bit with f2fs. On my old class 4 kingston sd card, the image with f2fs boots literally 2-3 times faster than with ext4. It takes 1:25-1:35 to boot and open my favorite web site in the browser, compared to 3-4 minutes with ext4!!

Thus I made a new release, with root on f2fs. Also, I aligned root partition to 4MiB. Not sure if this is necessary, but it may be good. I had to compile f2fs support in the kernel image (not as a loadable module).

f2fs is relatively raw in the old 3.10 kernel, but I did not encounter any real problems yet. I am impatiently waiting on the mainline to catch up with things like sound and suspend. I use my laptop for work when I travel, and these small things feel important.