Linux /dev目录下没有emmc设备文件

心上枫叶红 2018-08-03 03:54:25
我用zynq7000,在uboot下能找到emmc设备也能操作,但内核起来后在/dev目录下就没有emmc设备了。我怀疑是设备树的问题,也没有借鉴的,不清楚怎么修改,也不晓得是不是其他什么原因引起的。我内核是通过TFTP启动的。感谢大佬们提供思路与意见!







这里面也有mmc
但/dev下面没有

这下面是我的部分设备树:
#address-cells = <0x1>;
#size-cells = <0x1>;
compatible = "xlnx,zynq-7000";
model = "test";

chosen {
bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait";
linux,stdout-path = "/amba@0/uart@E0001000";

//bootargs = [00];
//stdout-path = "serial0:115200ns";
};

aliases {
serial0 = "/amba/serial@e0000000";
ethernet0 = "/amba/ethernet@e000b000";
spi0 = "/amba/spi@e000d000";
};

memory {
device_type = "memory";
reg = <0x0 0x40000000>;
};

cpus {
#address-cells = <0x1>;
#size-cells = <0x0>;

cpu@0 {
compatible = "arm,cortex-a9";
device_type = "cpu";
reg = <0x0>;
clocks = <0x1 0x3>;
clock-latency = <0x3e8>;
cpu0-supply = <0x2>;
operating-points = <0xa2c2a 0xf4240 0x51615 0xf4240>;
};

cpu@1 {
compatible = "arm,cortex-a9";
device_type = "cpu";
reg = <0x1>;
clocks = <0x1 0x3>;
};
};
....................
cache-controller@f8f02000 {
compatible = "arm,pl310-cache";
reg = <0xf8f02000 0x1000>;
interrupts = <0x0 0x2 0x4>;
arm,data-latency = <0x3 0x2 0x2>;
arm,tag-latency = <0x2 0x2 0x2>;
cache-unified;
cache-level = <0x2>;
};

memory-controller@f8006000 {
compatible = "xlnx,zynq-ddrc-a05";
reg = <0xf8006000 0x1000>;
};
................
spi@e000d000 {
clock-names = "ref_clk", "pclk";
clocks = <0x1 0xa 0x1 0x2b>;
compatible = "xlnx,zynq-qspi-1.0";
status = "okay";
interrupt-parent = <0x3>;
interrupts = <0x0 0x13 0x4>;
reg = <0xe000d000 0x1000>;
#address-cells = <0x1>;
#size-cells = <0x0>;
is-dual = <0x0>;
num-cs = <0x1>;

flash@0 {
compatible = "micron,m25p80";
reg = <0x0>;
#address-cells = <0x1>;
#size-cells = <0x1>;
spi-max-frequency = <0x2faf080>;

partition@0x00000000 {
label = "boot";
reg = <0x0 0x40000>;
};

partition@0x00040000 {
label = "bootenv";
reg = <0x40000 0x20000>;
};

partition@0x00060000 {
label = "kernel";
reg = <0x60000 0x600000>;
};
};
};

memory-controller@e000e000 {
#address-cells = <0x1>;
#size-cells = <0x1>;
status = "okay";
clock-names = "memclk", "aclk";
clocks = <0x1 0xb 0x1 0x2c>;
compatible = "arm,pl353-smc-r2p1";
interrupt-parent = <0x3>;
interrupts = <0x0 0x12 0x4>;
ranges;
reg = <0xe000e000 0x1000>;

flash@e1000000 {
status = "okay";
compatible = "arm,pl353-nand-r2p1";
reg = <0xe1000000 0x1000000>;
#address-cells = <0x1>;
#size-cells = <0x1>;
};

flash@e2000000 {
status = "okay";
compatible = "cfi-flash";
reg = <0xe2000000 0x2000000>;
#address-cells = <0x1>;
#size-cells = <0x1>;
};
};
....................
sdhci@e0100000 {
compatible = "arasan,sdhci-8.9a";
status = "okay";
clock-names = "clk_xin", "clk_ahb";
clocks = <0x1 0x15 0x1 0x20>;
interrupt-parent = <0x3>;
interrupts = <0x0 0x18 0x4>;
reg = <0xe0100000 0x1000>;
broken-adma2;
xlnx,has-cd = <0x1>;
xlnx,has-power = <0x0>;
xlnx,has-wp = <0x1>;
};

sdhci@e0101000 {
compatible = "arasan,sdhci-8.9a";
status = "okay";
clock-names = "clk_xin", "clk_ahb";
clocks = <0x1 0x16 0x1 0x21>;
interrupt-parent = <0x3>;
interrupts = <0x0 0x2f 0x4>;
reg = <0xe0101000 0x1000>;
broken-adma2;
xlnx,has-cd = <0x1>;
xlnx,has-power = <0x0>;
xlnx,has-wp = <0x0>;
};

