当前位置:网站首页>Openwrt adds support for SD card
Openwrt adds support for SD card
2022-07-27 16:01:00 【xhoufei2010】
One 、 Hardware platform
1.1 controller :MT7620(A9 kernel )
Two 、 software platform
2.1、 development environment :Ubuntu12.04
2.2、 Software version :openwrt official 15.05 edition SDK Development kit (CHAOS CALMER 15.05 edition )
3、 ... and 、 Functional specifications
The target chip selected in this article is MT7620,profile The choice is “Xiaomi MiWiFi Mini ”.
about openwrt Increase for sd card Support for , Four aspects need to be configured :
1、dts File add pair sdhci Support for , Turn on the hardware pair sd card Interface driver support , Hardware initialization .
2、 Add to sd card Driver support for , Used to detect sd card Plug and drive .
3、 Add support for language formats , Such as utf8、cp437、iso8859-1, Used to identify sd card What's in it , Avoid random code .
4、 Add to vfat File system support , Otherwise, you cannot mount sd card.
Four 、 Operation steps
4.1 modify dts file
For the default Xiaomi development board dts file , No, right sd Hardware initialization of the interface , Therefore, it needs to be modified “openwrt/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts” file .
In the document , Add the following code :
sdhci@10130000 {
compatible = "ralink,mt7620-sdhci";
reg = <0x10130000 4000>;
interrupt-parent = <&intc>;
interrupts = <14>;
status = "okay";
};
4.2 increase sd card Drive support
stay openwrt sdk In bag , Carry out orders make menuconfig command .
Kernel modules —> Other modules —>
-*- kmod-sdhci…………..
<*> kmod-sdhci-mt7620
Configuration is shown in figure 4-1 Shown . 
chart 4-1 increase sd card Interface drive
matters needing attention : stay make menuconfig Configuration of the sd card drive , No more make kernel_menuconfig Middle configuration sd card drive , Otherwise, when starting up , A message appears :
mmc_core: exports duplicate symbol __mmc_claim_host (owned by kernel)
sdhci-pltfm: SDHCI platform and OF driver helper
mmc_core: exports duplicate symbol __mmc_claim_host (owned by kernel)
mmc_core: exports duplicate symbol __mmc_claim_host (owned by kernel)
mmc_core: exports duplicate symbol __mmc_claim_host (owned by kernel)
mmc_core: exports duplicate symbol __mmc_claim_host (owned by kernel)
mmc_core: exports duplicate symbol __mmc_claim_host (owned by kernel)As shown in the prompt ,sd card mmc_core Duplicate export , So eventually, it can't sd Card drive succeeded !!!!
4.3 Add language module support
about openwrt System , Just turn on sd card Interface driver is not enough , You also need to add language support , otherwise sd card Unable to recognize the contents of the file , Or garbled code appears .
stay openwrt sdk In bag , Carry out orders make menuconfig command .
Kernel modules —> Native Language Support —>,
<*> kmod-nls-cp437
<*> kmod-nls-iso8859-1
<*> kmod-nls-utf8
The setting is as shown in the figure 4-2 Shown . 
chart 4-2 Add language support
For language , The explanation is as follows :
nls codepage 437 – The United States / Canadian English
nls codepage 737 – Greek
nls codepage 775 – Baltic
nls codepage 850 – Including Western European languages ( German , Spanish , Italian ) Some characters in
nls codepage 852 – Latin 2 Including central and Eastern European languages ( albanian , Croatian , Czech , English , Finnish language , Hungarian , irish , German , Polish language , Romanian , Serbian , Slovak , Slovenian ,Sorbian language )
nls codepage 855 – Slavic
nls codepage 857 – Turkish language
nls codepage 860 – Portuguese
nls codepage 861 – Icelandic
nls codepage 862 – Hebrew
nls codepage 863 – Canadian
nls codepage 864 – The Arabic language
nls codepage 865 – Germanic
nls codepage 866 – Slavic / Russian
nls codepage 869 – Greek (2)
nls codepage 874 – Thai,
nls codepage 936 – Simplified Chinese GBK
nls codepage 950 – Traditional Chinese Big5
nls iso8859-1 – Western European languages ( albanian , Spanish Catalan , Danish language , Dutch , English ,Faeroese language , Finnish language , French , German , Galician , irish , Icelandic , Italian , Norwegian , Portuguese , Swiss .) This also applies to American English .
nls iso8859-2 – Latin 2 Character set , Slav / Central European languages ( Czech , German , Hungarian , Polish language , romanian , Croatian , Slovak , Slovenian )
nls iso8859-3 – Latin 3 Character set , ( Esperanto , Galician , Maltese , Turkish language )
nls iso8859-4 – Latin 4 Character set , ( Ethanian , Latvian , Lithuanian ), yes Latin 6 The pre order standard of character set
nls iso8859-5 – Slavic ( Bulgarian ,Byelorussian language , Macedonian , Russian , Serbian , Ukrainian ) Generally recommended KOI8-R codepage
nls iso8859-6 – The Arabic language .
nls iso8859-7 – Modern Greek
nls iso8859-8 – Hebrew
nls iso8859-9 – Latin 5 Character set , ( Removed Latin 1 Some Icelandic characters that are not often used in Chinese are replaced by Turkish characters )
nls iso8859-10 – Latin 6 Character set , ( Inuit ( Greenland ) language , Samoan, etc Latin 4 Nordic languages not included in )
nls iso8859-15 – Latin 9 Character set , yes Latin 1 Updated version of the character set , Remove some uncommon characters , Increased support for the ethanian language , Revised French and Finnish , Added Euro characters )
nls koi8-r – Default support for Russian
4.4 increase vfat File system support
For the increase vfat File system support , There are two ways , Just choose one .
4.4.1、menuconfig Increase support
perform make menuconfig
Filesystems —>
Configuration is shown in figure 4-3 Shown . 
chart 4-3 increase vfat File system support
4.4.2 kernel_menuconfig Increase support
perform make kernel_menuconfig
File systems —> DOS/FAT/NT Filesystems —> 
chart 4-4 increase vfat File system support
such ,openwrt Configuration complete .
5、 ... and 、 test
After burning the program , About SD The boot information of the card is as follows :
[ 9.050000] MTK MSDC device init.
[ 9.090000] mtk-sd: MediaTek MT6575 MSDC Driver
[ 9.090000] sdhci: Secure Digital Host Controller Interface driver
[ 9.100000] sdhci: Copyright(c) Pierre Ossman
[ 9.110000] sdhci-pltfm: SDHCI platform and OF driver helper
[ 9.140000] mmc0: new high speed SD card at address b368
[ 9.150000] mmcblk0: mmc0:b368 00000 1.86 GiB (ro)
[ 9.160000] mmcblk0:take sd Mount the card
root@OpenWrt:/# mount -t vfat /dev/mmcblk0 /mnt/ see sd The contents of the card , Pictured 5-1 Shown . 
chart 5-1 sd Card content
边栏推荐
- __typeof和typeof的差异
- Is the array name the address of the first element?
- UDP message structure and precautions
- DRF学习笔记(三):模型类序列化器ModelSerializer
- [regular expression] match the beginning and end
- DRF学习笔记(四):DRF视图
- DRF学习笔记(二):数据反序列化
- The risk of multithreading -- thread safety
- 三星关闭在中国最后一家手机工厂
- [Yunxiang book club issue 13] packaging format and coding format of audio files
猜你喜欢

