With the previous porting, the new BSP Uboot and kernel have been able to run on the TQIMX6Q board, and then we'll mount the filesystem.
DTB Finishing
As mentioned in the previous article, the new version of the BSP DTB management feeling is not very good, in the previous migration of the BSP I found that even if there is a root file system, the kernel will also hang, because the original DTS file configuration content too much, not sure the source of the problem, this article on the DTS is organized, after finishing only a DTS file, The contents are as follows:
/* Copyright Freescale Semiconductor, Inc. * Copyright Linaro Ltd. * * The code contained herein is licensed U NDEr the GNU general public * License. Obtain a copy of the GNU general public License * Version 2 or later at the following locations: * * HTTP://WWW.OP ensource.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 = <0x 10000000 0x80000000>;};}; &uart1 {pinctrl-names = "default";p inctrl-0 = <&pinctrl_uart1_2>;status = "Okay";}; &USDHC2 {pinctrl-names = "default";p inctrl-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 change, because the code is managed using Git, so you can use the following command to recover:
git checkout Imx6qdl.dtsi
making a startup SD card
How to make the root file system This article will not repeat, can refer to this blog s5pv210 related records. I will make a good root file System package upload to the network disk, if you are too lazy to re-create the root file system can temporarily use the I made this:
Freescale i.mx6q BSP Transplant data collation
Start making the boot SD card below:
Step1. To partition an SD card using the FDISK command
In fact, the porting of the 3.0 kernel version of the BSP has been used by the Fdisk command, and the previous difference is the beginning of the partition offset in 20M position, as follows:
(1) Start partition command
One of the SDB please according to their own actual situation, the implementation must be repeatedly confirmed before, in order to avoid accidental operation caused the loss of files.
sudo fdisk/dev/sdb
(2) switch to Sector mode
Press U and enter, repeat until you switch to sector mode.
(3) Delete existing partitions
Press D and then enter, repeating until all partitions are deleted.
(4) Create a new partition
Press N to create a new partition.
(5) Perform the partition type.
Press p to select the primary partition.
(6) Input start offset
Enter "+20m" to specify that the starting position of the partition is 20M.
(7) Input end offset
This article uses only one partition, so press ENTER directly, indicating that the end of the partition is the end of the disk.
(8) Save partition information
Press W and enter to save the partition information.
Step2. formatting partitions
Using the MKFS command to format the newly created partition, consider using the ext3 or EXT4 file system for mobile devices, as follows:
sudo mkfs.ext3/dev/sdb1
Or
sudo mkfs.ext4/dev/sdb1
Step3. Copy the root file system
Because I previously produced a good root file system is a compressed package, it is directly extracted to the partition can be.
sudo mount/dev/sdb1/mntsudo tar jxf rootfs.tar.bz2-c/mntsudo mv/mnt/rootfs/*/mntsudo rm/mnt/rootfssudo umount/mnt
This completes the creation of the root file system.
Configuring 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 Show
Start log as follows:
U-boot 2013.04-04987-g98fdbdc-dirty (May 2015-11:46:24) Cpu:freescale i.mx6q rev1.2 at 792 mhzcpu:temperature 27 C, calibration data:0x54e4bb69reset cause:porboard:mx6q/sdl-sabresdi2c:readydram:1 gibmmc:fsl_sdhc:0, FSL_SDH C: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 B Oothit any key to stop autoboot:0 mmc0 are 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 (uncompressed) Data size:52892 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 18000000, end 1800befbStarting kernel ... Booting Linux on physical CPU 0x0linux version 3.10.17-80739-g33597e3-dirty ([email protected]) (GCC version 4.7.3 (U Buntu/linaro 4.7.3-12ubuntu1)) #1 SMP PREEMPT Sun May 3 11:31:37 CST 2015cpu:armv7 Processor [412fc09a] revision (ARM V7), Cr=10c53c7dcpu:pipt/vipt nonaliasing data cache, vipt aliasing instruction Cachemachine:freescale i.MX6 Quad/Dual Lite (Device Tree), Model:freescale i.mx6 Quad SABRE Smart Device Boardcma:CMA:reserved-MiB at 3c000000memory polic Y:ECC disabled, Data cache writeallocpercpu:embedded 8 pages/cpu @814f8000 s8896 r8192 d15680 u32768built 1 zonelists in Zone order, mobility grouping on. Total pages:260096kernel 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:1310524288 (order:7, bytes) inode-cache hash table entries:65536 (order:6, 262144 bytes) MEMORY:1024MB = 1024MB Totalmemo ry:697800k/697800k available, 350776k reserved, 0K highmemvirtual kernel memory layout:vector:0xffff0000-0xffff1 (4 KB) fixmap:0xfff00000-0xfffe0000 (896 KB) vmalloc:0xc0800000-0xff000000 (MB) lowme m:0x80000000-0xc0000000 (1024x768) pkmap:0x7fe00000-0x80000000 (2 MB) modules:0x7f000000-0x7fe0 0000 (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, Mi Nobjects=0, cpus=4, nodes=1preemptible hierarchical RCU implementation. Nr_irqs:16 nr_irqs:16 16l310 Cache controller enabledl2x0:16 ways, cache_id 0x410000c7, Aux_ctrl 0x32070000, Cache size: 1048576 bsched_clock:32 bits at 3000kHz, resolution 333ns, wraps every 1431655msCPU identified as I.MX6Q, silicon rev 1.2console:colour dummy device 80x30calibrating delay loop ... 1581.05 bogomips (lpj=7905280) pid_max:default:32768 minimum:301mount-cache hash table entries:512cpu:testing Write bu Ffer coherency:okcpu0:thread-1, CPU 0, Socket 0, MPIDR 80000000Setting up static identity map for 0x80610608-0x806106 60cpu1:booted secondary processorcpu1:thread-1, CPU 1, Socket 0, MPIDR 80000001cpu2:booted secondary processorcpu2:th Read-1, CPU 2, Socket 0, MPIDR 80000002cpu3:booted secondary processorcpu3:thread-1, CPU 3, Socket 0, MPIDR 80000003Br Ought up 4 cpussmp:total of 4 processors activated (6324.22 bogomips). Cpu:all CPU (s) started in SVC Mode.devtmpfs:initializedpinctrl core:initialized Pinctrl subsystemregulator-dummy:no pa rametersnet:registered protocol Family 16dma:preallocated 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 + MV vdd2p5:2000 <--> 2750 mv at 2425 MV cpu:725 <--> 1450 MV at 1150 MV vddpu:725 <--> 1450 MV vddsoc:725 <--> 1450 MV at MV Syscon 20e0000.iomux C-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 siz E 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 resu Me METHODSCSI subsystem initializedusbcore:registered new Interface driver usbfsusbcore:registered new interface driver hubusbcore:registered new device driver Usblinux video capture Interface:v2.00pps_core:linuxpps API ver. 1 REGISTEREDPP S_core:software ver. 5.3.6-coPyright 2005-2007 Rodolfo Giometti <[email protected]>ptp clock support Registeredimx-ipuv3 2400000.ipu:ipu DMFC normal mode:1 (0~1), 5B (4,5), 5F (6,7) imx-ipuv3 2800000.ipu:ipu DMFC NORMAL mode:1 (0~1), 5B (4,5), 5F (6,7) MIPI CSI2 D River Module loadedadvanced Linux sound Architecture Driver Initialized.cfg80211:Calling CRDA to update World regulatory Domainswitching to Clocksource mxc_timer1net: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 bin D 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:re Gistering the Id_resolver key Typekey type id_resolver Registeredkey type Id_legacy registeredjffs2:version 2.2. (NAND) Leaky 2001-2006 Red Hat, Inc.fuse init (API version 7.22) Msgmni have been set to 2002io scheduler NoOp Registeredio Sche Duler 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 firm Ware 1.1IMX-SDMA 20ec000.sdma:initializedserial:imx driver2020000.serial:ttymxc0 at MMIO 0x2020000 (IRQ =.) is a IMXC Onsole [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 ' enhanced ' Host Controller (EHCI) driverusbcore:registered new interface Driver USB-STORAGEMOUSEDEV:PS/2 Mouse device common for all micei2c-core:driver [isl29023] using legacy suspend Methodi2 C-core:driver [isl29023] using legacy resume METHODSNVS_RTC 20CC034.SNVS-RTC-LP:RTC core:registered 20cc034.snvs-rtc-l P as Rtc0i2c/dev entries driveri2c-core:driver [mag3110] using legacy suspend Methodi2c-core:driver [mag3110] using leg Acy Resume METHODIMX2-WDT 20bc000.wdog:imx2+ Watchdog Timer enabled. timeout=60s (nowayout=0) cpuidle:using Governor Laddercpuidle:using Governor Menusdhci:secure Digital Host Controller in Terface Driversdhci:copyright (c) Pierre OSSMANSDHCI-PLTFM:SDHCI platform and of driver Helpermmc0:no VQMMC regulator FO Undmmc0:no VMMC Regulator FOUNDMMC0:SDHCI Controller on 2194000.USDHC [2194000.USDHC] using admammc0:host does not supp ORT 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 V Ideo Data Order Adapter (VDOA) driver probedmxc_asrc 2034000.asrc:mxc_asrc registeredmxc_vpu 2040000.vpu:vpu initialized CAAM 2100000.caam:device ID = 0x0a16010000000000 (Era-524) caam 2100000.caam:job rings = 2, Qi = 0caam 2100000.caam:aut Henc-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-caamcaam 2100000.caam:ecb-arc4-caamcaam 2100000.caam:ecb-aes-caamcaam 2100000.caam:ctr-aes-caamcaam 2100000.caam:cbc-aes-caamcaam 2100000.caam:ecb-des3-caamcaam 2100000.caam:cbc-3des-caamcaam 2100000.caam: Cbc-des-caamcaam 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=18 021q:802.1q VLAN support V1.8key type Dns_resolver REGISTEREDVFP support V0.3:implementor 3 architecture Ant 9 rev 4SNVS_RTC 20cc034.snvs-rtc-lp:setting System clock to 1970-01-01 00:01:12 UTC () ALSA device List:no SOUNDCA RDS 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:264k (80be8 000-80c2a000)----------Mount all ...----------starting mdev ... and so on. Press Enter to activate the this console. @tqimx6q #
Summary
This transplant is not very smooth, let DTS toss the afternoon, and finally decided to use the current way to transplant, but this way can be more in-depth study of DTS. There is something wrong with the text, please help to point out, there are any questions can be left a message to discuss.
This article Girlkoo
This article link: http://blog.csdn.net/girlkoo/article/details/45463207
I.mx6q (tqimx6q/tqe9) Learning notes--The new BSP root file system mount