This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Building modules directly on the Beagleboard-xM Rev C

Hello everyone,

I'm using Beagleboard-xM Rev C, Linux kernel 2.6.38.8, Angstrom distibution. "u-boot" loads kernel from NFS and kernel mounts NFS root. My network configuration is OK and I can boot Linux kernel. For network setup I followed this link: http://veter-project.blogspot.com/2012/03/comfortable-kernel-workflow-on.html

Now, I want to insert HID module into my kernel but I have few problems:

  1. I added "HID Gadget" as a module in menuconfig (Device drivers ---> USB Support ---> USB Gadget Support ---> [M] HID Gadget). I built my kernel and modules on the host computer (Linux Ubuntu 12.10) with this instruction: cross make -j5 uImage modules. Everythig passed without errors and I got g_hid.ko in "/linux/drivers/usb/gadget/" folder. After that I installed modules in "/lib/modules/2.6.38.8/" with: sudo_cross make -j5 modules_install. There is g_hid.ko in "/lib/modules/2.6.38.8/kernel/drivers/usb/gadget/" folder but when I tried to insert module I got an error. insmod returns me an error something like: insmod: error inserting 'g_hid.ko': -1 No such device. I can't figured out why... lsmod returns me an empty list, but that's expected because lsmod returns a list of loaded modules.
  2. When I built modules directly on the Beagleboard-xM Rev C with GCC compiler downloaded from "www.angstrom-distribution.org" with "opkg install xxxxxx" feature, I got from lsmod only one module in the list "twl4030_pwrbutton". Of course, I built modules on the board with make ARCH=arm modules and then make ARCH=arm modules_install. Still I have g_hid.ko in "/lib/modules/2.6.38.8/kernel/drivers/usb/gadget/" folder but I can't get my g_hid.ko module in lsmod. 


I need quick answer... Please help me.

Any suggestion would be appriciated...



Best regards,

