AM335x(TQ335x)学习笔记——挂载Ramdisk

上篇文章中我们已经可以通过u-boot启动内核了。可是没有可以启动成功,从内核的log中可以看出。内核启动失败的原因是没有挂载到root文件系统,本文将使用busybox制作根文件系统并打包成ramdisk供u-boot启动内核使用。

(1)制作根文件系统

使用busybox构建根文件系统的步骤能够參考本博客的另外一篇文章。该文章链接例如以下:

S5PV210(TQ210)学习笔记——内核移植与文件系统构建

须要补充的是,文章"S5PV210(TQ210)学习笔记——内核移植与文件系统构建"中记录rootfs文件系统构建时漏掉了一步,没有在etc/sysconfig/文件夹下创建HOSTNAME文件,能够手动加入HOSTNAME文件。其内容为主机名称,本文使用了tq335x。在rootfs文件夹能够通过例如以下指令创建:

echo tq335x > etc/sysconfig/HOSTNAME

本文在已制作好的rootfs基础上,制作ramdisk。

(2)制作ramdisk

制作ramdisk的方式非常多,最方便的是使用指令genext2fs。ubuntu操作系统上能够通过apt-get工具直接安装genext2fs工具:

sudo apt-get install genext2fs

其他操作系统也有类似的管理工具,这里就不一一列举了,以下使用genext2fs打包rootfs文件夹。命令例如以下:

genext2fs -b 4096 -d rootfs/ ramdisk

然后使用gzip命令压缩ramdisk:

gzip -9 -f ramdisk

运行完毕该命令后能够得到文件ramdisk.gz。

因为u-boot启动内核使用的ramdisk须要有u-boot的image头,故须要使用编译u-boot时生成的工具mkimage将ramdisk.gz制作为ramdisk.img。当中,工具mkimage位于u-boot的tools文件夹下。制作ramdisk.img的指令例如以下:

u-boot-2014.10/tools/mkimage -A arm -O linux -T ramdisk -C none -a 0x88080000 -n "ramdisk" -d ramdisk.gz ramdisk.img

命令中mkimage前的路径依据自己实际运行的路径指定就可以。

这样,就完毕了u-boot能够使用的ramdisk制作,然后将ramdisk.img复制到SD卡的boot文件夹下就可以。

(3)挂载ramdisk

老式的ATAGS方式启动内核时使用ATAG传递bootargs给内核,因为本文使用的dtb方式启动内核。故採取dtb的chosen方式传递bootargs给内核。

Step1: 改动内核配置

make ARCH=arm menuconfig

进入配置项:

Boot options  --->

按N键取消配置项:

[ ] Use appended device tree blob to zImage (EXPERIMENTAL)

官方内核默认启用了该项配置。启用该项配置后内核兼容老式的ATAGS方式内核启动。关闭后则使用新式的dtb方式启动,故此处禁用了此项配置。

按ESC保存配置后退出menuconfig画面,又一次编译内核:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j8

Step2:加入bootargs到dtb

切换到内核文件夹arch/arm/boot/dts/,拷贝am335x-evm.dts为tq335x.dts:

cp am335x-evm.dts tq335x.dts

打开tq335x.dts,在memory项后通过chosen方式加入bootargs,加入内容例如以下:

memory {
	device_type = "memory";
	reg = <0x80000000 0x10000000>; /* 256 MB */
};

chosen {
	bootargs = "console=ttyO0,115200n8 root=/dev/ram0";
};

...

当中chosen节点是新加入的,memory节点是原有的。

接下来又一次编译dtb:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- tq335x.dtb

将新编译得到的tq335x.dtb复制到SD的boot文件夹下。

至此,准备工作就完毕了,以下我们使用新制作的ramdisk.img和tq335x.dtb启动内核。

Step3:使用新制作的ramdisk.img和tq335x.dtb启动内核

将SD插到开发板上。给开发板上电(开发板切换到SD卡启动模式),能够通过按随意键打断内核启动进入u-boot命令模式(因为之前没有配置u-boot的bootcmd环境变量,而默认的u-boot环境无法启动内核,故,开发板上电后不按键的话也会进入u-boot的命令行模式)。

首先是载入内核到DRAM:

load mmc 0 ${loadaddr} /boot/zImage

当中,${loadaddr}在u-boot的环境变量中默认指定为0x82000000,这里能够直接打数字。

然后是载入dtb到DRAM:

load mmc 0 ${fdtaddr} /boot/tq335x.dtb