Interview focus - TCP protocol of transport layer

Binary Insertion Sort

keil 采用 makefile 实现编译

Spark Bucket Table Join

scrapy爬虫框架

Learn parquet file format

First understanding of structure

网络层的IP协议
![[sword finger offer] interview question 50: the first character that appears only once - hash table lookup](/img/72/b35bdf9bde72423410e365e5b6c20e.png)
[sword finger offer] interview question 50: the first character that appears only once - hash table lookup

drf使用:get请求获取数据(小例子)
随机推荐
快速高效删除node_modules
面试重点——传输层的TCP协议
网络设备硬核技术内幕 路由器篇 小结(下)
Spark troubleshooting finishing
表格插入行内公式后,单元格失去焦点
DRF学习笔记(准备)
[regular expression] match the beginning and end
借5G东风,联发科欲再战高端市场?
UDP message structure and precautions
解决MT7620不断循环uboot(LZMA ERROR 1 - must RESET board to recover)
突发!海康/大华/商汤/旷视/依图/科大讯飞等28家中国实体被美列入黑名单
Network device hard core technology insider router Chapter 22
DRF学习笔记(一):数据序列化
busybox login: can't execute '/bin/bash': No such file or directory 解决方法
CAS compares the knowledge exchanged, ABA problems, and the process of lock upgrading
The method of exchanging two numbers in C language
profileapi.h header
Binder初始化过程
网络层的IP协议
禁令之下,安防巨头海康与大华的应对之策!