《rv1126 —— udev机制、增加U盘识别功能、usbmount实现USB设置自动挂载》
描述:
基于RV1126平台,当插入一个U盘,只能识别到有device插入,不能被识别成U盘生成对应的sd*节点。
1.使能udev
在文件系统中使能udev功能:
vi buildroot/configs/rockchip_rv1126_evb_tb_defconfig
+BR2_PACKAGE_THUNDERBOOT_USE_EUDEV=y
2.配置内核
diff --git a/arch/arm/configs/rv1126-tb.config b/arch/arm/configs/rv1126- tb.config index 729df48a8cb0..34d7d40c6d82 100644 --- a/arch/arm/configs/rv1126-tb.config +++ b/arch/arm/configs/rv1126-tb.config @@ -1,4 +1,3 @@ -CONFIG_BLK_DEV_SD=m CONFIG_BT=m CONFIG_BT_HCIUART=m CONFIG_CFG80211=m @@ -24,8 +23,6 @@ CONFIG_ROCKCHIP_HW_DECOMPRESS=y CONFIG_ROCKCHIP_RAMDISK=y CONFIG_ROCKCHIP_THUNDER_BOOT=y CONFIG_ROMFS_FS=y -CONFIG_SCSI=m -CONFIG_SCSI_MOD=m # CONFIG_SLUB_SYSFS is not set CONFIG_SND=m CONFIG_SND_ALOOP=m @@ -47,21 +44,21 @@ CONFIG_SOUND=m CONFIG_STMMAC_ETH=m CONFIG_STMMAC_PLATFORM=m # CONFIG_TEE is not set -CONFIG_USB=m +CONFIG_USB=y # CONFIG_USB_CONFIGFS_F_UAC1 is not set # CONFIG_USB_CONFIGFS_F_UAC2 is not set # CONFIG_USB_CONFIGFS_F_UVC is not set # CONFIG_USB_CONFIGFS_RNDIS is not set -CONFIG_USB_DWC3=m -CONFIG_USB_DWC3_OF_SIMPLE=m -CONFIG_USB_DWC3_ROCKCHIP_INNO=m -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_HCD_PLATFORM=m +CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_OF_SIMPLE=y +CONFIG_USB_DWC3_ROCKCHIP_INNO=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_PLATFORM=y CONFIG_USB_HID=m # CONFIG_USB_NET_DRIVERS is not set -CONFIG_USB_OHCI_HCD=m -CONFIG_USB_OHCI_HCD_PLATFORM=m -CONFIG_USB_STORAGE=m +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PLATFORM=y +CONFIG_USB_STORAGE=y CONFIG_USB_XHCI_HCD=m CONFIG_USB_XHCI_PLATFORM=m
编译烧录后插入U盘就可以看到
3.使能usbmount功能
在SDK中make menuconfig,然后查找usbmount,然后配置。然后再执行个make savedefconfig保存配置、编译。
编译完成后,就会有对应的文件系统中/etc中看到usbmount目录。
然后要对usbmount中的配置文件进行配置。具体配置百度。