${fdtaddr}的默认值是0x88000000。

接下来载入ramdisk到DRAM:

load mmc 0 ${rdaddr} /boot/ramdisk.img

${rdaddr}的默认值是0x88080000

最后就是将ramdisk和dtb的载入地址作为參数启动内核:

bootz ${loadaddr} ${rdaddr} ${fdtaddr}

至此。Linux内核已经可以正常启动并进入终端模式了。

启动Log例如以下:

Hit any key to stop autoboot:  0 
U-Boot# load mmc 0 ${fdtaddr} /boot/tq335x.dtb
34781 bytes read in 9 ms (3.7 MiB/s)
U-Boot# load mmc 0 ${loadaddr} /boot/zImage
4377824 bytes read in 242 ms (17.3 MiB/s)
U-Boot# load mmc 0 ${rdaddr} /boot/ramdisk.img
1120934 bytes read in 68 ms (15.7 MiB/s)
U-Boot# bootz ${loadaddr} ${rdaddr} ${fdtaddr}
Kernel image @ 0x82000000 [ 0x000000 - 0x42cce0 ]
## Loading init Ramdisk from Legacy Image at 88080000 ...
   Image Name:   ramdisk
   Created:      2014-11-18  15:47:41 UTC
   Image Type:   ARM Linux RAMDisk Image (uncompressed)
   Data Size:    1120870 Bytes = 1.1 MiB
   Load Address: 88080000
   Entry Point:  88080000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8feee000, end 8ffffa66 ... OK
   Loading Device Tree to 8fee2000, end 8feed7dc ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.17.2 ([email protected]) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) ) #1 SMP Tue Nov 18 22:49:31 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=/dev/ram0
[    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: 483692K/523264K available (5668K kernel code, 647K rwdata, 2208K rodata, 406K init, 8210K bss, 39572K 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.000013] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
[    0.000061] OMAP clocksource: timer1 at 24000000 Hz
[    0.000795] Console: colour dummy device 80x30
[    0.000847] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000856] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000863] ... MAX_LOCK_DEPTH:          48
[    0.000870] ... MAX_LOCKDEP_KEYS:        8191
[    0.000878] ... CLASSHASH_SIZE:          4096
[    0.000885] ... MAX_LOCKDEP_ENTRIES:     32768
[    0.000892] ... MAX_LOCKDEP_CHAINS:      65536
[    0.000900] ... CHAINHASH_SIZE:          32768
[    0.000907]  memory used by lock dependency info: 5167 kB
[    0.000915]  per task-struct memory footprint: 1152 bytes
[    0.000956] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.079037] pid_max: default: 32768 minimum: 301
[    0.079438] Security Framework initialized
[    0.079564] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.079576] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081769] CPU: Testing write buffer coherency: ok
[    0.082962] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.083084] Setting up static identity map for 0x8055f030 - 0x8055f0a0
[    0.086327] Brought up 1 CPUs
[    0.086347] SMP: Total of 1 processors activated.
[    0.086357] CPU: All CPU(s) started in SVC mode.
[    0.088983] devtmpfs: initialized
[    0.097743] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.132789] omap_hwmod: tptc0 using broken dt data from edma
[    0.133139] omap_hwmod: tptc1 using broken dt data from edma
[    0.133467] omap_hwmod: tptc2 using broken dt data from edma
[    0.141252] omap_hwmod: debugss: _wait_target_disable failed
[    0.198964] pinctrl core: initialized pinctrl subsystem
[    0.201633] regulator-dummy: no parameters
[    0.231057] NET: Registered protocol family 16
[    0.239540] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.241725] cpuidle: using governor ladder
[    0.241754] cpuidle: using governor menu
[    0.253658] OMAP GPIO hardware version 0.1
[    0.268591] omap-gpmc 50000000.gpmc: could not find pctldev for node /[email protected]/nandflash_pins_s0, deferring probe
[    0.268635] platform 50000000.gpmc: Driver omap-gpmc requests probe deferral
[    0.273243] No ATAGs?

