7. SquashFS RootFS Signing and Kernel Verification¶
7.1. Overall Goal¶
Purpose: Deviceon
mtdblock6etc.DeviceNode of SquashFS rootfs(Partition withBoard-levelis ) ,Kernelin before SignatureVerification,Failure 。ImplementationMethod:
mksquashfsofImage SHA256 and RSA Signature,and DefinitionSignature ;Kernel before Signature Verification。
7.2. Useand ¶
Usecan is:
menuconfig->Kernel options->Enable kernel secure boot。
Execute build_all。
BurningGenerateofImage,will
install/.../rootfs.spinor(Path Board Variant )Write ROOTFS Partition。
Optional: check_rootfs_sig.sh Confirm rootfs alreadySignature(sig_len>0)。 Certificate need linux_5.10/certs/cert.pem and -c / -k 。
Signature verification succeeds:
VFS: Mounted root (squashfs filesystem) readonly on device 31:6., after/sbin/initnormal startup。error -126:If
SquashFS raw signature requires cert with 'SquashFS Root Signing',get_squashfs_x509_key()is NULL。Through fallback Modifyafter, Certificate(If “Internet Widgits Pty Ltd”) SquashFS key, can 。error -129 ( PKCS#7 Path):If
Message digest doesn't matchor error -129, isDeviceonbeforebytes_usedBytesandSignature payload not ; beforealready Definition raw , PKCS#7 。
7.3. Related Files¶
Purpose |
Path( ) |
|---|---|
Private Key(Signature) |
|
Certificate(Signature Verification) |
|
Signing Script |
|
Script |
|
KernelSignature Verification |
|
CertificateLoad |
|
SquashFS key Interface |
|
CertificateThrough CONFIG_SYSTEM_TRUSTED_KEYS Kernel; on Private Key rootfs Signature。