Difference between revisions of "User:Oogwaymaki/Kernel Installation"
Oogwaymaki (talk | contribs) (Kernel Installation for PinePhone) |
Oogwaymaki (talk | contribs) |
||
Line 51: | Line 51: | ||
Mount Mobian boot image: | Mount Mobian boot image: | ||
Make sure your the root user for this for ease of installation: | Make sure your the root user for this for ease of installation: | ||
Delete the old kernel modules and put the new latest ones there | |||
<pre> | <pre> | ||
# mkdir debianboot | # mkdir debianboot | ||
# mount /dev/sda1 /media/debianboot | # mount /dev/sda1 /media/debianboot | ||
# cd / | # cd / | ||
# mkdir -p | # mkdir -p j . | ||
# cd /usr/src/ | # cd /usr/src/initrdimage | ||
# cp /media/debianboot/initrd.img-5.7-pinephone . | # cp /media/debianboot/initrd.img-5.7-pinephone . | ||
# zcat initrd.img-5.7-pinephone | cpio -idmv | # zcat initrd.img-5.7-pinephone | cpio -idmv | ||
# rm initrd.img-5.7-pinephone | # rm initrd.img-5.7-pinephone | ||
# cd /usr/src/ | # cd /usr/src/initrdimage/lib/modules | ||
# rsync -avh pp2 | # rm -rf /usr/src/initrdimage/lib/modules/5.7-pinephone | ||
# rsync -avh pp2-5.8/modules/lib/modules/ initrd/lib/modules/ | |||
</pre> | </pre> | ||
Repackage the Mobian Boot Image after new kernel modules installed | |||
<pre> | |||
# find . | cpio -o -c | gzip -9 > initrd.img-5.8-pinephone | |||
</pre> | |||
== References == | |||
* https://access.redhat.com/solutions/24029 |
Revision as of 22:47, 29 June 2020
Installing Megi's pre-compiled kernel
This tutorial is based on Debian Linux package management:
Install dependencies:
- u-boot-tools allows you to make images
- rsync allows you to copy and backup
# apt-get update # apt-get install rsync u-boot-tools
First, download the the PinePhone CE (1.2) Kernel:
# wget https://xff.cz/kernels/5.8/pp2.tar.gz
Extract the kernel:
Create a separate folder for organization and separation: Extract the a "tar" "gz" file using tar.
# tar -zxvf pp2.tar.gz
A default Mobian Installation looks like this:
Device Boot Start End Sectors Size Id Type /dev/sda1 * 1953 250000 248048 121.1M 83 Linux /dev/sda2 250001 7421874 7171874 3.4G 83 Linux
Notice the small size on the /boot partition.
This means we probably will have to, either kill the partition or resize both partitions:
Easiest thing to do:
Please all all the new files on the /dev/sda2 (they'll probably be more than 121 M)
Next we need to update the initrd image, to have the new modules, (the initrd image is a RAM disk helping the system to boot and needs kernel drivers while booting):
How to get and update initrd image:
Mount Mobian boot image: Make sure your the root user for this for ease of installation: Delete the old kernel modules and put the new latest ones there
# mkdir debianboot # mount /dev/sda1 /media/debianboot # cd / # mkdir -p j . # cd /usr/src/initrdimage # cp /media/debianboot/initrd.img-5.7-pinephone . # zcat initrd.img-5.7-pinephone | cpio -idmv # rm initrd.img-5.7-pinephone # cd /usr/src/initrdimage/lib/modules # rm -rf /usr/src/initrdimage/lib/modules/5.7-pinephone # rsync -avh pp2-5.8/modules/lib/modules/ initrd/lib/modules/
Repackage the Mobian Boot Image after new kernel modules installed
# find . | cpio -o -c | gzip -9 > initrd.img-5.8-pinephone