slcr@f8000000 {
#address-cells = <0x1>;
#size-cells = <0x1>;
compatible = "xlnx,zynq-slcr", "syscon", "simple-mfd";
reg = <0xf8000000 0x1000>;
ranges;
linux,phandle = <0x7>;
phandle = <0x7>;

clkc@100 {
#clock-cells = <0x1>;
compatible = "xlnx,ps7-clkc";
fclk-enable = <0x3>;
clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x", "cpu_3or2x", "cpu_2x", "cpu_1x", "ddr2x", "ddr3x", "dci", "lqspi", "smc", "pcap", "gem0", "gem1", "fclk0", "fclk1", "fclk2", "fclk3", "can0", "can1", "sdio0", "sdio1", "uart0", "uart1", "spi0", "spi1", "dma", "usb0_aper", "usb1_aper", "gem0_aper", "gem1_aper", "sdio0_aper", "sdio1_aper", "spi0_aper", "spi1_aper", "can0_aper", "can1_aper", "i2c0_aper", "i2c1_aper", "uart0_aper", "uart1_aper", "gpio_aper", "lqspi_aper", "smc_aper", "swdt", "dbg_trc", "dbg_apb";
reg = <0x100 0x100>;
ps-clk-frequency = <0x1fca055>;
linux,phandle = <0x1>;
phandle = <0x1>;
};

rstc@200 {
compatible = "xlnx,zynq-reset";
reg = <0x200 0x48>;
#reset-cells = <0x1>;
syscon = <0x7>;
};

pinctrl@700 {
compatible = "xlnx,pinctrl-zynq";
reg = <0x700 0x200>;
syscon = <0x7>;
};
};
...全文
4091 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
cmc9527 2019-06-03
  • 打赏
  • 举报
回复
udev 看一下Linux3.0设备管理器启动没有
jiamianshiye 2019-04-29
  • 打赏
  • 举报
回复
看下proc/mtd,有没有分区。
weixin_44980461 2019-04-26
  • 打赏
  • 举报
回复
看起來driver有起來,的確是要用mknod,block node參考你cat /proc/devices的id
Wenxy1 2018-09-15
  • 打赏
  • 举报
回复
用mknod手工建立设备树试试。
心上枫叶红 2018-08-10
  • 打赏
  • 举报
回复
都没人回答,我好伤心。
心上枫叶红 2018-08-06
  • 打赏
  • 举报
回复
引用 1 楼 wenxy1 的回复:
kernel里有加载emmc driver么?

有的
Wenxy1 2018-08-04
  • 打赏
  • 举报
回复
kernel里有加载emmc driver么?
### 课程介绍业务安全的基石是APP安全,APP安全的基石是操作系统安全,操作系统安全的基石是SecureBoot安全。不理解SecureBoot安全无法深入理解业务的安全性,也无法进行良好的安全业务设计。 SecureBOOT安全涉及方方面面的知识,掌握Secureboot后,对整个大系统就有了一个宏观的概念,对整个大系统的其它模块学习都有帮助。Secureboot也是一个高门槛的知识点,涉及到密码学基础知识、ARM硬件基础知识、SOC硬件基础知识(如SOC内集成的efuse、crypto engine、RPMB等)、BootRom的实现、emmc/ufs/nand/nor等知识、各种规范和标准、ATF(TF-A)等软件、安全业务的设计模式.....所以当我们充分理解了Secureboot,再回头学习其它知识点是,就会变得比较容易. 本课程包含但不限于以下章节1、课程介绍2、基础知识点扫盲(密码学算法,efuse,RPMB等)3、启动流程bl1--bl314、一种超简单的secureboot(不带证书)5、一种官方推荐的secureboot(不带证书)6、官方推荐的secureboot--代码导读7、引入encrypted image后8、efuse也不安全怎么办9、Android Verified Boot(AVB)10、TEE验证TA程序的设计11、总结### 你将收获1、掌握和深刻理解整个Secureboot基本原理;2、能够自行进行SecureBoot的设计;3、掌握安全基础知识;### 适用人群1、学生、入门级人群2、资深工程师,立志在arm领域、芯片领域、系统领域、嵌入式领域、安全领域、TEE领域长期发展的; 3、也适合行业大佬专家,听一听我的剖析和见解,查缺补漏4、对于嵌入式领域/linux kernel领域资深工程师,也非常适合,学习一下主流软件框架。5、也适合ASIC硬件同学,该课程涉及很多方面的软硬件结合。

1,318

社区成员

发帖
与我相关
我的任务
社区描述
主要是开发驱动技术
社区管理员
  • 驱动程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