Linux Kernel 4.18.8
#17
(09-30-2018, 06:24 PM)Takenover83 Wrote: Any chance of getting the zram module set as default on these kernels? Myself having the 2GB board find it essential. Come to think of it... I think all the configuration was done on my fresh installs of ayufan's distro's. Just was missing the module.

I tried to get zram to work and eventually gave up. Have just done a plain old swapfile the old fashioned way in my /etc/fstab - but as it is on my NVMe drive figure reasonable compromise for me as I "save" the CPU cycles needed for zram.

(09-30-2018, 06:24 PM)battlenut Wrote: So, I am still very new to this whole command line thing. How would I go about installing this new kernel to my rockpro64 and rock64. what are the commands or better yet where can I go to research these said commands?

There are (as always on Linux) a million ways to do this. Until 2 weeks ago I had never compiled a kernel despite swapping to Linux nearly 15 years ago and trying a couple of times. Nevertheless it really is, now, that easy. My steps below are just 1 way that works for me, I don't claim any particular benefit over any other way.

To cause an argument let me assume the starting point is an Ayufan 0.7.9 image on an SDcard in your RockPro64. And that you want to get the current 4.18 kernel as described in this thread running.

First observation: the way Ayufan has set things up you will be able to toggle between the 4.4.x kernel in his 0.7.9 image and your 4.18.y image as long as you can edit a text file on your SDcard on another Linux PC so you should not "brick" anything.

Second observation - everything below you can search www and find other pages/advice/embellishments if you want.

1) Create a working directory: if you start a terminal session (Open a terminal using your menu system - probably under system tools) you are most likely to be the user rock64 in your home directory (which is /home/rock64/). If you type
Code:
mkdir bin
you will create a new subdirectory called bin.

2) Download some Linux source code. As per the assumptions the simplest way to do this is to go to ddimension github page
click the big green clone or download button and select the "download zip" option at the bottom. Save the file to the bin directory you created in step 1.

3) We need to install some software - p7zip to unzip the file you just downloaded as well as some prerequisites to get the compile and build environment to work. I hope the following is complete - if you get any errors in later steps it will be most likely because of something missing here! First we are going to update/upgrade all the software you already have, then we will install the new stuff. type (or copy/paste) the following 4 lines 1 at a time - enter your password (possibly still rock64?) when asked after the first line:
Code:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install p7zip
sudo apt-get install build-essential libncurses-dev bison flex libssl-dev fakeroot pkg-config

4) OK - assuming you still have your terminal window open type
Code:
cd bin
ls -l
The ls command lists the files in the current directory - you should see linux-mainline-kernel-rockchip.zip from step 2. Type
Code:
unzip linux-mainline-kernel-rockchip.zip
and you should have a couple of minutes of excitement while all the source files are unzipped.

5) Still at your terminal type

Code:
cd linux-mainline-kernel-rockchip
cp rockpro64.config .config
The second command copied a default RockPro64 config file to your config file (that happens to be a hidden file which is why it has a . in front of the filename!) This is where there is a huge amount of room for alchemy: the contents of your config file determine the capabilities of your new kernel. Quite frankly for your first compile that is all pretty irrelevant - I just wanted to compile a kernel and get it to load and so that is all these instructions try to do. You can always come back later and "improve" your config file: beware there are numerous parameters, most of which can cause your kernel to be useless if you get them wrong. So take playing options in your config file slowly. If you come back later to this step make menuconfig is the way I play with mine! To kick off your kernel compile type
Code:
make -j6 bindeb-pkg
And go for lunch. First time I typed this on my RockPro64 it took about 55 minutes (and I have decent cooling so no thermal throttling, and  a rather fast NVMe drive - if you really are on an SDcard it will be worse!) Now it takes me just under 25 minutes - it is some help I am running at 2.1/1.5GHz, also the first change I would recommend to your config file is to disable debug_info which disables the building of all the debug options and saves a huge amount of compile time.

6) When your compile has finished, type
Code:
cd ..
sudo dpkg -i linux-image-4.18.10_4.18.10-1_arm64.deb
reboot
And if by a miracle all went well you will install your new kernel, your machine will reboot and load the new kernel! Hopefully by now you are familiar with tab autocomplete options on the commandline, so in fact above if you type sudo dpkg -i linux-i then push the tab key you should autocomplete with the correct filename (because by next week it will be 4.18.11 etc).

Now, if something goes wrong or you want to revert to your 4.4 kernel for whatever reason simply edit your /boot/extconfig/extconfig.conf file and set a default - my current file is below, the default line I think needs to be the first line and is what you have to add. The names of the labels can be freely abbreviated from what you find - just make sure whatever you put on line 1 matches a later label in the file. Otherwise the first label becomes the actual default!

Code:
default kernel-4.18.10

timeout 10
menu title select kernel