[    0.273274] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.316650] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
[    0.318001] vbat: 5000 mV 
[    0.318774] lis3_reg: no parameters
[    0.322209] SCSI subsystem initialized
[    0.323028] usbcore: registered new interface driver usbfs
[    0.323207] usbcore: registered new interface driver hub
[    0.327009] usbcore: registered new device driver usb
[    0.327877] omap_i2c 44e0b000.i2c: could not find pctldev for node /[email protected]/pinmux_i2c0_pins, deferring probe
[    0.327917] platform 44e0b000.i2c: Driver omap_i2c requests probe deferral
[    0.327972] omap_i2c 4802a000.i2c: could not find pctldev for node /[email protected]/pinmux_i2c1_pins, deferring probe
[    0.327995] platform 4802a000.i2c: Driver omap_i2c requests probe deferral
[    0.332363] Switched to clocksource timer1
[    0.477595] NET: Registered protocol family 2
[    0.479415] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.479601] TCP bind hash table entries: 4096 (order: 5, 147456 bytes)
[    0.480965] TCP: Hash tables configured (established 4096 bind 4096)
[    0.481157] TCP: reno registered
[    0.481186] UDP hash table entries: 256 (order: 2, 20480 bytes)
[    0.481375] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[    0.482657] NET: Registered protocol family 1
[    0.484656] RPC: Registered named UNIX socket transport module.
[    0.484680] RPC: Registered udp transport module.
[    0.484690] RPC: Registered tcp transport module.
[    0.484699] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.485566] Trying to unpack rootfs image as initramfs...
[    0.487045] rootfs image is not initramfs (no cpio magic); looks like an initrd
[    0.497016] Freeing initrd memory: 1092K (cfeee000 - cffff000)
[    0.497514] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.501968] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.507634] VFS: Disk quotas dquot_6.5.2
[    0.507781] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.510254] NFS: Registering the id_resolver key type
[    0.510637] Key type id_resolver registered
[    0.510653] Key type id_legacy registered
[    0.510794] jffs2: version 2.2. (NAND) (SUMMARY)  漏 2001-2006 Red Hat, Inc.
[    0.511229] msgmni has been set to 978
[    0.516624] io scheduler noop registered
[    0.516656] io scheduler deadline registered
[    0.516726] io scheduler cfq registered (default)
[    0.519057] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.522800] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.528945] omap_uart 44e09000.serial: no wakeirq for uart0
[    0.529540] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0
[    1.236732] console [ttyO0] enabled
[    1.245368] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[    1.277842] brd: module loaded
[    1.297230] loop: module loaded
[    1.303764] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.313662] usbcore: registered new interface driver asix
[    1.319456] usbcore: registered new interface driver ax88179_178a
[    1.326006] usbcore: registered new interface driver cdc_ether
[    1.332305] usbcore: registered new interface driver smsc95xx
[    1.338427] usbcore: registered new interface driver net1080
[    1.344489] usbcore: registered new interface driver cdc_subset
[    1.350791] usbcore: registered new interface driver zaurus
[    1.356854] usbcore: registered new interface driver cdc_ncm
[    1.364965] usbcore: registered new interface driver cdc_wdm
[    1.371056] usbcore: registered new interface driver usb-storage
[    1.377647] usbcore: registered new interface driver usbtest
[    1.388450] mousedev: PS/2 mouse device common for all mice
[    1.399599] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
[    1.407152] 44e3e000.rtc: already running
[    1.411995] i2c /dev entries driver
[    1.415787] Driver for 1-wire Dallas network protocol.
[    1.428670] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    1.438626] omap_hsmmc 48060000.mmc: unable to get vmmc regulator -517
[    1.446110] platform 48060000.mmc: Driver omap_hsmmc requests probe deferral
[    1.454198] ledtrig-cpu: registered to indicate activity on CPUs
[    1.461042] usbcore: registered new interface driver usbhid
[    1.466922] usbhid: USB HID core driver
[    1.472270] oprofile: using arm/armv7
[    1.476763] TCP: cubic registered
[    1.480243] Initializing XFRM netlink socket
[    1.484880] NET: Registered protocol family 17
[    1.489611] NET: Registered protocol family 15
[    1.494616] Key type dns_resolver registered
[    1.499266] omap_voltage_late_init: Voltage driver support not added
[    1.505960] sr_dev_init: No voltage domain specified for smartreflex0. Cannot initialize
[    1.514433] sr_dev_init: No voltage domain specified for smartreflex1. Cannot initialize
[    1.523926] ThumbEE CPU extension supported.
[    1.528444] Registering SWP/SWPB emulation handler
[    1.533522] SmartReflex Class3 initialized
[    1.547402] omap-gpmc 50000000.gpmc: GPMC revision 6.0
[    1.554563] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xd3
[    1.561211] nand: Samsung NAND 1GiB 3,3V 8-bit
[    1.565966] nand: 1024MiB, SLC, page size: 2048, OOB size: 64
[    1.571968] nand: error: CONFIG_MTD_NAND_OMAP_BCH not enabled
[    1.578104] omap2-nand: probe of omap2-nand.0 failed with error -22
[    1.691744] tps65910 0-002d: No interrupt support, no core IRQ
[    1.709178] vrtc: 1800 mV 
[    1.712892] vrtc: supplied by vbat
[    1.719981] vio: at 1500 mV 
[    1.723353] vio: supplied by vbat
[    1.730169] vdd_mpu: 912 <--> 1312 mV at 1325 mV 
[    1.735377] vdd_mpu: supplied by vbat
[    1.742659] vdd_core: 912 <--> 1150 mV at 1137 mV 
[    1.747889] vdd_core: supplied by vbat
[    1.754583] vdd3: 5000 mV 
[    1.760090] vdig1: at 1800 mV 
[    1.763611] vdig1: supplied by vbat
[    1.769998] vdig2: at 1800 mV 
[    1.773480] vdig2: supplied by vbat
[    1.779839] vpll: at 1800 mV 
[    1.783256] vpll: supplied by vbat
[    1.789576] vdac: at 1800 mV 
[    1.792977] vdac: supplied by vbat
[    1.799236] vaux1: at 1800 mV 
[    1.802749] vaux1: supplied by vbat
[    1.809109] vaux2: at 3300 mV 
[    1.812606] vaux2: supplied by vbat
[    1.818973] vaux33: at 3300 mV 
[    1.822579] vaux33: supplied by vbat
[    1.829010] vmmc: 1800 <--> 3300 mV at 3300 mV 
[    1.834051] vmmc: supplied by vbat
[    1.840026] vbb: at 3000 mV 
[    1.843609] vbb: supplied by vbat
[    1.848858] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.862630] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[    1.972271] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    1.978680] davinci_mdio 4a101000.mdio: detected phy mask ffffffde
[    1.988850] libphy: 4a101000.mdio: probed
[    1.993152] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver unknown
[    2.001513] davinci_mdio 4a101000.mdio: phy[5]: device 4a101000.mdio:05, driver unknown
[    2.011094] cpsw 4a100000.ethernet: Detected MACID = c4:ed:ba:88:b5:e4
[    2.022260] input: [email protected] as /devices/[email protected]/input/input0
[    2.032966] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[    2.041988] sr_init: No PMIC hook to init smartreflex
[    2.047636] sr_init: platform driver register failed for SR
[    2.071187] lis3_reg: disabling
[    2.078305] RAMDISK: gzip image found at block 0
[    2.088654] mmc0: host does not support reading read-only switch. assuming write-enable.
[    2.114634] mmc0: new high speed SDHC card at address aaaa
[    2.124023] mmcblk0: mmc0:aaaa SL16G 14.8 GiB 
[    2.145511]  mmcblk0:
[    2.264995] VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
[    2.273502] devtmpfs: mounted
[    2.277355] Freeing unused kernel memory: 404K (c07ba000 - c081f000)
----------mount all..........
----------Starting mdev......

