AM335x (TQ335x) study notes -- start the kernel, am335xtq335x

Source: Internet
Author: User

AM335x (TQ335x) study notes -- start the kernel, am335xtq335x

Old-fashioned u-boot uses the ATAGS method to start the Linux kernel. This article uses the new dtb method to start the kernel.

The kernel I use is the linux-3.17.2 version and the kernel is compiled below.

(1) decompress the kernel

tar jxf linux-3.17.2.tar.bz2
(2) configure the Linux kernel. Because am335x is classified as the omap2 series in the kernel, you can use the following command:

make ARCH=arm omap2plus_defconfig

(3) Compile the kernel:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j8
My linux tool chain prefix is arm-linux-gnueabi-, which needs to be replaced based on your actual tool chain situation.

(4) Compile dtb:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- am335x-evm.dtb
(5) create a boot disk:

Format SD as a FAT system and copy the MLO and u-boot.img to the root directory.

Create the boot directory in the root directory and copy the compiled zImage and am335x-evm.dtb to the directory.

(6) run the u-boot command to start the Linux kernel.

load mmc 0 0x88000000 /boot/tq335x.dtbload mmc 0 0x82000000 /boot/zImagebootz 0x82000000 - 0x88000000
Now, the Linux kernel can be started. The Log information is as follows:

U-Boot # load mmc 0 $ {fdtaddr}/boot/tq335x. dtb1_20 bytes read in 9 MS (3.7 MiB/s) U-Boot # load mmc 0 ${loadaddr}/boot/zImage4385928 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... OKStarting kern El... [0.000000] Booting Linux on physical CPU 0x0 [0.000000] Linux version 3.17.2 (lilianrong @ ay140721084813287e77z) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-121_tu1 )) #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 AM33 5x 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 u000064 [0.000000] Built 1 zonelists in Zone order, mobility grouping on. total pages: 1297 92 [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: 484792 K/523264 K available (5668 K kernel code, 64 7 K rwdata, 2208 K rodata, 406 K init, 8210 K bss, 38472 K reserved, 0 K 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] module S: 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. [1, 0.000000] RCU restricting CPUs from NR_CPUS = 2 to nr_cpu_ids = 1. [1, 0.000000] RCU: Adjusting geometry for rcu_f Anout_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 24000000Hz [0.000016] sched_clock: 32 bits at 24 MHz, resolution 41ns, wraps every 178956969942ns [0.000065] OMAP clocksource: timer1 at 24000000Hz [0.00 0805] Console: color 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.000 916] 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, 40 96 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. [2, 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: cocould not find pctldev for node/pinmux @ 44e10800/nandflash_pins_s0, deferring probe [0.271303] platform 50000000. gpmc: Driver omap-gpmc requests probe defer Ral [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: cocould 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: cocould 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. [2, 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) leakage 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) [2, 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 4832.16.rng: OMAP Random Number Generator. 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 extends 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] protocol: voltage driver support not added [1.476366] handle: No voltage domain specified for smartreflex0.cannot initialize [1.484816] handle: 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,3 V 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, 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 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 (2.066393): error-19 [] 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 (2.083990) [] --- [end Kernel panic-not syncing: VFS: unable to mount root fs on unknown-block (0, 0)
(7) Summary

From the startup Log, we can easily see that the kernel cannot be mounted to the root file system. In the next article, I will create the root file system.

Author: girlkoo

Link: http://blog.csdn.net/girlkoo/article/details/41223733

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.