Author Topic: Debian buster initramfs-tools-halium kernel file too large.  (Read 4109 times)

Geeber

  • Newbie
  • *
  • Posts: 22
    • View Profile
Debian buster initramfs-tools-halium kernel file too large.
« on: October 27, 2019, 11:09:43 am »
Greetings,

After Kali 2019.3 became more or less unusable on the Gemini.
I decided to try out gemian,
I found the software in debian stretch to be somewhat lacking. so (after a long session of trial and error) more or less gotten buster to run on the device pretty well.
First thing I did was install the gemian buster libc2.28 from the gemian buster repo and then:
I followed the instructions posted here https://github.com/gemian/gemini-keyboard-a...ki/DebianBuster by installing libglvnd-dev and moving the libs out of the way.
I also ran the update-alternatives command from the same page.
update-alternatives --set aarch64-linux-gnu_egl_conf /usr/lib/aarch64-linux-gnu/libhybris-egl/ld.so.conf after ran
sudo ldconfig and worked like a charm.

For anyone else that wants to run buster, I also needed to upgrade the x11-xkb-utils package or else the xserver would fail with illegal keycodes.

I also spent some time removing libs related to plasma kde as well as the majority of libreoffice packages before installing the buster libreoffice.
lxqt also conflicted but I don't use lxqt so I just removed it anyway.

However I upgraded the initramfs-tools-halium to the latest version from the gemian buster repo and first it gave an error saying /etc/ld.conf.so.d/aarch64-linux-gnu_EGL.conf no such file or directory. I fixed that by running sudo cp /usr/lib/aarch64-linux-gnu/libhybris-egl/ld.so.conf /etc/ld.so.conf/aarch64-linux-gnu_EGL.conf (I know this may not be the ideal way to solve the problem, just a workaround.) now the error is no longer there.

But after the kernel image is built it is too large for the partition.  I should mention I also get a depmod error from a missing gemini.cpio.gz supposed to be located in /lib/modules, but that's not relevant to my problem.

When i run the dd command to /dev/disk/by-partlabel/boot2 dd complains that it has run out of space on the disk. When running sudo fdisk -l the partition size for /dev/mmcblk0p30 (where the linux kernel boot2 is located) says it is 16M the kernel file is 21M.

So basically is it possible to either reduce the kernel file size or resize the /dev/mmcblk0p30 partition. (It may be possible to edit the scatter file start addresses and finish addersses but I don't want to do that without knowing what I am doing.) If anything it might be a good idea to allow for more space on this partition in future as the kernel can simply end up too large to be flashed.

For now I have simply reflashed the original kernel that came with the firmware using a download only on the boot2 partition using the flash tool. but it cannot load kernel modules.

Maybe later I will try recompiling the kernel from source on the gemini with modules enabled at some point.

FrankS

  • Newbie
  • *
  • Posts: 28
    • View Profile
Debian buster initramfs-tools-halium kernel file too large.
« Reply #1 on: December 29, 2019, 03:23:30 pm »
Hi,

I tested it today, you can modify a scatter file and do a fresh firmware download (flash). Now I have a boot2 with 32GB and boot3 with 32GB. You can see changes I made to partitons (linux, boot2 and boot3) in the diff file.

After flash I restored my tar backups (SFOS, gemian) and TWRP backup from android 7.1. ATM ererything is booting and working.

Next step is upgrade to buster. BTW I start gemian from microsd card (/dev/planetlinux/gemian).