Please press Enter to activate this console. 
@tq335x #ls
HOSTNAME    dev         lib         mnt         sbin        usr
bin         etc         linuxrc     proc        sys         var
boot        home        lost+found  root        tmp

(4)小结

到眼下为止,已经可以成功启动内核了,接下来我们会在新内核的基础上加入tq335x板载驱动。

本文作者:girlkoo

本文链接:http://blog.csdn.net/girlkoo/article/details/41258583

本文在该文章制作好的rootfs基础上,制作ramdisk。

时间: 2024-11-07 02:23:19

AM335x(TQ335x)学习笔记——挂载Ramdisk的相关文章

AM335x(TQ335x)学习笔记——触摸屏驱动编写

前面几篇文章已经通过配置DTS的方式完成了多个驱动的移植,接下来我们解决TQ335x的触摸驱动问题.由于种种原因,TQ335x的触摸屏驱动是以模块方式提供的,且Linux官方内核中也没有带该触摸屏的驱动源码,单纯的配置DTS是无法完成TQ335x的触摸驱动移植工作的,因此,本文参考内核中原有的pixcir_i2c_ts驱动编写TQ335x的触摸屏(TN92)驱动. 在之前移植TQ210时,我已经编写过TQ210的触摸屏驱动,我的TQ335x还是使用的TQ210的屏,因此,难度不是很大.这里需要说

AM335x(TQ335x)学习笔记——GPIO按键