Vladimir

  • The insmod error message is most likely because you did not use the newly built uImage, and probably the current one already has a gadget driver built in, so you cannot insmod a second gadget driver.

    Please do a quick check if you use the new uImage which comes from the build with g_hid.ko.

  • Hi Bin Liu,


    Thanks for quick peply... I cheked my menuconfig again and I found that "HID Devices" is "built-in" (Device drivers ---> [*] HID Devices ---> -*- Generic HID support AND <*> USB Human Interface Device (full HID) support). That means uImage has already a gadget driver built in? If I uncheck "[ ] HID Devices", can I insert module then?


    Firstly, I built uImage and modules together with cross make -j5 uImage modules and then I built modules on my Beagleboard-xM with make ARCH=arm modules. Is this wrong?


    Regards,

    Vladimir

  • Vladimir Gajinov said:
    Thanks for quick peply... I cheked my menuconfig again and I found that "HID Devices" is "built-in" (Device drivers ---> [*] HID Devices ---> -*- Generic HID support AND <*> USB Human Interface Device (full HID) support). That means uImage has already a gadget driver built in?

    Yes, that means HID gadget driver is already built in, you don't need to insmod anything, just boot up xM board, and connect to host, the host should enumerate it as a HID.

    Vladimir Gajinov said:
    If I uncheck "[ ] HID Devices", can I insert module then?

    I never tried that. If uncheck, then it does not build hid.ko, how to get one to insmod? To get the module, you have make the option to '[M]'.

    Vladimir Gajinov said:
    Firstly, I built uImage and modules together with cross make -j5 uImage modules and then I built modules on my Beagleboard-xM with make ARCH=arm modules. Is this wrong?

    You already got the module and uImage in the first step. why build the module again on xM? I never did that.

  • Bin Liu said:

    Thanks for quick peply... I cheked my menuconfig again and I found that "HID Devices" is "built-in" (Device drivers ---> [*] HID Devices ---> -*- Generic HID support AND <*> USB Human Interface Device (full HID) support). That means uImage has already a gadget driver built in?

    Yes, that means HID gadget driver is already built in, you don't need to insmod anything, just boot up xM board, and connect to host, the host should enumerate it as a HID.

    [/quote]

    Sorry, my response is wrong, the option you did above is HID host support, it is irrelevant to HID gadget.

  • Bin Liu,

    I did some stupid things because I don't know what else to do :) I tried everything but nothing helps... I'm pretty desperate :) Do you have any other idea?

    Thanks for help!

  • I don't know much about the 2.6.38.8 kernel, I guess it is not provided by TI.

    But it seems to be working for you, but only except the USB gadget. So You can do a quick check:

    When you did make uImage modules, you got uImage and g_hid.ko (assuming you enabled HID gadget as module, the message above shows you did), so update the new uImage to you filesystem and g_hid.ko. Then boot the board and insmod g_hid.ko, to see if it works.

    The rule here is always use the uImage and modules, which come from the same build, at the same time.

  • I built uImage and modules together, installed modules and then reboot BB-xM but it is the same behaviour. Still, I can't insert module. With modinfo g_hid i got:

    filename: /lib/modules/2.6.38.8/kernel/drivers/usb/gadget/g_hid.ko
    license: GPL
    author: Fabien Chouteau, Peter Korsgaard
    description: HID Gadget
    srcversion: DF28552EA5AAC8D1F62467D
    depends:
    vermagic: 2.6.38.8 preempt mod_unload modversions ARMv7
    parm: idVendor:USB Vendor ID (ushort)
    parm: idProduct:USB Product ID (ushort)
    parm: bcdDevice:USB Device version (BCD) (ushort)
    parm: iManufacturer:USB Manufacturer string (charp)
    parm: iProduct:USB Product string (charp)
    parm: iSerialNumber:SerialNumber string (charp)


    Can there be a problem with compiler i.e. maybe I'm using wrong GCC?! Maybe modules are built for some other platform so the BB-xM doesn't recognize them? I don't know, maybe that's stupid thinking... I downloaded GCC from http://www.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv7a/base/gcc_4.3.3-r24.1.6_armv7a.ipk

  • Vladimir Gajinov said:
    I built uImage and modules together, installed modules and then reboot BB-xM but it is the same behaviour. Still, I can't insert module.

    Did you put the new uImage into your filesystem?

    Please paste the output of 'uname -a'.

    Or please attach the file '/proc/config.gz' here if you have it enabled.

  • Here is the output of uname -a:

    Linux beagleboard 2.6.38.8 #15 PREEMPT Thu Apr 25 16:56:48 CEST 2013 armv7l GNU/Linux


    config.gz file is attached.

    config.gz
  • The .config does not have CONFIG_USB_GADGET_MUSB_HDRC=y.

    Please do menuconfig and

    Device Drivers ->
        [*] USB support  --->
            Driver Mode (USB Peripheral (gadget stack))  ---> (select 'USB peripheral' or 'Both host and peripheral:  USB OTG (On The Go) Device')

  • I selected "Both host and peripheral:  USB OTG (On The Go) Device" because I will connect BB-xM with mobile phone over OTG cable but I can't build kernel now. Here are the errors:

    drivers/tty/serial/omap-serial.c: In function 'serial_omap_irq':
    drivers/tty/serial/omap-serial.c:151:16: warning: 'ch' may be used uninitialized in this function
    drivers/tty/serial/omap-serial.c:151:16: warning: 'ch' may be used uninitialized in this function
    In file included from drivers/usb/musb/musb_core.c:102:0:
    drivers/usb/musb/musb_core.h:103:2: error: #error bogus Kconfig output ... select CONFIG_USB_GADGET_MUSB_HDRC
    CC fs/lockd/mon.o
    drivers/usb/musb/musb_core.c: In function 'musb_init_controller':
    drivers/usb/musb/musb_core.c:1964:3: error: label 'bad_config' used but not defined
    make[2]: *** [drivers/usb/musb/musb_core.o] Error 1
    make[1]: *** [drivers/usb/musb] Error 2


    The error said: select CONFIG_USB_GADGET_MUSB_HDRC. Then I must select Inventra HDRC USB Peripheral (TI, ADI, ...) in Device drivers ---> USB Support ---> USB gadget support ---> USB Peripheral controller ---> select "Inventra HDRC USB Peripheral (TI, ADI, ...)" instead of "OMAP USB Device Controller". Now, I'm able to compile kernel but the behaviour is same. I rebooted my BB-xM and then tried to insert module but I got the same error. Somewhere I read that I need to run depmod before insmod. Is that true? 

  • Vladimir Gajinov said:
    select "Inventra HDRC USB Peripheral (TI, ADI, ...)" instead of "OMAP USB Device Controller"

    That is correct. Beagle xM uses DM37xx which does not have 'OMAP USB Device Controller'.

    Vladimir Gajinov said:
    I rebooted my BB-xM and then tried to insert module but I got the same error

    Please provide the new /proc/config.gz

    Vladimir Gajinov said:
    Somewhere I read that I need to run depmod before insmod

    Instead tt is better to do 'make modules_install' once, since this is not a trivial kernel config change.

  • config.gz is attached.


    I'm not sure that I understand what you want to say with "Instead tt is better to do 'make modules_install' once, since this is not a trivial kernel config change.". After every modules compilation I did make ARCH=arm modules_install. That's correct?

    config.gz
  • That is correct. (sorry, I did not know you did modules_install to populate the modules) modules_install will do 'depmod' for you.

    I am not sure if that is the root cause, but the config.gz still has a couple CONFIG missing which are related to USB/MUSB. Is it possible you can try the attached config? it is for 2.6.37 kernel provided by TI.

    CONFIG_ARM=y
    CONFIG_GENERIC_GPIO=y
    CONFIG_EXPERIMENTAL=y
    CONFIG_SYSVIPC=y
    CONFIG_POSIX_MQUEUE=y
    CONFIG_BSD_PROCESS_ACCT=y
    CONFIG_IKCONFIG=y
    CONFIG_IKCONFIG_PROC=y
    CONFIG_LOG_BUF_SHIFT=16
    CONFIG_BLK_DEV_INITRD=y
    CONFIG_EMBEDDED=y
    # CONFIG_SYSCTL_SYSCALL is not set
    CONFIG_KALLSYMS_EXTRA_PASS=y
    
    #
    # Kernel Performance Events And Counters
    #
    CONFIG_SLAB=y
    CONFIG_PROFILING=y
    CONFIG_OPROFILE=y
    CONFIG_KPROBES=y
    CONFIG_MODULES=y
    # CONFIG_MODULE_FORCE_LOAD is not set
    CONFIG_MODULE_UNLOAD=y
    # CONFIG_MODULE_FORCE_UNLOAD is not set
    CONFIG_MODVERSIONS=y
    CONFIG_MODULE_SRCVERSION_ALL=y
    # CONFIG_BLK_DEV_BSG is not set
    
    
    
    #
    # System Type
    #
    CONFIG_MMU=y
    CONFIG_ARCH_OMAP=y
    
    #
    # TI OMAP Common Features
    #
    CONFIG_ARCH_OMAP_OTG=y
    # CONFIG_ARCH_OMAP1 is not set
    CONFIG_ARCH_OMAP2PLUS=y
    
    #
    # OMAP Feature Selections
    #
    CONFIG_OMAP_SMARTREFLEX=y
    CONFIG_OMAP_SMARTREFLEX_CLASS3=y
    CONFIG_OMAP_RESET_CLOCKS=y
    CONFIG_OMAP_MUX=y
    CONFIG_OMAP_MUX_DEBUG=y
    CONFIG_OMAP_MUX_WARNINGS=y
    CONFIG_OMAP_32K_TIMER=y
    # CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set
    CONFIG_OMAP_32K_TIMER_HZ=128
    CONFIG_OMAP_DM_TIMER=y
    # CONFIG_OMAP_PM_NONE is not set
    CONFIG_OMAP_PM_NOOP=y
    
    #
    # TI OMAP2/3/4 Specific Features
    #
    CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
    # CONFIG_ARCH_OMAP2 is not set
    CONFIG_ARCH_OMAP3=y
    # CONFIG_ARCH_OMAP4 is not set
    # CONFIG_ARCH_TI81XX is not set
    CONFIG_ARCH_OMAP3430=y
    CONFIG_OMAP_PACKAGE_CBB=y
    # CONFIG_OMAP_PACKAGE_CUS is not set
    
    #
    # OMAP Board Type
    #
    CONFIG_MACH_OMAP3_BEAGLE=y
    # CONFIG_MACH_DEVKIT8000 is not set
    # CONFIG_MACH_OMAP_LDP is not set
    # CONFIG_MACH_OMAP3530_LV_SOM is not set
    # CONFIG_MACH_OMAP3_TORPEDO is not set
    # CONFIG_MACH_OVERO is not set
    # CONFIG_MACH_OMAP3EVM is not set
    # CONFIG_MACH_OMAP3517EVM is not set
    # CONFIG_MACH_CRANEBOARD is not set
    # CONFIG_MACH_OMAP3_PANDORA is not set
    # CONFIG_MACH_OMAP3_TOUCHBOOK is not set
    # CONFIG_MACH_OMAP_3430SDP is not set
    # CONFIG_MACH_NOKIA_RM680 is not set
    # CONFIG_MACH_NOKIA_RX51 is not set
    # CONFIG_MACH_OMAP_ZOOM2 is not set
    # CONFIG_MACH_OMAP_ZOOM3 is not set
    # CONFIG_MACH_CM_T35 is not set
    # CONFIG_MACH_CM_T3517 is not set
    # CONFIG_MACH_IGEP0020 is not set
    # CONFIG_MACH_IGEP0030 is not set
    # CONFIG_MACH_SBC3530 is not set
    # CONFIG_MACH_OMAP_3630SDP is not set
    # CONFIG_OMAP3_EMU is not set
    # CONFIG_OMAP3_SDRC_AC_TIMING is not set
    
    #
    # Processor Features
    #
    CONFIG_ARM_THUMB=y
    CONFIG_ARM_THUMBEE=y
    
    #
    # Kernel Features
    #
    CONFIG_TICK_ONESHOT=y
    CONFIG_NO_HZ=y
    CONFIG_HIGH_RES_TIMERS=y
    CONFIG_PREEMPT_NONE=y
    CONFIG_HZ=128
    CONFIG_AEABI=y
    CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
    # CONFIG_LEDS is not set
    
    #
    # Boot options
    #
    CONFIG_ZBOOT_ROM_TEXT=0x0
    CONFIG_ZBOOT_ROM_BSS=0x0
    CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200"
    CONFIG_KEXEC=y
    CONFIG_ATAGS_PROC=y
    
    #
    # CPU Power Management
    #
    CONFIG_CPU_FREQ=y
    CONFIG_CPU_FREQ_TABLE=y
    CONFIG_CPU_FREQ_STAT=y
    CONFIG_CPU_FREQ_STAT_DETAILS=y
    CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
    CONFIG_CPU_FREQ_GOV_USERSPACE=y
    CONFIG_CPU_FREQ_GOV_ONDEMAND=y
    #
    # Floating point emulation
    #
    
    #
    # At least one emulation must be selected
    #
    CONFIG_FPE_NWFPE=y
    CONFIG_VFP=y
    CONFIG_VFPv3=y
    CONFIG_NEON=y
    
    #
    # Userspace binary formats
    #
    CONFIG_BINFMT_ELF=y
    CONFIG_HAVE_AOUT=y
    CONFIG_BINFMT_MISC=y
    
    #
    # Power management options
    #
    CONFIG_PM=y
    CONFIG_PM_DEBUG=y
    CONFIG_PM_SLEEP=y
    CONFIG_SUSPEND=y
    CONFIG_PM_RUNTIME=y
    CONFIG_NET=y
    
    #
    # Networking options
    #
    CONFIG_PACKET=y
    CONFIG_UNIX=y
    CONFIG_XFRM=y
    CONFIG_XFRM_USER=y
    CONFIG_NET_KEY=y
    CONFIG_NET_KEY_MIGRATE=y
    CONFIG_INET=y
    CONFIG_IP_MULTICAST=y
    CONFIG_IP_PNP=y
    CONFIG_IP_PNP_DHCP=y
    CONFIG_IP_PNP_BOOTP=y
    CONFIG_IP_PNP_RARP=y
    # CONFIG_INET_LRO is not set
    CONFIG_TCP_CONG_CUBIC=y
    CONFIG_DEFAULT_TCP_CONG="cubic"
    # CONFIG_IPV6 is not set
    
    #
    # Network testing
    #
    CONFIG_WIRELESS=y
    
    #
    # Generic Driver Options
    #
    CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
    CONFIG_PREVENT_FIRMWARE_BUILD=y
    CONFIG_MTD=y
    CONFIG_MTD_CONCAT=y
    CONFIG_MTD_CMDLINE_PARTS=y
    #
    # User Modules And Translation Layers
    #
    CONFIG_MTD_CHAR=y
    CONFIG_MTD_BLOCK=y
    CONFIG_MTD_OOPS=y
    #
    # RAM/ROM/Flash chip drivers
    #
    CONFIG_MTD_CFI=y
    CONFIG_MTD_CFI_INTELEXT=y
    
    #
    # Disk-On-Chip Device Drivers
    #
    CONFIG_MTD_NAND=y
    CONFIG_MTD_NAND_OMAP2=y
    CONFIG_MTD_ONENAND=y
    CONFIG_MTD_ONENAND_VERIFY_WRITE=y
    CONFIG_MTD_ONENAND_OMAP2=y
    
    #
    # UBI - Unsorted block images
    #
    CONFIG_BLK_DEV=y
    CONFIG_BLK_DEV_LOOP=y
    CONFIG_BLK_DEV_RAM=y
    CONFIG_BLK_DEV_RAM_SIZE=16384
    
    #
    # EEPROM support
    #
    CONFIG_EEPROM_LEGACY=y
    
    #
    # SCSI device support
    #
    CONFIG_SCSI=y
    CONFIG_SCSI_DMA=y
    
    #
    # SCSI support type (disk, tape, CD-ROM)
    #
    CONFIG_BLK_DEV_SD=y
    CONFIG_SCSI_MULTI_LUN=y
    CONFIG_SCSI_SCAN_ASYNC=y
    
    #
    # SCSI Transports
    #
    CONFIG_MD=y
    CONFIG_NETDEVICES=y
    
    #
    # MII PHY device drivers
    #
    CONFIG_SMSC_PHY=y
    CONFIG_NET_ETHERNET=y
    CONFIG_MII=y
    CONFIG_SMSC911X=y
    
    #
    # USB Network Adapters
    #
    CONFIG_USB_USBNET=y
    CONFIG_USB_NET_SMSC95XX=y
    CONFIG_USB_ALI_M5632=y
    CONFIG_USB_AN2720=y
    CONFIG_USB_EPSON2888=y
    CONFIG_USB_KC2190=y
    
    #
    # Input device support
    #
    CONFIG_INPUT=y
    
    #
    # Userland interfaces
    #
    CONFIG_INPUT_JOYDEV=y
    CONFIG_INPUT_EVDEV=y
    
    #
    # Input Device Drivers
    #
    CONFIG_INPUT_KEYBOARD=y
    CONFIG_KEYBOARD_GPIO=y
    CONFIG_KEYBOARD_TWL4030=y
    CONFIG_INPUT_TOUCHSCREEN=y
    CONFIG_TOUCHSCREEN_ADS7846=y
    CONFIG_INPUT_MISC=y
    CONFIG_INPUT_TWL4030_PWRBUTTON=y
    
    #
    # Character devices
    #
    CONFIG_VT_HW_CONSOLE_BINDING=y
    CONFIG_DEVKMEM=y
    #
    # Serial drivers
    #
    CONFIG_SERIAL_8250=y
    CONFIG_SERIAL_8250_CONSOLE=y
    CONFIG_SERIAL_8250_NR_UARTS=32
    CONFIG_SERIAL_8250_RUNTIME_UARTS=4
    CONFIG_SERIAL_8250_EXTENDED=y
    CONFIG_SERIAL_8250_MANY_PORTS=y
    CONFIG_SERIAL_8250_SHARE_IRQ=y
    CONFIG_SERIAL_8250_DETECT_IRQ=y
    CONFIG_SERIAL_8250_RSA=y
    
    #
    # Non-8250 serial port support
    #
    CONFIG_SERIAL_CORE=y
    CONFIG_SERIAL_CORE_CONSOLE=y
    # CONFIG_LEGACY_PTYS is not set
    CONFIG_HW_RANDOM=y
    CONFIG_I2C=y
    CONFIG_I2C_BOARDINFO=y
    CONFIG_I2C_COMPAT=y
    CONFIG_I2C_CHARDEV=y
    #
    # I2C system bus drivers (mostly embedded / system-on-chip)
    #
    CONFIG_I2C_OMAP=y
    CONFIG_SPI=y
    #
    # SPI Master Controller Drivers
    #
    CONFIG_SPI_OMAP24XX=y
    
    #
    # PPS support
    #
    CONFIG_DEBUG_GPIO=y
    CONFIG_GPIO_SYSFS=y
    #
    # I2C GPIO expanders:
    #
    CONFIG_GPIO_TWL4030=y
    
    #
    # MODULbus GPIO expanders:
    #
    # CONFIG_W1 is not set
    CONFIG_POWER_SUPPLY=y
    CONFIG_WATCHDOG=y
    CONFIG_OMAP_WATCHDOG=y
    CONFIG_TWL4030_WATCHDOG=y
    CONFIG_TWL4030_CORE=y
    CONFIG_TWL4030_POWER=y
    CONFIG_REGULATOR=y
    CONFIG_REGULATOR_DUMMY=y
    CONFIG_REGULATOR_TWL4030=y
    CONFIG_MEDIA_SUPPORT=y
    
    #
    # Multimedia core support
    #
    CONFIG_MEDIA_CONTROLLER=y
    CONFIG_VIDEO_DEV=y
    CONFIG_VIDEO_V4L2_COMMON=y
    CONFIG_VIDEO_ALLOW_V4L1=y
    CONFIG_VIDEO_V4L1_COMPAT=y
    CONFIG_VIDEO_V4L2_SUBDEV_API=y
    CONFIG_VIDEO_MEDIA=y
    
    #
    # Multimedia drivers
    #
    # CONFIG_IR_CORE is not set
    # CONFIG_MEDIA_ATTACH is not set
    # CONFIG_MEDIA_TUNER is not set
    # CONFIG_MEDIA_TUNER_CUSTOMISE is not set
    CONFIG_VIDEO_V4L2=y
    CONFIG_VIDEO_V4L1=y
    CONFIG_VIDEOBUF_GEN=y
    CONFIG_VIDEOBUF_DMA_CONTIG=y
    CONFIG_VIDEO_CAPTURE_DRIVERS=y
    CONFIG_VIDEO_MT9V113=y
    
    #
    # Video improvement chips
    #
    CONFIG_VIDEO_OMAP2_VOUT=y
    CONFIG_VIDEO_OMAP3=y
    CONFIG_VIDEO_OMAP3_DEBUG=y
    CONFIG_V4L_USB_DRIVERS=y
    CONFIG_USB_VIDEO_CLASS=y
    CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
    # CONFIG_RADIO_ADAPTERS is not set
    # CONFIG_DAB is not set
    
    #
    # Graphics support
    #
    CONFIG_FB=y
    CONFIG_FIRMWARE_EDID=y
    CONFIG_FB_CFB_FILLRECT=y
    CONFIG_FB_CFB_COPYAREA=y
    CONFIG_FB_CFB_IMAGEBLIT=y
    CONFIG_FB_MODE_HELPERS=y
    CONFIG_FB_TILEBLITTING=y
    
    #
    # Frame buffer hardware drivers
    #
    CONFIG_OMAP2_VRAM=y
    CONFIG_OMAP2_VRFB=y
    CONFIG_OMAP2_DSS=y
    CONFIG_OMAP2_VRAM_SIZE=4
    CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
    CONFIG_OMAP2_DSS_DPI=y
    CONFIG_OMAP2_DSS_VENC=y
    CONFIG_OMAP2_DSS_DSI=y
    CONFIG_OMAP2_DSS_USE_DSI_PLL=y
    CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=1
    CONFIG_FB_OMAP2=y
    CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
    CONFIG_FB_OMAP2_NUM_FBS=1
    
    #
    # OMAP2/3 Display Device Drivers
    #
    CONFIG_PANEL_GENERIC=y
    CONFIG_PANEL_SHARP_LS037V7DW01=y
    CONFIG_BACKLIGHT_LCD_SUPPORT=y
    CONFIG_LCD_CLASS_DEVICE=y
    CONFIG_LCD_PLATFORM=y
    CONFIG_BACKLIGHT_CLASS_DEVICE=y
    CONFIG_BACKLIGHT_GENERIC=m
    
    #
    # Display device support
    #
    CONFIG_DISPLAY_SUPPORT=y
    #
    # Console display driver support
    #
    CONFIG_LOGO=y
    CONFIG_LOGO_LINUX_MONO=y
    CONFIG_LOGO_LINUX_VGA16=y
    CONFIG_LOGO_LINUX_CLUT224=y
    CONFIG_SOUND=y
    CONFIG_SND=y
    CONFIG_SND_USB=y
    CONFIG_SND_USB_AUDIO=y
    CONFIG_SND_SOC=y
    CONFIG_SND_OMAP_SOC=y
    CONFIG_SND_OMAP_SOC_OMAP3EVM=y
    CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=y
    CONFIG_SND_SOC_I2C_AND_SPI=y
    CONFIG_HID_SUPPORT=y
    CONFIG_HID=y
    
    CONFIG_USB=y
    CONFIG_USB_DEBUG=y
    CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
    
    #
    # Miscellaneous USB options
    #
    CONFIG_USB_DEVICEFS=y
    # CONFIG_USB_DEVICE_CLASS is not set
    # CONFIG_USB_DYNAMIC_MINORS is not set
    CONFIG_USB_SUSPEND=y
    CONFIG_USB_OTG=y
    # CONFIG_USB_OTG_WHITELIST is not set
    # CONFIG_USB_MON is not set
    
    #
    # USB Host Controller Drivers
    #
    CONFIG_USB_EHCI_HCD=y
    CONFIG_USB_MUSB_HDRC=y
    CONFIG_USB_MUSB_SOC=y
    
    #
    # OMAP 343x high speed USB support
    #
    CONFIG_USB_MUSB_OTG=y
    CONFIG_USB_GADGET_MUSB_HDRC=y
    CONFIG_USB_MUSB_DEBUG=y
    
    #
    # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
    #
    
    #
    # also be needed; see USB_STORAGE Help for more info
    #
    CONFIG_USB_STORAGE=y
    # CONFIG_USB_LIBUSUAL is not set
    #
    # USB Miscellaneous drivers
    #
    CONFIG_USB_TEST=y
    CONFIG_USB_GADGET=y
    # CONFIG_USB_GADGET_DEBUG is not set
    # CONFIG_USB_GADGET_DEBUG_FILES is not set
    # CONFIG_USB_GADGET_DEBUG_FS is not set
    CONFIG_USB_GADGET_DUALSPEED=y
    # CONFIG_USB_ZERO is not set
    # CONFIG_USB_AUDIO is not set
    CONFIG_USB_ETH=y
    CONFIG_USB_ETH_RNDIS=y
    CONFIG_MMC=y
    # CONFIG_MMC_DEBUG is not set
    # CONFIG_MMC_UNSAFE_RESUME is not set
    
    #
    # MMC/SD/SDIO Card Drivers
    #
    CONFIG_SDIO_UART=y
    
    #
    # MMC/SD/SDIO Host Controller Drivers
    #
    CONFIG_MMC_OMAP=y
    CONFIG_MMC_OMAP_HS=y
    CONFIG_RTC_LIB=y
    CONFIG_RTC_CLASS=y
    
    #
    # RTC interfaces
    #
    CONFIG_RTC_INTF_SYSFS=y
    CONFIG_RTC_INTF_PROC=y
    CONFIG_RTC_INTF_DEV=y
    
    #
    # I2C RTC drivers
    #
    CONFIG_RTC_DRV_TWL4030=y
    
    #
    # File systems
    #
    CONFIG_EXT2_FS=y
    CONFIG_EXT3_FS=y
    # CONFIG_EXT3_FS_XATTR is not set
    CONFIG_INOTIFY=y
    CONFIG_QUOTA=y
    CONFIG_QFMT_V2=y
    
    #
    # DOS/FAT/NT Filesystems
    #
    CONFIG_MSDOS_FS=y
    CONFIG_VFAT_FS=y
    #
    # Pseudo filesystems
    #
    CONFIG_PROC_FS=y
    CONFIG_SYSFS=y
    CONFIG_TMPFS=y
    CONFIG_JFFS2_FS=y
    CONFIG_JFFS2_SUMMARY=y
    CONFIG_JFFS2_FS_XATTR=y
    CONFIG_JFFS2_COMPRESSION_OPTIONS=y
    CONFIG_JFFS2_LZO=y
    CONFIG_JFFS2_RUBIN=y
    CONFIG_CRAMFS=y
    CONFIG_NFS_FS=y
    CONFIG_NFS_V3=y
    CONFIG_NFS_V3_ACL=y
    CONFIG_NFS_V4=y
    CONFIG_ROOT_NFS=y
    CONFIG_LOCKD=y
    CONFIG_LOCKD_V4=y
    
    #
    # Partition Types
    #
    CONFIG_PARTITION_ADVANCED=y
    CONFIG_MSDOS_PARTITION=y
    CONFIG_NLS=y
    CONFIG_NLS_DEFAULT="iso8859-1"
    CONFIG_NLS_CODEPAGE_437=y
    CONFIG_NLS_ISO8859_1=y
    
    #
    # Kernel hacking
    #
    CONFIG_PRINTK_TIME=y
    CONFIG_MAGIC_SYSRQ=y
    CONFIG_DEBUG_FS=y
    CONFIG_DEBUG_KERNEL=y
    CONFIG_SCHEDSTATS=y
    CONFIG_TIMER_STATS=y
    CONFIG_PROVE_LOCKING=y
    CONFIG_LOCK_STAT=y
    CONFIG_DEBUG_SPINLOCK_SLEEP=y
    CONFIG_STACKTRACE=y
    CONFIG_DEBUG_INFO=y
    # CONFIG_RCU_CPU_STALL_DETECTOR is not set
    CONFIG_ARM_UNWIND=y
    CONFIG_DEBUG_LL=y
    # CONFIG_EARLY_PRINTK is not set
    
    #
    # Security options
    #
    CONFIG_SECURITY=y
    
    
    #
    # Random Number Generation
    #
    # CONFIG_CRYPTO_ANSI_CPRNG is not set
    CONFIG_CRYPTO_HW=y
    #
    # Library routines
    #
    CONFIG_CRC_CCITT=y
    CONFIG_CRC32=y
    CONFIG_LIBCRC32C=y
    CONFIG_HAS_IOMEM=y
    CONFIG_HAS_IOPORT=y
    CONFIG_HAS_DMA=y
    

    You can also download the 2.6.37 kernel for AM37xx/BeaglexM from am37x-evm-sdk-src-05.07.00.00.tar.gz

    Or 3.3 kernel for XM: beagleboard-sdk-src-05.07.00.00.tar.gz

  • Bin,

    I tried config file which you provided (1263.omap3_beagle_defconfig.txt) but it doesn't work.

    Is this SDK beagleboard-sdk-src-05.07.00.00.tar.gz especially for Beagle board - xM Rev C? .config file is written for BB-xM?

  • I personally did not test it on BB-xM, but yes, this package is dedicated for Beagleboard, including xM.

  • Bin,

    I can't boot that version of kernel via NFS. I extracted Linux kernel 3.3.7 into /rootfs/usr/src/ folder, built it with cross make -j5 uImage modules command from this blog: http://veter-project.blogspot.com/2012/03/comfortable-kernel-workflow-on.html. Now, I can load uImage but it stops:


    ---------------------------------------------------------------------------------------------------------------------

    U-Boot SPL 2011.12-dirty (Dec 31 2012 - 11:51:48)
    Texas Instruments Revision detection unimplemented
    OMAP SD/MMC: 0
    timed out in wait_for_bb: I2C_STAT=1000
    reading u-boot.img
    reading u-boot.img


    U-Boot 2011.12-dirty (Dec 31 2012 - 11:51:48)

    OMAP36XX/37XX-GP ES1.2, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz
    OMAP3 Beagle board + LPDDR/NAND
    I2C: ready
    DRAM: 512 MiB
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0
    *** Warning - readenv() failed, using default environment

    In: serial
    Out: serial
    Err: serial
    Beagle xM Rev C
    No EEPROM on expansion board
    No EEPROM on expansion board
    Die ID #401600029ff80000016849aa1402c006
    Net: Net Initialization Skipped
    No ethernet found.
    Hit any key to stop autoboot: 0
    The user button is currently NOT pressed.
    SD/MMC found on device 0
    reading uEnv.txt

    762 bytes read
    Loaded environment from uEnv.txt
    Importing environment from mmc ...
    Running uenvcmd ...
    Initializing net ...
    Data (writethrough) Cache is OFF
    (Re)start USB...
    USB: Register 1313 NbrPorts 3
    USB EHCI 1.00
    scanning bus for devices... 3 USB Device(s) found
    scanning bus for storage devices... 0 Storage Device(s) found
    scanning bus for ethernet devices... 1 Ethernet Device(s) found
    Loading kernel ...
    Waiting for Ethernet connection... done.
    Using sms0 device
    File transfer via NFS from server 192.168.2.177; our IP address is 192.168.2.100
    Filename '/home/dev4/work/rootfs/boot/uImage'.
    Load address: 0x80200000
    Loading: #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    ###################
    done
    Bytes transferred = 3424632 (344178 hex)
    Booting from nfs ...
    ## Booting kernel from Legacy Image at 80200000 ...
    Image Name: Linux-3.3.7
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 3424568 Bytes = 3.3 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK
    Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    [ 0.000000] Booting Linux on physical CPU 0
    [ 0.000000] Initializing cgroup subsys cpuset
    [ 0.000000] Initializing cgroup subsys cpu
    [ 0.000000] Linux version 3.3.7 (dev4@ubuntu) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #4 Fri Apr 26 16:04:16 CEST 2013
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine: OMAP3 Beagle Board
    [ 0.000000] Reserving 14680064 bytes SDRAM for VRAM
    [ 0.000000] Memory policy: ECC disabled, Data cache writeback
    [ 0.000000] OMAP3630 ES1.2 (l2cache iva sgx neon isp 192mhz_clk )
    [ 0.000000] Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 113920
    [ 0.000000] Kernel command line: console=ttyO2,115200n8 mpurate=800 mem=80M@0x80000000 mem=384M@0x88000000 xeno_hal.cpufreq=800000000 ip=192.168.2.100:192.168.2.177:192.168.2.1:255.255.255.0:beagleboard:usb0:off nfsroot=192.168.2.177:/home/dev4/work/rootfs,vers=3 root=/dev/nfs rw
    [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [ 0.000000] allocated 1048576 bytes of page_cgroup
    [ 0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
    [ 0.000000] Memory: 80MB 369MB = 449MB total
    [ 0.000000] Memory: 447548k/447548k available, 27588k reserved, 0K highmem
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
    [ 0.000000] vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
    [ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc0620ad0 (6243 kB)
    [ 0.000000] .init : 0xc0621000 - 0xc0658000 ( 220 kB)
    [ 0.000000] .data : 0xc0658000 - 0xc06a8900 ( 323 kB)
    [ 0.000000] .bss : 0xc06a8924 - 0xc06e21f4 ( 231 kB)
    [ 0.000000] NR_IRQS:474
    [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
    [ 0.000000] Total of 96 interrupts on 1 active controller
    [ 0.000000] OMAP clockevent source: GPTIMER12 at 32768 Hz
    [ 0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
    [ 0.000000] Console: colour dummy device 80x30
    [ 0.000183] Calibrating delay loop... 490.52 BogoMIPS (lpj=1916928)
    [ 0.032135] pid_max: default: 32768 minimum: 301
    [ 0.032318] Mount-cache hash table entries: 512
    [ 0.032653] Initializing cgroup subsys cpuacct
    [ 0.032653] Initializing cgroup subsys memory
    [ 0.032714] Initializing cgroup subsys devices
    [ 0.032714] Initializing cgroup subsys freezer
    [ 0.032745] Initializing cgroup subsys blkio
    [ 0.032745] Initializing cgroup subsys perf_event
    [ 0.032836] CPU: Testing write buffer coherency: ok
    [ 0.033081] Setting up static identity map for 0x80469a50 - 0x80469aa8
    [ 0.033752] devtmpfs: initialized
    [ 0.054626] print_constraints: dummy:
    [ 0.054870] NET: Registered protocol family 16
    [ 0.055053] GPMC revision 5.0
    [ 0.056396] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
    [ 0.056488] OMAP GPIO hardware version 2.5
    [ 0.056610] gpiochip_add: registered GPIOs 32 to 63 on device: gpio
    [ 0.056793] gpiochip_add: registered GPIOs 64 to 95 on device: gpio
    [ 0.056976] gpiochip_add: registered GPIOs 96 to 127 on device: gpio
    [ 0.057159] gpiochip_add: registered GPIOs 128 to 159 on device: gpio
    [ 0.057342] gpiochip_add: registered GPIOs 160 to 191 on device: gpio
    [ 0.057922] omap_mux_init: Add partition: #1: core, flags: 0
    [ 0.059051] OMAP3 Beagle Rev: xM C
    [ 0.060913] Reprogramming SDRC clock to 400000000 Hz
    [ 0.060943] dpll3_m2_clk rate change failed: -22
    [ 0.062683] usbhs_omap: alias fck already exists
    [ 0.062774] Found NAND on CS0
    [ 0.062805] Registering NAND on CS0
    [ 0.063262] hw-breakpoint: debug architecture 0x4 unsupported.
    [ 0.066528] omap-mcbsp.2: alias fck already exists
    [ 0.066711] omap-mcbsp.3: alias fck already exists
    [ 0.067901] Calibrating delay loop (skipped) already calibrated this CPU
    [ 0.067993] Switched to new clocking rate (Crystal/Core/MPU): 26.0/400/800 MHz
    [ 0.068145] OMAP DMA hardware revision 5.0
    [ 0.074340] bio: create slab <bio-0> at 0
    [ 0.075134] SCSI subsystem initialized
    [ 0.076324] usbcore: registered new interface driver usbfs
    [ 0.076416] usbcore: registered new interface driver hub
    [ 0.076507] usbcore: registered new device driver usb
    [ 0.077087] omap_i2c omap_i2c.1: bus 1 rev1.4.0 at 2600 kHz
    [ 0.079284] twl4030: PIH (irq 7) chaining IRQs 368..375
    [ 0.079376] twl4030: power (irq 373) chaining IRQs 376..383
    [ 0.079803] twl4030: gpio (irq 368) chaining IRQs 384..401
    [ 0.080047] gpiochip_add: registered GPIOs 192 to 211 on device: twl4030
    [ 0.081878] print_constraints: VUSB1V5: 1500 mV normal standby
    [ 0.082183] print_constraints: VUSB1V8: 1800 mV normal standby
    [ 0.082489] print_constraints: VUSB3V1: 3100 mV normal standby
    [ 0.085510] twl4030_usb twl4030_usb: Initialized TWL4030 USB module
    [ 0.085998] print_constraints: VMMC1: 1850 <--> 3150 mV at 3150 mV normal standby
    [ 0.086364] print_constraints: VDAC: 1800 mV normal standby
    [ 0.086730] print_constraints: VAUX2_4030: 1800 mV normal
    [ 0.087127] print_constraints: VDVI: 1800 mV normal standby
    [ 0.087585] print_constraints: VSIM: 1800 <--> 3000 mV at 1800 mV normal standby
    [ 0.087890] omap_i2c omap_i2c.3: bus 3 rev1.4.0 at 100 kHz
    [ 0.088531] omap-iommu omap-iommu.0: isp registered
    [ 0.088653] Advanced Linux Sound Architecture Driver Version 1.0.24.
    [ 0.089141] Bluetooth: Core ver 2.16
    [ 0.089202] NET: Registered protocol family 31
    [ 0.089202] Bluetooth: HCI device and connection manager initialized
    [ 0.089202] Bluetooth: HCI socket layer initialized
    [ 0.089233] Bluetooth: L2CAP socket layer initialized
    [ 0.089233] Bluetooth: SCO socket layer initialized
    [ 0.089477] Switching to clocksource 32k_counter
    [ 0.098571] usbhs_omap usbhs_omap: xclk60mhsp1_ck set parentfailed error:-22
    [ 0.098571] usbhs_omap usbhs_omap: xclk60mhsp2_ck set parentfailed error:-22
    [ 0.098937] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    [ 0.099365] musb-hdrc musb-hdrc: USB OTG mode controller at fa0ab000 using DMA, IRQ 92
    [ 0.099639] NET: Registered protocol family 2
    [ 0.099822] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.100128] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
    [ 0.100402] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
    [ 0.100555] TCP: Hash tables configured (established 16384 bind 16384)
    [ 0.100585] TCP reno registered
    [ 0.100585] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.100616] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.100799] NET: Registered protocol family 1
    [ 0.101074] RPC: Registered named UNIX socket transport module.
    [ 0.101104] RPC: Registered udp transport module.
    [ 0.101104] RPC: Registered tcp transport module.
    [ 0.101104] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.103790] VFS: Disk quotas dquot_6.5.2
    [ 0.103851] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [ 0.104370] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [ 0.104705] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
    [ 0.104736] JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
    [ 0.105346] msgmni has been set to 874
    [ 0.106475] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
    [ 0.106567] io scheduler noop registered
    [ 0.106567] io scheduler deadline registered
    [ 0.106628] io scheduler cfq registered (default)
    [ 0.107208] OMAP DSS rev 2.0
    [ 0.108856] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    [ 0.109924] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
    [ 0.110260] omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
    [ 0.876312] console [ttyO2] enabled
    [ 0.880371] omap_uart.3: ttyO3 at MMIO 0x49042000 (irq = 80) is a OMAP UART3
    [ 0.894256] brd: module loaded
    [ 0.900695] loop: module loaded
    [ 0.905517] No NAND device found
    [ 0.909149] No NAND device found
    [ 0.913299] usbcore: registered new interface driver catc
    [ 0.919036] usbcore: registered new interface driver kaweth
    [ 0.924926] pegasus: v0.6.14 (2006/09/27), Pegasus/Pegasus II USB Ethernet driver
    [ 0.932800] usbcore: registered new interface driver pegasus
    [ 0.938781] usbcore: registered new interface driver rtl8150
    [ 0.944793] usbcore: registered new interface driver asix
    [ 0.950500] usbcore: registered new interface driver cdc_ether
    [ 0.956665] usbcore: registered new interface driver dm9601
    [ 0.962554] usbcore: registered new interface driver smsc75xx
    [ 0.968658] usbcore: registered new interface driver smsc95xx
    [ 0.974731] usbcore: registered new interface driver gl620a
    [ 0.980621] usbcore: registered new interface driver net1080
    [ 0.986541] usbcore: registered new interface driver plusb
    [ 0.992340] usbcore: registered new interface driver rndis_host
    [ 0.998596] usbcore: registered new interface driver cdc_subset
    [ 1.004852] usbcore: registered new interface driver zaurus
    [ 1.010742] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
    [ 1.018829] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 3.035003] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
    [ 3.041259] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
    [ 3.049133] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
    [ 3.066345] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
    [ 3.072387] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 3.079559] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 3.087158] usb usb1: Product: OMAP-EHCI Host Controller
    [ 3.092773] usb usb1: Manufacturer: Linux 3.3.7 ehci_hcd
    [ 3.098388] usb usb1: SerialNumber: ehci-omap.0
    [ 3.103607] hub 1-0:1.0: USB hub found
    [ 3.107604] hub 1-0:1.0: 3 ports detected
    [ 3.136657] Initializing USB Mass Storage driver...
    [ 3.141815] usbcore: registered new interface driver usb-storage
    [ 3.148162] USB Mass Storage support registered.
    [ 3.153320] mousedev: PS/2 mouse device common for all mice
    [ 3.160614] input: twl4030_pwrbutton as /devices/platform/omap/omap_i2c.1/i2c-1/1-0049/twl4030_pwrbutton/input/input0
    [ 3.172088] i2c /dev entries driver
    [ 3.176086] Linux media interface: v0.10
    [ 3.180206] Linux video capture interface: v2.00
    [ 3.185638] OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
    [ 3.192047] Bluetooth: HCI UART driver ver 2.2
    [ 3.196655] Bluetooth: HCI H4 protocol initialized
    [ 3.201751] Bluetooth: HCI BCSP protocol initialized
    [ 3.207031] Bluetooth: HCILL protocol initialized
    [ 3.211914] Bluetooth: HCIATH3K protocol initialized
    [ 3.217193] usbcore: registered new interface driver btusb
    [ 3.223175] cpuidle: using governor ladder
    [ 3.227416] cpuidle: using governor menu
    [ 3.454711] usbcore: registered new interface driver usbhid
    [ 3.460632] usbhid: USB HID core driver
    [ 3.465087] usbcore: registered new interface driver snd-usb-audio
    [ 3.472198] OMAP3 Beagle/Devkit8000 SoC init
    [ 3.559234] asoc: twl4030-hifi <-> omap-mcbsp-dai.1 mapping ok
    [ 3.568145] ALSA device list:
    [ 3.571228] #0: omap3beagle
    [ 3.574401] oprofile: hardware counters not available
    [ 3.579620] oprofile: using timer interrupt.
    [ 3.584411] TCP cubic registered
    [ 3.587738] NET: Registered protocol family 17
    [ 3.592468] NET: Registered protocol family 15
    [ 3.597198] lib80211: common routines for IEEE802.11 drivers
    [ 3.603179] Registering the dns_resolver key type
    [ 3.608184] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 3.616241] ThumbEE CPU extension supported.
    [ 3.624328] sr_init: No PMIC hook to init smartreflex
    [ 3.629852] smartreflex smartreflex.0: omap_sr_probe: SmartReflex driver initialized
    [ 3.638092] smartreflex smartreflex.1: omap_sr_probe: SmartReflex driver initialized
    [ 3.646301] SmartReflex Class3 initialized
    [ 3.654541] clock: disabling unused clocks to save power
    [ 3.661193] registered taskstats version 1
    [ 3.678955] Console: switching to colour frame buffer device 80x30
    [ 3.691040] omapdss DPI: Could not find exact pixel clock. Requested 23500 kHz, got 24000 kHz
    [ 3.704132] regulator_init_complete: VDAC: incomplete constraints, leaving on
    [ 3.712249] input: gpio-keys as /devices/platform/gpio-keys/input/input1
    [ 3.719665] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
    [ 3.838439] mmc0: host does not support reading read-only switch. assuming write-enable.
    [ 3.849792] mmc0: new high speed SDHC card at address 1234
    [ 3.855957] mmcblk0: mmc0:1234 SA04G 3.63 GiB
    [ 3.862670] mmcblk0: p1
    [ 110.855804] VFS: Unable to mount root fs via NFS, trying floppy.
    [ 110.862579] VFS: Cannot open root device "nfs" or unknown-block(2,0)
    [ 110.869293] Please append a correct "root=" boot option; here are the available partitions:
    [ 110.878082] b300 3813376 mmcblk0 driver: mmcblk
    [ 110.883728] b301 3812352 mmcblk0p1 00000000-0000-0000-0000-000000000mmcblk0p1
    [ 110.892150] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

    ------------------------------------------------------------------------------------

    My uEnv.txt file have the following content:

    serverip=192.168.2.177
    ipaddr=192.168.2.100
    netmask=255.255.255.0
    gatewayip=192.168.2.1
    hostname=beagleboard
    console=ttyO2,115200n8
    optargs=mem=80M@0x80000000 mem=384M@0x88000000 xeno_hal.cpufreq=800000000
    mpurate=800
    root=/dev/nfs rw
    rootpath=/home/dev4/work/rootfs
    nfsdevice=usb0:off
    nfsrootargs=vers=3
    usbethaddr=76:E9:8B:BD:DE:92
    ethaddr=76:E9:8B:BD:DE:92
    nfsargs=setenv bootargs console=${console} mpurate=${mpurate} ${optargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${nfsdevice} nfsroot=${serverip}:${rootpath},${nfsrootargs} root=${root}
    uenvcmd=echo Initializing net ...; dcache off; usb start; echo Loading kernel ...; nfs ${loadaddr} ${serverip}:${rootpath}/boot/uImage ; echo Booting from nfs ...; run nfsargs; bootm ${loadaddr}


    One guy, RobertCNelson, told me "Yuck...v3.3.x was a crap shoot with respect to usb....." and he suggested me to patch the kernel (3.3.7) with this patches: https://github.com/RobertCNelson/stable-kernel/tree/v3.3.x/patches/beagle

    0001-ARM-OMAP3-USB-Fix-the-EHCI-ULPI-PHY-reset-issue.patch

    0001-ARM-OMAP3-clock-data-fill-in-some-missing-clockdomai.patch

    0001-Turn-on-the-USB-regulator-on-Beagle-xM-explicitly-wh.patch

    0001-omap3_beagle-init-uart2-for-beagle-rev-AX-BX-only.patch


    I patched Linux kernel 3.3.7, built it and tried to boot but still I can't get login prompt. Do you know something about that problem in Linux kernel 3.3.7?

  • I personally don't have experience on 3.3.x kernel and don't have comments for the patches you listed.

    The error message you had before 'error inserting 'g_hid.ko': -1 No such device.' is due to incomplete hid gadget driver. You can follow Documentation/usb/gadget_hid.txt to add your own platform device portion.

    For your reference, the following patch is what I tried and it works with the 3.3 kernel from the link I provided above with SD card boot.

    From 6363b29be2c2b477a723b74e52025511be280979 Mon Sep 17 00:00:00 2001
    From: Bin Liu <b-liu@ti.com>
    Date: Fri, 18 Jan 2013 10:27:57 -0600
    Subject: [PATCH] patched hid gadget
    
    ---
     drivers/usb/gadget/hid.c |   61 ++++++++++++++++++++++++++++++++++++++++++++++
     1 files changed, 61 insertions(+), 0 deletions(-)
    
    diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c
    index f888c3e..c037039 100644
    --- a/drivers/usb/gadget/hid.c
    +++ b/drivers/usb/gadget/hid.c
    @@ -16,6 +16,8 @@
     #include <linux/platform_device.h>
     #include <linux/list.h>
     
    +#include <linux/usb/g_hid.h>
    +
     #define DRIVER_DESC		"HID Gadget"
     #define DRIVER_VERSION		"2010/03/16"
     
    @@ -49,6 +51,57 @@ struct hidg_func_node {
     
     static LIST_HEAD(hidg_func_list);
     
    +
    +/* hid descriptor for a keyboard */
    +static struct hidg_func_descriptor my_hid_data = {
    +	.subclass		= 0, /* No subclass */
    +	.protocol		= 1, /* Keyboard */
    +	.report_length		= 8,
    +	.report_desc_length	= 63,
    +	.report_desc		= {
    +		0x05, 0x01,	/* USAGE_PAGE (Generic Desktop)	          */
    +		0x09, 0x06,	/* USAGE (Keyboard)                       */
    +		0xa1, 0x01,	/* COLLECTION (Application)               */
    +		0x05, 0x07,	/*   USAGE_PAGE (Keyboard)                */
    +		0x19, 0xe0,	/*   USAGE_MINIMUM (Keyboard LeftControl) */
    +		0x29, 0xe7,	/*   USAGE_MAXIMUM (Keyboard Right GUI)   */
    +		0x15, 0x00,	/*   LOGICAL_MINIMUM (0)                  */
    +		0x25, 0x01,	/*   LOGICAL_MAXIMUM (1)                  */
    +		0x75, 0x01,	/*   REPORT_SIZE (1)                      */
    +		0x95, 0x08,	/*   REPORT_COUNT (8)                     */
    +		0x81, 0x02,	/*   INPUT (Data,Var,Abs)                 */
    +		0x95, 0x01,	/*   REPORT_COUNT (1)                     */
    +		0x75, 0x08,	/*   REPORT_SIZE (8)                      */
    +		0x81, 0x03,	/*   INPUT (Cnst,Var,Abs)                 */
    +		0x95, 0x05,	/*   REPORT_COUNT (5)                     */
    +		0x75, 0x01,	/*   REPORT_SIZE (1)                      */
    +		0x05, 0x08,	/*   USAGE_PAGE (LEDs)                    */
    +		0x19, 0x01,	/*   USAGE_MINIMUM (Num Lock)             */
    +		0x29, 0x05,	/*   USAGE_MAXIMUM (Kana)                 */
    +		0x91, 0x02,	/*   OUTPUT (Data,Var,Abs)                */
    +		0x95, 0x01,	/*   REPORT_COUNT (1)                     */
    +		0x75, 0x03,	/*   REPORT_SIZE (3)                      */
    +		0x91, 0x03,	/*   OUTPUT (Cnst,Var,Abs)                */
    +		0x95, 0x06,	/*   REPORT_COUNT (6)                     */
    +		0x75, 0x08,	/*   REPORT_SIZE (8)                      */
    +		0x15, 0x00,	/*   LOGICAL_MINIMUM (0)                  */
    +		0x25, 0x65,	/*   LOGICAL_MAXIMUM (101)                */
    +		0x05, 0x07,	/*   USAGE_PAGE (Keyboard)                */
    +		0x19, 0x00,	/*   USAGE_MINIMUM (Reserved)             */
    +		0x29, 0x65,	/*   USAGE_MAXIMUM (Keyboard Application) */
    +		0x81, 0x00,	/*   INPUT (Data,Ary,Abs)                 */
    +		0xc0		/* END_COLLECTION                         */
    +	}
    +};
    +
    +static struct platform_device my_hid = {
    +	.name			= "hidg",
    +	.id			= 0,
    +	.num_resources		= 0,
    +	.resource		= 0,
    +	.dev.platform_data	= &my_hid_data,
    +};
    +
     /*-------------------------------------------------------------------------*/
     
     static struct usb_device_descriptor device_desc = {
    @@ -267,6 +320,13 @@ static int __init hidg_init(void)
     {
     	int status;
     
    +	status = platform_device_register(&my_hid);
    +	if (status < 0) {
    +		printk("____ reg failed\n");
    +		platform_device_unregister(&my_hid);
    +		return status;
    +	}
    +
     	status = platform_driver_probe(&hidg_plat_driver,
     				hidg_plat_driver_probe);
     	if (status < 0)
    @@ -283,6 +343,7 @@ module_init(hidg_init);
     static void __exit hidg_cleanup(void)
     {
     	platform_driver_unregister(&hidg_plat_driver);
    +	platform_device_unregister(&my_hid);
     	usb_composite_unregister(&hidg_driver);
     }
     module_exit(hidg_cleanup);
    -- 
    1.7.0.4
    
    

  • Bin,

    Now, I can insert g_hid.ko module but I can't get hidg file in /dev/ folder. I can't figure out why?!


    Regards,

    Vladimir

  • I have /dev/hidg0 on my BBxM.

    Do you use the root filesystem provided in the TI SDK package?

    Please provide the kernel log when 'insmod g_hid.ko'.

  • Bin,

    No, I don't use root filesystem provided in the TI SDK package. I used root filesystem (Angstrom-Beagleboard-demo-image-glibc-ipk-2011.1-beagleboard.rootfs.tar.bz2) from this site: http://downloads.angstrom-distribution.org/demo/beagleboard/

    Never mind, now I'm starting to develop on SBC8018 board. I hope I'll have less problems than with BeagleBoard-xM.



    Thank you anyway for help,

    Vladimir