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

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

Previous topic - Next topic

lambda

Quote from: khumarahn on April 26, 2018, 08:12:48 PM
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.

I don't think anybody is looking into suspend issues, but since it probably is something fairly trivial, maybe you can try to debug this yourself ...

(I guess experimenting with the PMIC related patches mentioned in the other thread recently might be a good start ...)

HTH,
Harald

khumarahn

Quote from: lambda on April 27, 2018, 10:43:08 PM
experimenting with the PMIC related patches might be a good start

thanks!! I may look at it, though this will hardly happen soon.

d3f

I've downloaded the last your gentoo version. It looks nice and faster boot but how do you resize the root partition? Doesn't look so easy as ext3/4.

-L

khumarahn

I did not have time recently to look at how the f2fs partitions are resized. Would gparted do it in gui somehow automatically?

In any case, you can save all the contents with rsync -aAxXhH, recreate the partition and copy the contents back.

Let me know if there are any issues.

khumarahn

I have been procrastinating from doing my most important work by updating Gentoo on Teres. So here is a set of updated configuration files and a new image:
https://github.com/khumarahn/teres1-gentoo

New things:
* I used the `deadline` scheduler for the IO. It prioritizes reads, storing writes for later. On Teres, where IO is a major bottleneck, it seems to improve overall latency. Say, chromium feels much more responsive. Or is it a placebo?

* Home folder is now encrypted with encfs, the password is asked at boot. I use my laptop on travel, and would not want to lose it with all those paypal cookies and passwords saved in my browser. This takes a toll on the IO, but not too much.

* Everything is rebuilt with newer compilers (gcc-8, clang-7). Many programs are updated, e.g. kicad to version 5.0.0.

* Portage is compressed into squashfs with squashmount; this frees up aroung 1GB. (Portage stores loads of small files in the filesystem; this is largely inefficient but not a problem on most modern computers.)

DiTBho

hi, any news since then?
I am going to prepare a 2024 stage4, with a recent kernel

kreyren

Quote from: DiTBho on February 29, 2024, 08:39:52 PMhi, any news since then?
I am going to prepare a 2024 stage4, with a recent kernel

The current way is to get u-boot (currently the best way seems to be to manually compile it until FWUPD is handled) and then use the graphical UEFI aarch64 installer to get teres to work on all distros as we are trying to do patches upstream to make downstream easier. Khumarahn highlighted few issues that i am tracking on https://git.dotya.ml/KREYLIMEX/TERES/issues

If you find any issues then submit them to https://github.com/khumarahn/teres1-gentoo i will submit patches if needs be
* Community Lead Developer of TeresDevelopment
* Downstream Maintainer of Linux and BSD* compatibility for OLIMEX Teres-I
* World record holder in annoying Tsvetan with questions about OLIMEX Teres-I hacking

DiTBho


kreyren

Quote from: DiTBho on March 11, 2024, 06:50:46 PMis there any patch-set and .config for recent kernel v6.*?

Yes, See https://linux-sunxi.org/Olimex_Teres-A64#Broken_ANX6345_on_Linux_6.5.2B_.28non-LTS_version.29 which is afaik the only patch needed to get teres to work atm beyond https://git.dotya.ml/KREYLIMEX/TERES/milestone/21. Let me know if you need help with the kernel config
* Community Lead Developer of TeresDevelopment
* Downstream Maintainer of Linux and BSD* compatibility for OLIMEX Teres-I
* World record holder in annoying Tsvetan with questions about OLIMEX Teres-I hacking

DiTBho

Can I use the default arm64 kernel config as reference, or is there a specific config for the Teres1?
I will make my own, at the end, but I need a starting point.

DiTBho

kernel-6.1.72-arm64-teres1-a64 vanilla:
drivers/clk/sunxi-ng/ccu-sun50i-a64.c already ok out of the box
(the patch appears to have been merged upstream)

kreyren

Quote from: DiTBho on March 12, 2024, 02:26:50 PMCan I use the default arm64 kernel config as reference, or is there a specific config for the Teres1?

There is a specific config, but all mainstream distribution excluding alpine linux/postmarketos (i am still working on that one https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4743) should provide a sufficient configs for the device, beyond that the kernel's defconfig is not sufficient for teres as understood it's due to the sunxi kernel module naming scheme.

The sunxi wiki page for the device provides info on the kernel configuration and the dt_to_config script can be used for reference (dump on https://gitea.itycodes.org/itycodes/olimex-teres/src/branch/master/dt_dump.txt#L242)

This is my kernel config: https://gist.githubusercontent.com/Kreyren/f0952b889d25216ae43cd4a585ca8373/raw/2e1780d63a010b7013dced6259485707ade07de4/gistfile1.txt (should be used only as a reference as i do a lot of development on the device and will use different configs bcs of it)

And for reference this is my nixos configuration for the device that i use as a daily: https://github.com/Kreyren/nixos-config/tree/WORK-IN-PROGRESS/machines/tsvetan

Overall in terms of the kernel defconfig + https://linux-sunxi.org/Olimex_Teres-A64#Unified_Extensible_Firmware_Interface_.28UEFI.29 for UEFI and https://linux-sunxi.org/Olimex_Teres-A64#Display for display should get you a working system

Cedrus (driver that handles hardware video encoding) is currently being investigated how to make it work reliably, but it seems that just enabling it will work

devfreq might need to be enabled (ARM_SUN8I_A33_MBUS_DEVFREQ)

crypto might need to be enabled, see https://itycodes.org/A64.html

Sim Card will probably need to be enabled, but that wasn't investigated yet

PWM, audio, wireless, media, DMA, camera, battery should work without an issue

let me know if you have issues i try to address them, the sunxi kernel modules are sometimes like a little annoying minigame to play nice on the linux kernel

Quote from: DiTBho on March 12, 2024, 02:37:10 PMkernel-6.1.72-arm64-teres1-a64 vanilla:
drivers/clk/sunxi-ng/ccu-sun50i-a64.c already ok out of the box
(the patch appears to have been merged upstream)

6.1-lts is not affected, the change seemed to have happened around 6.3 and projected itself in +6.5-lts
* Community Lead Developer of TeresDevelopment
* Downstream Maintainer of Linux and BSD* compatibility for OLIMEX Teres-I
* World record holder in annoying Tsvetan with questions about OLIMEX Teres-I hacking