• Uboot


    目录

    ​编辑

    一、何为uboot?

    二、Uboot获取

    三、为什么要移植uboot?

    四、正点原子官方uboot编译

    1、编译UBOOT的时候需要先配置

    五、通过imxdownload软件烧录bin文件到sd卡


    一、何为uboot?

    1、uboot是一个裸机程序,比较复杂。

    2、uboot就是一个bootloader,作用就是用于启动Linux或其他系统。Uboot最主要的工作就是初始化DDR。因为Linux是运行在DDR里面的。一般Linux镜像zImage(uImage)+设备树(.dtb)存放在SD、EMMC、NAND、SPI FLASH等等外置存储区域。

           这里就牵扯到一个问题,需要将Linux镜像从外置flash拷贝到DDR中,再去启动

           Uboot的主要目的就是为系统的启动做准备。

           Uboot不仅仅能启动Linux,也可以启动其他系统,比如vxworks。

           Linux不仅仅能通过uboot启动。

           Uboot是个通用的bootloader,他支持多种架构。

    二、Uboot获取

           1、首先就是uboot官网。缺点就是支持少,比如某一款具体芯片驱动等不完善。

           2、SOC厂商会从uboot官网下载某一个版本的uboot,然后在这个版本的uboot上加入相应的SOC以及驱动。这就是SOC厂商定制版的uboot。NXP官方的I.MX6ULL EVK板子,

           3、做开发板的厂商,开发板会参考SOC厂商的板子。开发板必然会和官方的板子不一样。因此开发板厂商又会去修改SOC厂商做好的uboot,以适应自己的板子。

    1. U-Boot 2016.03-gee88051 (Nov 05 2021 - 17:59:02 +0800)//uboot的版本
    2. CPU: Freescale i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
    3. CPU: Industrial temperature grade (-40C to 105C) at 44C
    4. Reset cause: POR
    5. Board: I.MX6U ALPHA|MINI
    6. I2C: ready
    7. DRAM: 512 MiB
    8. MMC: FSL_SDHC: 0, FSL_SDHC: 1 //相关硬件配置信息
    9. *** Warning - bad CRC, using default environment
    10. In: serial
    11. Out: serial
    12. Err: serial
    13. switch to partitions #0, OK
    14. mmc1(part 0) is current device
    15. Net: FEC1
    16. Error: FEC1 address not set.
    17. Normal Boot
    18. Hit any key to stop autoboot: 0 //在倒计时的3s内按键盘上的任意键就会进入uboot模式
    19. switch to partitions #0, OK
    20. mmc1(part 0) is current device
    21. switch to partitions #0, OK
    22. mmc1(part 0) is current device
    23. reading boot.scr //读取boot.src
    24. ** Unable to read file boot.scr **
    25. reading zImage //读取镜像
    26. 6785568 bytes read in 225 ms (28.8 MiB/s)
    27. Booting from mmc ...
    28. reading imx6ull-14x14-emmc-7-1024x600-c.dtb //读取设备树
    29. 39299 bytes read in 20 ms (1.9 MiB/s)
    30. Kernel image @ 0x80800000 [ 0x000000 - 0x678a20 ]
    31. ## Flattened Device Tree blob at 83000000
    32. Booting using the fdt blob at 0x83000000
    33. Using Device Tree in place at 83000000, end 8300c982
    34. Starting kernel ... //开始启动内核
    35. [ 0.000000] Booting Linux on physical CPU 0x0
    36. [ 0.000000] Linux version 4.1.15-gb8dc0d4 (alientek@ubuntu) (gcc version 5.3.0 (GCC) ) #1 SMP PREEMPT Fri JulST 2022
    37. [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
    38. [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    39. [ 0.000000] Machine model: Freescale i.MX6 ULL 14x14 EVK Board
    40. [ 0.000000] Reserved memory: created CMA memory pool at 0x98000000, size 128 MiB
    41. [ 0.000000] Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
    42. [ 0.000000] Memory policy: Data cache writealloc
    43. [ 0.000000] PERCPU: Embedded 12 pages/cpu @97b8f000 s16780 r8192 d24180 u49152
    44. [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
    45. [ 0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw
    46. [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    47. [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    48. [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    49. [ 0.000000] Memory: 375264K/524288K available (8552K kernel code, 449K rwdata, 2964K rodata, 528K init, 452K served, 131072K cma-reserved, 0K highmem)
    50. [ 0.000000] Virtual kernel memory layout:
    51. [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    52. [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    53. [ 0.000000] vmalloc : 0xa0800000 - 0xff000000 (1512 MB)
    54. [ 0.000000] lowmem : 0x80000000 - 0xa0000000 ( 512 MB)
    55. [ 0.000000] pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
    56. [ 0.000000] modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
    57. [ 0.000000] .text : 0x80008000 - 0x80b47284 (11517 kB)
    58. [ 0.000000] .init : 0x80b48000 - 0x80bcc000 ( 528 kB)
    59. [ 0.000000] .data : 0x80bcc000 - 0x80c3c7e0 ( 450 kB)
    60. [ 0.000000] .bss : 0x80c3f000 - 0x80cb00c4 ( 453 kB)
    61. [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    62. [ 0.000000] Preemptible hierarchical RCU implementation.
    63. [ 0.000000] Additional per-CPU info printed with stalls.
    64. [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
    65. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
    66. [ 0.000000] NR_IRQS:16 nr_irqs:16 16
    67. [ 0.000000] mxc_clocksource_init 3000000
    68. [ 0.000000] Switching to timer-based delay loop, resolution 333ns
    69. [ 0.000015] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
    70. [ 0.000057] clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
    71. [ 0.002910] Console: colour dummy device 80x30
    72. [ 0.002951] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=300
    73. [ 0.002985] pid_max: default: 32768 minimum: 301
    74. [ 0.003213] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    75. [ 0.003246] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    76. [ 0.004624] CPU: Testing write buffer coherency: ok
    77. [ 0.005114] /cpus/cpu@0 missing clock-frequency property
    78. [ 0.005155] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    79. [ 0.005263] Setting up static identity map for 0x80008280 - 0x800082d8
    80. [ 0.041180] Brought up 1 CPUs
    81. [ 0.041218] SMP: Total of 1 processors activated (6.00 BogoMIPS).
    82. [ 0.041237] CPU: All CPU(s) started in SVC mode.
    83. [ 0.042352] devtmpfs: initialized
    84. [ 0.059425] device-tree: Duplicate name in lcdif@021c8000, renamed to "display#1"
    85. [ 0.066063] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
    86. [ 0.066987] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    87. [ 0.077046] pinctrl core: initialized pinctrl subsystem
    88. [ 0.079778] NET: Registered protocol family 16
    89. [ 0.097565] DMA: preallocated 256 KiB pool for atomic coherent allocations
    90. [ 0.121496] cpuidle: using governor ladder
    91. [ 0.151559] cpuidle: using governor menu
    92. [ 0.202225] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    93. [ 0.202261] hw-breakpoint: maximum watchpoint size is 8 bytes.
    94. [ 0.206734] imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
    95. [ 0.207554] imx6ul-pinctrl 2290000.iomuxc-snvs: initialized IMX pinctrl driver
    96. [ 0.279429] mxs-dma 1804000.dma-apbh: initialized
    97. [ 0.286624] SCSI subsystem initialized
    98. [ 0.287970] usbcore: registered new interface driver usbfs
    99. [ 0.288170] usbcore: registered new interface driver hub
    100. [ 0.288386] usbcore: registered new device driver usb
    101. [ 0.291053] i2c i2c-0: IMX I2C adapter registered
    102. [ 0.291102] i2c i2c-0: can't use DMA
    103. [ 0.293473] i2c i2c-1: IMX I2C adapter registered
    104. [ 0.293521] i2c i2c-1: can't use DMA
    105. [ 0.293864] Linux video capture interface: v2.00
    106. [ 0.294069] pps_core: LinuxPPS API ver. 1 registered
    107. [ 0.294093] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti
    108. [ 0.294170] PTP clock support registered
    109. [ 0.297194] MIPI CSI2 driver module loaded
    110. [ 0.297907] Advanced Linux Sound Architecture Driver Initialized.
    111. [ 0.300138] Bluetooth: Core ver 2.20
    112. [ 0.300268] NET: Registered protocol family 31
    113. [ 0.300293] Bluetooth: HCI device and connection manager initialized
    114. [ 0.300334] Bluetooth: HCI socket layer initialized
    115. [ 0.300369] Bluetooth: L2CAP socket layer initialized
    116. [ 0.300451] Bluetooth: SCO socket layer initialized
    117. [ 0.303124] Switched to clocksource mxc_timer1
    118. [ 0.330145] NET: Registered protocol family 2
    119. [ 0.331747] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    120. [ 0.331881] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
    121. [ 0.332041] TCP: Hash tables configured (established 4096 bind 4096)
    122. [ 0.332179] UDP hash table entries: 256 (order: 1, 8192 bytes)
    123. [ 0.332242] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
    124. [ 0.332670] NET: Registered protocol family 1
    125. [ 0.333514] RPC: Registered named UNIX socket transport module.
    126. [ 0.333547] RPC: Registered udp transport module.
    127. [ 0.333567] RPC: Registered tcp transport module.
    128. [ 0.333587] RPC: Registered tcp NFSv4.1 backchannel transport module.
    129. [ 0.337087] imx rpmsg driver is registered.
    130. [ 0.339953] Bus freq driver module loaded
    131. [ 0.342168] futex hash table entries: 256 (order: 2, 16384 bytes)
    132. [ 0.359310] VFS: Disk quotas dquot_6.6.0
    133. [ 0.359824] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    134. [ 0.365608] NFS: Registering the id_resolver key type
    135. [ 0.365754] Key type id_resolver registered
    136. [ 0.365776] Key type id_legacy registered
    137. [ 0.365993] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
    138. [ 0.367921] fuse init (API version 7.23)
    139. [ 0.379023] io scheduler noop registered
    140. [ 0.379073] io scheduler deadline registered
    141. [ 0.379583] io scheduler cfq registered (default)
    142. [ 0.380735] imx-weim 21b8000.weim: Driver registered.
    143. [ 0.387620] backlight supply power not found, using dummy regulator
    144. [ 0.388940] MIPI DSI driver module loaded
    145. [ 0.389464] MIPI DSI driver module loaded
    146. [ 0.395694] 21c8000.lcdif supply lcd not found, using dummy regulator
    147. [ 0.503633] mxsfb 21c8000.lcdif: failed to find mxc display driver
    148. [ 0.518048] Console: switching to colour frame buffer device 128x37
    149. [ 0.554389] mxsfb 21c8000.lcdif: initialized
    150. [ 0.556513] imx-sdma 20ec000.sdma: no event needs to be remapped
    151. [ 0.556730] imx-sdma 20ec000.sdma: loaded firmware 3.3
    152. [ 0.564200] imx-sdma 20ec000.sdma: initialized
    153. [ 0.566479] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 19, base_baud = 5000000) is a IMX
    154. [ 1.254651] console [ttymxc0] enabled
    155. [ 1.260311] 21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 233, base_baud = 5000000) is a IMX
    156. [ 1.358946] imx-rng 2284000.rngb: iMX RNG Registered.
    157. [ 1.364834] imx sema4 driver is registered.
    158. [ 1.369216] [drm] Initialized drm 1.1.0 20060810
    159. [ 1.375259] [drm] Initialized vivante 1.0.0 20120216 on minor 0
    160. [ 1.407140] brd: module loaded
    161. [ 1.423336] loop: module loaded
    162. [ 1.431955] fsl-quadspi 21e0000.qspi: unrecognized JEDEC id bytes: ff, ff, ff
    163. [ 1.439334] fsl-quadspi 21e0000.qspi: Freescale QuadSPI probe failed
    164. [ 1.451945] spi_imx 2010000.ecspi: probed
    165. [ 1.458933] CAN device driver interface
    166. [ 1.466008] flexcan 2090000.can: device registered (reg_base=a0a08000, irq=26)
    167. [ 1.475703] 20b4000.ethernet supply phy not found, using dummy regulator
    168. [ 1.684329] pps pps0: new PPS source ptp0
    169. [ 1.689949] fec 20b4000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
    170. [ 1.700091] fec 20b4000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 5e:a8:0d:76:
    171. [ 1.711455] libphy: fec_enet_mii_bus: probed
    172. [ 1.719950] fec 20b4000.ethernet eth0: registered PHC device 0
    173. [ 1.727748] 2188000.ethernet supply phy not found, using dummy regulator
    174. [ 1.944205] pps pps1: new PPS source ptp1
    175. [ 1.949757] fec 2188000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
    176. [ 1.959893] fec 2188000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: d2:79:f3:dd:
    177. [ 1.972484] fec 2188000.ethernet eth1: registered PHC device 1
    178. [ 1.980204] PPP generic driver version 2.4.2
    179. [ 1.985209] PPP BSD Compression module registered
    180. [ 1.989969] PPP Deflate Compression module registered
    181. [ 1.995173] PPP MPPE Compression module registered
    182. [ 2.000025] NET: Registered protocol family 24
    183. [ 2.004823] usbcore: registered new interface driver asix
    184. [ 2.010415] usbcore: registered new interface driver ax88179_178a
    185. [ 2.016787] usbcore: registered new interface driver cdc_ether
    186. [ 2.022807] usbcore: registered new interface driver net1080
    187. [ 2.028704] usbcore: registered new interface driver cdc_subset
    188. [ 2.034836] usbcore: registered new interface driver zaurus
    189. [ 2.040689] usbcore: registered new interface driver cdc_ncm
    190. [ 2.046553] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    191. [ 2.053180] ehci-mxc: Freescale On-Chip EHCI Host driver
    192. [ 2.059037] usbcore: registered new interface driver usb-storage
    193. [ 2.065319] usbcore: registered new interface driver usb_ehset_test
    194. [ 2.074550] 2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
    195. [ 2.083914] 2184000.usb supply vbus not found, using dummy regulator
    196. [ 2.096030] ci_hdrc ci_hdrc.0: EHCI Host Controller
    197. [ 2.100992] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
    198. [ 2.123260] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
    199. [ 2.130840] hub 1-0:1.0: USB hub found
    200. [ 2.134934] hub 1-0:1.0: 1 port detected
    201. [ 2.140799] 2184200.usb supply vbus not found, using dummy regulator
    202. [ 2.151259] ci_hdrc ci_hdrc.1: EHCI Host Controller
    203. [ 2.156392] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 2
    204. [ 2.183275] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
    205. [ 2.190944] hub 2-0:1.0: USB hub found
    206. [ 2.194998] hub 2-0:1.0: 1 port detected
    207. [ 2.201672] mousedev: PS/2 mouse device common for all mice
    208. [ 2.209404] input: 20cc000.snvs:snvs-powerkey as /devices/platform/soc/2000000.aips-bus/20cc000.snvs/20cc000.rkey/input/input0
    209. [ 2.513196] usb 2-1: new high-speed USB device number 2 using ci_hdrc
    210. [ 2.562665] input: EP0790M09 as /devices/platform/soc/2100000.aips-bus/21a4000.i2c/i2c-1/1-0038/input/input1
    211. [ 2.574825] <<-GTP-INFO->> GTP driver installing...
    212. [ 2.580465] <<-GTP-INFO->> GTP Driver Version: gt9xx driver Rleased <2021/11/27> Based V2.4
    213. [ 2.589020] <<-GTP-INFO->> GTP I2C Address: 0x5d
    214. [ 2.593767] <<-GTP-ERROR->> Failed to request GPIO:9, ERRNO:-16
    215. [ 2.599713] <<-GTP-ERROR->> GTP request IO port failed.
    216. [ 2.609176] snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc0
    217. [ 2.618376] i2c /dev entries driver
    218. [ 2.624781] IR NEC protocol handler initialized
    219. [ 2.629373] IR RC5(x/sz) protocol handler initialized
    220. [ 2.634642] IR RC6 protocol handler initialized
    221. [ 2.639359] IR JVC protocol handler initialized
    222. [ 2.644034] IR Sony protocol handler initialized
    223. [ 2.648718] IR SANYO protocol handler initialized
    224. [ 2.653505] IR Sharp protocol handler initialized
    225. [ 2.658270] IR MCE Keyboard/mouse protocol handler initialized
    226. [ 2.664255] IR XMP protocol handler initialized
    227. [ 2.672236] hub 2-1:1.0: USB hub found
    228. [ 2.678641] pxp-v4l2 pxp_v4l2: initialized
    229. [ 2.682906] hub 2-1:1.0: 4 ports detected
    230. [ 2.690877] imx2-wdt 20bc000.wdog: use WDOG_B to reboot.
    231. [ 2.698704] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
    232. [ 2.706015] Bluetooth: HCI UART driver ver 2.3
    233. [ 2.710506] Bluetooth: HCI UART protocol H4 registered
    234. [ 2.715769] Bluetooth: HCI UART protocol BCSP registered
    235. [ 2.721114] Bluetooth: HCI UART protocol ATH3K registered
    236. [ 2.726855] usbcore: registered new interface driver bcm203x
    237. [ 2.732741] usbcore: registered new interface driver btusb
    238. [ 2.738616] usbcore: registered new interface driver ath3k
    239. [ 2.745321] sdhci: Secure Digital Host Controller Interface driver
    240. [ 2.751543] sdhci: Copyright(c) Pierre Ossman
    241. [ 2.756036] sdhci-pltfm: SDHCI platform and OF driver helper
    242. [ 2.764385] /soc/aips-bus@02100000/usdhc@02190000: voltage-ranges unspecified
    243. [ 2.771622] sdhci-esdhc-imx 2190000.usdhc: Got CD GPIO
    244. [ 2.779065] sdhci-esdhc-imx 2190000.usdhc: No vqmmc regulator found
    245. [ 2.834682] mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
    246. [ 2.851325] /soc/aips-bus@02100000/usdhc@02194000: voltage-ranges unspecified
    247. [ 2.865062] sdhci-esdhc-imx 2194000.usdhc: No vmmc regulator found
    248. [ 2.873461] sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found
    249. [ 2.933235] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
    250. [ 2.953957] usbcore: registered new interface driver usbhid
    251. [ 2.959576] usbhid: USB HID core driver
    252. [ 2.972755] mmc0: host does not support reading read-only switch, assuming write-enable
    253. [ 2.987918] mmc0: new high speed SDHC card at address 0001
    254. [ 2.998109] fsl-asrc 2034000.asrc: driver registered
    255. [ 3.003420] mmcblk0: mmc0:0001 SD16G 7.48 GiB
    256. [ 3.015731] mmcblk0: p1 p2
    257. [ 3.028202] imx-wm8960 sound: wm8960-hifi <-> 202c000.sai mapping ok
    258. [ 3.047891] imx-wm8960 sound: snd-soc-dummy-dai <-> 2034000.asrc mapping ok
    259. [ 3.058431] imx-wm8960 sound: wm8960-hifi <-> 202c000.sai mapping ok
    260. [ 3.128161] mmc1: MAN_BKOPS_EN bit is not set
    261. [ 3.173669] mmc1: new HS200 MMC card at address 0001
    262. [ 3.179775] mmcblk1: mmc1:0001 8GTF4R 7.28 GiB
    263. [ 3.184801] mmcblk1boot0: mmc1:0001 8GTF4R partition 1 4.00 MiB
    264. [ 3.191064] mmcblk1boot1: mmc1:0001 8GTF4R partition 2 4.00 MiB
    265. [ 3.197403] mmcblk1rpmb: mmc1:0001 8GTF4R partition 3 512 KiB
    266. [ 3.211262] NET: Registered protocol family 26
    267. [ 3.217147] mmcblk1: p1 p2
    268. [ 3.222255] NET: Registered protocol family 10
    269. [ 3.235031] sit: IPv6 over IPv4 tunneling driver
    270. [ 3.241370] NET: Registered protocol family 17
    271. [ 3.246275] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to loadif you need this.
    272. [ 3.259084] can: controller area network core (rev 20120528 abi 9)
    273. [ 3.265564] NET: Registered protocol family 29
    274. [ 3.270100] can: raw protocol (rev 20120528)
    275. [ 3.274585] can: broadcast manager protocol (rev 20120528 t)
    276. [ 3.280315] can: netlink gateway (rev 20130117) max_hops=1
    277. [ 3.286604] Bluetooth: RFCOMM TTY layer initialized
    278. [ 3.291553] Bluetooth: RFCOMM socket layer initialized
    279. [ 3.296966] Bluetooth: RFCOMM ver 1.11
    280. [ 3.300794] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    281. [ 3.306196] Bluetooth: BNEP filters: protocol multicast
    282. [ 3.311478] Bluetooth: BNEP socket layer initialized
    283. [ 3.316533] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
    284. [ 3.322497] Bluetooth: HIDP socket layer initialized
    285. [ 3.327678] 8021q: 802.1Q VLAN Support v1.8
    286. [ 3.332048] Key type dns_resolver registered
    287. [ 3.361888] dhd_module_init in
    288. [ 3.366555] input: gpio_keys@0 as /devices/platform/gpio_keys@0/input/input2
    289. [ 3.374341] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 2021-08-03 02:01:46 UTC (1627956106)
    290. [ 3.397786] gpio_dvfs: disabling
    291. [ 3.401060] can-3v3: disabling
    292. [ 3.404482] ALSA device list:
    293. [ 3.407472] #0: wm8960-audio
    294. [ 3.584681] kjournald starting. Commit interval 5 seconds
    295. [ 3.584827] EXT3-fs (mmcblk1p2): using internal journal
    296. [ 3.595889] EXT3-fs (mmcblk1p2): 1 orphan inode deleted
    297. [ 3.606318] EXT3-fs (mmcblk1p2): recovery complete
    298. [ 3.611137] EXT3-fs (mmcblk1p2): mounted filesystem with ordered data mode
    299. [ 3.618178] VFS: Mounted root (ext3 filesystem) on device 179:10.
    300. [ 3.625029] devtmpfs: mounted
    301. [ 3.628702] Freeing unused kernel memory: 528K (80b48000 - 80bcc000)
    302. INIT: version 2.88 booting
    303. Starting udev
    304. [ 4.268890] udevd[131]: starting version 3.1.5
    305. [ 4.282029] random: udevd urandom read with 33 bits of entropy available
    306. bootlogd: cannot allocate pseudo tty: No such file or directory
    307. [ 5.279276] 1-003c supply DOVDD not found, using dummy regulator
    308. [ 5.383246] 1-003c supply DVDD not found, using dummy regulator
    309. [ 5.389268] 1-003c supply AVDD not found, using dummy regulator
    310. [ 5.563593] ov5640_read_reg:write reg error:reg=300a
    311. [ 5.590944] camera ov5640 is not found
    312. [ 7.919422] kjournald starting. Commit interval 5 seconds
    313. [ 7.944909] EXT3-fs (mmcblk0p2): using internal journal
    314. [ 7.950175] EXT3-fs (mmcblk0p2): recovery complete
    315. [ 8.073644] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
    316. [ 8.086801] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    317. [ 8.107279] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    318. ALSA: Restoring mixer settings...
    319. INIT: Entering runlevel: 5
    320. Configuring network interfaces... [ 9.353895] fec 20b4000.ethernet eth0: Freescale FEC PHY driver [SMSC LAN87ii_bus:phy_addr=20b4000.ethernet:01, irq=-1)
    321. [ 9.393247] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    322. done.
    323. Starting system message bus: dbus.
    324. Starting Xserver
    325. Starting Connection Manager
    326. Starting Dropbear SSH server: dropbear.
    327. Starting rpcbind daemon...done.
    328. [ 10.503908] fec 2188000.ethernet eth1: Freescale FEC PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=20b40, irq=-1)
    329. [ 10.553487] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    330. starting statd: done
    331. Starting advanced power management daemon: apmd.
    332. apmd[626]: apmd 3.2.1 interfacing with apm driver 1.13 and APM BIOS 1.2
    333. Starting atd: OK
    334. exportfs: can't open /etc/exports for reading
    335. NFS daemon support not enabled in kernel
    336. Starting system log daemon...0
    337. Starting kernel log daemon...0
    338. * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon [ ok ]
    339. Starting Telephony daemon
    340. Starting Linux NFC daemon
    341. * starting FTP Server: vsftpd... done.
    342. Starting crond: OK
    343. Starting nginx: nginx.
    344. Running local boot scripts (/etc/rc.local).
    345. root@ATK-IMX6U:~# [ 16.679559] ICM20608 ID = 0XAE
    346. [ 19.726082] random: nonblocking pool is initialized

    三、为什么要移植uboot?

    uboot的下载可以到官方网站下载,这里面的uboot是原汁原味的源码,但我们肯定不用源码的uboot进行学习,芯片厂商会采用源码uboot进行芯片的移植,也就是说芯片厂商会自己维护一个版本的uboot,这个版本是他们自己定制的,(虽然uboot 官网的源码中一般也会支持他们的芯片,但是绝对是没有半导体厂商自己维护的 uboot 全面),如果我们一开会就拿源码uboot进行学习的话难度太大,因为用的板子是6ull,为nxp公司的芯片,所以我们直接在nxp官网下载器uboot版本进行配套学习就好了,如下:

     图中uboot 基本支持了 NXP 当前所有可以跑 Linux 的芯片,而且支持各种启动方式,比如 EMMC、NAND、 NOR FLASH 等等,这些都是 uboot 官方所不支持的。他们三者的关系如下:

     他们就是一环接一环,一环比一环更加二次开发,更加支持自家产品、切合实际使用!

            那么这三种 uboot 该如何选择呢?首先 uboot 官方的基本是不会用的,因为支持太弱了。
    最常用的就是半导体厂商或者开发板厂商的 uboot,如果你用的半导体厂商的评估板,那么就使
    用半导体厂商的 uboot,如果你是购买的第三方开发板,比如正点原子的 I.MX6ULL 开发板,
    那么就使用正点原子提供的 uboot 源码(也是在半导体厂商的 uboot 上修改的)。当然了,你也
    可以在购买了第三方开发板以后使用半导体厂商提供的 uboot, 只不过有些外设驱动可能不支
    持, 需要自己移植, 这个就是我们常说的 uboot 移植。

    四、正点原子官方uboot编译

    1、编译UBOOT的时候需要先配置

           1、编译完成以后就会生成一个u-boot.bin。必须向u-boot.bin添加头部信息。Uboot编译最后会通过/tools/mkimage软件添加头部信息,生成u-boot.imx。

           3、如果配置过uboot,那么一定要注意shell脚本会清除整个工程,那么配置的文件也会被删除,配置项也会被删除掉。

           4、为了方便开发,建议直接在uboot顶层Makefile里面设置好ARCH和CORSS_COMPILE这两个变量的值。

    也就是执行下面这三条命令 

    最后将成的uboot.imx文件通过mfgtool烧录到6ull就可以直线uboot的烧录了。

     可以看出时间已经改变,说明烧录成功。

    五、通过imxdownload软件烧录bin文件到sd卡

  • 相关阅读:
    一文理解CAS和自旋的区别(荣耀典藏版)
    2.11 Nginx控制浏览器缓存
    守护线程?
    MATLAB算法实战应用案例精讲-【数模应用】最大似然估计(MLE)(附MATLAB、Python和R语言代码)
    [巅峰极客 2022]smallcontainer
    【C++面向对象侯捷】10.扩展补充:类模板,函数模板,及其他
    关于vue首屏加载loading问题
    01 三角形的绘制
    学习记忆——数学篇——案例——算术——绝对值三角不等式
    使用gin 代理 web网页
  • 原文地址:https://blog.csdn.net/qq_43482790/article/details/126067907