User:Brendlefly62/Rockchip RK3588S OrangePi 5B/Build-Install-Kernel
Build your own kernel
Currently, there is no direct upstream support for this board in the Linux kernel, nor in u-boot upstream projects. So the "completely from sources" method described further below is not recommended. However, there is community support for the OrangePi 5/5B in Armbian, and it is relatively easy to use the Armbian build tools to build just the kernel, using a method very similar to that described for building u-boot, above. Of course, the same tool can be used to create an image for a fully working system, and the root filesystem can then be replaced to produce a working Gentoo system. See above.
Armbian's build script is supported by its developers only on Ubuntu. If an Ubuntu system is not available, it is easy to generate one in a Virtualbox Vm, as described [in this youtube video].
To use Armbian's build script to build just the kernel, first follow this basic outline to create a fresh workspace --
Use armbian/build
Start fresh
user $
cd ~/armbian
user $
sudo rm -r build/ ### start fresh
user $
git clone --depth=1 --branch=main https://github.com/armbian/build
If you already have a working system, you can use that current system's running config as a kernel-seed --
Use a kernel "seed"
user $
mv /media/host-share/${board}/<current-running-config> .
user $
cd build/
user $
mkdir userpatches
user $
board=orangepi5
user $
branch=vendor
user $
cp ../<current-running-config> userpatches/linux-rk35xx-vendor.config
Note that the name "linux-rk35xx-vendor.config" reflects the branch chosen, it will be different if the branch is "current" or "main" for example.
Now configure the kernel with Linux "menuconfig" using the "seed" as a start point --
Configure the kernel
user $
./compile.sh kernel-config SHARE_LOG='yes' ARTIFACT_IGNORE_CACHE='yes' BOARD=$board BRANCH=$branch BUILD_DESKTOP=no BUILD_MINIMAL=yes RELEASE=jammy
[๐ฟ] Applying cmdline param [ 'BUILD_MINIMAL': '(unset)' --> 'yes' early ] [๐ฟ] Applying cmdline param [ 'ARTIFACT_IGNORE_CACHE': '(unset)' --> 'yes' early ] [๐ฟ] Applying cmdline param [ 'BUILD_DESKTOP': '(unset)' --> 'no' early ] [๐ฟ] Applying cmdline param [ 'BRANCH': '(unset)' --> 'vendor' early ] [๐ฟ] Applying cmdline param [ 'BOARD': '(unset)' --> 'orangepi5' early ] [๐ฟ] Applying cmdline param [ 'RELEASE': '(unset)' --> 'jammy' early ] [๐ฟ] Applying cmdline param [ 'SHARE_LOG': '(unset)' --> 'no' early ] [๐ฑ] artifact [ kernel :: kernel() ] [๐ธ] This script requires root privileges; Docker is unavailable [ trying to use sudo ] [๐ฟ] Applying cmdline param [ 'PREFER_DOCKER': '(unset)' --> 'no' early ] [๐ฟ] Applying cmdline param [ 'BUILD_MINIMAL': '(unset)' --> 'yes' early ] [๐ฟ] Applying cmdline param [ 'ARTIFACT_IGNORE_CACHE': '(unset)' --> 'yes' early ] [๐ฟ] Applying cmdline param [ 'BUILD_DESKTOP': '(unset)' --> 'no' early ] [๐ฑ] Skip cmdline param [ 'ARMBIAN_RELAUNCHED': already set to 'yes' early ] [๐ฟ] Applying cmdline param [ 'BRANCH': '(unset)' --> 'vendor' early ] [๐ฟ] Applying cmdline param [ 'BOARD': '(unset)' --> 'orangepi5' early ] [๐ฟ] Applying cmdline param [ 'SET_OWNER_TO_UID': '(unset)' --> '1000' early ] [๐ฟ] Applying cmdline param [ 'RELEASE': '(unset)' --> 'jammy' early ] [๐ฟ] Applying cmdline param [ 'SHARE_LOG': '(unset)' --> 'no' early ] [๐ฑ] artifact [ kernel :: kernel() ] [๐ฑ] Downloading required [ ORAS tooling ] 2024-07-14 17:43:21 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/162945532/abfb05ae-4c6a-4f2e-b227-96dced7a8477?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240714%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240714T214319Z&X-Amz-Expires=300&X-Amz-Signature=48394601617fa4fec174d2df90aeb49a9a57060272eb4f8cb936ebd6d3566027&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=162945532&response-content-disposition=attachment%3B%20filename%3Doras_0.16.0_linux_amd64.tar.gz&response-content-type=application%2Foctet-stream [3377400/3377400] -> "/home/joe/armbian/build/cache/tools/oras/oras_0.16.0_linux_amd64.tar.gz.tmp" [1] [๐ฑ] Starting single build process [ orangepi5 ] [๐ฑ] Checking [ basic host setup ] [๐ฑ] Build host OS release [ jammy ] [๐ฑ] Build host architecture [ amd64 ] [๐ฑ] Sourcing board configuration [ /home/joe/armbian/build/config/boards/orangepi5.conf ] [๐ฟ] Enabling extension [ bluetooth-hciattach ] [โ ] change-tracking: after sourcing board file config/boards/orangepi5.conf [ BOARDFAMILY='rockchip-rk3588' ] [โ ] change-tracking: after sourcing board file config/boards/orangepi5.conf [ BOOTCONFIG='orangepi-5-rk3588s_defconfig' ] [โ ] change-tracking: after defaulting LINUXFAMILY to BOARDFAMILY [ LINUXFAMILY='rockchip-rk3588' ] [๐ฑ] Starting main configuration [๐ฑ] Using REVISION from [ main VERSION file: '24.8.0-trunk' ] [๐ฑ] Sourcing family configuration [ /home/joe/armbian/build/config/sources/families/rockchip-rk3588.conf ] [๐ฟ] Enabling extension [ rkbin-tools ] [๐ฑ] Determined BOOT_SOC from BOOTCONFIG [ BOOT_SOC: 'rk3588'; BOOTCONFIG: 'orangepi-5-rk3588s_defconfig' ] [โ ] change-tracking: after sourcing family config [ KERNELSOURCE='https://github.com/armbian/linux-rockchip.git' ] [โ ] change-tracking: after sourcing family config [ KERNEL_MAJOR_MINOR='6.1' ] [โ ] change-tracking: after sourcing family config [ KERNELBRANCH='branch:rk-6.1-rkr1' ] [โ ] change-tracking: after sourcing family config [ LINUXFAMILY='rk35xx' # (was: 'rockchip-rk3588') ] [โ ] change-tracking: after sourcing family config [ KERNELPATCHDIR='rk35xx-vendor-6.1' ] [โ ] change-tracking: after sourcing family config [ BOOTSOURCE='https://github.com/radxa/u-boot.git' ] [โ ] change-tracking: after sourcing family config [ BOOTBRANCH='branch:next-dev-v2024.03' ] [โ ] change-tracking: after sourcing family config [ BOOTPATCHDIR='legacy/u-boot-radxa-rk35xx' ] [โ ] change-tracking: after sourcing family config [ BOOTDIR='u-boot-rockchip64' ] [โ ] change-tracking: after sourcing family config [ NETWORKING_STACK='systemd-networkd' ] [๐ฑ] Sourcing arch configuration [ arm64.conf ] [๐ฑ] Using NETWORKING_STACK [ NETWORKING_STACK: systemd-networkd ] [๐ฑ] Adding networking extensions [ net-systemd-networkd, net-systemd-timesyncd ] [๐ฟ] Enabling extension [ net-systemd-networkd ] [๐ฟ] Enabling extension [ net-systemd-timesyncd ] [๐ฑ] Extension manager [ processed 16 Extension Methods calls and 29 Extension Method implementations ] [๐ฑ] bluetooth-hciattach orangepi5 [ adding bluetooth packages to image ] [๐ฑ] orangepi5 [ Configuring (orangepi5) standard and sata uboot target map ] [๐ฑ] rockchip64_common: defaulting SERIALCON [ Setting SERIALCON to ttyFIQ0 for BRANCH='vendor' ] [๐ฑ] bluetooth-hciattach orangepi5 [ initializing config ] [๐ฑ] Extension: net-systemd-timesyncd: Installing additional packages [ systemd-timesyncd ] [๐ฑ] Extension: net-systemd-networkd: Installing additional packages [ netplan.io ] [โ ] change-tracking: after late_family_config hooks [ LINUXCONFIG='linux-rk35xx-vendor' ] [โ ] change-tracking: after late_family_config hooks [ KERNEL_PATCH_ARCHIVE_BASE='rk35xx' ] [โ ] change-tracking: before handling KERNEL_MAJOR_MINOR in config_post_main [ BOOTSOURCEDIR='u-boot-worktree/u-boot-rockchip64/next-dev-v2024.03' ] [โ ] change-tracking: before calling extension_finish_config [ LINUXSOURCEDIR='linux-kernel-worktree/6.1__rk35xx__arm64' ] [๐ฑ] Minimal configuration prepared for build [ prep_conf_main_minimal_ni ] [๐ฑ] Running artifact build in interactive mode [ log file will be incomplete ] [โจ] Repeat Build Options (early) [ ./compile.sh kernel-config ARTIFACT_IGNORE_CACHE=yes BOARD=orangepi5 BRANCH=vendor BUILD_DESKTOP=no BUILD_MINIMAL=yes RELEASE=jammy SHARE_LOG=no ] [๐ฑ] Checked directory OK for mount options [ /home/joe/armbian/build/.tmp ('main temporary dir') ] [๐ฑ] Preparing [ host ] [๐ฑ] Syncing clock [ host ] [๐จ] 14 Jul 17:43:29 ntpdate[5578]: step time server 209.51.161.238 offset -1.870061 sec [๐ฑ] Ignoring toolchains [ SKIP_EXTERNAL_TOOLCHAINS: yes ] [๐จ] '/home/joe/armbian/build/config/templates/customize-image.sh.template' -> '/home/joe/armbian/build/userpatches/customize-image.sh' [๐ฑ] Setting kernel git cache TTL to [ 120 ] [๐ฑ] Producing new & caching [ GIT_INFO_KERNEL ] [๐ฑ] Fetching SHA1 of 'branch' 'refs/heads/rk-6.1-rkr1' [ https://github.com/armbian/linux-rockchip.git ] [๐ฑ] SHA1 of branch refs/heads/rk-6.1-rkr1 [ '9fd0cc90e31b90eb4ca2a57b4fa8223866378867' ] [๐ฑ] User patches directory for kernel [ /home/joe/armbian/build/userpatches/kernel/rk35xx-vendor-6.1 ] [๐ฑ] Using kernel config provided by user [ userpatches/linux-rk35xx-vendor.config ] [๐ฑ] Forcing kernel config hash to 999999 [ due to KERNEL_CONFIGURE=yes ] [๐ฑ] Kernel build starting [ linux-kernel-worktree/6.1__rk35xx__arm64 ] [๐ฑ] Using shallow Kernel bare tree for 6.1 [ slow storage device (/dev/sda3) or low disk space (28940 MiB) ] -------------------------------------------------------------------------------------------------------------------- [๐ธ] Warning: no Kernel bare tree exists for version 6.1 - about to start downloading. [๐ฟ] Armbian is going to use a 'shallow' git tree, which is around [ 300MiB ] [๐ฟ] This was decided due to [ slow storage device (/dev/sda3) or low disk space (28940 MiB) ] [๐ฑ] Benefits of using a 'shallow' git tree [ smaller download, less disk space consumed ] [๐ธ] Cons of using a 'shallow' git tree [ less useful over time, no history, not shared across versions ] [๐ธ] You can abort now, and pass either KERNEL_GIT=full or KERNEL_GIT=shallow to force. [๐ธ] If you want to abort [ press Ctrl+C before the countdown ends in 60 seconds ] [๐ฟ] If you agree with the decision to use a 'shallow' git tree [ press any other key to continue ] Counting down: 59... 58... 57... [๐ฑ] User pressed a key, continuing faster... [๐ฑ] Preparing bare kernel git tree [ this might take a long time ] [๐จ] Downloading fafe50b2b7dc application/vnd.oci.image.manifest.v1+json [๐จ] Processing fafe50b2b7dc application/vnd.oci.image.manifest.v1+json [๐จ] Skipped 44136fa355b3 application/vnd.unknown.config.v1+json [๐จ] Downloading c08c28c55ac1 linux-shallow-6.1.git.tar [๐จ] Downloaded c08c28c55ac1 linux-shallow-6.1.git.tar [๐จ] Downloaded fafe50b2b7dc application/vnd.oci.image.manifest.v1+json [๐จ] Pulled ghcr.io/armbian/shallow/kernel-git-shallow-6.1:latest [๐จ] Digest: sha256:fafe50b2b7dcd037dc74f524ab6dd17261b76e66c381f9c2847438bed4540c10 [๐ฑ] Getting sources from Git [ kernel:6.1 rk-6.1-rkr1 ] Preparing worktree (checking out 'master') [๐ฟ] Fetching updates from remote repository [ kernel:6.1 rk-6.1-rkr1 ] POST git-upload-pack (321 bytes) POST git-upload-pack (gzip 2971 to 1504 bytes) POST git-upload-pack (gzip 3771 to 1922 bytes) POST git-upload-pack (gzip 5371 to 2725 bytes) POST git-upload-pack (gzip 8571 to 4316 bytes) POST git-upload-pack (gzip 14971 to 7509 bytes) POST git-upload-pack (gzip 27771 to 13960 bytes) POST git-upload-pack (gzip 53371 to 26854 bytes) POST git-upload-pack (gzip 104571 to 52170 bytes) POST git-upload-pack (gzip 6371 to 3200 bytes) remote: Enumerating objects: 9188702, done. remote: Counting objects: 100% (8686323/8686323), done. remote: Compressing objects: 100% (1369676/1369676), done. remote: Total 8621273 (delta 7244660), reused 8575209 (delta 7199760), pack-reused 0 Receiving objects: 100% (8621273/8621273), 2.07 GiB | 34.50 MiB/s, done. Resolving deltas: 100% (7244660/7244660), completed with 46549 local objects. From https://github.com/armbian/linux-rockchip * branch rk-6.1-rkr1 -> FETCH_HEAD [๐ฑ] git: Fetch from remote completed, rev-parsing... [ 'kernel:6.1' 'rk-6.1-rkr1' 'FETCH_HEAD' ] [๐ฟ] Using Kernel git revision [ 9fd0cc90e31b90eb4ca2a57b4fa8223866378867 at 'Wed Jul 10 05:57:33 EDT 2024' ] [๐ฑ] Creating patches for kernel drivers [ version: 'sha1_9fd0cc90e31b90eb4ca2a57b4fa8223866378867' family: 'rk35xx-vendor' ] [๐จ] HEAD is now at 9fd0cc90e31b add FriendlyElec's 6.1-rkr1 NanoPi R5S/R5C/R5S-LTS [๐ฑ] Preparing driver [ driver_generic_bring_back_ipx ] [๐ฑ] Reverting upstream-removed [ IPX stuff needed for Wireless Drivers ] [๐ฑ] * applying patch/misc/wireless-bring-back-headers.patch [๐ฑ] Preparing driver [ driver_mt7921u_add_pids ] [๐ฑ] Mediatek MT7921u [ Add Comfast CF952A and Netgear AXE3000 ] [๐ฑ] * applying patch/misc/wireless-mt7921u-add-pids.patch [๐ฑ] Preparing driver [ driver_rtl8152_rtl8153 ] [๐ฑ] Preparing driver [ driver_rtl8189ES ] [๐ฑ] Adding [ Wireless drivers for Realtek 8189ES chipsets commit:30a52f789a0b933c4a7eb06cbf4a4d21c8e581aa ] [๐ฑ] Getting sources from Git [ rtl8189es 30a52f789a0b933c4a7eb06cbf4a4d21c8e581aa ] [๐ฟ] Initializing empty git local copy [ git init: rtl8189es 30a52f789a0b933c4a7eb06cbf4a4d21c8e581aa ] [๐ฟ] Fetching updates from remote repository [ rtl8189es 30a52f789a0b933c4a7eb06cbf4a4d21c8e581aa ] [๐จ] From https://github.com/jwrdegoede/rtl8189ES_linux [๐จ] * branch 30a52f789a0b933c4a7eb06cbf4a4d21c8e581aa -> FETCH_HEAD [๐ฑ] git: Fetch from remote completed, rev-parsing... [ 'rtl8189es' '30a52f789a0b933c4a7eb06cbf4a4d21c8e581aa' 'FETCH_HEAD' ] [๐ฑ] * applying patch/misc/wireless-rtl8189es-Fix-p2p-go-advertising.patch [๐ฑ] * applying patch/misc/wireless-rtl8189es-Fix-VFS-import.patch [๐ฑ] * applying patch/misc/wireless-rtl8189es-Fix-building-on-5.4.251-kernel.patch [๐ฑ] Preparing driver [ driver_rtl8189FS ] [๐ฑ] Adding [ Wireless drivers for Realtek 8189FS chipsets commit:30a52f789a0b933c4a7eb06cbf4a4d21c8e581aa ] [๐ฑ] Getting sources from Git [ rtl8189fs 30a52f789a0b933c4a7eb06cbf4a4d21c8e581aa ] [๐ฟ] Initializing empty git local copy [ git init: rtl8189fs 30a52f789a0b933c4a7eb06cbf4a4d21c8e581aa ] [๐ฟ] Fetching updates from remote repository [ rtl8189fs 30a52f789a0b933c4a7eb06cbf4a4d21c8e581aa ] [๐จ] From https://github.com/jwrdegoede/rtl8189ES_linux [๐จ] * branch 30a52f789a0b933c4a7eb06cbf4a4d21c8e581aa -> FETCH_HEAD [๐ฑ] git: Fetch from remote completed, rev-parsing... [ 'rtl8189fs' '30a52f789a0b933c4a7eb06cbf4a4d21c8e581aa' 'FETCH_HEAD' ] [๐ฑ] * applying patch/misc/wireless-rtl8189fs-fix-p2p-go-advertising.patch [๐ฑ] * applying patch/misc/wireless-rtl8189fs-Fix-VFS-import.patch [๐ฑ] * applying patch/misc/wireless-rtl8189fs-Fix-building-on-5.4.251-kernel.patch [๐ฑ] Preparing driver [ driver_rtl8192EU ] [๐ฑ] Adding [ Wireless drivers for Realtek 8192EU chipsets commit:a5ac6789a78a4f5ca0bf157a0f62385ea034cb9c ] [๐ฑ] Getting sources from Git [ rtl8192eu a5ac6789a78a4f5ca0bf157a0f62385ea034cb9c ] [๐ฟ] Initializing empty git local copy [ git init: rtl8192eu a5ac6789a78a4f5ca0bf157a0f62385ea034cb9c ] [๐ฟ] Fetching updates from remote repository [ rtl8192eu a5ac6789a78a4f5ca0bf157a0f62385ea034cb9c ] [๐จ] From https://github.com/Mange/rtl8192eu-linux-driver [๐จ] * branch a5ac6789a78a4f5ca0bf157a0f62385ea034cb9c -> FETCH_HEAD [๐ฑ] git: Fetch from remote completed, rev-parsing... [ 'rtl8192eu' 'a5ac6789a78a4f5ca0bf157a0f62385ea034cb9c' 'FETCH_HEAD' ] [๐ฑ] * applying patch/misc/wireless-rtl8192eu-Fix-p2p-go-advertising.patch [๐ฑ] * applying patch/misc/wireless-rtl8192eu-Fix-VFS-import.patch [๐ฑ] * applying patch/misc/wireless-rtl8192eu-Fix-building-on-5.4.251-kernel.patch [๐ฑ] Preparing driver [ driver_rtl8811_rtl8812_rtl8814_rtl8821 ] [๐ฑ] Adding [ Wireless drivers for Realtek 8811, 8812, 8814 and 8821 chipsets commit:b44d288f423ede0fc7cdbf92d07a7772cd727de4 ] [๐ฑ] Getting sources from Git [ rtl8812au b44d288f423ede0fc7cdbf92d07a7772cd727de4 ] [๐ฟ] Initializing empty git local copy [ git init: rtl8812au b44d288f423ede0fc7cdbf92d07a7772cd727de4 ] [๐ฟ] Fetching updates from remote repository [ rtl8812au b44d288f423ede0fc7cdbf92d07a7772cd727de4 ] [๐จ] From https://github.com/aircrack-ng/rtl8812au [๐จ] * branch b44d288f423ede0fc7cdbf92d07a7772cd727de4 -> FETCH_HEAD [๐ฑ] git: Fetch from remote completed, rev-parsing... [ 'rtl8812au' 'b44d288f423ede0fc7cdbf92d07a7772cd727de4' 'FETCH_HEAD' ] [๐ฑ] Preparing driver [ driver_xradio_xr819 ] [๐ฑ] Preparing driver [ driver_rtl8811CU_rtl8821C ] [๐ฑ] Adding [ Wireless drivers for Realtek RTL8811CU and RTL8821C chipsets commit:3eacc28b721950b51b0249508cc31e6e54988a0c ] [๐ฑ] Getting sources from Git [ rtl8811cu 3eacc28b721950b51b0249508cc31e6e54988a0c ] [๐ฟ] Initializing empty git local copy [ git init: rtl8811cu 3eacc28b721950b51b0249508cc31e6e54988a0c ] [๐ฟ] Fetching updates from remote repository [ rtl8811cu 3eacc28b721950b51b0249508cc31e6e54988a0c ] [๐จ] From https://github.com/morrownr/8821cu-20210916 [๐จ] * branch 3eacc28b721950b51b0249508cc31e6e54988a0c -> FETCH_HEAD [๐ฑ] git: Fetch from remote completed, rev-parsing... [ 'rtl8811cu' '3eacc28b721950b51b0249508cc31e6e54988a0c' 'FETCH_HEAD' ] [๐ฑ] Preparing driver [ driver_rtl8188EU_rtl8188ETV ] [๐ฑ] Preparing driver [ driver_rtl88x2bu ] [๐ฑ] Adding [ Wireless drivers for Realtek 88x2bu chipsets commit:e96ef9a9e0a9261598137b3ad2c70fa018914764 ] [๐ฑ] Getting sources from Git [ rtl88x2bu e96ef9a9e0a9261598137b3ad2c70fa018914764 ] [๐ฟ] Initializing empty git local copy [ git init: rtl88x2bu e96ef9a9e0a9261598137b3ad2c70fa018914764 ] [๐ฟ] Fetching updates from remote repository [ rtl88x2bu e96ef9a9e0a9261598137b3ad2c70fa018914764 ] [๐จ] From https://github.com/morrownr/88x2bu-20210702 [๐จ] * branch e96ef9a9e0a9261598137b3ad2c70fa018914764 -> FETCH_HEAD [๐ฑ] git: Fetch from remote completed, rev-parsing... [ 'rtl88x2bu' 'e96ef9a9e0a9261598137b3ad2c70fa018914764' 'FETCH_HEAD' ] [๐ฑ] Preparing driver [ driver_rtw88 ] [๐ฑ] Adding [ Upstream wireless RTW88 drivers ] [๐ฑ] * applying patch/misc/rtw88/6.1/001-drivers-net-wireless-realtek-rtw88-upstream-wireless.patch [๐ฑ] * applying patch/misc/rtw88/hack/002-rtw88-usb-make-work-queues-high-priority.patch [๐ฑ] * applying patch/misc/rtw88/hack/003-rtw88-decrease-the-log-level-of-tx-report.patch [๐ฑ] Preparing driver [ driver_rtl8852bs ] [๐ฑ] Adding [ Wireless drivers for Realtek 8852BS SDIO chipset commit:b7d94226641ef4687bc7f54ae6fa01b7e30f4b82 ] [๐ฑ] Getting sources from Git [ rtl8852bs b7d94226641ef4687bc7f54ae6fa01b7e30f4b82 ] [๐ฟ] Initializing empty git local copy [ git init: rtl8852bs b7d94226641ef4687bc7f54ae6fa01b7e30f4b82 ] [๐ฟ] Fetching updates from remote repository [ rtl8852bs b7d94226641ef4687bc7f54ae6fa01b7e30f4b82 ] [๐จ] From https://github.com/armbian/wifi-rtl8852bs [๐จ] * branch b7d94226641ef4687bc7f54ae6fa01b7e30f4b82 -> FETCH_HEAD [๐ฑ] git: Fetch from remote completed, rev-parsing... [ 'rtl8852bs' 'b7d94226641ef4687bc7f54ae6fa01b7e30f4b82' 'FETCH_HEAD' ] [๐ฑ] * applying patch/misc/wireless-rtl8852bs-Update-rtw_regd_init-for-6.1.patch [๐ฑ] Preparing driver [ driver_rtl88x2cs ] [๐ฑ] Preparing driver [ driver_rtl8822cs_bt ] [๐ฑ] Preparing driver [ driver_rtl8723DS ] [๐ฑ] Adding [ Wireless drivers for Realtek 8723DS chipsets commit:52e593e8c889b68ba58bd51cbdbcad7fe71362e4 ] [๐ฑ] Getting sources from Git [ rtl8723ds 52e593e8c889b68ba58bd51cbdbcad7fe71362e4 ] [๐ฟ] Initializing empty git local copy [ git init: rtl8723ds 52e593e8c889b68ba58bd51cbdbcad7fe71362e4 ] [๐ฟ] Fetching updates from remote repository [ rtl8723ds 52e593e8c889b68ba58bd51cbdbcad7fe71362e4 ] [๐จ] From https://github.com/lwfinger/rtl8723ds [๐จ] * branch 52e593e8c889b68ba58bd51cbdbcad7fe71362e4 -> FETCH_HEAD [๐ฑ] git: Fetch from remote completed, rev-parsing... [ 'rtl8723ds' '52e593e8c889b68ba58bd51cbdbcad7fe71362e4' 'FETCH_HEAD' ] [๐ฑ] * applying patch/misc/wireless-rtl8723ds-Fix-p2p-go-advertising.patch [๐ฑ] * applying patch/misc/wireless-rtl8723ds-Fix-VFS-import.patch [๐ฑ] Preparing driver [ driver_rtl8723DU ] [๐ฑ] Adding [ Wireless drivers for Realtek 8723DU chipsets commit:ae03b0861351f72808405ddda80e8aab105bcfce ] [๐ฑ] Getting sources from Git [ rtl8723du ae03b0861351f72808405ddda80e8aab105bcfce ] [๐ฟ] Initializing empty git local copy [ git init: rtl8723du ae03b0861351f72808405ddda80e8aab105bcfce ] [๐ฟ] Fetching updates from remote repository [ rtl8723du ae03b0861351f72808405ddda80e8aab105bcfce ] [๐จ] From https://github.com/lwfinger/rtl8723du [๐จ] * branch ae03b0861351f72808405ddda80e8aab105bcfce -> FETCH_HEAD [๐ฑ] git: Fetch from remote completed, rev-parsing... [ 'rtl8723du' 'ae03b0861351f72808405ddda80e8aab105bcfce' 'FETCH_HEAD' ] [๐ฑ] * applying patch/misc/wireless-rtl8723du-5.19.2.patch [๐ฑ] * applying patch/misc/wireless-rtl8723du-Fix-uninitialized-cfg80211-chan-def.patch [๐ฑ] * applying patch/misc/wireless-rtl8723du-Fix-p2p-go-advertising.patch [๐ฑ] * applying patch/misc/wireless-rtl8723du-Fix-VFS-import.patch [๐ฑ] * applying patch/misc/wireless-rtl8723du-6.3.patch [๐ฑ] Preparing driver [ driver_rtl8822BS ] [๐ฑ] Preparing driver [ driver_uwe5622 ] [๐ฑ] Adding [ Drivers for Unisoc uwe5622 found on some Allwinner and Rockchip boards ] [๐ฑ] * applying patch/misc/wireless-uwe5622/uwe5622-allwinner.patch [๐ฑ] * applying patch/misc/wireless-uwe5622/uwe5622-allwinner-bugfix.patch [๐ฑ] * applying patch/misc/wireless-uwe5622/uwe5622-warnings.patch [๐ฑ] * applying patch/misc/wireless-uwe5622/uwe5622-park-link-v6.1-post.patch [๐ฑ] * applying patch/misc/wireless-uwe5622/uwe5622-v6.1.patch [๐ฑ] * applying patch/misc/wireless-uwe5622/wireless-uwe5622-Fix-compilation-with-6.7-kernel.patch [๐ฑ] * applying patch/misc/wireless-uwe5622/wireless-uwe5622-reduce-system-load.patch [๐ฑ] Preparing driver [ driver_rtl8723cs ] [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Add-a-new-driver-v5.12.2-7-g2de5ec386.20201013_beta.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Make-the-driver-compile-and-probe-drop-rockchip-platform.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Enable-OOB-interrupt.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Load-the-MAC-address-from-local-mac-address.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Modify-makefile-options-to-better-suit-PinePhone-Allwinn.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Enable-monitor-mode.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Disable-power-saving.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-aes_encrypt-aes_encrypt_128-to-avoid-symbol-name-conflic.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Enable-wifi-power-saving-mode.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Enable-TDLS-802.11z-support-direct-sta-sta-connection.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Disable-CONFIG_CONCURRENT_MODE.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Set-CONFIG_RTW_SDIO_PM_KEEP_POWER-n-to-fix-suspend-38.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Resume-wifi-in-a-workqueue.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Port-to-5.11.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Enable-WoWLAN.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Port-to-5.12.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Fix-misleading-indentation.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Disable-use-of-NAPI.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Fix-indentation.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Fix-compile-warnings.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Port-to-5.15.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Clear-wowlan_last_wake_reason-prior-to-suspend.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Forward-port-to-5.17.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Port-to-5.18.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Fix-some-compilation-warnings.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Adapt-to-API-changes-in-stable-5.19.2-and-6.0.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Port-to-6.0.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Port-to-6.1.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Port-to-6.1-rc1.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/dt-bindings-net-bluetooth-Add-rtl8723bs-bluetooth.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/Bluetooth-hci_h5-Add-support-for-binding-RTL8723CS-with-device-.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/bluetooth-btrtl-add-rtl8703bs.patch [๐ฑ] * applying patch/misc/wireless-rtl8723cs/8723cs-Fix-symbol-conflicts-with-rtw88-driver.patch [๐ฑ] Drivers have modifications [ exporting patch into /home/joe/armbian/build/cache/patch/kernel-drivers/sha1_9fd0cc90e31b90eb4ca2a57b4fa8223866378867_rk35xx_vendor_3b287fda_8d10f3ba-01ba4719.patch ] [๐จ] renamed '/home/joe/armbian/build/cache/patch/kernel-drivers/sha1_9fd0cc90e31b90eb4ca2a57b4fa8223866378867_rk35xx_vendor_3b287fda_8d10f3ba-01ba4719.patch.tmp' -> '/home/joe/armbian/build/cache/patch/kernel-drivers/sha1_9fd0cc90e31b90eb4ca2a57b4fa8223866378867_rk35xx_vendor_3b287fda_8d10f3ba-01ba4719.patch' [๐ฑ] Python3 version [ 3.10.12 - 'Python 3.10.12' ] [๐ฑ] pip3 version [ 22.0.2: 'pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)' ] [๐ฑ] Installing pip packages for Python tools [ e26d829827 ] [๐จ] Collecting setuptools==70.2.0 [๐จ] Using cached setuptools-70.2.0-py3-none-any.whl (930 kB) [๐จ] Collecting pyelftools==0.31 [๐จ] Using cached pyelftools-0.31-py3-none-any.whl (180 kB) [๐จ] Collecting unidiff==0.7.5 [๐จ] Using cached unidiff-0.7.5-py2.py3-none-any.whl (14 kB) [๐จ] Collecting GitPython==3.1.43 [๐จ] Using cached GitPython-3.1.43-py3-none-any.whl (207 kB) [๐จ] Collecting unidecode==1.3.8 [๐จ] Using cached Unidecode-1.3.8-py3-none-any.whl (235 kB) [๐จ] Collecting coloredlogs==15.0.1 [๐จ] Using cached coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB) [๐จ] Collecting PyYAML==6.0.1 [๐จ] Using cached PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (705 kB) [๐จ] Collecting oras==0.1.30 [๐จ] Using cached oras-0.1.30-py3-none-any.whl (40 kB) [๐จ] Collecting Jinja2==3.1.4 [๐จ] Using cached jinja2-3.1.4-py3-none-any.whl (133 kB) [๐จ] Collecting rich==13.7.1 [๐จ] Using cached rich-13.7.1-py3-none-any.whl (240 kB) [๐จ] Collecting dtschema==2024.5 [๐จ] Using cached dtschema-2024.5-py3-none-any.whl (106 kB) [๐จ] Collecting yamllint==1.35.1 [๐จ] Using cached yamllint-1.35.1-py3-none-any.whl (66 kB) [๐จ] Collecting gitdb<5,>=4.0.1 [๐จ] Using cached gitdb-4.0.11-py3-none-any.whl (62 kB) [๐จ] Collecting humanfriendly>=9.1 [๐จ] Using cached humanfriendly-10.0-py2.py3-none-any.whl (86 kB) [๐จ] Collecting jsonschema [๐จ] Using cached jsonschema-4.23.0-py3-none-any.whl (88 kB) [๐จ] Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from oras==0.1.30->-r /home/joe/armbian/build/requirements.txt (line 15)) (2.25.1) [๐จ] Requirement already satisfied: MarkupSafe>=2.0 in /usr/lib/python3/dist-packages (from Jinja2==3.1.4->-r /home/joe/armbian/build/requirements.txt (line 16)) (2.0.1) [๐จ] Collecting markdown-it-py>=2.2.0 [๐จ] Using cached markdown_it_py-3.0.0-py3-none-any.whl (87 kB) [๐จ] Collecting pygments<3.0.0,>=2.13.0 [๐จ] Using cached pygments-2.18.0-py3-none-any.whl (1.2 MB) [๐จ] Collecting pylibfdt [๐จ] Using cached pylibfdt-1.7.0.post1-cp310-cp310-linux_x86_64.whl [๐จ] Collecting rfc3987 [๐จ] Using cached rfc3987-1.3.8-py2.py3-none-any.whl (13 kB) [๐จ] Collecting jsonschema [๐จ] Using cached jsonschema-4.17.3-py3-none-any.whl (90 kB) [๐จ] Collecting ruamel.yaml>0.15.69 [๐จ] Using cached ruamel.yaml-0.18.6-py3-none-any.whl (117 kB) [๐จ] Collecting pathspec>=0.5.3 [๐จ] Using cached pathspec-0.12.1-py3-none-any.whl (31 kB) [๐จ] Collecting smmap<6,>=3.0.1 [๐จ] Using cached smmap-5.0.1-py3-none-any.whl (24 kB) [๐จ] Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 [๐จ] Using cached pyrsistent-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (117 kB) [๐จ] Collecting attrs>=17.4.0 [๐จ] Using cached attrs-23.2.0-py3-none-any.whl (60 kB) [๐จ] Collecting mdurl~=0.1 [๐จ] Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB) [๐จ] Collecting ruamel.yaml.clib>=0.2.7 [๐จ] Using cached ruamel.yaml.clib-0.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (526 kB) [๐จ] Installing collected packages: unidiff, rfc3987, pylibfdt, pyelftools, unidecode, smmap, setuptools, ruamel.yaml.clib, PyYAML, pyrsistent, pygments, pathspec, mdurl, Jinja2, humanfriendly, attrs, yamllint, ruamel.yaml, markdown-it-py, jsonschema, gitdb, coloredlogs, rich, oras, GitPython, dtschema [๐จ] Successfully installed GitPython-3.1.43 Jinja2-3.1.4 PyYAML-6.0.1 attrs-23.2.0 coloredlogs-15.0.1 dtschema-2024.5 gitdb-4.0.11 humanfriendly-10.0 jsonschema-4.17.3 markdown-it-py-3.0.0 mdurl-0.1.2 oras-0.1.30 pathspec-0.12.1 pyelftools-0.31 pygments-2.18.0 pylibfdt-1.7.0.post1 pyrsistent-0.20.0 rfc3987-1.3.8 rich-13.7.1 ruamel.yaml-0.18.6 ruamel.yaml.clib-0.2.8 setuptools-70.2.0 smmap-5.0.1 unidecode-1.3.8 unidiff-0.7.5 yamllint-1.35.1 [๐จ] WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv [๐ฑ] Calling Python patching script for kernel: [ https://github.com/armbian/linux-rockchip.git - branch:rk-6.1-rkr1 ] [๐ฑ] Using kernel patch dir: [ rk35xx-vendor-6.1 ] [๐จ] Found patching config file: '/home/joe/armbian/build/patch/kernel/rk35xx-vendor-6.1/0000.patching_config.yaml' [๐จ] Applying 1 patches from 1 files of which 1 driver patches... [๐จ] -> 1/1: /home/joe/armbian/build/cache/patch/kernel-drivers/sha1_9fd0cc90e31b90eb4ca2a57b4fa8223866378867_rk35xx_vendor_3b287fda_8d10f3ba-01ba4719(:1) [๐จ] Autopatching DT Makefile in arch/arm64/boot/dts/rockchip with config 'CONFIG_ARCH_ROCKCHIP'... [๐จ] Read 21471 bytes from /home/joe/armbian/build/cache/sources/linux-kernel-worktree/6.1__rk35xx__arm64/arch/arm64/boot/dts/rockchip/Makefile [๐จ] Read 347 lines from /home/joe/armbian/build/cache/sources/linux-kernel-worktree/6.1__rk35xx__arm64/arch/arm64/boot/dts/rockchip/Makefile [๐จ] Wrote 7 lines to /home/joe/armbian/build/cache/sources/linux-kernel-worktree/6.1__rk35xx__arm64/arch/arm64/boot/dts/rockchip/Makefile [๐จ] Summary: kernel patching: 1 total patches; 1 applied; 0 with problems [๐จ] Summary of kernel patches [๐จ] โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ [๐จ] โ Patch / Status โ Diffstat / files โ Author / Subject โ [๐จ] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค [๐จ] โ sha1_9fd0cc90e31b90eb4ca2a57b4fa8223866378867_rk35xx_vendor_3b287fda_8d10f3ba-01 โ (+0/-0)[] ? โ Armbian Autopatcher: [AUTOGEN] โ [๐จ] โ ba4719 โ โ /home/joe/armbian/build/cache/patch/kerโฆ โ [๐จ] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค [๐จ] โ Armbian Bare DT auto-patch โ โ Armbian Autopatcher: Armbian Bare DT โ [๐จ] โ โ โ files for arch/arm64/boot/dts/rockchip โ [๐จ] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค [๐จ] โ Armbian DT Makefile auto-patch โ Makefile โ Armbian Autopatcher: Armbian DT Makefile โ [๐จ] โ โ โ AutoPatch for โ [๐จ] โ โ โ arch/arm64/boot/dts/rockchip; โ [๐จ] โ โ โ one-rule-for-all-dtbs (arm 32-bit) style โ [๐จ] โ โ โ (incremental) โ [๐จ] โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ [๐ฑ] Cleaning up Kernel git bundle artifacts [ no longer needed ] [๐ฟ] Cross compilation [ target arm64 on host amd64 ] [๐ฑ] Compiler version [ aarch64-linux-gnu-gcc 11.4.0 ] [๐ฑ] Configuring kernel [ linux-rk35xx-vendor ] [๐ฑ] Using kernel config provided by user [ userpatches/linux-rk35xx-vendor.config ] [๐จ] '/home/joe/armbian/build/userpatches/linux-rk35xx-vendor.config' -> '/home/joe/armbian/build/cache/sources/linux-kernel-worktree/6.1__rk35xx__arm64/.config' [๐จ] HOSTCC scripts/basic/fixdep [๐จ] HOSTCC scripts/kconfig/conf.o [๐จ] HOSTCC scripts/kconfig/confdata.o [๐จ] HOSTCC scripts/kconfig/expr.o [๐จ] LEX scripts/kconfig/lexer.lex.c [๐จ] YACC scripts/kconfig/parser.tab.[ch] [๐จ] HOSTCC scripts/kconfig/menu.o [๐จ] HOSTCC scripts/kconfig/preprocess.o [๐จ] HOSTCC scripts/kconfig/symbol.o [๐จ] HOSTCC scripts/kconfig/util.o [๐จ] HOSTCC scripts/kconfig/lexer.lex.o [๐จ] HOSTCC scripts/kconfig/parser.tab.o [๐จ] HOSTLD scripts/kconfig/conf [๐จ] # [๐จ] # No change to .config [๐จ] # [๐จ] '.config' -> '.config_after_kernel_config_extension' [๐จ] # [๐จ] # No change to .config [๐จ] # [๐ฟ] No misconfigurations or missing kernel option dependencies detected [ info ] [๐ฑ] Kernel configuration [ linux-rk35xx-vendor ] UPD scripts/kconfig/mconf-cfg HOSTCC scripts/kconfig/mconf.o HOSTCC scripts/kconfig/lxdialog/checklist.o HOSTCC scripts/kconfig/lxdialog/inputbox.o HOSTCC scripts/kconfig/lxdialog/menubox.o HOSTCC scripts/kconfig/lxdialog/textbox.o HOSTCC scripts/kconfig/lxdialog/util.o HOSTCC scripts/kconfig/lxdialog/yesno.o HOSTLD scripts/kconfig/mconf *** End of the configuration. *** Execute 'make' to start the build or try 'make help'. [๐ฑ] Exporting new kernel config [ /home/joe/armbian/build/output/config/linux-rk35xx-vendor.config ] [๐จ] '.config' -> '/home/joe/armbian/build/output/config/linux-rk35xx-vendor.config' [๐ฑ] Exporting new kernel config - git commit pending [ /home/joe/armbian/build/userpatches/linux-rk35xx-vendor.config ] [๐จ] '.config' -> '/home/joe/armbian/build/userpatches/linux-rk35xx-vendor.config' [๐จ] 'defconfig' -> '/home/joe/armbian/build/output/config/linux-rk35xx-vendor.defconfig' [๐จ] 'defconfig' -> '/home/joe/armbian/build/userpatches/linux-rk35xx-vendor.config.defconfig' [๐] Stopping after configuring kernel [๐ฑ] Runtime [ 11:30 min ] [โจ] Repeat Build Options [ ./compile.sh kernel-config ARTIFACT_IGNORE_CACHE=yes BOARD=orangepi5 BRANCH=vendor BUILD_DESKTOP=no BUILD_MINIMAL=yes RELEASE=jammy SHARE_LOG=no ] [๐ฑ] Cleaning up [ please wait for cleanups to finish ] [๐ฟ] ANSI log file built; inspect it by running: [ less -RS output/logs/log-kernel-config-72a7829f-9314-48ac-882d-bdd221f5ae4b.log.ans ] [๐ฟ] Share log manually (or SHARE_LOG=yes): [ curl --data-binary @output/logs/log-kernel-config-72a7829f-9314-48ac-882d-bdd221f5ae4b.log.ans https://paste.armbian.com/log ]
Now, copy the config file generated by this process so you can use it as a start point for future builds --
user $
cp output/config/linux-rk35xx-vendor.config ../linux-rk35xx-vendor_orangepi5.config
user $
cp ../linux-rk35xx-vendor_orangepi5.config userpatches/linux-rk35xx-vendor.config
(Click "Expand" to see output) ... and now build the kernel --
Build the Kernel
user $
./compile.sh kernel SHARE_LOG='yes' ARTIFACT_IGNORE_CACHE='yes' BOARD=$board BRANCH=$branch BUILD_DESKTOP=no BUILD_MINIMAL=yes RELEASE=jammy
... ... lots of impressive, pretty output like above, and below ... ... [๐จ] 57M used in 2 directories, 343 files [๐ฑ] shellcheck found no problems in package scripts [ shellchecked 2 scripts in 'linux-dtb-vendor-rk35xx' ] [๐ฑ] Building package, this might take a while.. [ linux-dtb-vendor-rk35xx_6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a_arm64.deb ] [๐จ] dpkg-deb: building package 'linux-dtb-vendor-rk35xx' in '/home/joe/armbian/build/output/packages-hashed/global/linux-dtb-vendor-rk35xx_6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a_arm64.deb'. [๐ฑ] Packaging linux-headers [ rk35xx linux-rk35xx-vendor ] [๐จ] '/home/joe/armbian/build/.tmp/work-c03e80c7-b2a5-431a-90a9-375bd46ad92b/deb-k-linux-headers-vendor-rk35xx-MrzFc/lib/modules/6.1.43-vendor-rk35xx/build' -> '/usr/src/linux-headers-6.1.43-vendor-rk35xx' [๐จ] '/home/joe/armbian/build/cache/sources/linux-kernel-worktree/6.1__rk35xx__arm64/.config' -> '/home/joe/armbian/build/.tmp/work-c03e80c7-b2a5-431a-90a9-375bd46ad92b/deb-k-linux-headers-vendor-rk35xx-MrzFc/usr/src/linux-headers-6.1.43-vendor-rk35xx/.config' [๐จ] '/home/joe/armbian/build/cache/sources/linux-kernel-worktree/6.1__rk35xx__arm64/scripts/module.lds' -> '/home/joe/armbian/build/.tmp/work-c03e80c7-b2a5-431a-90a9-375bd46ad92b/deb-k-linux-headers-vendor-rk35xx-MrzFc/usr/src/linux-headers-6.1.43-vendor-rk35xx/scripts/module.lds' [๐ฑ] shellcheck found no problems in package scripts [ shellchecked 3 scripts in 'linux-headers-vendor-rk35xx' ] [๐ฑ] Building package, this might take a while.. [ linux-headers-vendor-rk35xx_6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a_arm64.deb ] [๐จ] dpkg-deb: building package 'linux-headers-vendor-rk35xx' in '/home/joe/armbian/build/output/packages-hashed/global/linux-headers-vendor-rk35xx_6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a_arm64.deb'. [๐ฑ] Packaging linux-libc-dev [ rk35xx linux-rk35xx-vendor ] [๐ฑ] shellcheck found no problems in package scripts [ no scripts found for 'linux-libc-dev-vendor-rk35xx' ] [๐ฑ] Building package, this might take a while.. [ linux-libc-dev-vendor-rk35xx_6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a_arm64.deb ] [๐จ] dpkg-deb: building package 'linux-libc-dev-vendor-rk35xx' in '/home/joe/armbian/build/output/packages-hashed/global/linux-libc-dev-vendor-rk35xx_6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a_arm64.deb'. [๐ฑ] Kernel packaged in [ 8 seconds - 6.1.43-rk35xx ] [๐ฑ] Kernel build finished [ 6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a ] [๐ฑ] Created deb-tar artifact [ deb-tar: /home/joe/armbian/build/output/packages-hashed/kernel-rk35xx-vendor_6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a_arm64.tar ] [๐ฑ] Reversioning package [ re-version 'kernel-rk35xx-vendor(deb-tar)::6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a' to '24.8.0-trunk' ] [๐จ] removed '/home/joe/armbian/build/output/packages-hashed/global/linux-image-vendor-rk35xx_6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a_arm64.deb' [๐จ] removed '/home/joe/armbian/build/output/packages-hashed/global/linux-headers-vendor-rk35xx_6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a_arm64.deb' [๐จ] removed '/home/joe/armbian/build/output/packages-hashed/global/linux-libc-dev-vendor-rk35xx_6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a_arm64.deb' [๐จ] removed '/home/joe/armbian/build/output/packages-hashed/global/linux-dtb-vendor-rk35xx_6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a_arm64.deb' [๐ฑ] Runtime [ 3:34 min ] [โจ] Repeat Build Options [ ./compile.sh kernel ARTIFACT_IGNORE_CACHE=yes BOARD=orangepi5 BRANCH=vendor BUILD_DESKTOP=no BUILD_MINIMAL=yes RELEASE=jammy SHARE_LOG=no ] [๐ฑ] Cleaning up [ please wait for cleanups to finish ] [๐ฟ] ANSI log file built; inspect it by running: [ less -RS output/logs/log-kernel-c03e80c7-b2a5-431a-90a9-375bd46ad92b.log.ans ] [๐ฟ] Share log manually (or SHARE_LOG=yes): [ curl --data-binary @output/logs/log-kernel-c03e80c7-b2a5-431a-90a9-375bd46ad92b.log.ans https://paste.armbian.com/log ]
(Click "Expand" to see some of the output)
Once that is complete, examine the new contents in the "armbian/build/output" folder, and copy the package containing the kernel, config, and system map to a development workstation where they can be extracted and employed in the system-build.
Examine the kernel build output
user $
tree output/
output/ โโโ config โ โโโ linux-rk35xx-vendor.config โ โโโ linux-rk35xx-vendor.defconfig โโโ debs โ โโโ linux-dtb-vendor-rk35xx_24.8.0-trunk_arm64__6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a.deb โ โโโ linux-headers-vendor-rk35xx_24.8.0-trunk_arm64__6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a.deb โ โโโ linux-image-vendor-rk35xx_24.8.0-trunk_arm64__6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a.deb โ โโโ linux-libc-dev-vendor-rk35xx_24.8.0-trunk_arm64__6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a.deb โโโ info โโโ logs โ โโโ archive โ โ โโโ log-kernel-config-72a7829f-9314-48ac-882d-bdd221f5ae4b.log.ans.zst โ โ โโโ log-kernel-config-72a7829f-9314-48ac-882d-bdd221f5ae4b.log.zst โ โ โโโ summary-kernel-config-72a7829f-9314-48ac-882d-bdd221f5ae4b.md.zst โ โโโ log-kernel-c03e80c7-b2a5-431a-90a9-375bd46ad92b.log โ โโโ log-kernel-c03e80c7-b2a5-431a-90a9-375bd46ad92b.log.ans โ โโโ summary-kernel-c03e80c7-b2a5-431a-90a9-375bd46ad92b.md โโโ packages-hashed โโโ global โโโ kernel-rk35xx-vendor_6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a_arm64.tar 7 directories, 13 files
Note that this output includes several .deb archives under a "debs" directory, but all of those archives are also archived in the single tarball in the "packages-hashed" directory at the bottom of the list ( kernel-rk35xx-vendor_6.1.43-S9fd0-D3b28-Pb426-Cc8e9H5c21-HK01ba-Vc222-Bc7db-R448a_arm64.tar in this example ). That is the only file we really need, to deploy the entire kernel and associated .dtb file, overlays, and modules.
Deploy the output tarball
user $
file=$(find output/packages-hashed/ -iname 'kernel-rk35xx-vendor_*')
user $
echo $file
user $
newversion{{=}}$(echo $(basename ${file}) | sed 's/kernel-rk35xx-vendor_//' | cut -d'-' -f1)
user $
echo $newversion
user $
cp ${file} /media/host-share/${board}/linux-${board}_armbian_kernel_image-${newversion}.tar
Now go to windows host and copy these contents over to your development workstation, so they can be further copied into the new system (/boot device)
Build a kernel from-Source
Without patches specifically associated with this board, the resulting kernel may not work!
Build Prerequisites
For the more adventurous builder a "completely from sources" build might be possible, if the defconfig or a working kernel seed and board-specific patches can be found. (Maybe as used by community contributors to Armbian), then the linux kernel for the OrangePi 5/5b can be built on an ARM64 device or cross-compiled on a PC. Assuming the latter, git and crossdev are needed:
- git, to check out the sources
- crossdev, since an arm64 (aarch64) toolchains is required
Make sure these are installed:
root #
emerge --ask --update dev-vcs/git sys-devel/crossdev
Please review the crossdev article if crossdev is not already set up.
Install the 64-bit cross-compiler toolchain:
root #
crossdev --target aarch64-unknown-linux-gnu
See the crossdev article regarding possible need to specify versions of components of the toolchain using -g, -b, -k, and -l options
Get the sources
Create a build directory
user $
cd /home/joe/
user $
mkdir -p My_${model}_project/build/${model}
Identify and populate a sources directory
root #
cd /usr/aarch64-unknown-linux-gnu/usr/src/
and retrieve sources for an appropriate version of the kernel. If this is the first custom kernel build for this board, it is probably wise to build the same version (or only a minor upgrade to a version) known to work in other distributions (e.g. Armbian or Debian). This retrieval can be done either by cloning the entire linux kernel repository and browsing it
root #
git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
root #
cd linux
root #
git branch --list --remotes
root #
git branch --show-current
root #
git checkout linux-<new_LTS_version>.y
or by browsing https://cdn.kernel.org/pub/linux/kernel/ to identify the version number, and then using wget to retrieve only the version needed
root #
tar xvpf linux-6.1.66.tar.xz
Configure the kernel
Once the sources are retrieved, the next step is configuration. As of this writing, there is no publicly available rk3588s-orangepi-5b_defconfig. It would be possible to get one from files used to run armbian/build ([[1]], [[2]]), but if that software has already been used to generate a working kernel, it will be more efficient to use that running kernel's configuration as a "seed" for making a new one. For example, where model=rk3588s-orangepi-5b
--
root #
cd ~/My_${model}project/build/${model}/
root #
ln -snf /usr/aarch64-unknown-linux-gnu/usr/src/linux-<version> linux
root #
cd ../../
root #
cp kernelconfigs/<my_seed_config> build/<model>/.config
This procedure involves cross-compiling in a build directory, so lengthy command line operations can be simplified by exporting variables, or by assigning much of the repeated text to a single bash variable ${make_model}. This article will demonstrate the latter. For example --
root #
make_model='MAKEOPTS="-j16 -l4" FEATURES=" -userpriv -distcc -distcc-pump" make O=/home/joe/My_rk3588s-orangepi-5b_project/build/rk3588s-orangepi-5b/ ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu-'
Save a copy of the initial .config file, and then run make commands mrproper, prepare, oldconfig, and menuconfig; and then save a copy of the new .config file
root #
backup_config
root #
eval ${make_model} mrproper
root #
cp -v ${config_dir}/.config.bak ${model_config}
root #
eval ${make_model} prepare
root #
eval ${make_model} oldconfig
root #
eval ${make_model} menuconfig
root #
save_new_config
make targets prepare and oldconfig may generate interactive configuration questions on STDOUT that must be answered to complete configuration. When done, don't forget to save a copy of the new configuration file
Compile
Using the same "make_model" bash variable defined above, continue and build the kernel image, modules, and device tree binary blob files
root #
eval ${make_model} ${image}
root #
eval ${make_model} modules
root #
eval ${make_model} dtbs
Create a staging directory
This is a location in which to stage the kernel image, modules, and .dtb files needed on the target system, copy those files and build a tarball to facilitate transfer and installation on the target system
root #
cd ~/My_${model}project/build/${model}/
root #
distrib_dir=/home/joe/My_${model}_project/build/${model}/tmp/distrib
root #
mkdir -p ${distrib_dir}/{boot,lib}
root #
kernel_distrib_dir=${distrib_dir}/boot
Clean distrib_dir structure if repeating this procedure
root #
for x in $distrib_dir $kernel_distrib_dir; do [ [ -d $x ] ] && find $x -maxdepth 1 -type f -iname '*' -delete; done
root #
[ [ -d $lib_dir ] ] && find $lib_dir -mindepth 1 -iname '*' -delete
Stage the kernel and modules
root #
cp -av arch/arm64/boot/Image ${kernel_distrib_dir}/vmlinuz
root #
eval ${make_model} INSTALL_MOD_PATH=${distrib_dir} modules_install
Fix the "build" and "source" symlinks
root #
cd ${distrib_dir}/lib/modules/<version_number>
root #
rm -v build 2>/dev/null
root #
ln -snfv /usr/src/linux build
root #
rm -v source 2>/dev/null
root #
ln -snfv /usr/src/linux source
root #
cd ~/My_${model}project/build/${model}/
Stage the dtb files (and overlays)
root #
eval ${make_model} INSTALL_DTBS_PATH=${kernel_distrib_dir}/dts/ dtbs_install
root #
# copy the one dtb file we need up to boot
root #
cp -av ${kernel_distrib_dir}/dts/rockchip/${model}.dtb ${kernel_distrib_dir}/
Make tarball
root #
cd $distrib_dir
root #
tar --exclude lib/modules/<version_number>/source/ --exclude lib/firmware -cvjf linux-${model}-<version_number>_kernel_image.tar.bz2 boot lib
root #
cd ~/My_${model}project/build/${model}/
Deploy new kernel, modules, dtb
Now copy the tarball ${distrib_dir}/vmlinuz-<version_number>.tar.bz2 to the target system, either by
- mounting the target system storage device on the development platform and copying to its root / directory, or
- copying it to other removeable media to transfer to the / directory on the target system, or
- copying with scp, etc. to the / directory on the target system
Then un-archive contents from the tarball
root #
cd /mnt/gentoo/
root #
tar xvjf linux-${model}-<version_number>_kernel_image.tar.bz2
Inspect contents of target system /lib/modules/<version_number> and /boot/. Ensure the kernel and dtb files are named as the boot.scr script will expect (rename or edit joetooEnv.txt, if not).
Reboot! Observe u-boot console output...