AM335x(TQ335x)学习笔记——使用dtb方式启动内核
老式的u-boot使用ATAGS的方式启动linux内核,本文使用新式的dtb方式启动内核。
我使用的内核是linux-3.17.2版本,下面开始编译内核。
(1) 解压内核
- tar jxf linux-3.17.2.tar.bz2
(2)配置linux内核,由于am335x在内核中都归为omap2系列,故可以使用如下命令:
- make ARCH=arm omap2plus_defconfig
(3)编译内核:
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j8
我的linux工具链前缀是arm-linux-gnueabi-,这个需要根据自己的实际的工具链情况进行替换。
(4)编译dtb:
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- am335x-evm.dtb
(5)制作启动盘:
将SD格式化为FAT系统,将MLO、u-boot.img拷贝到根目录下。
在根目录下创建boot目录,将编译好的zImage和am335x-evm.dtb拷贝到该目录下。
(6)u-boot命令行启动Linux内核
- load mmc 0 0x88000000 /boot/am335x-evm.dtb
- load mmc 0 0x82000000 /boot/zImage
- bootz 0x82000000 - 0x88000000
至此,Linux内核就能启动了,看到的Log信息如下:
- U-Boot# load mmc 0 ${fdtaddr} /boot/tq335x.dtb
- 34720 bytes read in 9 ms (3.7 MiB/s)
- U-Boot# load mmc 0 ${loadaddr} /boot/zImage
- 4385928 bytes read in 243 ms (17.2 MiB/s)
- U-Boot# bootz ${loadaddr} - ${fdtaddr}
- Kernel image @ 0x82000000 [ 0x000000 - 0x42ec88 ]
- ## Flattened Device Tree blob at 88000000
- Booting using the fdt blob at 0x88000000
- Loading Device Tree to 8fff4000, end 8ffff79f ... OK
- Starting kernel ...
- [ 0.000000] Booting Linux on physical CPU 0x0
- [ 0.000000] Linux version 3.17.2 (lilianrong@AY140721164813287e77Z) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) ) #1 SMP Mon Nov 10 20:46:04 CST 2014
- [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
- [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
- [ 0.000000] Machine model: TI AM335x EVM
- [ 0.000000] cma: Reserved 16 MiB at 9e800000
- [ 0.000000] Memory policy: Data cache writeback
- [ 0.000000] HighMem zone: 1048574 pages exceeds freesize 0
- [ 0.000000] CPU: All CPU(s) started in SVC mode.
- [ 0.000000] AM335X ES2.1 (sgx neon )
- [ 0.000000] PERCPU: Embedded 9 pages/cpu @dfa9a000 s14336 r8192 d14336 u36864
- [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129792
- [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=9,2048 rootfstype=ubifs rootwait=1
- [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
- [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
- [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
- [ 0.000000] Memory: 484792K/523264K available (5668K kernel code, 647K rwdata, 2208K rodata, 406K init, 8210K bss, 38472K reserved, 0K highmem)
- [ 0.000000] Virtual kernel memory layout:
- [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
- [ 0.000000] fixmap : 0xffc00000 - 0xffe00000 (2048 kB)
- [ 0.000000] vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
- [ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
- [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
- [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
- [ 0.000000] .text : 0xc0008000 - 0xc07b9478 (7878 kB)
- [ 0.000000] .init : 0xc07ba000 - 0xc081f800 ( 406 kB)
- [ 0.000000] .data : 0xc0820000 - 0xc08c1d08 ( 648 kB)
- [ 0.000000] .bss : 0xc08c1d08 - 0xc10c68e0 (8211 kB)
- [ 0.000000] Hierarchical RCU implementation.
- [ 0.000000] RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
- [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
- [ 0.000000] NR_IRQS:16 nr_irqs:16 16
- [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
- [ 0.000000] Total of 128 interrupts on 1 active controller
- [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
- [ 0.000016] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
- [ 0.000065] OMAP clocksource: timer1 at 24000000 Hz
- [ 0.000805] Console: colour dummy device 80x30
- [ 0.000857] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
- [ 0.000865] ... MAX_LOCKDEP_SUBCLASSES: 8
- [ 0.000873] ... MAX_LOCK_DEPTH: 48
- [ 0.000880] ... MAX_LOCKDEP_KEYS: 8191
- [ 0.000888] ... CLASSHASH_SIZE: 4096
- [ 0.000895] ... MAX_LOCKDEP_ENTRIES: 32768
- [ 0.000902] ... MAX_LOCKDEP_CHAINS: 65536
- [ 0.000909] ... CHAINHASH_SIZE: 32768
- [ 0.000916] memory used by lock dependency info: 5167 kB
- [ 0.000924] per task-struct memory footprint: 1152 bytes
- [ 0.000966] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
- [ 0.079040] pid_max: default: 32768 minimum: 301
- [ 0.079436] Security Framework initialized
- [ 0.079561] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
- [ 0.079574] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
- [ 0.081771] CPU: Testing write buffer coherency: ok
- [ 0.082962] CPU0: thread -1, cpu 0, socket -1, mpidr 0
- [ 0.083083] Setting up static identity map for 0x8055f030 - 0x8055f0a0
- [ 0.086327] Brought up 1 CPUs
- [ 0.086346] SMP: Total of 1 processors activated.
- [ 0.086356] CPU: All CPU(s) started in SVC mode.
- [ 0.088958] devtmpfs: initialized
- [ 0.097809] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
- [ 0.134392] omap_hwmod: tptc0 using broken dt data from edma
- [ 0.134758] omap_hwmod: tptc1 using broken dt data from edma
- [ 0.135103] omap_hwmod: tptc2 using broken dt data from edma
- [ 0.143122] omap_hwmod: debugss: _wait_target_disable failed
- [ 0.201002] pinctrl core: initialized pinctrl subsystem
- [ 0.203537] regulator-dummy: no parameters
- [ 0.233163] NET: Registered protocol family 16
- [ 0.241735] DMA: preallocated 256 KiB pool for atomic coherent allocations
- [ 0.243918] cpuidle: using governor ladder
- [ 0.243946] cpuidle: using governor menu
- [ 0.255876] OMAP GPIO hardware version 0.1
- [ 0.271254] omap-gpmc 50000000.gpmc: could not find pctldev for node /pinmux@44e10800/nandflash_pins_s0, deferring probe
- [ 0.271303] platform 50000000.gpmc: Driver omap-gpmc requests probe deferral
- [ 0.275826] No ATAGs?
- [ 0.275857] hw-breakpoint: debug architecture 0x4 unsupported.
- [ 0.319359] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
- [ 0.320718] vbat: 5000 mV
- [ 0.321481] lis3_reg: no parameters
- [ 0.324766] SCSI subsystem initialized
- [ 0.325577] usbcore: registered new interface driver usbfs
- [ 0.325755] usbcore: registered new interface driver hub
- [ 0.329802] usbcore: registered new device driver usb
- [ 0.330683] omap_i2c 44e0b000.i2c: could not find pctldev for node /pinmux@44e10800/pinmux_i2c0_pins, deferring probe
- [ 0.330726] platform 44e0b000.i2c: Driver omap_i2c requests probe deferral
- [ 0.330784] omap_i2c 4802a000.i2c: could not find pctldev for node /pinmux@44e10800/pinmux_i2c1_pins, deferring probe
- [ 0.330808] platform 4802a000.i2c: Driver omap_i2c requests probe deferral
- [ 0.335082] Switched to clocksource timer1
- [ 0.480572] NET: Registered protocol family 2
- [ 0.482404] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
- [ 0.482587] TCP bind hash table entries: 4096 (order: 5, 147456 bytes)
- [ 0.483951] TCP: Hash tables configured (established 4096 bind 4096)
- [ 0.484145] TCP: reno registered
- [ 0.484169] UDP hash table entries: 256 (order: 2, 20480 bytes)
- [ 0.484359] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
- [ 0.485643] NET: Registered protocol family 1
- [ 0.487595] RPC: Registered named UNIX socket transport module.
- [ 0.487618] RPC: Registered udp transport module.
- [ 0.487628] RPC: Registered tcp transport module.
- [ 0.487637] RPC: Registered tcp NFSv4.1 backchannel transport module.
- [ 0.488910] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
- [ 0.493146] futex hash table entries: 256 (order: 2, 16384 bytes)
- [ 0.498771] VFS: Disk quotas dquot_6.5.2
- [ 0.498919] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
- [ 0.500956] NFS: Registering the id_resolver key type
- [ 0.501307] Key type id_resolver registered
- [ 0.501322] Key type id_legacy registered
- [ 0.501464] jffs2: version 2.2. (NAND) (SUMMARY) 漏 2001-2006 Red Hat, Inc.
- [ 0.501877] msgmni has been set to 978
- [ 0.507196] io scheduler noop registered
- [ 0.507232] io scheduler deadline registered
- [ 0.507301] io scheduler cfq registered (default)
- [ 0.509624] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
- [ 0.513086] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
- [ 0.519109] omap_uart 44e09000.serial: no wakeirq for uart0
- [ 0.519691] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0
- [ 1.212068] console [ttyO0] enabled
- [ 1.221114] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
- [ 1.253833] brd: module loaded
- [ 1.273197] loop: module loaded
- [ 1.279721] mtdoops: mtd device (mtddev=name/number) must be supplied
- [ 1.289621] usbcore: registered new interface driver asix
- [ 1.295487] usbcore: registered new interface driver ax88179_178a
- [ 1.301980] usbcore: registered new interface driver cdc_ether
- [ 1.308269] usbcore: registered new interface driver smsc95xx
- [ 1.314388] usbcore: registered new interface driver net1080
- [ 1.320444] usbcore: registered new interface driver cdc_subset
- [ 1.326767] usbcore: registered new interface driver zaurus
- [ 1.332806] usbcore: registered new interface driver cdc_ncm
- [ 1.340919] usbcore: registered new interface driver cdc_wdm
- [ 1.347170] usbcore: registered new interface driver usb-storage
- [ 1.353622] usbcore: registered new interface driver usbtest
- [ 1.364045] mousedev: PS/2 mouse device common for all mice
- [ 1.374760] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
- [ 1.382981] i2c /dev entries driver
- [ 1.386769] Driver for 1-wire Dallas network protocol.
- [ 1.398911] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
- [ 1.408869] omap_hsmmc 48060000.mmc: unable to get vmmc regulator -517
- [ 1.416459] platform 48060000.mmc: Driver omap_hsmmc requests probe deferral
- [ 1.424503] ledtrig-cpu: registered to indicate activity on CPUs
- [ 1.431429] usbcore: registered new interface driver usbhid
- [ 1.437293] usbhid: USB HID core driver
- [ 1.442582] oprofile: using arm/armv7
- [ 1.447131] TCP: cubic registered
- [ 1.450611] Initializing XFRM netlink socket
- [ 1.455238] NET: Registered protocol family 17
- [ 1.459968] NET: Registered protocol family 15
- [ 1.465016] Key type dns_resolver registered
- [ 1.469680] omap_voltage_late_init: Voltage driver support not added
- [ 1.476366] sr_dev_init: No voltage domain specified for smartreflex0. Cannot initialize
- [ 1.484816] sr_dev_init: No voltage domain specified for smartreflex1. Cannot initialize
- [ 1.494347] ThumbEE CPU extension supported.
- [ 1.498923] Registering SWP/SWPB emulation handler
- [ 1.503942] SmartReflex Class3 initialized
- [ 1.517159] omap-gpmc 50000000.gpmc: GPMC revision 6.0
- [ 1.524094] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xd3
- [ 1.530939] nand: Samsung NAND 1GiB 3,3V 8-bit
- [ 1.535638] nand: 1024MiB, SLC, page size: 2048, OOB size: 64
- [ 1.541640] nand: error: CONFIG_MTD_NAND_OMAP_BCH not enabled
- [ 1.547760] omap2-nand: probe of omap2-nand.0 failed with error -22
- [ 1.663619] tps65910 0-002d: No interrupt support, no core IRQ
- [ 1.680749] vrtc: 1800 mV
- [ 1.684124] vrtc: supplied by vbat
- [ 1.691498] vio: at 1500 mV
- [ 1.694737] vio: supplied by vbat
- [ 1.701644] vdd_mpu: 912 <--> 1312 mV at 1325 mV
- [ 1.706882] vdd_mpu: supplied by vbat
- [ 1.713875] vdd_core: 912 <--> 1150 mV at 1137 mV
- [ 1.719187] vdd_core: supplied by vbat
- [ 1.725964] vdd3: 5000 mV
- [ 1.731302] vdig1: at 1800 mV
- [ 1.734706] vdig1: supplied by vbat
- [ 1.741264] vdig2: at 1800 mV
- [ 1.744671] vdig2: supplied by vbat
- [ 1.751054] vpll: at 1800 mV
- [ 1.754365] vpll: supplied by vbat
- [ 1.760730] vdac: at 1800 mV
- [ 1.764036] vdac: supplied by vbat
- [ 1.770317] vaux1: at 1800 mV
- [ 1.773717] vaux1: supplied by vbat
- [ 1.780114] vaux2: at 3300 mV
- [ 1.783514] vaux2: supplied by vbat
- [ 1.789893] vaux33: at 3300 mV
- [ 1.793397] vaux33: supplied by vbat
- [ 1.799920] vmmc: 1800 <--> 3300 mV at 3300 mV
- [ 1.804999] vmmc: supplied by vbat
- [ 1.810938] vbb: at 3000 mV
- [ 1.814411] vbb: supplied by vbat
- [ 1.819729] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
- [ 1.833220] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
- [ 1.877209] UBI error: ubi_init: cannot open mtd 9, error -19
- [ 1.944943] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
- [ 1.951329] davinci_mdio 4a101000.mdio: detected phy mask ffffffde
- [ 1.961340] libphy: 4a101000.mdio: probed
- [ 1.965645] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver unknown
- [ 1.974006] davinci_mdio 4a101000.mdio: phy[5]: device 4a101000.mdio:05, driver unknown
- [ 1.983572] cpsw 4a100000.ethernet: Detected MACID = c4:ed:ba:88:b5:e4
- [ 1.994560] input: volume_keys@0 as /devices/volume_keys@0/input/input0
- [ 2.005474] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
- [ 2.014497] sr_init: No PMIC hook to init smartreflex
- [ 2.020120] sr_init: platform driver register failed for SR
- [ 2.043081] lis3_reg: disabling
- [ 2.049937] UBIFS error (pid 1): ubifs_mount: cannot open "ubi0:rootfs", error -19
- [ 2.058011] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
- [ 2.066393] Please append a correct "root=" boot option; here are the available partitions:
- [ 2.075257] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
- [ 2.083990] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
(7)小结
从启动Log上很容易看出,现在内核无法挂在根文件系统,在下一篇文章中,我会制作根文件系统。
AM335x(TQ335x)学习笔记——使用dtb方式启动内核的更多相关文章
- AM335x(TQ335x)学习笔记——挂载Ramdisk
上篇文章中我们已经能够通过u-boot启动内核了,但是没有能够启动成功,从内核的log中可以看出,内核启动失败的原因是没有挂载到root文件系统,本文将使用busybox制作根文件系统并打包成ramd ...
- AM335x(TQ335x)学习笔记——GPIO关键驱动移植
或按照S5PV210学习秩序.我们首先解决的关键问题.TQ335x有六个用户按钮,每个上.下.剩下.对.Enter和ESC. 我想开始学习S5PV210当同一,写输入子系统驱动器的关键问题要解决,但浏 ...
- AM335x(TQ335x)学习笔记——GPIO按键驱动移植
还是按照S5PV210的学习顺序来,我们首先解决按键问题.TQ335x有六个用户按键,分别是上.下.左.右.Enter和ESC.开始我想到的是跟学习S5PV210时一样,编写输入子系统驱动解决按键问题 ...
- AM335x(TQ335x)学习笔记——LCD驱动移植
TI的LCD控制器驱动是非常完善的,共通的地方已经由驱动封装好了,与按键一样,我们可以通过DTS配置完成LCD的显示.下面,我们来讨论下使用DTS方式配置内核完成LCD驱动的思路. (1)初步分析 由 ...
- AM335x(TQ335x)学习笔记——WM8960声卡驱动移植
经过一段时间的调试,终于调好了TQ335x的声卡驱动.TQ335x采用的Codec是WM8960,本文来总结下WM8960驱动在AM335x平台上的移植方法.Linux声卡驱动架构有OSS和ALSA两 ...
- AM335x(TQ335x)学习笔记——触摸屏驱动编写
前面几篇文章已经通过配置DTS的方式完成了多个驱动的移植,接下来我们解决TQ335x的触摸驱动问题.由于种种原因,TQ335x的触摸屏驱动是以模块方式提供的,且Linux官方内核中也没有带该触摸屏的驱 ...
- AM335x(TQ335x)学习笔记——u-boot-2014.10移植
根据最近移植u-boot-2014.10至TQ335x,基于这样的假设am335x evm移植.不是很多地方需要改变. 因为TI的am335x evm开发了使用eeprom船上保存配置信息.它使用不同 ...
- AM335x(TQ335x)学习笔记——USB驱动移植
对于AM335x来讲,TI维护的USB驱动已经非常完善了,本文称之为移植,实际上仅仅是配置内核选项使能USB HOST/OTG功能.废话少说,直接动手开启AM335x的USB驱动配置项. Step1. ...
- AM335x(TQ335x)学习笔记——Nand&&网卡驱动移植
移植完成声卡驱动之后本想再接再励,移植网卡驱动,但没想到的是TI维护的内核太健壮,移植网卡驱动跟之前移植按键驱动一样简单,Nand驱动也是如此,于是,本人将Nand和网卡放在同一篇文章中介绍.介绍之前 ...
随机推荐
- 07_SSH免登录配置
占位占位占位占位占位占位占位占位
- Redis .Net 基本类型使用之南
前言 最近需要使用redis,看了一些文档,也在博客园里面看了很多文章,这里就记录下Redis常用类型的操作. String string是redis基本类型,一般通过Get,Set 命令进行操作,这 ...
- SpringBoot与Mybatis整合方式01(源码分析)
前言:入职新公司,SpringBoot和Mybatis都被封装了一次,光用而不知道原理实在受不了,于是开始恶补源码,由于刚开始比较浅,存属娱乐,大神勿喷. 就如网上的流传的SpringBoot与Myb ...
- 洛谷 [P1182] 数列分段
这是一道典型的二分答案问题(最大值最小,最小值最大)关键是对于细节的处理. 二分的框架: //l=max{num[i]},r=sum{num[i]} while(l<=r){ int m=(l+ ...
- 洛谷 [P1403] 约数研究
本题的思想很好,正难则反 首先如果暴力枚举每个数的约数个数,一定会超时,那么我们就从约数的角度考虑,题目中问的是1~n的约数个数和,那么我们就枚举约数,看每个约数在1~n中出现过几次. #includ ...
- BZOJ 1202: [HNOI2005]狡猾的商人 [带权并查集]
题意: 给出m个区间和,询问是否有区间和和之前给出的矛盾 NOIp之前做过hdu3038..... 带权并查集维护到根的权值和,向左合并 #include <iostream> #incl ...
- Markdown 安装图解(破解汉化教程)
http://blog.csdn.net/taokai_110/article/details/72934818 终于解决了问题
- vue环境搭建与创建第一个vuejs文件
我们在前端学习中,学会了HTML.CSS.JS之后一般会选择学习一些框架,比如Jquery.AngularJs等.这个系列的博文是针对于学习Vue.js的同学展开的. 1.如何简单地使用Vue.js ...
- ionic2 +Angular 使用自定义图标
结合阿里巴巴矢量图标库实现在ionic2开发中使用自定义图标. step1:在阿里巴巴图标管理中新建项目,并添加自己选中的图标到购物车: step2:将购物车中的图标"添加至项目" ...
- 揽货最短路径解决方案算法 - C# 蚁群优化算法实现
需求为(自己编的,非实际项目): 某配送中心进行揽货,目标客户数为50个客户,配送中心目前的运力资源如下: 现有车辆5台 单台运力最大行驶距离200千米 单台运力最大载重公斤1吨 问:运力怎样走法才能 ...