§2023-10-13
(chroot) orgpi58G /usr/src # git clone -b orange-pi-5.10-rk3588 git@github.com:orangepi-xunlong/linux-orangepi.git
Cloning into 'linux-orangepi'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
emerge dev-embedded/u-boot-tools was installed, mkimage was required when
make
- http://www.orangepi.org/orangepiwiki/index.php/Orange_Pi_5_Plus#Onboard_LED_Light_Test_Instructions debisn spt install build-essentials git flex bison sudo apt install python-is-python3
(chroot) orgpi58G /usr/src # git clone --depth=1 -b orange-pi-5.10-rk3588 https://github.com/orangepi-xunlong/linux-orangepi
(chroot) orgpi58G /usr/src # cd linux-orangepi/
(chroot) orgpi58G /usr/src/linux-orangepi # make rockchip_linux_defconfig
(chroot) orgpi58G /usr/src/linux-orangepi # make -j8
(chroot) orgpi58G /usr/src/linux-orangepi # diff Makefile Makefile.ori
519c519
< KBUILD_CFLAGS := -Wall -Wundef -Wno-trigraphs \
---
> KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
(chroot) orgpi58G /usr/src/linux-orangepi # make modules
(chroot) orgpi58G /usr/src/linux-orangepi # make modules_prepare
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
LDS scripts/module.lds
(chroot) orgpi58G /usr/src/linux-orangepi # make modules_install
(chroot) orgpi58G /usr/src/linux-orangepi # make modules_install
alexlai@n2Jammy:~/build/linux-orangepi$ ls /boot -l
total 28344
-rw-r--r-- 1 root root 4490 Oct 13 19:46 boot.scr
-rw-r--r-- 1 root root 4490 Oct 13 19:46 boot.scr.bak
-rw-r--r-- 1 root root 220943 Jun 23 17:13 config-5.15.0-odroid-arm64
-rw-r--r-- 1 root root 237 Oct 13 19:30 config.ini
lrwxrwxrwx 1 root root 58 Oct 13 19:46 dtb -> dtbs/5.15.0-odroid-arm64/amlogic/meson64_odroidn2_plus.dtb
lrwxrwxrwx 1 root root 58 Oct 13 19:46 dtb-5.15.0-odroid-arm64 -> dtbs/5.15.0-odroid-arm64/amlogic/meson64_odroidn2_plus.dtb
drwxr-xr-x 3 root root 4096 Oct 13 19:31 dtbs
lrwxrwxrwx 1 root root 30 Oct 13 19:31 initrd.img -> initrd.img-5.15.0-odroid-arm64
-rw-r--r-- 1 root root 11761357 Oct 13 19:46 initrd.img-5.15.0-odroid-arm64
lrwxrwxrwx 1 root root 30 Oct 13 19:31 initrd.img.old -> initrd.img-5.15.0-odroid-arm64
drwx------ 2 root root 16384 Oct 13 19:03 lost+found
lrwxrwxrwx 1 root root 41 Oct 13 19:46 overlays -> dtbs/5.15.0-odroid-arm64/amlogic/overlays
-rw-r--r-- 1 root root 5487786 Jun 23 17:13 System.map-5.15.0-odroid-arm64
lrwxrwxrwx 1 root root 27 Oct 13 19:31 vmlinuz -> vmlinuz-5.15.0-odroid-arm64
-rw-r--r-- 1 root root 11508233 Jun 23 17:13 vmlinuz-5.15.0-odroid-arm64
lrwxrwxrwx 1 root root 27 Oct 13 19:31 vmlinuz.old -> vmlinuz-5.15.0-odroid-arm64
alexlai@n2Jammy:~/build/linux-orangepi$ sudo make install
sh ./arch/arm64/boot/install.sh 5.10.110+ \
arch/arm64/boot/Image System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.10.110+ /boot/vmlinuz-5.10.110+
update-initramfs: Generating /boot/initrd.img-5.10.110+
Using DTB: amlogic/meson64_odroidn2_plus.dtb
Couldn't find DTB meson64_odroidn2_plus.dtb in /usr/lib/linux-image-5.10.110+ or /etc/flash-kernel/dtbs
Couldn't find DTB files in /usr/lib/linux-image-5.10.110+/amlogic
run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 1
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
make[1]: *** [arch/arm64/boot/Makefile:40: install] Error 1
make: *** [arch/arm64/Makefile:173: install] Error 2
alexlai@n2Jammy:~/build/linux-orangepi$ ls -l /boot/
total 84876
-rw-r--r-- 1 root root 4490 Oct 13 19:46 boot.scr
-rw-r--r-- 1 root root 4490 Oct 13 19:46 boot.scr.bak
-rw-r--r-- 1 root root 219592 Oct 14 05:48 config-5.10.110+
-rw-r--r-- 1 root root 220943 Jun 23 17:13 config-5.15.0-odroid-arm64
-rw-r--r-- 1 root root 237 Oct 13 19:30 config.ini
lrwxrwxrwx 1 root root 58 Oct 13 19:46 dtb -> dtbs/5.15.0-odroid-arm64/amlogic/meson64_odroidn2_plus.dtb
lrwxrwxrwx 1 root root 58 Oct 13 19:46 dtb-5.15.0-odroid-arm64 -> dtbs/5.15.0-odroid-arm64/amlogic/meson64_odroidn2_plus.dtb
drwxr-xr-x 3 root root 4096 Oct 13 19:31 dtbs
lrwxrwxrwx 1 root root 30 Oct 13 19:31 initrd.img -> initrd.img-5.15.0-odroid-arm64
-rw-r--r-- 1 root root 15772576 Oct 14 05:48 initrd.img-5.10.110+
-rw-r--r-- 1 root root 11761357 Oct 13 19:46 initrd.img-5.15.0-odroid-arm64
lrwxrwxrwx 1 root root 30 Oct 13 19:31 initrd.img.old -> initrd.img-5.15.0-odroid-arm64
drwx------ 2 root root 16384 Oct 13 19:03 lost+found
lrwxrwxrwx 1 root root 41 Oct 13 19:46 overlays -> dtbs/5.15.0-odroid-arm64/amlogic/overlays
-rw-r--r-- 1 root root 7780901 Oct 14 05:48 System.map-5.10.110+
-rw-r--r-- 1 root root 5487786 Jun 23 17:13 System.map-5.15.0-odroid-arm64
lrwxrwxrwx 1 root root 17 Oct 14 05:48 vmlinuz -> vmlinuz-5.10.110+
-rw-r--r-- 1 root root 34109952 Oct 14 05:48 vmlinuz-5.10.110+
-rw-r--r-- 1 root root 11508233 Jun 23 17:13 vmlinuz-5.15.0-odroid-arm64
lrwxrwxrwx 1 root root 27 Oct 13 19:31 vmlinuz.old -> vmlinuz-5.15.0-odroid-arm64
alexlai@n2Jammy:~/build/linux-orangepi$ cp -v arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dtb arch/arm64/boot/dts/rockchip/meson64_odroidn2_plus.dtb
'arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dtb' -> 'arch/arm64/boot/dts/rockchip/meson64_odroidn2_plus.dtb'
Then install the kernel image and uInitrd
orangepi@orangepi:~/linux-orangepi$ sudo make install
The installation path of the kernel image and uInitrd is:/boot/
After executing the sudo make install command, you can see that there will be one more kernel file under /boot/:
orangepi@orangepi5plus:~/orange-pi-5.10-rk3588$ ls /boot/vmlinuz*
/boot/vmlinuz-5.10.110+ /boot/vmlinuz-5.10.110-rockchip-rk3588
The file /boot/Image is actually loaded when the system starts, and Image is a copy of the vmlinuz file
Then install the dtb file into /boot/dtb
orangepi@orangepi:~/linux-orangepi$ sudo make dtbs_install INSTALL_DTBS_PATH=/boot/dtb/
Then restart the Linux system and the newly compiled kernel will be loaded
orangepi@orangepi:~$ uname -r
5.10.110+
alexlai@orangepi5plus:~/build/linux-orangepi$ sudo make install
sh ./arch/arm64/boot/install.sh 5.10.110+ \
arch/arm64/boot/Image System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/dkms 5.10.110+ /boot/vmlinuz-5.10.110+
* dkms: running auto installation service for kernel 5.10.110+
Kernel preparation unnecessary for this kernel. Skipping...
Running the pre_build script:
checking for gawk... awk
checking metadata... META file
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking target system type... aarch64-unknown-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... ld
checking if the linker (ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... nm
checking the name lister (nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert aarch64-unknown-linux-gnu file names to aarch64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert aarch64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse nm output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) none
checking whether ln -s works... yes
checking for pkg-config... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking dependency style of gcc... none
checking whether to build with code coverage support... no
checking how to create a pax tar archive... gnutar
checking zfs author... OpenZFS
checking zfs license... CDDL
checking whether NLS is requested... yes
checking for msgfmt... /bin/msgfmt
checking for gmsgfmt... /bin/msgfmt
checking for xgettext... /bin/xgettext
checking for msgmerge... /bin/msgmerge
checking for ld... ld
checking if the linker (ld) is GNU ld... yes
checking for shared library run path origin... done
checking 32-bit host C ABI... no
checking for the common suffixes of directories in the library search path... lib,lib
checking zfs config... kernel
checking the number of available CPUs... 8
checking whether gcc supports -Wno-clobbered... yes
checking whether gcc supports -Winfinite-recursion... no
checking whether gcc supports -Wimplicit-fallthrough... yes
checking whether gcc supports -Wframe-larger-than=<size>... yes
checking whether gcc supports -Wno-format-truncation... yes
checking whether gcc supports -Wno-format-zero-length... yes
checking whether gcc supports -fno-omit-frame-pointer... yes
checking whether gcc supports -fno-ipa-sra... yes
checking whether to build with -fsanitize=address support... no
checking for system type (linux-gnu)... Linux
checking for python3... python
checking for python version... 3.10
checking for python platform... linux
checking for GNU default python prefix... ${prefix}
checking for GNU default python exec_prefix... ${exec_prefix}
checking for python script directory (pythondir)... ${PYTHON_PREFIX}/lib/python3.10/site-packages
checking for python extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/lib/python3.10/site-packages
checking for python module: packaging... no
checking for python module: distlib... no
checking whether to enable pyzfs: ... no
checking for sed --in-place... --in-place
checking for cppcheck... no
checking for shellcheck... no
checking for checkbashisms... no
checking for parallel... no
checking kernel source and build directories... done
checking kernel source directory... /lib/modules/5.10.110+/source
checking kernel build directory... /lib/modules/5.10.110+/build
checking kernel source version... 5.10.110+
checking for kernel config option compatibility... done
checking whether CONFIG_MODULES is defined... yes
checking whether CONFIG_BLOCK is defined... yes
checking whether mutex_lock() is GPL-only... no
checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... yes
checking whether CONFIG_ZLIB_DEFLATE is defined... yes
checking whether CONFIG_ZLIB_INFLATE is defined... yes
checking kernel file name for module symbols... Module.symvers
checking whether fpu headers are available... i387.h & xcr.h
checking whether objtool header is available... linux/objtool.h
checking whether wait_queue_entry_t exists... yes
checking whether /dev/zfs minor is available... 249
checking whether DECLARE_EVENT_CLASS() is available... no
checking for available kernel interfaces...
....
Building module:
cleaning build area....
make -j8 KERNELRELEASE=5.10.110+.......................
Running the post_build script:
cleaning build area....
zavl.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.110+/updates/dkms/
znvpair.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.110+/updates/dkms/
zunicode.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.110+/updates/dkms/
zcommon.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.110+/updates/dkms/
zfs.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.110+/updates/dkms/
icp.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.110+/updates/dkms/
zlua.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.110+/updates/dkms/
spl.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.110+/updates/dkms/
zzstd.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.110+/updates/dkms/
depmod...
Warning: Unable to find an initial ram disk that I know how to handle.
Will not try to make an initrd.
[ OK ]
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.10.110+ /boot/vmlinuz-5.10.110+
update-initramfs: Generating /boot/initrd.img-5.10.110+
update-initramfs: Converting to u-boot format
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.10.110+ /boot/vmlinuz-5.10.110+
run-parts: executing /etc/kernel/postinst.d/update-notifier 5.10.110+ /boot/vmlinuz-5.10.110+
run-parts: executing /etc/kernel/postinst.d/xx-initramfs-cleanup 5.10.110+ /boot/vmlinuz-5.10.110+
Remove unused generated file: /boot/initrd.img-5.10.110-rockchip-rk3588.uimg
Remove unused generated file: /boot/initrd.img-5.10.110-rockchip-rk3588-uInitrd
Free space after deleting the package in /boot: 1.6G
run-parts: executing /etc/kernel/postinst.d/xx-update-initrd-links 5.10.110+ /boot/vmlinuz-5.10.110+
run-parts: /etc/kernel/postinst.d/xx-update-initrd-links exited with return code 1
make[1]: *** [arch/arm64/boot/Makefile:40: install] Error 1
make: *** [arch/arm64/Makefile:173: install] Error 2