Skip to main content

8. apt updates kernel packages

armsom builds kernels through armbian system and supports apt to update kernel packages online

8.1 Online installation

sudo apt-get update
sudo apt-get upgrade

The above two commands can be used to update and install deb packages online

8.2 Offline local installation

After compiling through armbian, the following files are available in the output/debs path of the armbian source code:

image

armbian-bsp-cli-armsom-sige5-vendor_24.11.0-trunk_arm64__1-PC980a-V2b19-H2670-B6e44-R7697.deb //Unknown function
armbian-bsp-cli-armsom-sige5_24.11.0-trunk_arm64__1-PC980a-V2b19-H2670-B6e44-R7697.deb //Unknown function
armbian-config_24.11.0-trunk_all__1-SAae27-B3387-R448a.deb //Unknown function
armbian-firmware_24.11.0-trunk_all__1-SA8dbb-B6c7f-R448a.deb //Unknown function
armbian-plymouth-theme_24.11.0-trunk_all__1-Bfe25-R448a.deb //Unknown function
armbian-zsh_24.11.0-trunk_all__1-SAbfee-B6e0d-R448a.deb //Mac OS commonly used compilation environment can replace bash, or coexistence users can choose zsh or bash
extra
fake-ubuntu-advantage-tools_24.11.0-trunk_all__1-B34ac-R448a.deb //Unknown function
linux-dtb-vendor-rk35xx_24.11.0-trunk_arm64__6.1.75-S00b3-D0531-Pe6e2-C65f1H5c21-HK01ba-Vc222-B59f0-R448a.deb //Device tree and other image data
linux-headers-vendor-rk35xx_24.11.0-trunk_arm64__6.1.75-S00b3-D0531-Pe6e2-C65f1H5c21-HK01ba-Vc222-B59f0-R448a.deb //Contains kernel header files and other information to facilitate board driver compilation
linux-image-vendor-rk35xx_24.11.0-trunk_arm64__6.1.75-S00b3-D0531-Pe6e2-C65f1H5c21-HK01ba-Vc222-B59f0-R448a.deb //Contains kernel image Image
linux-libc-dev-vendor-rk35xx_24.11.0-trunk_arm64__6.1.75-S00b3-D0531-Pe6e2-C65f1H5c21-HK01ba-Vc222-B59f0-R448a.deb //libc and other core libraries
linux-u-boot-armsom-sige5-vendor_24.11.0-trunk_arm64__2017.09-S6e37-P567b-H4674-V8051-Bda0a-R448a.deb //u-boot image

To upgrade the kernel package, you need to install the necessary libraries in advance using the following commands:

sudo apt-get update
sudo apt-get install libssl-dev libelf-dev

# When executing the above installation library, an error will be reported. You need to execute the following command to solve the error
sudo apt --fix-broken install

Manually install the kernel package:

Copy the compiled deb package to the board through scp or other methods, and then enter the following command to install the deb package

sudo dpkg -i *.deb

Then you can see the printed information as follows:

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) ...
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.

The above printout indicates that the update was successful.