(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
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
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
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.