在最开始的时候,树莓派是只支持MBR分区表的,直到Android官方提供了AndroidThings系统,通过分析这个系统镜像文件,才知道其实GPT分区表也是可以支持的:
- 分区表
之前,我们也通过gdisk命令分析了Android官方提供的AndroidThings镜像文件的分区表信息,同时我们可以通过相关的命令将各分区的文件dump出来分析。
最新的开机流程文档:
https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/bootmodes/bootflow.md
It is no longer necessary for the first partition to be the FAT partition, as the MSD boot will continue to search for a FAT partition beyond the first one.
The boot ROM also now supports GUID partitioning and has been tested with hard drives partitioned using Mac, Windows, and Linux.
可以看到最新的硬件版本:
- 已经不再要求SD/TF卡的第一个分区为FAT分区,但必须要有一个分区是FAT分区并且存放这些开机引导文件
- 支持GPT分区表
#! /bin/bash SGDISK=sgdisk GDISK=gdisk DD=dd if [ "${1}x" = "x" ] ; then echo "Please specify target file or device name" exit 1 fi target=${1} # ----------------------------------------------------------------------------------- SIZE_RPIBOOT=64M SIZE_UBOOT=1024K SIZE_BOOT=32M SIZE_SYSTEM=650M SIZE_VBMETA=64K SIZE_MISC=1024K SIZE_VENDOR=256M SIZE_OEM_BOOTLOADER=4M SIZE_FRP=2M SIZE_SWAP=384M SIZE_USERDATA=1G # ----------------------------------------------------------------------------------- SECTOR_SIZE=512 SECTOR_START=40 PART_INDEX=1 SG_PARAM="--set-alignment=1" SG_PARAM="${SG_PARAM} $(cat << EOF | while read line PART: 314F99D5-B2BF-4883-8D03-E2F2CE507D6A rpiboot ${SIZE_RPIBOOT} PART: 314F99D5-B2BF-4883-8D03-E2F2CE507D6A uboot_a ${SIZE_UBOOT} PART: 314F99D5-B2BF-4883-8D03-E2F2CE507D6A uboot_b ${SIZE_UBOOT} PART: BB499290-B57E-49F6-BF41-190386693794 boot_a ${SIZE_BOOT} PART: BB499290-B57E-49F6-BF41-190386693794 boot_b ${SIZE_BOOT} PART: 0F2778C4-5CC1-4300-8670-6C88B7E57ED6 system_a ${SIZE_SYSTEM} PART: 0F2778C4-5CC1-4300-8670-6C88B7E57ED6 system_b ${SIZE_SYSTEM} PART: B598858A-5FE3-418E-B8C4-824B41F4ADFC vbmeta_a ${SIZE_VBMETA} PART: B598858A-5FE3-418E-B8C4-824B41F4ADFC vbmeta_b ${SIZE_VBMETA} PART: 6B2378B0-0FBC-4AA9-A4F6-4D6E17281C47 misc ${SIZE_MISC} PART: 314F99D5-B2BF-4883-8D03-E2F2CE507D6A vendor_a ${SIZE_VENDOR} PART: 314F99D5-B2BF-4883-8D03-E2F2CE507D6A vendor_b ${SIZE_VENDOR} PART: AA3434B2-DDC3-4065-8B1A-18E99EA15CB7 oem_bootloader_a ${SIZE_OEM_BOOTLOADER} PART: AA3434B2-DDC3-4065-8B1A-18E99EA15CB7 oem_bootloader_b ${SIZE_OEM_BOOTLOADER} PART: AA3434B2-DDC3-4065-8B1A-18E99EA15CB7 frp ${SIZE_FRP} PART: AA3434B2-DDC3-4065-8B1A-18E99EA15CB7 swap ${SIZE_SWAP} PART: 0BB7E6ED-4424-49C0-9372-7FBAB465AB4C userdata ${SIZE_USERDATA} EOF do ARRAY=(${line}) uuid=${ARRAY[1]} label=${ARRAY[2]} size=${ARRAY[3]} if [ "${size}x" = "x" ] ; then echo "ERROR size @ ${line}" exit 1 elif [[ ${size} =~ [0-9]+G$ ]] ; then real_size=$((`echo ${size} | sed 's/G$//'` * 1024 * 1024 * 1024)) elif [[ ${size} =~ [0-9]+M$ ]] ; then real_size=$((`echo ${size} | sed 's/M$//'` * 1024 * 1024)) elif [[ ${size} =~ [0-9]+K$ ]] ; then real_size=$((`echo ${size} | sed 's/K$//'` * 1024)) elif [[ ${size} =~ [0-9]+$ ]] ; then real_size=$((${size})) else echo "ERROR @ ${line}" exit 2 fi sector_end=$((${SECTOR_START} + ${real_size} / ${SECTOR_SIZE})) echo " --new=${PART_INDEX}:${SECTOR_START}:$((${sector_end} - 1))" echo " --typecode=${PART_INDEX}:${uuid}" echo " --change-name=${PART_INDEX}:${label}" PART_INDEX=$((${PART_INDEX} + 1)) SECTOR_START=${sector_end} done)" echo " => Destroy partition table ..." ${SGDISK} --zap-all ${target} echo " => Install GPT partition table ..." ${SGDISK} ${SG_PARAM} ${target} 2>&1 > /dev/null echo " => Install hybrid MBR partition table ..." ${GDISK} << EOF ${target} 2>&1 > /dev/null r h 1 N 06 N N w Y EOF # -------------------------------------------------------------------------------------------------- echo " => Install images ...." DINFO="`${SGDISK} --print ${target}`" echo "${DINFO}" | tail -n +10 | while read line do ARRAY=(${line}) start=${ARRAY[1]} end=${ARRAY[2]} end=${ARRAY[2]} label=${ARRAY[6]} file=images/${label}.img if [ -f ${file} ] ; then echo " => Install: ${label} images ..." sector_count=$((${end} - ${start} + 1)) part_size=$((${sector_count} * ${SECTOR_SIZE})) file_size=`stat -c %s ${file}` if [ ${file_size} -gt ${part_size} ] ; then echo "Can not install image: ${label}, file size: ${file_size}, partition size: ${part_size}" continue fi ${DD} if=${file} of=${target} conv=notrunc bs=${SECTOR_SIZE} count=$((${end} - ${start} + 1)) seek=${start} fi done # -------------------------------------------------------------------------------------------------- echo -e "\n\n\n => Verify images ...." echo "${DINFO}" echo "${DINFO}" | tail -n +10 | while read line do ARRAY=(${line}) num=${ARRAY[0]} start=${ARRAY[1]} end=${ARRAY[2]} label=${ARRAY[6]} guid=`${SGDISK} --info ${num} ${target} | head -n 1 | sed 's/.*: \([0-9A-Z-]\+\).*/\1/g'` uuid=`${SGDISK} --info ${num} ${target} | head -n 2 | tail -n 1 | sed 's/.*: \([0-9A-Z-]\+\).*/\1/g'` echo "PART: ${guid} ${uuid} ${label}" done
这个脚本用于我们创建分区表及将生成的Android 9 Pie系统镜像写入到最终生成的整个磁盘文件中。
- 开启bootcode相关的log信息
请先看下面一段话(来自
https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/bootmodes/README.md):
bootcode.bin UART enable
It is possible to enable an early stage UART to debug booting issues (useful with the above bootcode.bin only boot mode). To do this, make sure you’ve got a recent version of the firmware (including bootcode.bin). To check if UART is supported in your current firmware:
$ strings bootcode.bin | grep BOOT_UART BOOT_UART=0
To enable UART from bootcode.bin use:
sed -i -e "s/BOOT_UART=0/BOOT_UART=1/" bootcode.bin
Next, connect a suitable USB serial cable to your host computer (a Raspberry Pi will work, although I find the easiest path is to use a USB serial cable since it’ll work out the box without any pesky config.txt settings). Use the standard pins 6, 8 and 10 (GND, GPIO14, GPIO15) on a Pi or CM board.
Then use
screen
on linux or a Mac orputty
on windows to connect to the serial.Setup your serial to receive at 115200-8-N-1, and then boot your Pi / Compute module. You should get an immediate serial output from the device as bootcode.bin runs.
按照这个文档的说明,我们就可以看到bootcode运行时的log信息,类似如下:
Raspberry Pi Bootcode Found SD card, config.txt = 1, start.elf = 1, recovery.elf = 0, timeout = 0 Read File: config.txt, 1288 (bytes) Raspberry Pi Bootcode Read File: config.txt, 1288 Read File: start_x.elf, 4047876 (bytes) Read File: fixup_x.dat, 9889 (bytes) MESS:00:00:01.074021:0: brfs: File read: /mfs/sd/config.txt MESS:00:00:01.078777:0: brfs: File read: 1288 bytes MESS:00:00:01.103918:0: HDMI:EDID version 1.3, 1 extensions, screen size 82x46 cm MESS:00:00:01.109745:0: HDMI:EDID features - videodef 0x81 !standby !suspend !active off; colour encoding:RGB444|YCbCr422; sRGB is not default colourspace; preferred format is native; support GTF MESS:00:00:01.126863:0: HDMI:EDID found preferred DMT detail timing format: 1360x768p @ 60 Hz (39) MESS:00:00:01.135516:0: HDMI:EDID found DMT detail timing format: 1280x768p @ 60 Hz (23) MESS:00:00:01.143316:0: HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II MESS:00:00:01.152428:0: HDMI:EDID found DMT format: code 5, 640x480p @ 72 Hz in established timing I/II MESS:00:00:01.161543:0: HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II MESS:00:00:01.170657:0: HDMI:EDID found DMT format: code 10, 800x600p @ 72 Hz in established timing I/II MESS:00:00:01.179858:0: HDMI:EDID found DMT format: code 11, 800x600p @ 75 Hz in established timing I/II MESS:00:00:01.189061:0: HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II MESS:00:00:01.198349:0: HDMI:EDID found DMT format: code 17, 1024x768p @ 70 Hz in established timing I/II MESS:00:00:01.207637:0: HDMI:EDID found DMT format: code 18, 1024x768p @ 75 Hz in established timing I/II MESS:00:00:01.216928:0: HDMI:EDID found DMT format: code 36, 1280x1024p @ 75 Hz in established timing I/II MESS:00:00:01.226346:0: HDMI:EDID standard timings block x 8: 0x9500 B300 81C0 8100 8140 8180 A940 D1C0 MESS:00:00:01.235517:0: HDMI:EDID found DMT format: code 47, 1440x900p @ 60 Hz (16:10) in standard timing 0 MESS:00:00:01.244978:0: HDMI:EDID found DMT format: code 58, 1680x1050p @ 60 Hz (16:10) in standard timing 1 MESS:00:00:01.254531:0: HDMI:EDID found DMT format: code 85, 1280x720p @ 60 Hz (16:9) in standard timing 2 MESS:00:00:01.263899:0: HDMI:EDID found DMT format: code 28, 1280x800p @ 60 Hz (16:10) in standard timing 3 MESS:00:00:01.273361:0: HDMI:EDID found DMT format: code 32, 1280x960p @ 60 Hz (4:3) in standard timing 4 MESS:00:00:01.282649:0: HDMI:EDID found DMT format: code 35, 1280x1024p @ 60 Hz (5:4) in standard timing 5 MESS:00:00:01.292025:0: HDMI:EDID found DMT format: code 51, 1600x1200p @ 60 Hz (4:3) in standard timing 6 MESS:00:00:01.301403:0: HDMI:EDID found DMT format: code 82, 1920x1080p @ 60 Hz (16:9) in standard timing 7 MESS:00:00:01.323818:0: HDMI:EDID parsing v3 CEA extension 0 MESS:00:00:01.327794:0: HDMI:EDID monitor support - underscan IT formats:yes, basic audio:yes, yuv444:yes, yuv422:yes, #native DTD:1 MESS:00:00:01.339472:0: HDMI:EDID found unknown detail timing format: 1280x2940i hfp:110 hs:40 hbp:220 vfp:5 vs:5 vbp:21 pixel clock:148 MHz MESS:00:00:01.351795:0: HDMI:EDID found unknown detail timing format: 1280x2940i hfp:440 hs:40 hbp:220 vfp:5 vs:5 vbp:21 pixel clock:148 MHz MESS:00:00:01.364125:0: HDMI:EDID found unknown detail timing format: 1920x2205p hfp:638 hs:44 hbp:148 vfp:4 vs:5 vbp:36 pixel clock:148 MHz MESS:00:00:01.376408:0: HDMI:EDID found CEA detail timing format: 1280x720p @ 60 Hz (4) MESS:00:00:01.384126:0: HDMI:EDID found CEA format: code 5, 1920x1080i @ 60Hz MESS:00:00:01.391069:0: HDMI:EDID found CEA format: code 2, 720x480p @ 60Hz MESS:00:00:01.397839:0: HDMI:EDID found CEA format: code 3, 720x480p @ 60Hz MESS:00:00:01.404611:0: HDMI:EDID found CEA format: code 4, 1280x720p @ 60Hz MESS:00:00:01.411469:0: HDMI:EDID found CEA format: code 7, 1440x480i @ 60Hz MESS:00:00:01.418327:0: HDMI:EDID found CEA format: code 16, 1920x1080p @ 60Hz MESS:00:00:01.425357:0: HDMI:EDID found CEA format: code 17, 720x576p @ 50Hz MESS:00:00:01.432215:0: HDMI:EDID found CEA format: code 18, 720x576p @ 50Hz MESS:00:00:01.439073:0: HDMI:EDID found CEA format: code 19, 1280x720p @ 50Hz MESS:00:00:01.446018:0: HDMI:EDID found CEA format: code 20, 1920x1080i @ 50Hz MESS:00:00:01.453049:0: HDMI:EDID found CEA format: code 21, 1440x576i @ 50Hz MESS:00:00:01.459993:0: HDMI:EDID found CEA format: code 22, 1440x576i @ 50Hz MESS:00:00:01.466938:0: HDMI:EDID found CEA format: code 31, 1920x1080p @ 50Hz MESS:00:00:01.473997:0: HDMI:EDID found audio format 2 channels PCM, sample rate: 32|44|48|96|192 kHz, sample size: 16|20|24 bits MESS:00:00:01.485326:0: HDMI:EDID found HDMI VSDB length 16 MESS:00:00:01.490628:0: HDMI:EDID HDMI VSDB has physical address 1.0.0.0 MESS:00:00:01.497047:0: HDMI:EDID HDMI VSDB supports AI:yes, dual link DVI:no MESS:00:00:01.503914:0: HDMI:EDID HDMI VSDB deep colour support - 48-bit:no 36-bit:yes 30-bit:yes DC_yuv444:yes MESS:00:00:01.513712:0: HDMI:EDID HDMI VSDB max TMDS clock 225 MHz MESS:00:00:01.519613:0: HDMI:EDID HDMI VSDB does not support content type MESS:00:00:01.526127:0: HDMI:EDID HDMI VSDB supports 3D formats MESS:00:00:01.531767:0: HDMI:EDID HDMI VSDB 3D_Mask: 0x0000 MESS:00:00:01.537062:0: HDMI:EDID HDMI VSDB 3D_Structure_All: 0x0109 MESS:00:00:01.543157:0: HDMI:EDID HDMI VSDB explicit 3D mode: 2D VIC order 0 (CEA 5), 3D struct 0x00, 3D detail 0x00 MESS:00:00:01.553400:0: HDMI:EDID HDMI VSDB explicit 3D mode: 2D VIC order 0 (CEA 5), 3D struct 0x00, 3D detail 0x00 MESS:00:00:01.563665:0: HDMI:EDID CEA (32) 1920x1080p 24Hz 3D supports: FP|TopBot MESS:00:00:01.570853:0: HDMI:EDID CEA (4) 1280x720p 60Hz 3D supports: FP|TopBot MESS:00:00:01.577884:0: HDMI:EDID CEA (5) 1920x1080i 60Hz 3D supports: FP|SbS-HH MESS:00:00:01.585002:0: HDMI:EDID CEA (19) 1280x720p 50Hz 3D supports: FP|TopBot MESS:00:00:01.592118:0: HDMI:EDID CEA (20) 1920x1080i 50Hz 3D supports: SbS-HH MESS:00:00:01.599059:0: HDMI:EDID CEA (2) 720x480p 60Hz 3D supports: none MESS:00:00:01.605569:0: HDMI:EDID CEA (3) 720x480p 60Hz 3D supports: none MESS:00:00:01.612081:0: HDMI:EDID CEA (7) 1440x480i 60Hz 3D supports: none MESS:00:00:01.618678:0: HDMI:EDID CEA (16) 1920x1080p 60Hz 3D supports: none MESS:00:00:01.625448:0: HDMI:EDID CEA (17) 720x576p 50Hz 3D supports: none MESS:00:00:01.632046:0: HDMI:EDID CEA (18) 720x576p 50Hz 3D supports: none MESS:00:00:01.638644:0: HDMI:EDID CEA (21) 1440x576i 50Hz 3D supports: none MESS:00:00:01.645328:0: HDMI:EDID CEA (22) 1440x576i 50Hz 3D supports: none MESS:00:00:01.652012:0: HDMI:EDID CEA (31) 1920x1080p 50Hz 3D supports: none MESS:00:00:01.658781:0: HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023 MESS:00:00:01.667849:0: HDMI:EDID preferred mode remained as DMT (39) 1360x768p @ 60 Hz with pixel clock 85 MHz MESS:00:00:01.692620:0: brfs: File read: /mfs/sd/config.txt MESS:00:00:01.697255:0: HDMI:Setting property pixel encoding to Default MESS:00:00:01.702833:0: HDMI:Setting property pixel clock type to PAL MESS:00:00:01.708995:0: HDMI:Setting property content type flag to No data MESS:00:00:01.715593:0: HDMI:Setting property fuzzy format match to enabled MESS:00:00:01.941696:0: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined MESS:00:00:01.949185:0: hdmi: HDMI:>>>>>>>>>>>>>Rx sensed, reading EDID<<<<<<<<<<<<< MESS:00:00:01.967418:0: hdmi: HDMI:EDID version 1.3, 1 extensions, screen size 82x46 cm MESS:00:00:01.973767:0: hdmi: HDMI:EDID features - videodef 0x81 !standby !suspend !active off; colour encoding:RGB444|YCbCr422; sRGB is not default colourspace; preferred format is native; support GTF MESS:00:00:01.991406:0: hdmi: HDMI:EDID found preferred DMT detail timing format: 1360x768p @ 60 Hz (39) MESS:00:00:02.000578:0: hdmi: HDMI:EDID found DMT detail timing format: 1280x768p @ 60 Hz (23) MESS:00:00:02.008900:0: hdmi: HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II MESS:00:00:02.018532:0: hdmi: HDMI:EDID found DMT format: code 5, 640x480p @ 72 Hz in established timing I/II MESS:00:00:02.028168:0: hdmi: HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II MESS:00:00:02.037803:0: hdmi: HDMI:EDID found DMT format: code 10, 800x600p @ 72 Hz in established timing I/II MESS:00:00:02.047525:0: hdmi: HDMI:EDID found DMT format: code 11, 800x600p @ 75 Hz in established timing I/II MESS:00:00:02.057249:0: hdmi: HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II MESS:00:00:02.067057:0: hdmi: HDMI:EDID found DMT format: code 17, 1024x768p @ 70 Hz in established timing I/II MESS:00:00:02.076866:0: hdmi: HDMI:EDID found DMT format: code 18, 1024x768p @ 75 Hz in established timing I/II MESS:00:00:02.086678:0: hdmi: HDMI:EDID found DMT format: code 36, 1280x1024p @ 75 Hz in established timing I/II MESS:00:00:02.096619:0: hdmi: HDMI:EDID standard timings block x 8: 0x9500 B300 81C0 8100 8140 8180 A940 D1C0 MESS:00:00:02.106308:0: hdmi: HDMI:EDID found DMT format: code 47, 1440x900p @ 60 Hz (16:10) in standard timing 0 MESS:00:00:02.116291:0: hdmi: HDMI:EDID found DMT format: code 58, 1680x1050p @ 60 Hz (16:10) in standard timing 1 MESS:00:00:02.126364:0: hdmi: HDMI:EDID found DMT format: code 85, 1280x720p @ 60 Hz (16:9) in standard timing 2 MESS:00:00:02.136253:0: hdmi: HDMI:EDID found DMT format: code 28, 1280x800p @ 60 Hz (16:10) in standard timing 3 MESS:00:00:02.146235:0: hdmi: HDMI:EDID found DMT format: code 32, 1280x960p @ 60 Hz (4:3) in standard timing 4 MESS:00:00:02.156045:0: hdmi: HDMI:EDID found DMT format: code 35, 1280x1024p @ 60 Hz (5:4) in standard timing 5 MESS:00:00:02.165941:0: hdmi: HDMI:EDID found DMT format: code 51, 1600x1200p @ 60 Hz (4:3) in standard timing 6 MESS:00:00:02.175841:0: hdmi: HDMI:EDID found DMT format: code 82, 1920x1080p @ 60 Hz (16:9) in standard timing 7 MESS:00:00:02.198776:0: hdmi: HDMI:EDID parsing v3 CEA extension 0 MESS:00:00:02.203274:0: hdmi: HDMI:EDID monitor support - underscan IT formats:yes, basic audio:yes, yuv444:yes, yuv422:yes, #native DTD:1 MESS:00:00:02.215475:0: hdmi: HDMI:EDID failed to find a matching detail format for 1280x2940i hfp:110 hs:40 hbp:220 vfp:5 vs:5 vbp:21 pixel clock:148 MHz MESS:00:00:02.228948:0: hdmi: HDMI:EDID calculated refresh rate is 60 Hz MESS:00:00:02.235383:0: hdmi: HDMI:EDID guessing the format to be 1280x2940i @60 Hz MESS:00:00:02.242808:0: hdmi: HDMI:EDID found unknown detail timing format: 1280x2940i hfp:110 hs:40 hbp:220 vfp:5 vs:5 vbp:21 pixel clock:148 MHz MESS:00:00:02.255662:0: hdmi: HDMI:EDID failed to find a matching detail format for 1280x2940i hfp:440 hs:40 hbp:220 vfp:5 vs:5 vbp:21 pixel clock:148 MHz MESS:00:00:02.269139:0: hdmi: HDMI:EDID calculated refresh rate is 50 Hz MESS:00:00:02.275574:0: hdmi: HDMI:EDID guessing the format to be 1280x2940i @50 Hz MESS:00:00:02.282998:0: hdmi: HDMI:EDID found unknown detail timing format: 1280x2940i hfp:440 hs:40 hbp:220 vfp:5 vs:5 vbp:21 pixel clock:148 MHz MESS:00:00:02.295858:0: hdmi: HDMI:EDID failed to find a matching detail format for 1920x2205p hfp:638 hs:44 hbp:148 vfp:4 vs:5 vbp:36 pixel clock:148 MHz MESS:00:00:02.309331:0: hdmi: HDMI:EDID calculated refresh rate is 24 Hz MESS:00:00:02.315764:0: hdmi: HDMI:EDID guessing the format to be 1920x2205p @24 Hz MESS:00:00:02.323194:0: hdmi: HDMI:EDID found unknown detail timing format: 1920x2205p hfp:638 hs:44 hbp:148 vfp:4 vs:5 vbp:36 pixel clock:148 MHz MESS:00:00:02.336003:0: hdmi: HDMI:EDID found CEA detail timing format: 1280x720p @ 60 Hz (4) MESS:00:00:02.344243:0: hdmi: HDMI:EDID found CEA format: code 5, 1920x1080i @ 60Hz MESS:00:00:02.351706:0: hdmi: HDMI:EDID found CEA format: code 2, 720x480p @ 60Hz MESS:00:00:02.358997:0: hdmi: HDMI:EDID found CEA format: code 3, 720x480p @ 60Hz MESS:00:00:02.366289:0: hdmi: HDMI:EDID found CEA format: code 4, 1280x720p @ 60Hz MESS:00:00:02.373668:0: hdmi: HDMI:EDID found CEA format: code 7, 1440x480i @ 60Hz MESS:00:00:02.381047:0: hdmi: HDMI:EDID found CEA format: code 16, 1920x1080p @ 60Hz MESS:00:00:02.388598:0: hdmi: HDMI:EDID found CEA format: code 17, 720x576p @ 50Hz MESS:00:00:02.395978:0: hdmi: HDMI:EDID found CEA format: code 18, 720x576p @ 50Hz MESS:00:00:02.403356:0: hdmi: HDMI:EDID found CEA format: code 19, 1280x720p @ 50Hz MESS:00:00:02.410822:0: hdmi: HDMI:EDID found CEA format: code 20, 1920x1080i @ 50Hz MESS:00:00:02.418373:0: hdmi: HDMI:EDID found CEA format: code 21, 1440x576i @ 50Hz MESS:00:00:02.425838:0: hdmi: HDMI:EDID found CEA format: code 22, 1440x576i @ 50Hz MESS:00:00:02.433305:0: hdmi: HDMI:EDID found CEA format: code 31, 1920x1080p @ 50Hz MESS:00:00:02.440885:0: hdmi: HDMI:EDID found audio format 2 channels PCM, sample rate: 32|44|48|96|192 kHz, sample size: 16|20|24 bits MESS:00:00:02.452734:0: hdmi: HDMI:EDID found HDMI VSDB length 16 MESS:00:00:02.458557:0: hdmi: HDMI:EDID HDMI VSDB has physical address 1.0.0.0 MESS:00:00:02.465497:0: hdmi: HDMI:EDID HDMI VSDB supports AI:yes, dual link DVI:no MESS:00:00:02.472885:0: hdmi: HDMI:EDID HDMI VSDB deep colour support - 48-bit:no 36-bit:yes 30-bit:yes DC_yuv444:yes MESS:00:00:02.483203:0: hdmi: HDMI:EDID HDMI VSDB max TMDS clock 225 MHz MESS:00:00:02.489626:0: hdmi: HDMI:EDID HDMI VSDB does not support content type MESS:00:00:02.496660:0: hdmi: HDMI:EDID HDMI VSDB supports 3D formats MESS:00:00:02.502820:0: hdmi: HDMI:EDID HDMI VSDB 3D_Mask: 0x0000 MESS:00:00:02.508637:0: hdmi: HDMI:EDID HDMI VSDB 3D_Structure_All: 0x0109 MESS:00:00:02.515253:0: hdmi: HDMI:EDID HDMI VSDB explicit 3D mode: 2D VIC order 0 (CEA 5), 3D struct 0x00, 3D detail 0x00 MESS:00:00:02.526016:0: hdmi: HDMI:EDID HDMI VSDB explicit 3D mode: 2D VIC order 0 (CEA 5), 3D struct 0x00, 3D detail 0x00 MESS:00:00:02.536803:0: hdmi: HDMI:EDID CEA (32) 1920x1080p 24Hz 3D supports: FP|TopBot MESS:00:00:02.544511:0: hdmi: HDMI:EDID CEA (4) 1280x720p 60Hz 3D supports: FP|TopBot MESS:00:00:02.552063:0: hdmi: HDMI:EDID CEA (5) 1920x1080i 60Hz 3D supports: FP|SbS-HH MESS:00:00:02.559702:0: hdmi: HDMI:EDID CEA (19) 1280x720p 50Hz 3D supports: FP|TopBot MESS:00:00:02.567338:0: hdmi: HDMI:EDID CEA (20) 1920x1080i 50Hz 3D supports: SbS-HH MESS:00:00:02.574801:0: hdmi: HDMI:EDID CEA (2) 720x480p 60Hz 3D supports: none MESS:00:00:02.581831:0: hdmi: HDMI:EDID CEA (3) 720x480p 60Hz 3D supports: none MESS:00:00:02.588863:0: hdmi: HDMI:EDID CEA (7) 1440x480i 60Hz 3D supports: none MESS:00:00:02.595983:0: hdmi: HDMI:EDID CEA (16) 1920x1080p 60Hz 3D supports: none MESS:00:00:02.603273:0: hdmi: HDMI:EDID CEA (17) 720x576p 50Hz 3D supports: none MESS:00:00:02.610392:0: hdmi: HDMI:EDID CEA (18) 720x576p 50Hz 3D supports: none MESS:00:00:02.617510:0: hdmi: HDMI:EDID CEA (21) 1440x576i 50Hz 3D supports: none MESS:00:00:02.624715:0: hdmi: HDMI:EDID CEA (22) 1440x576i 50Hz 3D supports: none MESS:00:00:02.631920:0: hdmi: HDMI:EDID CEA (31) 1920x1080p 50Hz 3D supports: none MESS:00:00:02.639210:0: hdmi: HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023 MESS:00:00:02.648798:0: hdmi: HDMI:EDID preferred mode remained as DMT (39) 1360x768p @ 60 Hz with pixel clock 85 MHz MESS:00:00:02.658898:0: hdmi: HDMI: hotplug attached with HDMI support MESS:00:00:02.665162:0: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead MESS:00:00:02.676307:0: hdmi: HDMI: power_on to DMT mode 1360x768@60 MESS:00:00:02.684124:0: hdmi: HDMI: Action callback added to queue to happen at frame 2 MESS:00:00:02.690431:0: hdmi: HDMI: Action stop_3d_mode added to queue to happen at frame 2 MESS:00:00:02.698503:0: hdmi: HDMI: Action unmute added to queue to happen at frame 3 MESS:00:00:02.706060:0: hdmi: HDMI: Action cec_init added to queue to happen at frame 3 MESS:00:00:02.735043:0: *** Restart logging MESS:00:00:02.737529:0: brfs: File read: 1288 bytes MESS:00:00:02.743671:0: brfs: File read: /mfs/sd/cmdline.txt MESS:00:00:02.747685:0: Read command line from file 'cmdline.txt': MESS:00:00:02.753543:0: 'dwc_otg.lpm_enable=0 ro rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait earlyprintk init=/init androidboot.hardware=rpi3 androidboot.selinux=permissive skip_initramfs drm_kms_helper.edid_firmware=edid/1280x720.bin' MESS:00:00:02.775657:0: brfs: File read: 225 bytes MESS:00:00:02.813466:0: brfs: File read: /mfs/sd/u-boot-dtok.bin MESS:00:00:02.817775:0: Loading 'u-boot-dtok.bin' to 0x80000 size 0x77c24 MESS:00:00:02.828616:0: Kernel trailer DTOK property says yes MESS:00:00:02.832660:0: Kernel trailer DDTK property says yes MESS:00:00:02.838160:0: brfs: File read: 490532 bytes MESS:00:00:02.847096:0: brfs: File read: /mfs/sd/bcm2710-rpi-3-b-plus.dtb MESS:00:00:02.852185:0: Loading 'bcm2710-rpi-3-b-plus.dtb' to 0xf7c24 size 0x6416 MESS:00:00:03.007261:0: brfs: File read: 25622 bytes MESS:00:00:03.013029:0: brfs: File read: /mfs/sd/config.txt MESS:00:00:03.017039:0: dtparam: audio=on MESS:00:00:03.039992:0: brfs: File read: 1288 bytes MESS:00:00:03.044728:0: brfs: File read: /mfs/sd/overlays/chosen-serial0.dtbo MESS:00:00:03.050505:0: Loaded overlay 'chosen-serial0' MESS:00:00:03.058979:0: brfs: File read: 176 bytes MESS:00:00:03.063151:0: brfs: File read: /mfs/sd/overlays/rpi-uart-skip-init.dtbo MESS:00:00:03.083011:0: Loaded overlay 'rpi-uart-skip-init' MESS:00:00:03.108040:0: brfs: File read: 329 bytes MESS:00:00:03.112994:0: brfs: File read: /mfs/sd/overlays/sdtweak.dtbo MESS:00:00:03.128199:0: Loaded overlay 'sdtweak' MESS:00:00:03.131115:0: dtparam: overclock_50=84 MESS:00:00:03.147317:0: brfs: File read: 804 bytes MESS:00:00:03.152882:0: brfs: File read: /mfs/sd/overlays/vc4-kms-v3d.dtbo MESS:00:00:03.221000:0: Loaded overlay 'vc4-kms-v3d' MESS:00:00:03.224261:0: dtparam: cma-256=true MESS:00:00:03.370921:0: brfs: File read: 2367 bytes MESS:00:00:03.376004:0: brfs: File read: /mfs/sd/overlays/bcm2710-rpi-3-b-android-fstab.dtbo MESS:00:00:03.383794:0: Loaded overlay 'bcm2710-rpi-3-b-android-fstab' MESS:00:00:04.526517:0: gpioman: gpioman_get_pin_num: pin EMMC_ENABLE not defined MESS:00:00:04.653673:0: Device tree loaded to 0x2eff9400 (size 0x6b8c) MESS:00:00:04.659879:0: uart: Set PL011 baud rate to 103448.300000 Hz MESS:00:00:04.666212:0: uart: Baud rate change done... MESS:00:00:04.669642:0: uart: Baud rate U-Boot 2018.07-g99aaf7e-dirty (Nov 11 2018 - 21:16:37 +0800)
可以看到,这里面包含了读取TF卡中的相关文件信息,HDMI相关的初始化信息(树莓派通过一根HDMI线连接着电视机)
及通过config.txt中的信息生成device tree信息。
这些log信息对我们配置boot分区,编写config.txt及cmdline.txt文件时特别有用,可以少走很多弯路。
并且可以进一步熟悉整个系统的开机流程。
- 相关的参考文档
- https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/bootmodes/README.md