The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 871 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 871 errorHandler->error



Hello There, Guest! Register

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
building linux kernel and modules
#1
So I wanted to rebuild linux kernel for leaptv to enable some extra kernel modules like
usb HID - for usb keyboards,mouse and gamepads
usb storage - flash sticks, card readers, hard disks, dvd roms
framebuffer console - to have shell console on screen with keyboard or just to see kernel output garbage on screen ;-)

the kernel source is inside the source code drop https://mega.nz/#%21pNoxUSjI%21SyAS6O_Um...ebFIv6lit4 as archive linux-3.4.5+svn-r1382-patched.tar.gz

The device has 3.4.24 version but luckily the archive name is misleading and it really contains this version. The device code name appears to be glasgow so I built it like this

Code:
cp arch/arm/configs/nxp4330_glasgow_defconfig .config
make ARCH=arm CROSS_COMPILE=/mnt/resource/leaptv/buildroot-2015.11.1/output/host/usr/bin/arm-linux-

So far so good the result builds fine.
Then I enabled usb hid, framebuffer console and usb storage via menuconfig
Code:
make ARCH=arm CROSS_COMPILE=/mnt/resource/leaptv/buildroot-2015.11.1/output/host/usr/bin/arm-linux- menuconfig
bu so far I have mixed results. The framebuffer modules build fine and can be 'insmod'-ed correctly  but usb storage and hid are missing other modules which current kernel source does not build for me.

For usb storage I need scsi support, so even if I enable both as a modules it only builds scsi cdrom.ko module for me Sad 
   
No scsi and scsi disk kernel modules get build. And when also enabling usb storage I see error when building it

Code:
 CHK     include/linux/version.h
 CHK     include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
 CALL    scripts/checksyscalls.sh
 CC [M]  drivers/usb/storage/scsiglue.o
 CC [M]  drivers/usb/storage/protocol.o
 CC [M]  drivers/usb/storage/transport.o
 CC [M]  drivers/usb/storage/usb.o
 CC [M]  drivers/usb/storage/initializers.o
 CC [M]  drivers/usb/storage/sierra_ms.o
 CC [M]  drivers/usb/storage/option_ms.o
 CC [M]  drivers/usb/storage/usual-tables.o
 LD [M]  drivers/usb/storage/usb-storage.o
 Building modules, stage 2.
 MODPOST 8 modules
ERROR: "scsi_get_host_dev" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "scsi_host_alloc" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "scsi_normalize_sense" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "scsi_add_host_with_dma" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "scsi_cmd_get_serial" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "scsi_eh_restore_cmnd" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "scsi_is_host_device" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "scsi_scan_host" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "scsi_host_put" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "scsi_eh_prep_cmnd" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "scsi_sense_desc_find" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "scsi_report_bus_reset" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "scsi_remove_host" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "scsi_report_device_reset" [drivers/usb/storage/usb-storage.ko] undefined!
/mnt/resource/leaptv/linux-3.4.5/scripts/Makefile.modpost:91: recipe for target '__modpost' failed
make[1]: *** [__modpost] Error 1
Makefile:1096: recipe for target 'modules' failed
make: *** [modules] Error 2
So it looks like for some reason the scsi code is not built and then it fails.

And similar for usb keyboard mouse, it does not build generic HID support. This time at least modules build fine but usbhid.ko cannot be inserted because it misses symbols from generic hid modules (hid.ko, hid_generic.ko) which do _not_ get built even if enabled in config as modules.
   

I guess it can be related to usb gadget storage modules being enabled and conflicting with the host mode drivers in some way but this should work in general. Maybe leapfrog/nxp engineers broke something in the kernel dependencies when adding their drivers.

I'll continue with this and let you know when I get it working. If someone finds the reason why it does not build those (scsi, generic hid) modules then let me know too.
Reply


Messages In This Thread
building linux kernel and modules - by fanoush - 01-18-2016, 01:35 AM

Forum Jump: