Kernel Build Help
#21
(06-03-2018, 06:09 PM)pfeerick Wrote:
Code:
/bin/bash ./arch/arm64/boot/install.sh 4.4.126-g13bc656c-dirty

It's probably something to do with flash-kernel, as from what I can gather so far it writes the initramfs and kernel into the right spots on the microSD... https://manpages.debian.org/testing/flas....8.en.html

Or, are you suggesting the command "flash-kernel"?

I read from the manpages link, in the middle of the description, it says "this is only really useful for one-off testing".  So, I had not go further on that.  I expect I can do apt update/upgrade or even another kernel compilation later when needed.  Or, did I mis-interpret that "one-off testing"?


thanks
  Reply
#22
So here's a recap, this is how I'm now build and install a kernel on the latest bionic image.

From a new install of bionic

Code:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install fakeroot kernel-wedge build-essential bison flex libncurses5-dev libncursesw5-dev python
$ git clone https://github.com/ayufan-rock64/linux-mainline-kernel.git
$ cd linux-kernel-release-4.4
$ cat /proc/config.gz | gunzip > .config
$ make oldconfig

Depending on how out of date the OS image you may get asked some config questions as the kernel patch level moves on all the time...

I like to set my own build name suffix, the easiest way to do that is menuconfig
Code:
$ make menuconfig
The menu option is General setup  ---> () Local version - append to kernel release. I set mine to -frewind-01

Now build everything
Code:
$ make -j5
Install the modules
Code:
$ sudo make modules_install
Run the installer
Code:
$ sudo make install
You should get the missing dtb error, so to correct this copy the rk3328-rock64.dtb to /etc/flash-kernel/dtbs
Code:
$ sudo cp /boot/dtbs/4.4.126-rockchip-ayufan-239/rockchip/rk3328-rock64.dtb /etc/flash-kernel/dtbs
Run the installer again
Code:
$ sudo make install
This will give you  the message "Ignoring old or unknown version 4.4.126-frewind-01 (latest is 4.4.126-rockchip-ayufan-239)", so we need to force it.
Code:
$ sudo flash-kernel --force 4.4.126-frewind-01
reboot
Code:
sudo reboot

It looks like it has installed the correct kernel with the correct initrd.img
  Reply
#23
@frewind
Thank you for saving me time from guessing.  A few questions to seek your practical experience.

1.  How frequent Or do you do apt upgrade after kernel compile? (for all reasons including sake of security)

2.  Does bionic run better than stretch?  In x86/x64, stretch is supposed to be more stable and forked.  For sure it does not hold 100% true in ARM.  How much (50%? 5%? 0%?) you think that remains?  Just a gut feel number is fine.

btw, you can use zcat to replace the gunzip pipe.^^
  Reply
#24
(06-06-2018, 10:01 PM)cooker Wrote: @frewind
Thank you for saving me time from guessing.  A few questions to seek your practical experience.

1.  How frequent Or do you do apt upgrade after kernel compile? (for all reasons including sake of security)

2.  Does bionic run better than stretch?  In x86/x64, stretch is supposed to be more stable and forked.  For sure it does not hold 100% true in ARM.  How much (50%? 5%? 0%?) you think that remains?  Just a gut feel number is fine.

btw, you can use zcat to replace the gunzip pipe.^^

1. I try to keep all my Linux devices up to date, you will have to recompile after kernel/firmware updates.

2. bionic appear to be stable for me.
  Reply
#25
(06-08-2018, 01:01 AM)frewind Wrote: 1. I try to keep all my Linux devices up to date, you will have to recompile after kernel/firmware updates.

2. bionic appear to be stable for me.

oic, then how you interpret the term "one-off test" in the manpage of flash-kernel?
After ayufan push another kernel upgrade, can you recompile then flash-kernel on the production sdcard? or you download the latest img from ayufan, to recompile then flash-kernel, and re-work on those services you use again?

I had swaped my 4G to production and testing Archlinuxarm on my 1G, bit sluggish to do the above test myself.

