我們也可以進入文件中,輸入以下命令查看 cmdline。
su
cat /proc/cmdline
cmdline 參數說明
storagemedia=emmc
androidboot.storagemedia=emmc
表示存儲介質使用的是 EMMC
androidboot.mode=normal
表示安卓系統的啟動方式是正常啟動方式。除了正常啟動方式,還有 charger
(電源充電)啟動模式。
androidboot.dtb_idx=0
androidboot.dtbo_idx=0
表示設置的是 dtb 和 dtbo 的索引值,表示在多個設備樹中用第幾個設備樹。
androidboot.verifiedbootstate=orange
官方解釋:
On Android, the boot loader must set the androidboot.verifiedbootstate parameter
on the kernel command-line to indicate the boot state. It shall use the following value:
green: If in LOCKED state and the key used for verification was not by the end user. yellow: If in LOCKED state and the key used for verification was setby the end user. orange: If in the UNLOCKED state
androidboot.serialno=67188a9846568f84
表示安卓序列號
androidboot.wificountrycode=CN
表示設置 wifi 的國家碼為 CN
androidboot.veritymode=enforcing
表示驗證固件的完整性
androidboot.slot_suffix= 表示用于 OTA 升級,選擇指定是從 a 啟動還是 b 啟動
androidboot.baseband=N/A
基帶是哪一個,rk 沒有這個功能。
console=ttyFIQ0
定義串口
androidboot.hardware=rk30board
表示啟動設備的名字
firmware_class.path=/vendor/etc/firmware
指定驅動放置的位置,一些不開源的驅動,如 wifi、bt、gpu 等
init=/init
祖先進程的權限和位置
rootwait ro
用于文件系統不能立即可用的情況,例如 emmc 初始化未完成,這個時候如
果不設置 root_wait 的話,就會 mount rootfs failed,而加上這個參數的話,則可以等
待 driver 加載完成后,在從存儲設備中 copy 出 rootfs,再 mount 的話,就不會提
示失敗了。ro:加載 rootfs 的屬性,只讀/讀寫
loop.max_part=7
用來設定每個 loop 的設備所能支持的分區數目
androidboot.selinux=permissive
有三種模式:
enforcing :強制模式
permissive :寬容模式,這種模式可以用來作為 selinux 的 debug 之用。
disabled: 關閉 selinux
buildvariant=userdebug
earlycon=uart8250,mmio32,0xfe660000
在串口節點未建立之前,指定串口及其配置
androidboot.boot_devices=fe310000.sdhci,fe330000.nandc
表示 emmc 和 nand 的基地址