我正在使用一个Stamp9g20嵌入式芯片。它基于Atmel at91sam9g20平台。对于客户端,我需要将内核升级到新版本。经过一番研究,我登陆了Linux4SAM页面和它们的附加yocto层,完成了4.14内核!然而,当我编译内核时,我看不到我的所有设备,例如,我可以写入NAND内存并挂载USB设备,但我看不到或挂载任何mmc/mci设备。我试过检查Stamp9g20和AT91SAM9G20EK有什么不同,但我没有找到确切的答案。Linux4SAM repo支持稍微不同版本的AT91SAM9系列,但我让它为4.14内核工作,使用at91sam9g20ek.dts作为板的输入。必须将我的机器添加到兼容的机器列表中,所以它也将为9g20版本编译。COMPATIBLE_MACHINE += 'at91sam9g20ek'我的machine.conf看起来像:#@Name: ATMEL AT91SAM9G20EK#@DESCRIPTION: Machine configuration for Atmel's evaluation board## define SOC_FAMILY (we are the family of ...)SOC_FAMILY = "atsam9"# Add arm926ejs to the DEFAULTTUNE, so it will be selected in our environmentDEFAULTTUNE = "arm926ejs"# http://lists.openembedded.org/pipermail/openembedded-core/2019-January/277527.html#TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv5', ' -march=armv5t${ARMPKGSFX_DSP}', '', d)}"TUNE_CCARGS = "${@bb.utils.contains('TUNE_FEATURES', 'armv5', ' -march=armv5t${ARMPKGSFX_DSP}', '', d)}"# We rely on the generic meta-atmel layerrequire conf/machine/include/at91sam9.incMACHINE_FEATURES = "apm ext2 ext3 ext4 usbhost usbgadget vfat jffs2"# This device tree is available in the kernelKERNEL_DEVICETREE = " \ at91sam9g20ek.dtb \ "# Create filesystems tar.gz and jffs2IMAGE_FSTYPES += " tar.gz jffs2 tar"# UNTESTED IMAGES (both bootstrap and uboot)UBOOT_MACHINE ?= "at91sam9g20ek_nandflash_defconfig"UBOOT_ENTRYPOINT = "0x20008000"UBOOT_LOADADDRESS = "0x20008000"AT91BOOTSTRAP_MACHINE ?= "at91sam9g20ek"当内核启动时,它显示它在地址0xffff8000上注册了一个设备驱动程序,但没有看到块设备。bus: 'mmc': add driver mmcblkbus: 'sdio': add driver sdio_uartbus: 'platform': add driver atmel_mcibus: 'platform': driver_probe_device: matched device fffa8000.mmc with driver atmel_mcibus: 'platform': really_probe: probing driver atmel_mci with device fffa8000.mmcatmel_mci fffa8000.mmc: no init pinctrl stateatmel_mci fffa8000.mmc: version: 0x210atmel_mci fffa8000.mmc: using PDCdevice: 'mmc0': device_addatmel_mci fffa8000.mmc: Atmel MCI controller at 0xfffa8000 irq 30, 1 slotsdriver: 'atmel_mci': driver_bound: bound to device 'fffa8000.mmc'bus: 'platform': really_probe: bound device fffa8000.mmc to driver atmel_mci我已经用2.6.x版本试用了这个板,它可以按预期工作。如何使块设备mmcblk在系统中可用?我需要更改.dts吗(目前我正在使用at91sam9g20ek.dts作为模板,对NAND内存做一些小的更改)。或者我可以做些什么来获得更多关于内核为什么不与mmc设备交互的信息?另外,如果我比较dts结构之前的源代码,我看不出代码的mcc部分有显著的差异:https://elixir.bootlin.com/linux/v3.6.9/source/arch/arm/mach-at91/board-sam9g20ek.chttps://elixir.bootlin.com/linux/v3.6.9/source/arch/arm/mach-at91/board-stamp9g20.c我发现的唯一区别是,at91sam9g20ek板: .slot_b = 1, /* Only one slot so use slot B */stamp9g20董事会: .slot_b = 0,所以我尝试将dts中的reg属性更改为1,但没有成功。。。 最佳答案 找到了!我只需将dts中的mmc插槽(was 1)更改为插槽0:--- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi+++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi@@ -39,8 +39,8 @@ };- mmc0_slot1 {- pinctrl_board_mmc0_slot1: mmc0_slot1-board {+ mmc0_slot0 {+ pinctrl_board_mmc0_slot0: mmc0_slot0-board { atmel,pins = <AT91_PIOC 9 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PC9 gpio CD pin pull up and deglitch */ };@@ -90,15 +90,14 @@ mmc0: mmc@fffa8000 { pinctrl-0 = <- &pinctrl_board_mmc0_slot1+ &pinctrl_board_mmc0_slot0 &pinctrl_mmc0_clk- &pinctrl_mmc0_slot1_cmd_dat0- &pinctrl_mmc0_slot1_dat1_3>;+ &pinctrl_mmc0_slot0_cmd_dat0+ &pinctrl_mmc0_slot0_dat1_3>; status = "okay";- slot@1 {- reg = <1>;+ slot@0 {+ reg = <0>; bus-width = <4>;- cd-gpios = <&pioC 9 GPIO_ACTIVE_HIGH>; }; };关于linux - Linux内核在at91sam9g20板上看不到所有组件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/56152337/
10-10 10:39