Welcome, Guest

Author Topic: Gentoo [26 September 2018] [deadline, encrypted home, squashed portage]  (Read 4787 times)

khumarahn

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +8/-0
Re: Gentoo!
« Reply #15 on: November 27, 2017, 04:48:27 PM »
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

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +8/-0
Re: Gentoo!
« Reply #16 on: November 28, 2017, 07:31:14 PM »
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

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +8/-0
Re: Gentoo!
« Reply #17 on: November 29, 2017, 03:53:03 AM »
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

  • Newbie
  • *
  • Posts: 12
  • Karma: +3/-0
Re: Gentoo!
« Reply #18 on: November 29, 2017, 11:10:47 AM »
sunxi_check_jack_type

Hope this help you

Brian

  • Newbie
  • *
  • Posts: 12
  • Karma: +3/-0
Re: Gentoo!
« Reply #19 on: November 29, 2017, 03:47:01 PM »
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

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +8/-0
Re: Gentoo!
« Reply #20 on: November 29, 2017, 03:58:19 PM »
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

  • Newbie
  • *
  • Posts: 12
  • Karma: +3/-0
Re: Gentoo!
« Reply #21 on: November 29, 2017, 04:16:11 PM »
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)
« Last Edit: November 29, 2017, 04:18:36 PM by Brian »

khumarahn

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +8/-0
Re: Gentoo!
« Reply #22 on: February 16, 2018, 04:03:00 PM »
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

  • Newbie
  • *
  • Posts: 11
  • Karma: +1/-0
Re: Gentoo! [update Feb 15, 2018]
« Reply #23 on: March 14, 2018, 09:35:24 PM »
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

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +8/-0
Re: Gentoo! [update Feb 15, 2018]
« Reply #24 on: March 14, 2018, 09:52:31 PM »
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

  • Newbie
  • *
  • Posts: 11
  • Karma: +1/-0
Re: Gentoo! [update Feb 15, 2018]
« Reply #25 on: March 15, 2018, 04:53:04 PM »
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

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +8/-0
Re: Gentoo! [update Feb 15, 2018]
« Reply #26 on: March 15, 2018, 05:45:22 PM »
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:
Code: [Select]
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

Code: [Select]
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).
« Last Edit: March 15, 2018, 05:56:29 PM by khumarahn »

khumarahn

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +8/-0
Re: Gentoo! [update 16 March 2018]
« Reply #27 on: March 16, 2018, 10:13:40 PM »
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
Code: [Select]
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

  • Newbie
  • *
  • Posts: 11
  • Karma: +1/-0
Re: Gentoo [16 March 2018] [now with binary repo]
« Reply #28 on: March 17, 2018, 06:52:37 PM »
Great work, works nice and smooth, many thanks!

khumarahn

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +8/-0
Re: Gentoo [26 April 2018] [now with binary repo and f2fs]
« Reply #29 on: April 26, 2018, 08:12:48 PM »
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.