TQMa93 Secure Boot
ထုတ်ကုန်အချက်အလက်
သတ်မှတ်ချက်များ
- မော်ဒယ်- TQMa93xx
- လည်ပတ်မှုစနစ်- Linux (Ubuntu 22.04)
- လုံခြုံရေးအင်္ဂါရပ်- Secure Boot
သတိပြုရန်- Fuses (One Time Programmable) are set in this How-to, this process is irreversible. It is therefore strongly recommended to use a development pattern for this guide.
လုပ်ထုံးလုပ်နည်း
ဤလမ်းညွှန်သည် Linux kernel မှတဆင့် boot loader မှ ယုံကြည်ခြင်းကွင်းဆက်တစ်ခုကို dm-verity ဖြင့် root partition သို့ မည်သို့တည်ဆောက်နိုင်ကြောင်း ရှင်းပြထားသည်။
အောက်ပါဇယားသည် boot လုပ်ငန်းစဉ်အတွင်း ယုံကြည်မှုနှင့် အတည်ပြုခြင်းကွင်းဆက်ကို ဖန်တီးရာတွင် ပါ၀င်သော ရိုးရှင်းသောဖော်ပြချက်တစ်ခုကို ပေးသည်-
ဘိတ်
The following projects are required to create a signed boot stream for TQMa93xx:
- imx-mkimage: https://github.com/nxp-imx/imx-mkimage (လိုအပ်သည်)
- NXP Code Signing Tool 3.4.x (with NXP Account): https://www.nxp.com/webapp/Download?colCode=IMX_CST_TOOL_NEW (လိုအပ်သည်)
- TQ Yocto-Workspace: https://github.com/tq-systems/ci-meta-tq (အကြံပြုထားသည်)
TQMa93xx အတွက် bootstream တွင် artifact များစွာ ပါဝင်ပါသည်။ တူညီသောအရင်းအမြစ်မှဤအရာအားလုံးကိုရယူရန် TQ Yocto workspace ci-meta-tq ကိုအသုံးပြုရန်အကြံပြုထားသည်။ အောက်ဖော်ပြပါ TQMa93xx-based စက်များထဲမှ တစ်ခုအတွက် ပြီးပြည့်စုံသော ပုံ (tq-image-weston-debug သို့မဟုတ် tq-image-generic-debug) ကို တည်ဆောက်ရန် ထိုနေရာတွင် ပါဝင်သော ညွှန်ကြားချက်များကို လိုက်နာနိုင်သည်-
- tqma93xx-mba91xxca.conf
- tqma93xx-mba93xxca.conf
- tqma93xxla-mba93xxla.conf
သတိပြုရန်- To create U-Boot with secure boot functionality (AHAB), the following line must be added to local.conf:
DISTRO_FEATURES: append = ” လုံခြုံသည်”
ထို့နောက်၊ boot stream ကို ပြန်လည်ဖန်တီးရပါမည်-
$ bitbake imx-boot
The TQ Yocto workspace can also be used to create an image of the complete chain of trust presented here. The settings required for this are described in section 5.2 .
The sources for the Linux kernel and U-Boot are optional but recommended. They can be downloaded from Github:
- Linux- https://github.com/tq-systems/linux-tqmaxx/tree/TQMa-fslc-6.6-2.0.x-imx
- U-Boot- https://github.com/tq-systems/u-boot-tqmaxx/tree/TQM-lf_v2023.04
- ပြင်ဆင်မှုတွင် TQMa93xx မျိုးကွဲအတွက် Linux နှင့် U-Boot ကို စုစည်းထားပြီးဖြစ်သင့်သည်။
ဦးဘွတ်
Generating keys
Signing and verification of the boot stream are carried out using a public key infrastructure (PKI). If not already available, the Code Signing Tool can be used to create a suitable PKI. The CST 3.4.x is a tar.gz archive that only needs to be unpacked. No further installation is necessary. The following steps can be used to generate the sampဤလမ်းညွှန်အတွက် သော့များ
သတိပြုရန်- Paths are relative to the folder extracted from the archive.
- Enter the serial number of the first certificate in keys/serial (file ဖန်တီးရမည်): 12345678
- Enter the passphrase twice in keys/key_pass.txt (file must be created):
my_passphrase my_passphrase - Create PKI tree:
$ keys/ahab_pki_tree.sh -existing-ca n -kt ecc -kl p521 -da sha512 -duration 10 -srk-ca n
For an explanation of the options, please refer to the User Guide contained in the CST (in the docs subfolder) or the –help option of the above script.
Alternatively, the script can also be called without options and configured in interactive mode.
The script generates keys in keys/ and certificates in crts/. - Create SRK table and SRK hash table:
$ linux64/bin/srktool -a -s sha512 -d sha256 -t SRK_1_2_3_4_table.bin \
-e SRK_1_2_3_4_fuse.bin -f 1 -c
crts/SRK1_sha512_secp521r1_v3_usr_crt.pem,crts/SRK2_sha512_secp521r1_v3_usr_crt. pem,crts/SRK3_sha512_secp521r1_v3_usr_crt.pem,crts/SRK4_sha512_secp521r1_v3_usr_ crt.pem - Write SRK hash table in fuses:
သတိပြုရန်- ဤအဆင့်သည် တစ်ကြိမ်သာ ဖြစ်နိုင်ပြီး နောက်ပြန်လှည့်၍မရပါ။ အောက်ပါတန်ဖိုးများသည် ex သာဖြစ်သည်။amples ကို သင့်ကိုယ်ပိုင်တန်ဖိုးများဖြင့် အစားထိုးရပါမည်။- Display hashes:
$ hexdump -e ‘/4 “0x”‘ -e ‘/4 “%X””\n”‘ SRK_1_2_3_4_fuse.bin
က0x00000000
က0x11111111
က0x22222222
က0x33333333
က0x44444444
က0x55555555
က0x66666666
က0x77777777 - Write hashes in fuses (TQMa93xx U-Boot):
=> fuse prog 16 0 0x00000000
=> fuse prog 16 1 0x11111111
=> fuse prog 16 2 0x22222222
=> fuse prog 16 3 0x33333333
=> fuse prog 16 4 0x44444444
=> fuse prog 16 5 0x55555555
=> fuse prog 16 6 0x66666666
=> fuse prog 16 7 0x77777777
- Display hashes:
Creating a signed boot stream
U-Boot Proper and ATF
- လိုအပ်တာတွေကို ကူးယူပါ။ files (successful build of a TQ image, see above, or the U-Boot sources is assumed):
- ARM Trusted Firmware: ${DEPLOY_DIR_IMAGE}/bl31-imx93.bin, rename to bl31.bin
- U-Boot Proper:
${DEPLOY_DIR_IMAGE}/u-boot.bin
ဒီ file is a link, so copy it with cp –-dereference or display and copy the original file with ls –-long
or
ကိုယ်တိုင်စုစည်းထားသော U-Boot အရင်းအမြစ်များမှ
ဒါတွေ files ကို imx-mkimage/iMX9/ သို့ ကူးယူရပါမည်။ imx-mkimage ကို အထက်ဖော်ပြပါ Github repository မှ ရယူနိုင်ပြီး တပ်ဆင်ရန် မလိုအပ်ပါ။
- Build container with U-Boot Proper and ATF (execute in folder imx-mkimage):
$ make SOC=iMX9 REV=A1 u-boot-atf-container.img include autobuild.mak- …
- CST- ကွန်တိန်နာ 0 အော့ဖ်ဆက်- 0x0
- CST- CONTAINER 0- Signature Block- offset သည် 0x110 ဖြစ်သည်။
- Offsets = 0x0 0x110
- ပြီးပါပြီ။
- မှတ်ချက်- ကျေးဇူးပြု၍ ပုံအား အော့ဖ်ဆက်သို့ ကူးယူပါ- IVT_OFFSET + IMAGE_OFFSET
သတိပြုရန်- နောက်တဆင့်တွင် ကွန်တိန်နာနှင့် လက်မှတ်ဘလောက်အတွက် အော့ဖ်ဆက်များ လိုအပ်ပါသည်။ - ထို့နောက် artifact imx-mkimage/iMX9/u-boot-atf-container.img ကို အဆင့် “၃.၁ သော့ထုတ်ပေးခြင်း” တွင်ထုပ်ပိုးထားသော CST ဖိုင်တွဲသို့ ကူးယူရမည်ဖြစ်သည်။
- Transfer offset of container and signature block to Command Sequence File (CSF):
- [ခေါင်းစီး]
- Target = AHAB
- ဗားရှင်း = 1.0
- [SRK ကို ထည့်သွင်းပါ]
- File = “SRK_1_2_3_4_table.bin”
- Source = “crts/SRK1_sha512_secp521r1_v3_usr_crt.pem”
- Source index = 0
- Source set = OEM
- Revocations = 0x0
- [Authenticate Data]
- File = “u-boot-atf-container.img”
- Offsets = 0x0 0x110
- CSF based on: https://github.com/nxp-imx/uboot-imx/blob/lf_v2024.04/doc/imx/ahab/csf_examples/csf_uboot_atf.txt
- The CSF is also stored in the CST folder with the name csf_uboot_atf.txt that was unpacked in step “3.1 Generating keys”.
- Sign container (path relative to the CST folder):
$ linux64/bin/cst -i csf_uboot_atf.txt -o signed-u-boot-atf-container.img The signed container must then be copied back to imx-mkimage/iMX9/u-boot-atf-container.img. Note the renaming to u-boot-atf-container.img.
Complete bootstream
- လိုအပ်တာတွေကို ကူးယူပါ။ files (successful build of a TQ image, see above, or of the U-Boot sources is assumed):
- Edgelock Secure Enclave Firmware: ${DEPLOY_DIR_IMAGE}/mx93a1-ahab-container.img
- RAM Firmware: ${DEPLOY_DIR_IMAGE}/lpddr4*.bin
- U-Boot SPL:
${DEPLOY_DIR_IMAGE}/u-boot-spl.bin
ဒီ file is a link, so copy it with cp –-dereference or display and copy the original file with ls –-long
or
ကိုယ်တိုင်စုစည်းထားသော U-Boot အရင်းအမြစ်များမှ - Signed container with U-Boot Proper and ATF from step „3.2.1 U-Boot Proper and ATF“
ဒါတွေ files ကို imx-mkimage/iMX9/ သို့လည်း ကူးယူရပါမည်။
- Build bootstream
- $ make -j8 SOC=iMX9 REV=A1 flash_singleboot
autobuild.mak ပါဝင်သည်။ - …
- CST- ကွန်တိန်နာ 0 အော့ဖ်ဆက်- 0x400
- CST- CONTAINER 0- Signature Block- offset သည် 0x490 ဖြစ်သည်။
- Offsets = 0x400 0x490
- ပြီးပါပြီ။
- မှတ်ချက်: Please copy image to offset: IVT_OFFSET + IMAGE_OFFSET append u-boot-atf-container.img at 379 KB, psize=1024
- 1145+0 မှတ်တမ်းများ
- 1145+0 မှတ်တမ်းများထွက်လာသည်။
- 1172480 bytes (1.2 MB၊ 1.1 MiB) ကူးယူသည်၊ 0.00266906 s၊ 439 MB/s
- သတိပြုရန်- The offsets for the container and signature block are required in the next step.
ထို့နောက် artifact imx-mkimage/iMX9/flash.bin ကို အဆင့် “၃.၁ သော့ထုတ်ပေးခြင်း” တွင်ထုပ်ပိုးထားသော CST ဖိုင်တွဲသို့ ကူးယူရမည်ဖြစ်သည်။
- $ make -j8 SOC=iMX9 REV=A1 flash_singleboot
- Transfer offset of container and signature block to Command Sequence File (CSF):
- [ခေါင်းစီး]
- Target = AHAB
- ဗားရှင်း = 1.0
- [SRK ကို ထည့်သွင်းပါ]
- File = “SRK_1_2_3_4_table.bin”
- Source = “crts/SRK1_sha512_secp521r1_v3_usr_crt.pem”
- Source index = 0
- Source set = OEM
- Revocations = 0x0
- [Authenticate Data]
- File = “flash.bin”
- Offsets = 0x400 0x490
- CSF based on: https://github.com/nxp-imx/uboot-imx/blob/lf_v2024.04/doc/imx/ahab/csf_examples/csf_boot_image.txt
- The CSF is stored in the CST folder with the name csf_boot_image.txt unpacked in step “3.1 Generating keys”.
- Sign the bootstream
- linux64/bin/cst -i csf_boot_image.txt -o signed-flash.bin
The steps for replacing the boot stream can be found in the BSP layer (https://github.com/tq-systems/meta-tq) under meta-tq/doc.
စိစစ်ခြင်း။
To check if the signed boot stream is valid, use the ahab_status command in U-Boot:
- => ahab_status
- Lifecycle: 0x00000008, OEM Open
- ပွဲများမတွေ့ပါ။
- If an event is found, the boot stream is invalid and would not be able to boot on a locked device.
အတုအယောင်အတွက်၊ လက်မှတ်မထိုးထားသော bootstream ကို စတင်နိုင်ပြီး ထို့နောက် ahab_status ဟုခေါ်နိုင်သည်-
- => ahab_status
- Lifecycle: 0x00000008, OEM Open
- 0x0287fad6
- IPC = MU APD (0x2)
- CMD = ELE_OEM_CNTN_AUTH_REQ (0x87)
- IND = ELE_BAD_KEY_HASH_FAILURE_IND (0xFA)
- STA = ELE_SUCCESS_IND (0xD6)
- 0x0287fad6
- IPC = MU APD (0x2)
- CMD = ELE_OEM_CNTN_AUTH_REQ (0x87)
- IND = ELE_BAD_KEY_HASH_FAILURE_IND (0xFA)
- STA = ELE_SUCCESS_IND (0xD6)
စက်ပစ္စည်းကို လော့ခ်ချပါ။
သတိပြုရန်- This step is irreversible and should only be carried out if necessary. If the configuration is incorrect, this step will result in an unusable device.
The device can be locked in the U-Boot with the command ahab_close. This means that only valid boot streams verified by the Boot ROM will boot. The following status is displayed after rebooting:
- => ahab_status
- Lifecycle: 0x00000020, OEM Closed
- ပွဲများမတွေ့ပါ။
FIT-ရုပ်ပုံ
သတိပြုရန်- Path information is relative to a new, empty folder, e.g.
fit_image_work, or the kernel sources, if self-compiled. Hereafter referred to as the working directory.
Generating a key pair
An asymmetric key pair is used to sign the FIT image. Such a pair can be generated with OpenSSL:
$ openssl genpkey -algorithm RSA -out dev.key -pkeyopt rsa_keygen_bits:2048
$ openssl req -batch -new -x509 -key dev.key -out dev.crt
Create image tree source
- Create image tree source sign.its for the FIT image.
- /dts-v1/;
- / {
- description = “Kernel fitImage for TQMa93xx”;
- #address-cells = <1>;
- images {
- kernel-1 {
- description = “Linux kernel”;
- data = /incbin/(“Image”);
- type = “kernel”;
- arch = “arm64”;
- os = “linux”;
- compression = “gzip”;
- load = <0x90000000>;
- entry = <0x90000000>;
- hash-1 {
- algo = “sha256”;
- };
- };
- fdt-1 {
- description = “Flattened Device Tree blob”;
- data = /incbin/(“<path/to/Devicetree.dtb>”);
- type = “flat_dt”;
- arch = “arm64”;
- compression = “none”;
- load = <0x97000000>;
- hash-1 {
- algo = “sha256”;
- };
- };
- };
- configurations {
- default = “conf-1”;
- conf-1 {
- description = “Linux kernel, FDT blob”;
- kernel = “kernel-1”;
- fdt = “fdt-1”;
- hash-1 {
- algo = “sha256”;
- };
- signature-1 {
- algo = “sha256,rsa2048”;
- key-name-hint = “dev”;
- padding = “pkcs-1.5”;
- sign-images = “kernel”, “fdt”;
- };
- };
- };
- };
Creating a signed FIT image
မှတ်ချက် - The devicetree binary for U-Boot is required for this step. Ready-made devicetree binaries can be found in the Yocto workspace in the U-Boot build directory. The path to the build directory can be displayed with bitbake virtual/bootloader –e | grep ^B=.
- လိုအပ်တာတွေကို ကူးယူပါ။ files into the working directory:
- Rename U-Boot devicetree imx93-tqma9352-mba91xxca.dtb, imx93-tqma9352-mba93xxca.dtb or imx93-tqma9352-mba93xxla.dtb, in pubkey.dtb:
From U-Boot build directory in Yocto workspace (path: bitbake virtual/bootloader –e | grep ^B=)
or
ကိုယ်တိုင်စုစည်းထားသော U-Boot အရင်းအမြစ်များမှ - Linux-Kernel:
${DEPLOY_DIR_IMAGE}/Image
ဒီ file is a link, so copy it with cp –-dereference or display and copy the original file with ls –-long
or
from self-compiled Linux sources - Linux devicetree:
Depending on the variant ${DEPLOY_DIR_IMAGE}/imx93-tqma93…
ဒီ file is a link, so copy it with cp –-dereference or display and copy the original file with ls –-long
or
from self-compiled Linux sources - The keys generated in step 4.1
- The ITS file အဆင့် 4.2 တွင်ထုတ်လုပ်သည်။
- Rename U-Boot devicetree imx93-tqma9352-mba91xxca.dtb, imx93-tqma9352-mba93xxca.dtb or imx93-tqma9352-mba93xxla.dtb, in pubkey.dtb:
- Create FIT image with signature
$ mkimage -f sign.its -K pubkey.dtb -k . -r image.itb
The public key is written to the devicetree of the U-Boot. This key is used to verify the FIT image signed above.
သတိပြုရန်- To pack the U-Boot devicetree with the public key into the signed bootstream from chapter 3.2, the steps from chapter 3.2 must be repeated with a customized U-Boot Proper u-boot.bin. To do this, the devcietree with the public key pubkey.dtb must be specified via the EXT_DTB option when compiling the U-Boot:
make EXT_DTB=<Pfad/zu/pubkey.dtb>
စိစစ်ခြင်း။
အများသူငှာသော့များဖြင့် U-Boot တွင်၊ လက်မှတ်ထိုးထားသော FIT ရုပ်ပုံ image.itb ကို သင့်လျော်သော ကြားခံတစ်ခုမှ တင်ပြီးနောက် ၎င်းကို bootm ဖြင့် စတင်နိုင်သည်။
FIT ပုံကို စတင်သောအခါ၊ U-Boot သည် ကွန်ဆိုးလ်ပေါ်ရှိ အခန်း 256 တွင် ထုတ်ပေးသည့် သော့၏အရှည်နှင့် sha2048,rsa4.1:dev+ OK ဟူသော အချက်အလက်ကို ပြန်ပေးသည်-
- ## Loading kernel from FIT Image at 80400000 …
… - Verifying Hash Integrity … sha256,rsa2048:dev+ OK
… - ## Loading ramdisk from FIT Image at 80400000 …
… - Verifying Hash Integrity … sha256,rsa2048:dev+ OK
… - ## Loading fdt from FIT Image at 80400000 …
… - Verifying Hash Integrity … sha256,rsa2048:dev+ OK
…
အတုအယောင်အတွက်၊ အပိုင်း 4.1 တွင်ဖော်ပြထားသည့်အတိုင်း နောက်ထပ်သော့အတွဲအတွဲကို ဖန်တီးနိုင်ပြီး FIT ပုံကို လက်မှတ်ရေးထိုးရန်အတွက် အသုံးပြုနိုင်သည်။ U-Boot Devicetree တွင် သော့မလဲလှယ်ဘဲ ဤ FIT ပုံကို စတင်၍မရပါ။
## Loading kernel from FIT Image at 80400000 …
Using ‘conf-1’ configuration
Verifying Hash Integrity … sha256,rsa2048:test- error!
Verification failed for ‘<NULL>’ hash node in ‘conf-1’ config node
Failed to verify required signature ‘key-dev’
Bad Data Hash
ERROR: can’t get kernel image!
Extend Chain of Trust: root partition
ယခင်တည်ထားသောယုံကြည်မှုကွင်းဆက်သည် U-Boot နှင့် Linux kernel တို့၏ဇာစ်မြစ်ကိုစစ်ဆေးသည်။ အထက်ဖော်ပြပါ ယန္တရားများဖြင့် ထုတ်လုပ်ထားသော သီးသန့်သော့ပိုင်ရှင်သာလျှင် ၎င်း၏ဆော့ဖ်ဝဲလ်ကို လက်မှတ်ထိုးပြီး စက်ပေါ်တွင် စတင်နိုင်သည်။ နောက်ထပ်လင့်ခ်များကို ကွင်းဆက်သို့ ပေါင်းထည့်နိုင်သည်။ အောက်ပါအပိုင်းသည် dm-verity ကို အသုံးပြု၍ root partition ကို ခြယ်လှယ်ခြင်းမှ မည်သို့ကာကွယ်နိုင်သည်ကို ဖော်ပြထားပါသည်။ လက်တွေ့အကောင်အထည်ဖော်ရန်အတွက် TQ-BSP ဖြင့် ပြီးပြည့်စုံသောကွင်းဆက်ကို မည်သို့ဖန်တီးနိုင်ကြောင်းကိုလည်း ပြသထားသည်။ လိုအပ်ချက်များ၏ ရှုပ်ထွေးမှုကြောင့် dm-verity ကာကွယ်ရေးအတွက် အဆင့်ဆင့်လမ်းညွှန်ချက်ကို ချန်လှပ်ထားသည်။
Sketch: Verity Devicemapper
- Generate Verity hashes:
veritysetup သည် hash တန်ဖိုးများကို တွက်ချက်ပြီး root partition ၏အဆုံးတွင် သိမ်းဆည်းထားသည်။ root partition က အစစ်အမှန်ဖြစ်နိုင်ပါတယ်။ file သို့မဟုတ် ပိတ်ဆို့ကိရိယာတစ်ခု file (ဥပမာ /dev/sdaX)။- veritysetup \
- –data-block-size=1024 \
- –hash-block-size=4096 \
- –hash-offset=<Offset> \
- format \
- <Root-Partition.img> \
- <Root-Partition.img>
- veritysetup သည် အောက်ပါအချက်အလက်များကို ထုတ်ပေးသည် (သက်ဆိုင်ရာ မတူညီသောတန်ဖိုးများဖြင့်)
- data.img အတွက် VERITY ခေါင်းစီးအချက်အလက်
- UUID: e06ff4cb-6b56-4ad4-bd97-0104505a70a5
- Hash type: 1
- Data blocks: 204800
- Data block size: 1024
- Hash block size: 4096
- Hash algorithm: sha256
- Salt: 17328c48990b76fbb3e05d0ebfd236043674cf0d14c278bc875b42693621cc21
- Root hash: a0e1a449d452f74d041706b955794c0041e3d8ad051068df6589e08485323698
- root hash သည် ကာကွယ်ရန် လိုအပ်သော အရေးကြီးသော တန်ဖိုးဖြစ်သည်။ အကယ်၍ ဤ hash ကို အပေးအယူလုပ်ခံရပါက၊ ဥပမာ- ခွင့်ပြုချက်မရှိသူမှ ပြောင်းလဲနိုင်လျှင် dm-verity ဖြင့် root partition ၏ခိုင်မာမှုကို ကာကွယ်ခြင်းသည် တန်ဖိုးမရှိပေ။
- Integrate the root hash into the chain of trust
- The root hash generated above is stored in the signed FIT image, which protects it against manipulation. For this purpose, an initramfs is added to the FIT image in which the root hash is stored in a file.
- The images node of the ITS file from chapter 4.2 is extended by the following section, among others:
- ramdisk-1 {
- description = “dm-verity-image-initramfs”;
- data = /incbin/(“<path/to/Initramfs.cpio.gz>”);
- type = “ramdisk”;
- arch = “arm64”;
- os = “linux”;
- compression = “none”;
- load = <0x98000000>;
- entry = <0x98000000>;
- hash-1 {
- algo = “sha256”;
- };
- };
- Check the integrity of the root partition
- The initramfs contains a suitable script that generates a device mapper from the root partition and the root hash.
- veritysetup \
- –data-block-size=${DATA_BLOCK_SIZE} \
- –hash-offset=${DATA_SIZE} \
- create rootfs \
- </dev/Root-Paritition> \
- </dev/Root-Paritition> \
- <Root Hash>
The device mapper is then mounted:
- mount \
- -o ro \
- /dev/mapper/rootfs \
- /rootfs
အမြစ် fileစနစ်သည် ဖတ်ရန်သာဖြစ်သည်။ အမှန်တကယ် root သို့ပြောင်းရန် fileစနစ်၊ switch-root ကိုသုံးပါ။
Automated creation with TQ-BSP
In principle, an image with a chain of trust from the boot loader to the root partition can be created automatically with the TQ-BSP.
For TQMa93xx the following options have to be added to local.conf :
- # The DISTRO_FEATURE secure necessary config options for U-Boot and Kernel
- DISTRO_FEATURES: append = ” လုံခြုံသည်”
- # Name of the key used for signing the bootloader
- IMX_HAB_KEY_NAME = “ahab”
- # Activates the signing of the FIT image in the build process
- UBOOT_SIGN_ENABLE = “1”
- # This class contains the logic for creating a protected root partition
- IMAGE_CLASSES += “dm-verity-img”
- # Name of the initramfs image for dm-verity handling
- INITRAMFS_IMAGE = “dm-verity-image-initramfs”
- # Initramfs is stored as a separate artifact in the image
- INITRAMFS_IMAGE_BUNDLE = “0”
- # Store FIT image with initramfs in boot partition
- IMAGE_BOOT_FILES:append = ” fitImage-${INITRAMFS_IMAGE}-${MACHINE}-
- ${MACHINE};fitImage” # Image to be protected with dm-verity
- # Alternative: tq-image-weston-debug
- DM_VERITY_IMAGE = “tq-image-generic-debug”
- # Type oft he above image
- DM_VERITY_IMAGE_TYPE = “ext4”
သတိပြုရန်- The exact options may change in future versions of the BSP. The latest information can be found in the BSP layer documentation (https://github.com/tq-systems/meta-tq) under meta-tq/doc.
ပုံအပြည့်အစုံကို bitbake tq-image-generic-debug ဖြင့် ဖန်တီးထားပြီး ဥပမာအားဖြင့် SD ကတ်သို့ စာရေးနိုင်သည်။ampလဲ့
စိစစ်ခြင်း။
In Linux, mount -a can be used to check if the Verity Devicemapper is mounted as the root fileစနစ်-
- # တောင်
- …
- /dev/mapper/rootfs on / type ext4 (ro,relatime)
- …
- ထို့အပြင် root တစ်ခုလုံး file ဤကိစ္စတွင် စနစ်သည် ဖတ်ရန်သာဖြစ်သည်-
- # touch test
- touch: cannot touch ‘test’: Read-only file စနစ်
အတုအယောင်အတွက်၊ အမြစ် file system can be modified offline and the device rebooted. The modification causes a different root hash and the boot process is aborted: device-mapper: verity: 179:98: data block 1 is corrupted
More information about the TQMa93xx can be found in the TQ Support Wiki: https://support.tq-group.com/en/arm/modules#nxp_imx_9_series
TQ-Systems GmbH
Mühlstraße 2 l Gut Delling l 82229 Seefeld Info@TQ-Group | TQ-Group
အမေးများသောမေးခွန်းများ
မေး- How-to တွင်ဖော်ပြထားသော Fuses သတ်မှတ်ခြင်း၏ နောက်ပြန်လှည့်၍မရသော လုပ်ငန်းစဉ်ကို ပြောင်းပြန်လှန်ရန် ဖြစ်နိုင်ပါသလား။
A: No, setting Fuses is irreversible. It is recommended to use a development pattern.
မေး- Linux နှင့် U-Boot အတွက် လိုအပ်သောရင်းမြစ်များကို ဘယ်မှာရှာရမည်နည်း။
A- Linux-
Linux Repository
U-Boot- ဦးဘွတ်
Repository
စာရွက်စာတမ်းများ / အရင်းအမြစ်များ
![]() |
TQ TQMa93 Secure Boot [pdf] အသုံးပြုသူလမ်းညွှန် TQMa93xx၊ TQMa93 Secure Boot၊ Secure Boot၊ Boot |