label kernel-4.18.10
    kernel /boot/vmlinuz-4.18.10
    initrd /boot/initrd.img-4.18.10
    devicetreedir /boot/dtbs/4.18.10
    append rw panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 root=LABEL=MySM961 rootwait rootfstype=ext4

label kernel-4.4.154
    kernel /boot/vmlinuz-4.4.154-1105-rockchip-ayufan-g5d9fbef9cfa0
    initrd /boot/initrd.img-4.4.154-1105-rockchip-ayufan-g5d9fbef9cfa0
    devicetreedir /boot/dtbs/4.4.154-1105-rockchip-ayufan-g5d9fbef9cfa0
    append rw panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 root=LABEL=MySM961 rootwait rootfstype=ext4

label kernel-4.4.132-1075-rockchip-ayufan-ga83beded8524
    kernel /boot/vmlinuz-4.4.132-1075-rockchip-ayufan-ga83beded8524
    initrd /boot/initrd.img-4.4.132-1075-rockchip-ayufan-ga83beded8524
    devicetreedir /boot/dtbs/4.4.132-1075-rockchip-ayufan-ga83beded8524
    append rw panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 root=LABEL=MySM961 rootwait rootfstype=ext4

Have fun.

Please let me know how you go: if these instructions are coherent enough I will put them in a tutorial.
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (5.19 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition daily driver, Tow-boot on SPI, Arch/phosh on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with Arch/Phosh on eMMC


Messages In This Thread
Linux Kernel 4.18.8 - by Bullet64 - 09-18-2018, 01:14 AM
RE: Linux Kernel 4.18.8 - by dukla2000 - 09-18-2018, 04:28 PM
RE: Linux Kernel 4.18.8 - by ddimension - 09-20-2018, 12:32 PM
RE: Linux Kernel 4.18.8 - by dukla2000 - 09-21-2018, 03:44 AM
RE: Linux Kernel 4.18.8 - by Takenover83 - 09-22-2018, 06:24 PM
RE: Linux Kernel 4.18.8 - by dukla2000 - 09-23-2018, 06:12 AM
RE: Linux Kernel 4.18.8 - by dukla2000 - 09-29-2018, 08:04 AM
RE: Linux Kernel 4.18.8 - by Yoast - 09-21-2018, 04:51 AM
RE: Linux Kernel 4.18.8 - by Yoast - 09-22-2018, 08:36 AM
RE: Linux Kernel 4.18.8 - by dukla2000 - 09-22-2018, 10:13 AM
RE: Linux Kernel 4.18.8 - by Yoast - 09-24-2018, 05:58 AM
RE: Linux Kernel 4.18.8 - by dukla2000 - 09-23-2018, 03:19 PM
RE: Linux Kernel 4.18.8 - by tuxd3v - 09-23-2018, 07:21 PM
RE: Linux Kernel 4.18.8 - by ahare - 09-28-2018, 06:55 AM
RE: Linux Kernel 4.18.8 - by Takenover83 - 09-30-2018, 06:24 PM
RE: Linux Kernel 4.18.8 - by dukla2000 - 10-01-2018, 12:54 PM
RE: Linux Kernel 4.18.8 - by battlenut - 10-01-2018, 01:43 AM
RE: Linux Kernel 4.18.8 - by battlenut - 10-01-2018, 03:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  RockPro64 linux console video mode callegar 0 62 09-06-2022, 02:32 PM
Last Post: callegar
  [OS] SkiffOS and Buildroot for Rockpro64 w/ 5.17 kernel paralin1 1 631 05-08-2022, 03:26 PM
Last Post: paralin1
Brick Maintained Linux booting from eMMC ootoovak 10 3,869 04-30-2022, 03:57 PM
Last Post: TRS-80
  Kernel OOPs triggered by big writes to ext4 FS ajtravis 1 528 04-04-2022, 05:29 PM
Last Post: ajtravis
  How I Got Fedora Linux to Boot From eMMC (or microSD, for that matter) whitecat23 4 1,561 01-03-2022, 10:32 AM
Last Post: whitecat23
  Manjaro ARM - Built-in ethernet was broken with kernel 5.14.1-1 (over now) Dendrocalamus64 2 1,210 09-11-2021, 08:58 PM
Last Post: t4_4t
  compiling a new kernel for overclocking on arch Mentaluproar 2 1,568 07-15-2021, 10:16 AM
Last Post: Mentaluproar
  Other boot options than Sdcard for linux 5.x kernel? MisterA 2 1,670 07-14-2021, 02:37 PM
Last Post: TRS-80
  ayufan kernel update unbootable TheHunter 2 1,998 03-12-2021, 05:17 PM
Last Post: LMM
  Booting Linux/Debian from the eMMC linuxha 4 3,072 03-02-2021, 07:01 PM
Last Post: linuxha

Forum Jump:


Users browsing this thread: 1 Guest(s)