鋒影
email:[email protected]
如果你認爲本系列文章對你有所幫助,請大家有錢的捧個錢場,點擊此處贊助,贊助額0.1元起步,多少隨意
在QNX下,啓動相關的服務都是放置在build配置文件中的。我的開發板用的是TF卡,相對應於SD卡是沒有WP管腳(寫保護)的,僅僅存在CD(card select)管腳。啓動服務的腳本如下:
#because we use TFcard not SD card, so we do not need to config the WP options
devb-sdmmc-mx6 cam pnp,verbose blk rw,cache=2M sdio addr=0x02194000,irq=55,bs=cd_base=0x0209c000:cd_pin=4 disk name=sd2
#"cd_base", /* GPIO base address for the CD pin */ "cd_irq", /* Interrupt vector for GPIO CD pin */ "cd_pin"
#"wp_base", /* GPIO base address for the WP pin */
# devb-sdmmc-mx6 cam pnp,verbose blk rw,cache=2M sdio addr=0x02194000,irq=55,bs=cd_base=0x020a0000:cd_pin=15 disk name=sd2
# devb-sdmmc-mx6 cam pnp,verbose blk rw,cache=2M sdio addr=0x02194000,irq=55,bs=cd=0x020a0000^15^335:wp=0x0209c000^13^173 disk name=sd2
display_msg Starting Emmc driver...
devb-sdmmc-mx6 cam pnp,verbose blk rw,cache=5M sdio addr=0x0219C000,irq=57 disk name=emmc
waitfor /dev/emmc0t12 3
mount -t dos /dev/emmc0t12 /emmc
options:
-cam: common access method.其參數主要有pnp,verbose等等,具體可以查看《Utilities refercence》
-blk:the blk control io-blk.so, for more information, see io-blk.so. 主要參數有rw,cache,讀寫權限和緩存大小。
-sdio:描述的當前硬件管腳的配置,sd的基地址和終端號,bs表示當前的Board Specific options,具體描述信息如下:
/*
* Board Specific options can be passed through command line arguments or syspage optstr attribute,
* but the syspage way is recommended since it can pass different options to different uSDHC contollers
* Example of the BS options: bs=cd_irq=165:cd_base=0x0209C000:cd_pin=5:vdd1_8
* -- CD pin is GPIO1[5] (GPIO1 Base: 0x0209C000)
* -- IRQ for GPIO1[5] is 165
* -- 1.8v is supported
* Also please note that the optstr passed from syspage can be overwritten by the SDMMC command line arguments
*
* Notes:
* CD_BASE=base, CD_PIN=pin, CD_IRQ=irq can be replaced by one single option: CD=base^pin^irq
* WP_BASE=base, WP_PIN=pin can be replaced by one single option: WP=base^pin
* For example:
* cd=0x020a0000^0^192 is equavalent to cd_base=0x020a0000:cd_pin=0:cd_irq=192
* wp=0x020a0000^1 is equavalent to wp_base=0x020a0000:wp_pin=1
*/