§2023-11-16
Image: Orangepi5plus_1.0.6_debian_bullseye_server_linux5.10.110.7z
- /boot
# ls -l
total 100356
-rwxr-xr-x 1 root root 230456 Jun 1 01:57 boot.bmp
-rwxr-xr-x 1 root root 3339 Jun 1 01:57 boot.cmd
-rwxr-xr-x 1 root root 3411 Jun 1 02:04 boot.scr
-rwxr-xr-x 1 root root 219610 Jun 1 00:04 config-5.10.110-rockchip-rk3588
drwxr-xr-x 3 root root 4096 Jun 1 01:57 dtb
drwxr-xr-x 3 root root 4096 Jun 1 01:57 dtb-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root 34109952 Jun 1 00:04 Image
-rwxr-xr-x 1 root root 12560522 Jun 1 02:05 initrd.img-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root 1152056 Jun 1 01:57 logo.bmp
-rwxr-xr-x 1 root root 227 Nov 16 13:17 orangepiEnv.txt
-rwxr-xr-x 1 root root 1542 Jun 1 02:03 orangepi_first_run.txt.template
-rwxr-xr-x 1 root root 7780782 Jun 1 00:04 System.map-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root 12560586 Jun 1 02:05 uInitrd
-rwxr-xr-x 1 root root 34109952 Jun 1 00:04 vmlinuz-5.10.110-rockchip-rk3588
mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
- nano /etc/apt/sources.list as,
deb https://repo.huaweicloud.com/debian bullseye main contrib non-free
deb-src https://repo.huaweicloud.com/debian bullseye main contrib non-free <-- uncomment
deb https://repo.huaweicloud.com/debian bullseye-updates main contrib non-free
deb-src https://repo.huaweicloud.com/debian bullseye-updates main contrib non-free <-- uncomment
deb https://repo.huaweicloud.com/debian bullseye-backports main contrib non-free
deb-src https://repo.huaweicloud.com/debian bullseye-backports main contrib non-free <-- uncomment
deb https://repo.huaweicloud.com/debian-security bullseye-security main contrib non-free
deb-src https://repo.huaweicloud.com/debian-security bullseye-security main contrib non-free <-- uncomment
And,
apt update && apt -y upgrade
3)apt-cache search linux-source
# apt-cache search linux-source
linux-source - Linux kernel source (meta-package)
linux-source-5.10 - Linux kernel source for version 5.10 with Debian patches
linux-source-6.1 - Linux kernel source for version 6.1 with Debian patches
- get kernel source
sudo apt install dpkg-dev
$ mkdir -p build/kernel-6.1.55 && cd $_
$ apt source linux-source ( evevn you specify linux-source-5.10 you will get 6.1.55)
ls -l
total 136080
drwxr-xr-x 28 alexlai alexlai 4096 Nov 16 15:11 linux-6.1.55
-rw-r--r-- 1 alexlai alexlai 1578380 Oct 14 09:10 linux_6.1.55-1~bpo11+1.debian.tar.xz
-rw-r--r-- 1 alexlai alexlai 313386 Oct 14 09:10 linux_6.1.55-1~bpo11+1.dsc
-rw-r--r-- 1 alexlai alexlai 137442320 Sep 29 12:26 linux_6.1.55.orig.tar.xz
- install build requirements
$ sudo apt build-dep linux
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
builddeps:linux : Depends: libtracefs-dev (>= 1.3) but 1.0.2-1 is to be installed
Depends: libtraceevent-dev (>= 1:1.5) but 1:1.1.2-1 is to be installed
E: Unable to correct problems, you have held broken packages.
$ sudo apt install libtracefs-dev
$ sudo apt install libtraceevent-dev
- use the following instead
$ sudo apt-get install build-essential linux-source bc kmod cpio flex libncurses5-dev libelf-dev libssl-dev dwarves bison
- make menuconfig
$ pwd
/home/alexlai/build/kernel-6.1.55/linux-6.1.55
$ cp -v /boot/config-5.10.110-rockchip-rk3588 .config
'/boot/config-5.10.110-rockchip-rk3588' -> '.config'
$ make oldconfig
$ make menuconfig ---> [*] Rockchip Platforms
$ time make -j10
real 27m0.674s
user 189m46.090s
sys 24m7.174s
- make modules_install
$ sudo make modules_install
...
INSTALL /lib/modules/6.1.55/kernel/sound/drivers/snd-serial-u16550.ko
INSTALL /lib/modules/6.1.55/kernel/sound/drivers/snd-virmidi.ko
DEPMOD /lib/modules/6.1.55
$ ls /lib/modules
5.10.110-rockchip-rk3588 6.1.55
- make inatall
- before
$ ls /boot -l
total 100364
-rwxr-xr-x 1 root root 230456 Jun 1 01:57 boot.bmp
-rwxr-xr-x 1 root root 3339 Jun 1 01:57 boot.cmd
-rwxr-xr-x 1 root root 3411 Jun 1 02:04 boot.scr
-rwxr-xr-x 1 root root 219610 Jun 1 00:04 config-5.10.110-rockchip-rk3588
drwxr-xr-x 3 root root 4096 Jun 1 01:57 dtb
drwxr-xr-x 3 root root 4096 Jun 1 01:57 dtb-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root 34109952 Jun 1 00:04 Image
-rwxr-xr-x 1 root root 12563497 Nov 16 14:52 initrd.img-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root 1152056 Jun 1 01:57 logo.bmp
-rwxr-xr-x 1 root root 227 Nov 16 13:17 orangepiEnv.txt
-rwxr-xr-x 1 root root 1542 Jun 1 02:03 orangepi_first_run.txt.template
-rwxr-xr-x 1 root root 7780782 Jun 1 00:04 System.map-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root 12563561 Nov 16 14:52 uInitrd
-rwxr-xr-x 1 root root 34109952 Jun 1 00:04 vmlinuz-5.10.110-rockchip-rk3588
alexlai@orangepi5plus:~/build/kernel-6.1.55/linux-6.1.55$ sudo make install
INSTALL /boot
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 6.1.55 /boot/vmlinuz-6.1.55
run-parts: executing /etc/kernel/postinst.d/dkms 6.1.55 /boot/vmlinuz-6.1.55
dkms: running auto installation service for kernel 6.1.55:.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 6.1.55 /boot/vmlinuz-6.1.55
update-initramfs: Generating /boot/initrd.img-6.1.55
update-initramfs: Converting to u-boot format
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 6.1.55 /boot/vmlinuz-6.1.55
run-parts: executing /etc/kernel/postinst.d/xx-initramfs-cleanup 6.1.55 /boot/vmlinuz-6.1.55
Free space after deleting the package in /boot: 874.6M
run-parts: executing /etc/kernel/postinst.d/xx-update-initrd-links 6.1.55 /boot/vmlinuz-6.1.55
Cpoy /boot/vmlinuz-6.1.55 to /boot/Image
alexlai@orangepi5plus:~/build/kernel-6.1.55/linux-6.1.55$ ls /boot -l
total 145904
-rwxr-xr-x 1 root root 230456 Jun 1 01:57 boot.bmp
-rwxr-xr-x 1 root root 3339 Jun 1 01:57 boot.cmd
-rwxr-xr-x 1 root root 3411 Jun 1 02:04 boot.scr
-rwxr-xr-x 1 root root 219610 Jun 1 00:04 config-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root 219095 Nov 16 16:31 config-6.1.55
drwxr-xr-x 3 root root 4096 Jun 1 01:57 dtb
drwxr-xr-x 3 root root 4096 Jun 1 01:57 dtb-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root 31089152 Nov 16 16:31 Image ---> same as vmlinuz-6.1.55
-rwxr-xr-x 1 root root 12563497 Nov 16 14:52 initrd.img-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root 12490656 Nov 16 16:31 initrd.img-6.1.55
-rwxr-xr-x 1 root root 1152056 Jun 1 01:57 logo.bmp
-rwxr-xr-x 1 root root 227 Nov 16 13:17 orangepiEnv.txt
-rwxr-xr-x 1 root root 1542 Jun 1 02:03 orangepi_first_run.txt.template
-rwxr-xr-x 1 root root 7780782 Jun 1 00:04 System.map-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root 5918265 Nov 16 16:31 System.map-6.1.55
-rwxr-xr-x 1 root root 12490720 Nov 16 16:31 uInitrd
-rwxr-xr-x 1 root root 34109952 Jun 1 00:04 vmlinuz-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root 31089152 Nov 16 16:31 vmlinuz-6.1.55
$ sudo mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
Image Name:
Created: Thu Nov 16 16:36:06 2023
Image Type: ARM Linux Script (uncompressed)
Data Size: 3347 Bytes = 3.27 KiB = 0.00 MiB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 3339 Bytes = 3.26 KiB = 0.00 MiB