8. apt更新内核包
armsom通过armbian系统构建内核并支持apt在线更新内核包
1. 在线安装
sudo apt-get update
sudo apt-get upgrade
通过以上两条命令即可在线更新并安装deb包
2. 离线本地安装
通过armbian编译后,在armbian源码的output/debs路径下有以下文件:
armbian-bsp-cli-armsom-sige5-vendor_24.11.0-trunk_arm64__1-PC980a-V2b19-H2670-B6e44-R7697.deb //作用不详
armbian-bsp-cli-armsom-sige5_24.11.0-trunk_arm64__1-PC980a-V2b19-H2670-B6e44-R7697.deb //作用不详
armbian-config_24.11.0-trunk_all__1-SAae27-B3387-R448a.deb //作用不祥
armbian-firmware_24.11.0-trunk_all__1-SA8dbb-B6c7f-R448a.deb //作用不详
armbian-plymouth-theme_24.11.0-trunk_all__1-Bfe25-R448a.deb //作用不详
armbian-zsh_24.11.0-trunk_all__1-SAbfee-B6e0d-R448a.deb //mac os常用的编译环境可以替换bash,或者共存用户可选zsh还是bash
extra
fake-ubuntu-advantage-tools_24.11.0-trunk_all__1-B34ac-R448a.deb //作用不详
linux-dtb-vendor-rk35xx_24.11.0-trunk_arm64__6.1.75-S00b3-D0531-Pe6e2-C65f1H5c21-HK01ba-Vc222-B59f0-R448a.deb //设备树等镜像数据
linux-headers-vendor-rk35xx_24.11.0-trunk_arm64__6.1.75-S00b3-D0531-Pe6e2-C65f1H5c21-HK01ba-Vc222-B59f0-R448a.deb //包含内核头文件等信息,方便板卡编译驱动
linux-image-vendor-rk35xx_24.11.0-trunk_arm64__6.1.75-S00b3-D0531-Pe6e2-C65f1H5c21-HK01ba-Vc222-B59f0-R448a.deb //包含内核镜像Image
linux-libc-dev-vendor-rk35xx_24.11.0-trunk_arm64__6.1.75-S00b3-D0531-Pe6e2-C65f1H5c21-HK01ba-Vc222-B59f0-R448a.deb //libc等核心库
linux-u-boot-armsom-sige5-vendor_24.11.0-trunk_arm64__2017.09-S6e37-P567b-H4674-V8051-Bda0a-R448a.deb //u-boot镜像
升级内核包需要事先使用以下命令安装必要库:
sudo apt-get update
sudo apt-get install libssl-dev libelf-dev
# 执行上面安装库时会报错,需要执行下面的命令解决报错
sudo apt --fix-broken install
手动安装内核包:
通过scp等方式将编译好的deb包复制进板卡,之后输入以下命令安装deb包
sudo dpkg -i *.deb
之后可见打印信息如下:
armsom@armsom-sige5:~$ sudo dpkg -i *.deb
(Reading database ... 117947 files and directories currently installed.)
Preparing to unpack linux-headers-vendor-rk35xx_24.11.0-trunk_arm64__6.1.75-S00b3-D0531-Pe6e2-C65f1H5c21-HK01ba-Vc222-B59f0-R448a.deb ...
Armbian 'linux-headers-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'prerm' starting.
Cleaning directory /usr/src/linux-headers-6.1.75-vendor-rk35xx ...
Armbian 'linux-headers-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'prerm' finishing.
Armbian 'linux-headers-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'preinst' starting.
Armbian 'linux-headers-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'preinst' finishing.
Unpacking linux-headers-vendor-rk35xx (24.11.0-trunk) over (24.11.0-trunk) ... //可见解包header deb包成功
Preparing to unpack linux-image-vendor-rk35xx_24.11.0-trunk_arm64__6.1.75-S00b3-D0531-Pe6e2-C65f1H5c21-HK01ba-Vc222-B59f0-R448a.deb ...
Armbian 'linux-image-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'prerm' starting.
Armbian 'linux-image-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'prerm' finishing.
Armbian 'linux-image-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'preinst' starting.
Armbian 'linux-image-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'preinst' finishing.
Unpacking linux-image-vendor-rk35xx (24.11.0-trunk) over (24.11.0-trunk) ...
Armbian 'linux-image-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'postrm' starting.
Armbian 'linux-image-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'postrm' finishing.
Setting up linux-headers-vendor-rk35xx (24.11.0-trunk) ...
Armbian 'linux-headers-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'postinst' starting.
Compiling kernel-headers tools (6.1.75-vendor-rk35xx) using 8 CPUs - please wait ...
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/lexer.lex.o
HOSTCC scripts/kconfig/menu.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTLD scripts/kconfig/conf
*
* Restart config...
*
*
* General architecture-dependent options
*
Kprobes (KPROBES) [Y/n/?] y
Optimize very unlikely/likely branches (JUMP_LABEL) [N/y/?] n
Enable seccomp to safely execute untrusted bytecode (SECCOMP) [Y/n/?] y
Show seccomp filter cache status in /proc/pid/seccomp_cache (SECCOMP_CACHE_DEBUG) [N/y/?] n
Stack Protector buffer overflow detection (STACKPROTECTOR) [Y/n/?] y
Strong Stack Protector (STACKPROTECTOR_STRONG) [Y/n/?] y
Shadow Call Stack (SHADOW_CALL_STACK) [N/y/?] (NEW)
Link Time Optimization (LTO)
> 1. None (LTO_NONE)
choice[1]: 1
Number of bits to use for ASLR of mmap base address (ARCH_MMAP_RND_BITS) [18] 18
Number of bits to use for ASLR of mmap base address for compatible applications (ARCH_MMAP_RND_COMPAT_BITS) [11] 11
Provide system calls for 32-bit time_t (COMPAT_32BIT_TIME) [Y/n/?] y
Use a virtually-mapped stack (VMAP_STACK) [Y/n/?] y
Support for randomizing kernel stack offset on syscall entry (RANDOMIZE_KSTACK_OFFSET) [Y/n/?] y
Default state of kernel stack offset randomization (RANDOMIZE_KSTACK_OFFSET_DEFAULT) [N/y/?] n
Locking event counts collection (LOCK_EVENT_COUNTS) [N/y/?] n
*
* Memory initialization
*
Initialize kernel stack variables at function entry
> 1. no automatic stack variable initialization (weakest) (INIT_STACK_NONE)
2. pattern-init everything (strongest) (INIT_STACK_ALL_PATTERN) (NEW)
3. zero-init everything (strongest and safest) (INIT_STACK_ALL_ZERO) (NEW)
choice[1-3?]:
Enable heap memory zeroing on allocation by default (INIT_ON_ALLOC_DEFAULT_ON) [N/y/?] n
Enable heap memory zeroing on free by default (INIT_ON_FREE_DEFAULT_ON) [N/y/?] n
Enable register zeroing on function exit (ZERO_CALL_USED_REGS) [N/y/?] n
*
* Kernel Testing and Coverage
*
Notifier error injection (NOTIFIER_ERROR_INJECTION) [N/m/y/?] n
Fault-injections of functions (FUNCTION_ERROR_INJECTION) [N/y/?] n
Fault-injection framework (FAULT_INJECTION) [N/y/?] n
Code coverage for fuzzing (KCOV) [N/y/?] (NEW)
Memtest (MEMTEST) [N/y/?] n
#
# configuration written to .config
#
SYNC include/config/auto.conf.cmd
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
LEX scripts/dtc/dtc-lexer.lex.c
YACC scripts/dtc/dtc-parser.tab.[ch]
HOSTCC scripts/dtc/libfdt/fdt.o
HOSTCC scripts/dtc/libfdt/fdt_ro.o
HOSTCC scripts/dtc/libfdt/fdt_wip.o
HOSTCC scripts/dtc/libfdt/fdt_sw.o
HOSTCC scripts/dtc/libfdt/fdt_rw.o
HOSTCC scripts/dtc/libfdt/fdt_strerror.o
HOSTCC scripts/dtc/libfdt/fdt_empty_tree.o
HOSTCC scripts/dtc/libfdt/fdt_addresses.o
HOSTCC scripts/dtc/libfdt/fdt_overlay.o
HOSTCC scripts/dtc/fdtoverlay.o
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/fdtoverlay
HOSTLD scripts/dtc/dtc
HOSTCC scripts/kallsyms
HOSTCC scripts/resource_tool
HOSTCC scripts/sorttable
HOSTCC scripts/asn1_compiler
HOSTCC scripts/genksyms/genksyms.o
YACC scripts/genksyms/parse.tab.[ch]
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/selinux/genheaders/genheaders
LEX scripts/genksyms/lex.lex.c
HOSTCC scripts/genksyms/parse.tab.o
HOSTCC scripts/genksyms/lex.lex.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
CC scripts/mod/devicetable-offsets.s
UPD scripts/mod/devicetable-offsets.h
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
MODPOST scripts/mod/Module.symvers
Done compiling kernel-headers tools (6.1.75-vendor-rk35xx).
Done compiling kernel-headers tools (6.1.75-vendor-rk35xx).
Armbian 'linux-headers-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'postinst' finishing.
Setting up linux-image-vendor-rk35xx (24.11.0-trunk) ...
Armbian 'linux-image-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'postinst' starting.
* dkms: running auto installation service for kernel 6.1.75-vendor-rk35xx
* dkms: autoinstall for kernel 6.1.75-vendor-rk35xx [ OK ]
update-initramfs: Generating /boot/initrd.img-6.1.75-vendor-rk35xx
update-initramfs: Armbian: Converting to u-boot format: /boot/uInitrd-6.1.75-vendor-rk35xx
Image Name: uInitrd
Created: Sun Dec 8 02:29:00 2024
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 16104949 Bytes = 15727.49 KiB = 15.36 MiB
Load Address: 00000000
Entry Point: 00000000
update-initramfs: Armbian: Symlinking /boot/uInitrd-6.1.75-vendor-rk35xx to /boot/uInitrd
'/boot/uInitrd' -> 'uInitrd-6.1.75-vendor-rk35xx'
update-initramfs: Armbian: done.
Armbian: update last-installed kernel symlink to 'Image'...
'/boot/Image' -> 'vmlinuz-6.1.75-vendor-rk35xx'
Armbian: Debian compat: linux-update-symlinks install 6.1.75-vendor-rk35xx boot/vmlinuz-6.1.75-vendor-rk35xx
Armbian 'linux-image-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'postinst' finishing.
上述打印代表更新成功。