btw, I installed (on rock64 & RPi3) and compiled kernel (on RPi3 only) successfully on the first trial there (Arch). Only drawback (to me) is USB3.0 is not working yet (HDMI neither). They are using kernel 4.14.48 where apparmor is crashed so I won't swap very soon. But given Arch's ecosystem, I think it is worth starting.
  Reply
#26
Hi all;

I have obtained some SSD's to replace the usb-3 backup type hard drive that failed, and have it configured now, but not yet mounted.

What I intend to do is use it as a build location, to basically follow the recipe as laid out above, but using the latest git clone from the rt-linux site as the app it will run if this effort is successfull, demands at minimum a fully pre-emptible real time kernel. There are also land mines in the conversion of the linuxcnc's rpspi.ko to run on the gpio and spi buss of the rock64 as its been built so it refuses to run if not on an rpi-3b. That will be the 2nd non-negotiable requirement, but one stone at a time.

There be land mines in the make oldconfig based on the current stretch kernel, one of ayufans latest releases. And just updated by apt yesterday.

Can anyone advise me as to how best to do this make oldconfig?

Thank you all;

gene83
  Reply
#27
(07-15-2018, 08:35 AM)gene83 Wrote: Hi all;

I have obtained some SSD's to replace the usb-3 backup type hard drive that failed, and have it configured now, but not yet mounted.

What I intend to do is use it as a build location, to basically follow the recipe as laid out above, but using the latest git clone from the rt-linux site as the app it will run if this effort is successfull, demands at minimum a fully pre-emptible real time kernel. There are also land mines in the conversion of the linuxcnc's rpspi.ko to run on the gpio and spi buss of the rock64 as its been built so it refuses to run if not on an rpi-3b. That will be the 2nd non-negotiable requirement, but one stone at a time.

There be land mines in the make oldconfig based on the current stretch kernel, one of ayufans latest releases. And just updated by apt yesterday.

Can anyone advise me as to how best to do this make oldconfig?

Thank you all;

gene83


My humble advice: best is not to do it.

I have my rock64 serving as NAS, music server and NextCloud server.  It runs faultlessly 7x24 for months until I do apt-get update/upgrade last time ^^!!  It just crashes. Angel

I am paranoid enough that I poweroff the board and make a dd copy of the sdcard everytime before I run apt-get update/upgrade.  First time I get my paranoid reward. Rolleyes

Put all data including mysql database onto harddisk.  When the system is toooo outdate someday, download the latest ayufan image, reinstall everything you're running, rebuild all setup, ... and enjoy another months of good value board.  It is still the easiest way of living as of today. Big Grin
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to boot an older, working kernel bits 0 90 11-01-2024, 04:43 PM
Last Post: bits
  Linux 5.15 Kernel - openSuse mark1250 0 1,526 12-02-2021, 04:36 PM
Last Post: mark1250
  Security Patches for the Kernel kwinz 9 8,151 10-22-2021, 05:45 AM
Last Post: kwinz
  Debian build from mrfixit2001 Luke 18 31,176 05-17-2021, 02:35 AM
Last Post: Wizzard
  Debian kernel stuck at 4.4.167 Enig123 5 6,554 12-29-2020, 12:57 PM
Last Post: kwinz
  Arch Linux Arm --> Kernel 5.8 breaks installation as365n4 12 14,005 08-31-2020, 01:41 AM
Last Post: as365n4
  mainline kernel sound support Openwrt lucize 2 4,550 05-01-2020, 05:09 PM
Last Post: PakoSt
  5.3 kernel support? csrf 5 8,008 04-18-2020, 11:34 PM
Last Post: CameronNemo
Question alternative browser / seamonkey armhf build? kapqa 1 3,199 03-26-2020, 03:02 AM
Last Post: kapqa
  Help troubleshooting kernel panic gabrielfin 3 5,191 03-02-2020, 04:18 PM
Last Post: gabrielfin

Forum Jump:


Users browsing this thread: 1 Guest(s)