还是按照S5PV210的学习顺序来,我们首先解决按键问题.TQ335x有六个用户按键,分别是上.下.左.右.Enter和ESC.开始我想到的是跟学习S5PV210时一样,编写输入子系统驱动解决按键问题,但是浏览driver/input/keyboard目录时意外的发现了gpio-keys.c,大体上看下该驱动程序,其功能是实现了通用的gpio按键.再去看了下DTS,发现DTS中有对gpio-keys的引用,于是猜到,新的内核不需要自己编写输入子系统驱动,可以通过配置DTS直接解决按键问题.本人最

AM335x(TQ335x)学习笔记——LCD驱动移植

TI的LCD控制器驱动是非常完善的,共通的地方已经由驱动封装好了,与按键一样,我们可以通过DTS配置完成LCD的显示.下面,我们来讨论下使用DTS方式配置内核完成LCD驱动的思路. (1)初步分析 由于TQ335x使用的芯片是AM335x,故仍然可以参考am335x-evm.dts.当然,am335x-evmsk.dts.am335x-beagbone.dts都可以.本文以am335x-evm.dts为例.大体上浏览下DTS文件,可以发现两个醒目的节点:一个是panel,一个是backlight

AM335x(TQ335x)学习笔记——USB驱动移植

对于AM335x来讲,TI维护的USB驱动已经非常完善了,本文称之为移植,实际上仅仅是配置内核选项使能USB HOST/OTG功能.废话少说,直接动手开启AM335x的USB驱动配置项. Step1. 配置内核支持USB 默认的配置项没有配置USB相关的选项,但是DTS已经配置好了,我们不需要对DTS作任何修改,详细的内核配置项如下: Device Drivers ---> [*] USB support ---> [*] OTG support <*> EHCI HCD (USB

AM335x(TQ335x)学习笔记——Nand&amp;&amp;网卡驱动移植

移植完成声卡驱动之后本想再接再励,移植网卡驱动,但没想到的是TI维护的内核太健壮,移植网卡驱动跟之前移植按键驱动一样简单,Nand驱动也是如此,于是,本人将Nand和网卡放在同一篇文章中介绍.介绍之前先感慨一下:TI的维护的内核真的很健壮,DTS真的很强大. 1. Nand驱动移植 阅读TQ335x的原理图可知,TQ335x的Nand连接到了GPMC上,且都是使用的相应引脚的MODE0复用功能,AM335x上上电复位后这些引脚的默认状态就处于MODE0模式,故无需进行pinmux设置,原始的DT

AM335x(TQ335x)学习笔记——Nand&amp;amp;&amp;amp;网卡驱动移植

移植完毕声卡驱动之后本想再接再励,移植网卡驱动,但没想到的是TI维护的内核太健壮,移植网卡驱动跟之前移植按键驱动一样简单,Nand驱动也是如此,于是,本人将Nand和网卡放在同一篇文章中介绍.介绍之前先感慨一下:TI的维护的内核真的非常健壮,DTS真的非常强大. 1. Nand驱动移植 阅读TQ335x的原理图可知,TQ335x的Nand连接到了GPMC上,且与DTS中默认的配置吻合,此处不做不论什么改动,详情例如以下: nandflash_pins_s0: nandflash_pins_s0

AM335x(TQ335x)学习笔记——启动内核

老式的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-gnuea

AM335x(TQ335x)学习笔记——u-boot-2014.10移植

最近移植了下u-boot-2014.10到TQ335x,如果基于am335x evm进行移植,需要修改的地方并不多. 由于TI的am335x evm开发使用了一个eeprom保存了板载配置信息,用来区分不同板子的型号的,而TQ335x没有这个eeprom,因此,需要修改eeprom相关的部分,使u-boot适应TQ335x开发板. 使用source insight查看代码,很容易发现,所有获取板载配置的部分都是通过读取eeprom获得的,因此,首选修改read_eeprom(board/ti/a

AM335x(TQ335x)学习笔记——WM8960声卡驱动移植

经过一段时间的调试,终于调好了TQ335x的声卡驱动.TQ335x采用的Codec是WM8960,本文来总结下WM8960驱动在AM335x平台上的移植方法.Linux声卡驱动架构有OSS和ALSA两种架构,目前最常用的架构是ALSA,本文也使用ALSA架构对WM8960驱动进行移植. ASoC是对ALSA驱动架构的进一步封装.ASoC将ALSA驱动中的各模块抽象为三部分:Platform.Codec和Machine.Platform主要是平台硬件驱动,包括SoC的IIS模块.DMA等,在本文中