Hello,
I've recently bought a MELE A1000 [link], which currently has ICS and Linux kernel version 3.0.8.
But I've come across a problem; my Xbox 360 wired usb joystick isn't working with the MELE.
Research tells me that the module isn't compiled/included in the kernel [link]
This gives me two options, each with it's problems:
1- Re-compile the kernel, including the Xpad module:
I'd have to get the kernel source (either this "generic" kernel, or this Allwinner-specific kernel) then include it in the boot image, which is specific for the MELEA1000 link (check the first comment with the Chinese link to the official image)
Problems with this option
a) I don't know if the generic kernel will work with my device (Are there differences other than included modules?)
b) I can't compile the specific Allwinner kernel for some reason
c) Will the specific boot image work with a custom kernel? I think so.
2- Compile and include the module with insmod
I'd have to get the source of the ffmemless module [Source] and the xpad module [Source], compile them and do insmod to get them working.
Problems with this option
a) I can't seem to compile the modules in the correct version for my kernel (kernel 3.0.8+ #24 PREEMPT, armv71)
b) the precompiled modules I found were for 2.6*
Easiest scenario: compile modules + insmod.
Ideal scenario: get custom kernel, working + mod the rom (this is not within this thread's scope)
Could you give me any links, ideas or keywords to help me continue?
PS: I'm a programmer and I have previously modded/compiled kernels (from Debian's official repositories though)
Thanks
With information I've been reading I got up to this point:
Download the ARM kernel
git clone git://github.com/amery/linux-allwinner.git
Install the necessary libraries / binaries
apt-get install gcc-4.4-arm-linux-gnueabi build-essential u-boot-tools (if u-boot-tools not found, try uboot-mkimage)
Configure
make ARCH=arm sun4i_defconfig
make ARCH=arm xconfig
Check the following modules:
Input device support -> Support for memoryless force-feedback device
Input device support -> Joystick / gamepad
Input device support -> Joystick / gamepad -> X-box gamepad
Compile the modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j3 INSTALL_MOD_PATH=output modules
Then move the xpad.ko module to the MELE and run insmod xpad.ko, but I'm stuck with xpad: disagrees about version of symbol module_layout
I'm guessing this is a compile issue.
I've started a blog in which I'll try to document everything I do in the most detailed way I can.
Cheers
I think easier will be to get already compiled modules for A10 3.0.8+ from some firmware. I got cp210x.ko from "Aurora CM9 Nightly By Feiyu 0803.zip", successfully insmod-ed it into my device, and later added that insmod command to autorun with script manager app. I checked xpad module - it is in this firmware.
Related
Hi there,
I would have posted this in /dev but you know...first post.
I was trying to apply these kernel modules: http://forum.xda-developers.com/showthread.php?t=1557868
but I'm getting the error "insmod: init_module '/system/lib/modules/cifs.ko' failed (Exec format error)", or if i use the busybox insmod i get the following error: "insmod: can't insert '/system/lib/modules/cifs.ko': invalid module format"
Are updated versions available for 2.6.39.4? I'm guessing the ones for 2.6.36.3 aren't inter-operable.
I haven't used the other bash-4.2.zip and config from the above link, is that necessary for this to work?
Thanks for any tips on getting these kernel modules working.
Thanks,
abactor
IRC channel
Is there an IRC channel that's in use for sony tablet S, by any chance?
compile module yourself?
You might be successful compiling the kernel modules yourself from the available source code and a crossplatform compiler on linux. It has worked for me for the tun module
Source code at sony.net, I cannot publish external links yet. But you can find the link e.g. in this thread at first page http://forum.xda-developers.com/showthread.php?t=1473621
The free Sourcery G++ Lite for ARM GNU Linux did a good job for me.
I don't know of any Tablet S IRC channels, but it would be cool if there was.
As for the modules, you do need to recompile it. Kernel modules (in practically every Linux flavour) are completely incompatible, even across minor revisions, but recompiling against the newest code and headers should yield the same result with a new module.
The Sony.net link walsera mentioned is (I believe) this one
Thanks guys,
I'll look into it. I've compiled c code for android under mingw, but I don't have a linux toolchain setup. Anyone try to compile these sorts of things on the device itself (I.e. not cross_compiled)? I just started playing around with a native android/arm gcc toolchain, but I was having linker issues I think, with crt0.o and libc and whatnot.
Thanks and take care,
Abactor
I've never tried it natively on the device, but there have been a couple of developments into native versions of gcc and whatnot, so that may be worth a look. You can always compile on your PC, then copy the ko over...
After mounting a debian chroot on the tablet and installing the needed tools, unpacking the kernel source, and copying over config.gz, and editing .config to build the needed modules then calling make modules everything seems to work. What's the best way to make them available and what modules do people need? I've done ntfs and tun so far.
Take care
A
I'm trying to compile the rtl8187 kernel module for my archos 101 g9, I've pulled the archos-gpl-gen9-kernel-ics git repository and I've used the android-ndk r8 to compile the modules. Everything looks perfectly fine (the vermagic is matching the other modules "3.0.8+ SMP preempt mod_unload ARMv7" no issues there) except when I try to insmod the eeprom_93cx6.ko (This module needs to be loaded before the rtl8187.ko) I get told in dmesg "eeprom_93cx6: unknown relocation: 27"
After googling around it hasn't really helped me any.
So hopefully you guys can help me out. Any ideas of whats causing the above error?
mcd1992 said:
Sorry if this should go in the other gen9 section of this forum, wan't really sure. Feel free to move it mods.
I'm trying to compile the rtl8187 kernel module for my archos 101 g9, I've pulled the archos-gpl-gen9-kernel-ics git repository and I've used the android-ndk r8 to compile the modules. Everything looks perfectly fine (the vermagic is matching the other modules "3.0.8+ SMP preempt mod_unload ARMv7" no issues there) except when I try to insmod the eeprom_93cx6 (This module needs to be loaded before the rtl8187.ko) I get told in dmesg "eeprom_93cx6: unknown relocation: 27"
After googling around it hasn't really helped me any. (Not sure what R_ARM_PLT32 and all that is)
So hopefully you guys can help me out. Any ideas of how to my realtek wifi dongle working?
Click to expand...
Click to collapse
Hi !
You can try to update :
sudo apt-get install build-essential
sudo apt-get install libssl-dev
...and now recompile the module ....and also you need to take a look at Module.symvers - look into it an see if export symbols !
surdu_petru said:
Hi !
You can try to update :
sudo apt-get install build-essential
sudo apt-get install libssl-dev
...and now recompile the module ....and also you need to take a look at Module.symvers - look into it an see if export symbols !
Click to expand...
Click to collapse
Thanks for replying.
I'm using the latest build-utils and libssl for my os and inside my Module.symver the modules does appear.
Code:
0x00000000 eeprom_93cx6_read drivers/misc/eeprom/eeprom_93cx6 (unknown)
0x00000000 eeprom_93cx6_multiread drivers/misc/eeprom/eeprom_93cx6 (unknown)
mcd1992 said:
Thanks for replying.
I'm using the latest build-utils and libssl for my os and inside my Module.symver the modules does appear.
Code:
0x00000000 eeprom_93cx6_read drivers/misc/eeprom/eeprom_93cx6 (unknown)
0x00000000 eeprom_93cx6_multiread drivers/misc/eeprom/eeprom_93cx6 (unknown)
Click to expand...
Click to collapse
Ok !
Seem to be good ! If you want I can try to compile for you ...but I need your source module ...I will take a look tomorrow if you upload it !
Digging deeper into google I actually found a solution, adding -fno-pic to the compiler flags stops the error.
Original post by the_zuck
EDIT:
Yesssssss, Originally inserting the realtek dongle was causing a backtrace to appear in the dmesg but unloading the built-in modules (compat, wl12xx*, mac80211, and then cfg80211) and then loading my compiled modules (cfg80211, lib80211, mac80211, eeprom_93cx6, and then rtl8187) has resulted in success
So finally got my tablet where I want it, arch linux chroot with aircrack-ng / kismet running on it nicely with my alfa dongle. Thanks for trying to help me solve my issue at least surdu_petru
Compiled Modules tested and working on surdu_petru's 4.0.7 rooted rom.
mcd1992 said:
Digging deeper into google I actually found a solution, adding -fno-pic to the compiler flags stops the error.
Original post by the_zuck
EDIT:
Yesssssss, Originally inserting the realtek dongle was causing a backtrace to appear in the dmesg but unloading the built-in modules (compat, wl12xx*, mac80211, and then cfg80211) and then loading my compiled modules (cfg80211, lib80211, mac80211, eeprom_93cx6, and then rtl8187) has resulted in success
So finally got my tablet where I want it, arch linux chroot with aircrack-ng / kismet running on it nicely with my alfa dongle. Thanks for trying to help me solve my issue at least surdu_petru
Compiled Modules tested and working on surdu_petru's 4.0.7 rooted rom.
Click to expand...
Click to collapse
Im trying to compile the rtl8187 driver for my s3 - could you point me in the right directions to try and compile it. My s3 is rooted running a custom kernel. Thanks.
mcd1992 said:
Digging deeper into google I actually found a solution, adding -fno-pic to the compiler flags stops the error.
Original post by the_zuck
EDIT:
Yesssssss, Originally inserting the realtek dongle was causing a backtrace to appear in the dmesg but unloading the built-in modules (compat, wl12xx*, mac80211, and then cfg80211) and then loading my compiled modules (cfg80211, lib80211, mac80211, eeprom_93cx6, and then rtl8187) has resulted in success
So finally got my tablet where I want it, arch linux chroot with aircrack-ng / kismet running on it nicely with my alfa dongle. Thanks for trying to help me solve my issue at least surdu_petru
Compiled Modules tested and working on surdu_petru's 4.0.7 rooted rom.
Click to expand...
Click to collapse
I was trying to download the rtl8187 for my device that you posted and the link is bad. Any chance I can get it from you? Im trying to get an 8187.ko to work on my MK808 TV Stick and the rtl8187.ko that I have is giving me an "exec format error" when I insmod.
Hi all,
I would like to know how to go about compiling drivers for the stock android OS, specifically, usb-serial driver for cp210x. The kernel version in the development tablet is 3.0.8+ and I have compiled an "example" module. When I "insmod" the module in the tab dmesg says
example : disagrees about version of symbol module_layout
I have checked module_layout in the "stock" module and compiled module and equated them using hex editor, but it failed with the same error.
Can anyone suggest me how to go remove this error?
Hello, i'm trying to add cifs.ko kernel's module to my rooted (with Magisk) Redmi Note 9 Pro (Joyeuse Global).
On my Ubuntu computer, i've cloned smb3-cifs-linux-stable-backports (linux 4.14, the same kernel version as my phone run) and compiled the cifs.ko module using
Code:
make -C . M=fs/cifs ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
The kernel module compiled successfully, then I've created a Magisk module which load into /vendor/lib/modules the compiled cifs.ko, but I get
Code:
insmod: failed to load cifs.ko: Required key not available
, but my compiled kernel module isn't signed and i've checked a factory kernel module : isn't signed too.
I don't know what i've done wrong, if someone can tells me how to do and how.
Thanks
could you resolve this? I want to add cifs in the same kernel (v4.14.180). do you have the cifs.ko file? thank you!
(I'm cross-posting from "General Discussion", I think I picked the wrong forum. Sorry!)
I have:
Downloaded the exact kernel version running on my device from an AOSP mirror (4.9.170) (https://github.com/aosp-mirror/kernel_common.git)
Downloaded the exact compiler used to compile the kernel from my device:
Ran `cat /proc/version`, which returns "Linaro GCC 5.3-2016.05", which I downloaded from https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/aarch64-linux-gnu/
Took the kernel configuration from `/proc/config.gz`, copied it to the kernel source directory `kernel_common` as `.config`
Ran `make ARCH=arm64 CROSS_COMPILE=xxx oldconfig`
What I'm seeing:
First, the downloaded kernel source for 4.9.170 seems to think that my `config` is incomplete, since it will prompt me to answer ~15 extra configuration questions.
Second, this old Linaro compiled doesn't appear to support `-fstack-protector-strong` despite it being explicitly enabled in the `/proc/config.gz` file. So I end up disabling it with `./scripts/config --disable CONFIG_CC_STACKPROTECTOR_STRONG`
Finally, after successfully compiling, I take `net/ipv4/tcp_westwood.ko`, just as a test module, and try to load it on my Android device, and it fails:
`insmod: failed to load tcp_westwood_5.ko: Exec format error`
And in dmesg output: `tcp_westwood: disagrees about version of symbol module_layout`
My questions:
Can I assume that the `/proc/config.gz` file is not the actual file used to compile the running kernel, considering it doesn't completely configure the 4.9.170 kernel?
Am I on the right path to getting a kernel module that my kernel will load?
Background information:
I'm hoping this isn't very relevant, but just to head off some questions
This is a T95 Android TV device running what appears to be, to this newbie's eyes, a very Frankenstein'd Android 10 install (See https://www.cnx-software.com/2020/0...-comes-with-mali-g31-gpu-supports-android-10/)
I can't find any official - or unofficial - source for this device, which is why I'm going to all the trouble above.
I really appreciate any help, thank you!