I. MX6Q (TQIMX6Q/TQE9) Study Notes-mounting the new BSP root file system, tqimx6qtqe9
After the previous transplantation, the uboot and kernel of the new BSP version can be run on the tqimx6q Development Board. Next we will mount the file system.
DTB sorting
As mentioned in the previous article, the DTB management of the new BSP version is not very good. On the previously ported BSP, I found that even if there is a root file system, the kernel will crash, since the original DTS file contains too many configuration content, it is difficult to determine the source of the problem. This article has sorted out the data transmission and only needs one data transmission file. Its content is as follows:
/* * Copyright 2012 Freescale Semiconductor, Inc. * Copyright 2011 Linaro Ltd. * * The code contained herein is licensed under the GNU General Public * License. You may obtain a copy of the GNU General Public License * Version 2 or later at the following locations: * * http://www.opensource.org/licenses/gpl-license.html * http://www.gnu.org/copyleft/gpl.html *//dts-v1/;#include "imx6q.dtsi"/ {model = "Freescale i.MX6 Quad SABRE Smart Device Board";compatible = "fsl,imx6q-sabresd", "fsl,imx6q";memory {reg = <0x10000000 0x80000000>;};};&uart1 {pinctrl-names = "default";pinctrl-0 = <&pinctrl_uart1_2>;status = "okay";};&usdhc2 {pinctrl-names = "default";pinctrl-0 = <&pinctrl_usdhc2_2>;cd-gpios = <&gpio1 4 0>;no-1-8-v;keep-power-in-suspend;enable-sdio-wakeup;status = "okay";};&iomuxc {pinctrl-names = "default";uart1 {pinctrl_uart1_2: uart1grp-2 {fsl,pins = <MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1>;};};};At the same time, you need to restore imx6qdl. dtsi to the State before the previous modification. Because the code is managed by git, you can use the following command to restore:
git checkout imx6qdl.dtsi
Create startup SD card
This document will not repeat how to create the root file system. For more information, see S5PV210. I will package the prepared root file system and upload it to the online storage. If you are too lazy to re-create the root file system, you can temporarily use this one created by the monks:
Freescale I. MX6Q BSP porting data arrangement
Start to create an SD card:
Step1.Use the fdisk command to partition the SD card
In fact, the fdisk command has been used to port the 3.0 kernel version BSP. The difference is that the starting offset of the partition is changed to 20 m, as shown below:
(1) Start the partition command
Specifically, sdb should be formulated according to your actual situation. Before execution, you must confirm it again to avoid file loss caused by misoperations.
sudo fdisk /dev/sdb
(2) switch to sector Mode
Press u and press Enter. Repeat the operation until you switch to the sector mode.
(3) Delete existing partitions
Press d and press enter to repeat until all partitions are deleted.
(4) Create a New Partition
Create a new partition by n.
(5) Execution partition type.
Select p as the primary partition.
(6) Input start offset
Enter "+ 20 M" to specify the start position of the partition as 20 M.
(7) input end offset
This article only uses one partition, so press enter to indicate that the end position of the partition is the end of the disk.
(8) Save partition information
Press w and press enter to save the partition information.
Step2.Format partitions
Use the mkfs command to format the newly created partition. for mobile devices, consider using the ext3 or ext4 file system. The command is as follows:
sudo mkfs.ext3 /dev/sdb1
Or
sudo mkfs.ext4 /dev/sdb1
Step3.Copy the root file system
As the root file system I have prepared is a compressed package, you can directly extract it to the partition.
sudo mount /dev/sdb1 /mntsudo tar jxf rootfs.tar.bz2 -C /mntsudo mv /mnt/rootfs/* /mntsudo rm /mnt/rootfssudo umount /mnt
So far, the root file system has been created.
Configure uboot Environment Variables
setenv bootargs 'noinitrd console=ttymxc0,115200 root=/dev/mmcblk0p1 rw init=/linuxrc'setenv bootcmd 'mmc dev 0; mmc read 0x11ffffc0 0x800 0x3000; mmc read 0x18000000 0x5000 0x800; bootm 0x11ffffc0 - 0x18000000'saveenv
Then restart the Development Board.
Effect display
The startup Log is as follows:
U-Boot 2013.04-04987-g98fdbdc-dirty (May 03 2015-11:46:24) CPU: Freescale I. MX6Q rev1.2 at 792 MHzCPU: Temperature 27 C, calibration data: Drawing cause: PORBoard: MX6Q/SDL-SabreSDI2C: readyDRAM: 1 GiBMMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2No panel detected: default to Hannstar-XGADisplay: Hannstar-XGA (1024x768) In: serialOut: serialErr: serialmmc0 is current deviceNet: Phy not foundPHY Reset timed outFEC [PRIME] Warning: failed to set MAC addressNormal BootHit any key to stop autoboot: 0 mmc0 is current deviceMMC read: dev #0, block #2048, count 12288... 12288 blocks read: OKMMC read: dev #0, block #20480, count 2048... 2048 blocks read: OK # Booting kernel from Legacy Image at 11ffffc0... image Name: Linux-3.10.17-80739-g33597e3-dir Image Type: ARM Linux Kernel Image (un Compressed) Data Size: 5289224 Bytes = 5 MiB Load Address: 12000000 Entry Point: 12000000 Verifying Checksum... OK ## Flattened Device Tree blob at 18000000 Booting using the fdt blob at 0x18000000 XIP Kernel Image... OKOK Using Device Tree in place at 18000000, end 1800 befbStarting kernel... booting Linux on physical CPU 0x0Linux version 3.10.17-80739-g33597e3-dirty (lilianrong @ lenovo) (gcc vers Ion 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) #1 smp preempt Sun May 3 11:31:37 CST 2015CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr = 10c53c7dCPU: PIPT/VIPT nonaliasing data cache, VIPT aliasing instruction cacheMachine: Freescale I. MX6 Quad/DualLite (Device Tree), model: Freescale I. MX6 Quad SABRE Smart Device Boardcma: CMA: reserved 320 MiB at 3c000000Memory policy: ECC disabled, Data Cache writeallocPERCPU: Embedded 8 pages/cpu @ 814f8000 s8896 r8192 d15680 u32768Built 1 zonelists in Zone order, mobility grouping on. total pages: 260096 Kernel command line: noinitrd console = ttymxc0, 115200 root =/dev/mmcblk0p1 rw rootfstype = ext4 init =/linuxrcPID hash table entries: 4096 (order: 2, 16384 bytes) Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) Inode-cache hash table en Tries: 65536 (order: 6, 262144 bytes) Memory: 1024 MB = 1024 MB totalMemory: 697800 k/697800 k available, 350776 k reserved, 0 K highmemVirtual kernel memory layout: vector: 0xffff0000-0xffff1000 (4 kB) fixmap: 0xfff00000-0xfffe0000 (896 kB) vmalloc: 0xc0800000-0xff000000 (1000 MB) lowmem: 0x80000000-0xc0000000 (1024 MB) pkmap: 0x7fe00000-0x80000000 (2 MB) modules: 0x7f000000-0x7fe00 000 (14 MB ). text: 0x80008000-0x80be704c (12157 kB ). init: 0x80be8000-0x80c2a2c0 (265 kB ). data: 0x80c2c000-0x80c7c260 (321 kB ). bss: 0x80c7c260-0x80ce5434( 421 kB) SLUB: HWalign = 64, Order = 0-3, MinObjects = 0, CPUs = 4, Nodes = 1 Preemptible hierarchical RCU implementation. NR_IRQS: 16 nr_irqs: 16 16L310 cache controller enabledl2x0: 16 ways, CACHE_ID 0x41_c7, AUX_CTRL 0x32070000, Cache si Ze: 1048576 Bsched_clock: 32 bits at 3000 kHz, resolution 333ns, wraps every 1431655 msCPU identified as I. MX6Q, silicon rev 1.2 Console: color dummy device 80x30Calibrating delay loop... 1581.05 BogoMIPS (lpj = 7905280) pid_max: default: 32768 minimum: 301Mount-cache hash table entries: 512CPU: Testing write buffer coherency: okCPU0: thread-1, cpu 0, socket 0, mpid r 80000000 Setting up static identity Map for 0x80610608-0x80642560cpu1: Booted secondary processorCPU1: thread-1, cpu 1, socket 0, mpidr 8001_1cpu2: Booted secondary processorCPU2: thread-1, cpu 2, socket 0, mpidr 8003662cpu3: Booted secondary processorCPU3: thread-1, cpu 3, socket 0, mpidr 80000003 Brought up 4 CPUsSMP: Total of 4 processors activated (6324.22 BogoMIPS ). CPU: All CPU (s) started in SVC mode. devtmpfs: initializ Edpinctrl core: initialized pinctrl subsystemregulator-dummy: no parametersNET: Registered protocol family 16DMA: preallocated 256 KiB pool for atomic coherent allocationsUse WDOG1 as reset sourcesyscon 20c8000. anatop: regmap [mem 0x020c8000-0x020c8fff] registeredvdd1p1: 800 <--> 1375 mV at 1125 mV vdd3p0: 2800 <--> 3150 mV at 3000 mV vdd2p5: 2000 <--> 2750 mV at 2425 mV cpu: 725 <--> 1450 mV at 1 150 mV vddpu: 725 <--> 1450 mV vddsoc: 725 <--> 1450 mV at 1200 mV syscon 20e0000. iomuxc-gpr: regmap [mem 0x020e0000-0x020e0037] registeredsyscon 21bc000. ocotp-ctrl: regmap [mem 0x021bc000-0x021bffff] registeredhw-breakpoint: found 5 (+ 1 reserved) breakpoint and 1 watchpoint registers. hw-breakpoint: maximum watchpoint size is 4 bytes. imx6q-pinctrl 20e0000. iomuxc: initialized IMX pinctrl driverbio: Create slab <bio-0> at 0mxs-dma 110000. dma-apbh: initializedi2c-core: driver [max17135] using legacy suspend methodi2c-core: driver [max17135] using legacy resume methodSCSI subsystem initializedusbcore: registered new interface driver combined: registered new interface driver hubusbcore: registered new device driver usbLinux video capture interface: v2.00pps _ core: LinuxPPS API ver. 1 registe Redpps_core: Software ver. 5.3.6-Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> PTP clock support registeredimx-ipuv3 242130.ipu: ipu dmfc normal mode: 1 (0 ~ 1), 5B (), 5F (6, 7) imx-ipuv3 282130.ipu: ipu dmfc normal mode: 1 (0 ~ 1), 5B (), 5F (6, 7) MIPI CI2 driver module loadedAdvanced Linux Sound Architecture Driver Initialized. listen 80211: Calling CRDA to update world regulatory domainSwitching to clocksource tables: Registered protocol family 2TCP established hash table entries: 8192 (order: 4, 65536 bytes) TCP bind hash table entries: 8192 (order: 4, 65536 bytes) TCP: Hash tables configured (established 8192 bind 8192) TCP: reno registeredUDP hash table entries: 512 (order: 2, 16384 bytes) UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) NET: Registered protocol family 1RPC: Registered named UNIX socket transport module. RPC: Registered udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters availablepureg-dummy: no parametersimx6_busfreq busfreq.15: DDR medium rate not supported. bus freq driver module loadedVFS: Disk quotas dquot_6.5.2Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) NFS: Registering the id_resolver key typeKey type id_resolver registeredKey type id_legacy limit: version 2.2. (NAND) 2001-2006 Red Hat, Inc. fuse init (API version 7.22) msgmni has been set to 2002io scheduler noop registeredio scheddio deadline registeredio scheduler cfq registered (default) imx-weim 21b8000. weim: WEIM driver registered. mipi dsi driver module loadedimx-sdma 20ec000. sdma: no iram assigned, using external memimx-sdma 20ec000. sdma: loaded firmware 1.1imx-sdma 20ec000. sdma: initializedSerial: IMX driver2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMXconsole [ttymxc0] enabledserial: freescale lpuart driver [drm] Initialized drm 1.1.0 20060810 [drm] Initialized vivante 1.0.0 20120216 on minor 0brd: module loadedloop: module loadedCAN device driver interfaceehci_hcd: USB 2.0 'enabled' Host Controller (EHCI) driverusbcore: registered new interface driver usb-storagemousedev: PS/2 mouse device common for all micei2c-core: driver [isl29023] using legacy suspend methodi2c-core: driver [isl29023] using legacy resume methodsnvs_rtc 20cc034. snvs-rtc-lp: rtc core: registered 20cc034. snvs-rtc-lp as rtc0i2c/dev entries driveri2c-core: driver [mag3110] using legacy suspend methodi2c-core: driver [mag3110] using legacy resume methodimx2-wdt 20bc000. wdog: IMX2 + Watchdog Timer enabled. timeout = 60 s (nowayout = 0) cpuidle: using governor laddercpuidle: using governor menusdhci: Secure Digital Host Controller Interface driversdhci: Copyright (c) Pierre Ossmansdhci-pltfm: SDHCI platform and OF driver helpermmc0: no vqmmc regulator foundmmc0: no vmmc regulator foundmmc0: SDHCI controller on 2194000. usdhc [2194000. usdhc] using ADMAmmc0: host does not support reading read-only switch. assuming write-enable.mmc0: new high speed SDHC card at address e624mmcblk0: mmc0: e624 SS08G 7.40 GiB mmcblk0: p1Galcore version 4.6.9.9754mxc _ vdoa 21e4000. vdoa: I. MX Video Data Order Adapter (VDOA) driver probedmxc_asrc 2034000. asrc: mxc_asrc registeredmxc_vpu 2040000.vpu: VPU initializedcaam 2100000. caam: device ID = 0x0a1600000000000 (Era-524) caam 2100000. caam: job rings = 2, qi = 0 caam 2100000. caam: authenc-hmac-md5-cbc-aes-caamcaam 2100000. caam: authencesn-hmac-md5-cbc-aes-caamcaam 2100000. caam: authenc-hmac-sha1-cbc-aes-caamcaam 2100000. caam: authencesn-hmac-sha1-cbc-aes-caamcaam 2100000. caam: authenc-hmac-sha224-cbc-aes-caamcaam 2100000. caam: authencesn-hmac-sha224-cbc-aes-caamcaam 2100000. caam: authenc-hmac-sha256-cbc-aes-caamcaam 2100000. caam: authencesn-hmac-sha256-cbc-aes-caamcaam 2100000. caam: authenc-hmac-md5-cbc-des3_ede-caamcaam 2100000. caam: authencesn-hmac-md5-cbc-des3_ede-caamcaam 2100000. caam: authenc-hmac-sha1-cbc-des3_ede-caamcaam 2100000. caam: authencesn-hmac-sha1-cbc-des3_ede-caamcaam 2100000. caam: authenc-hmac-sha224-cbc-des3_ede-caamcaam 2100000. caam: authencesn-hmac-sha224-cbc-des3_ede-caamcaam 2100000. caam: authenc-hmac-sha256-cbc-des3_ede-caamcaam 2100000. caam: authencesn-hmac-sha256-cbc-des3_ede-caamcaam 2100000. caam: authenc-hmac-md5-cbc-des-caamcaam 2100000. caam: authencesn-hmac-md5-cbc-des-caamcaam 2100000. caam: authenc-hmac-sha1-cbc-des-caamcaam 2100000. caam: authencesn-hmac-sha1-cbc-des-caamcaam 2100000. caam: authenc-hmac-sha224-cbc-des-caamcaam 2100000. caam: authencesn-hmac-sha224-cbc-des-caamcaam 2100000. caam: authenc-hmac-sha256-cbc-des-caamcaam 2100000. caam: authencesn-hmac-sha256-cbc-des-caamcaam 2100000. caam: ecb-des-caamca 2100000. caam: ecb-arc4-caamcaam 2100000. caam: ecb-aes-caamca 2100000. caam: ctr-aes-caamca 2100000. caam: cbc-aes-caamca 2100000. caam: ecb-des3-caamcaam 2100000. caam: cbc-3des-caamcaam 2100000. caam: cbc-des-caamca 2100000. caam: fsl, sec-v4.0 algorithms registered in/proc/cryptoplatform 2101000. jr0: registering rng-caamplatform caam_sm: caam_sm_test: 8-byte key test match OKplatform caam_sm: caam_sm_test: 16-byte key test match OKplatform caam_sm: caam_sm_test: 32-byte key test match OKplatform caam_secvio.16: security violation service handlers armedusbcore: registered new interface driver usbhidusbhid: usb hid core driveri2c-core: driver [cs42888] using legacy suspend methodi2c-core: driver [cs42888] using legacy resume methodTCP: cubic registeredNET: Registered protocol family 10sit: IPv6 over IPv4 tunneling driverNET: Registered protocol family 17can: controller area network core (rev 20120528 abi 9) NET: registered protocol family 29can: raw protocol (rev 20120528) can: broadcast manager protocol (rev 20120528 t) can: netlink gateway (rev 20130117) max_hops = 18021q: 802.1Q VLAN Support v1.8Key type dns_resolver registeredVFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4snvs_rtc 20cc034. snvs-rtc-lp: setting system clock to 1970-01-01 00:01:12 UTC (72) ALSA device list: No soundcards found. EXT4-fs (mmcblk0p1): recovery completeEXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. opts: (null) VFS: Mounted root (ext4 filesystem) on device 179: 1. devtmpfs: mountedFreeing unused kernel memory: 264 K (80be8000-80c2a000) -------- mount all .......... ---------- Starting mdev ...... please press Enter to activate this console. @ tqimx6q #
Summary
This migration was not very smooth, so DTS had to spend the afternoon and finally decided to use the current migration method. However, this method can be used to learn more about DTS. If you have any questions, leave a message for discussion.
Author: girlkoo
Link: http://blog.csdn.net/girlkoo/article/details/45463207