dCore Import Debian Packages to Mountable SCE extensions > Allwinner A10
A10 boot files
tinypoodle:
--- Quote from: persian on August 09, 2013, 03:36:37 AM ---insmod: can't insert 'sun4i-gpio.ko': invalid module format
I know that this error is because of my kernel version is not the one on which I am running the insmod command, but I don't know what to do to sort out this problem?
--- End quote ---
You have already pinned down the issue by yourself...
kernel modules are specific to a kernel build, so make sure you insmod modules respective to kernel you are running.
persian:
Dear tinypoodle,
What is your opinion about the following lines ?
Thank you.
:
:
insmod: can't insert 'sun4i-gpio.ko': invalid module format
:
:
I run dmesg and uname -a commands and the results are :
tc@box:/mnt/mmcblk0p2/My_Added_Modules/lib/modules/3.0.42/kernel/drivers/misc$ dmesg
:
:
[ 2239.490000] sun4i_gpio: module_layout: kernel tainted.
[ 2239.500000] Disabling lock debugging due to kernel taint
[ 2239.500000] sun4i_gpio: version magic '3.0.42 ARMv7 ' should be '3.0.42 preempt mod_unload modversions ARMv7 '
[ 3118.120000] spi_sunxi: version magic '3.0.42 ARMv7 ' should be '3.0.42 preempt mod_unload modversions ARMv7 '
tc@box:/mnt/mmcblk0p2/My_Added_Modules/lib/modules/3.0.42/kernel/drivers/misc$ uname -a
Linux box 3.0.42 #3 PREEMPT Fri Feb 8 18:38:58 PST 2013 armv7l GNU/Linux
Rich:
Hi persian
It's rejecting the module because its version does not match the version of your kernel.
sun4i_gpio version=3.0.42 ARMv7
kernel version=3.0.42 #3 PREEMPT
I removed the attachment from your previous post. Forum rules forbid the attachment of binaries.
roberts:
Appears that gpio could be made into a loadable module with existing kernel. I did such.
However, enabling spi requires a new kernel. Therefore your issue.
I assume that you built a new kernel, so next step is to make it Allwinner loadable with mkimage.
You can import u-boot-tools, loadsce u-boot-tools to get mkimage.
Then from your linux source directory
make uImage
Finally copy uImage to sdcard to test boot. Then try insmod your new modules.
persian:
Dear Roberts,
Thank you, for your effective replies to my questions.
I replaced the [.config] file with [a10Core-kernel-3.0.42.config] and make the uImage successfully and then boot the TC linux from uSD with it.
Also I make a new script.bin for GPIO support (but not for SPI because I don't know how to do it).
Now GPIO attached and work correctly, but when I reboot Marsboard the GPIO disappear!
How can I establish the GPIO for ever ?
I tested the modprobe but It did not have any permanent effect after insmod (and before insmod it make "not found in modules.dep" error).
Also when I run insmod command for spi_sunxi.ko, I get the following error:
root@box:~# insmod /mnt/mmcblk0p2/My_Added_Modules/lib/modules/3.0.42/kernel/drivers/spi/spi_sunxi.ko
Segmentation fault
The dmesg command report the following error:
:
:
[ 1768.180000] [spi]: sw spi init !!
[ 1768.180000] [spi]: Found 0 spi devices in config files
[ 1768.190000] [spi]: boards num modalias max_spd_hz bus_num cs mode
[ 1768.200000] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 1768.210000] pgd = e7298000
[ 1768.210000] [00000000] *pgd=672e8831, *pte=00000000, *ppte=00000000
[ 1768.220000] Internal error: Oops: 80000007 [#1] PREEMPT
[ 1768.220000] Modules linked in: spi_sunxi(+)
[ 1768.220000] CPU: 0 Not tainted (3.0.42 #6)
[ 1768.220000] PC is at 0x0
[ 1768.220000] LR is at spi_sunxi_register_spidev+0x1e4/0x2a4 [spi_sunxi]
[ 1768.220000] pc : [<00000000>] lr : [<bf009c34>] psr: 60000013
[ 1768.220000] sp : e72e3e08 ip : e72e3c88 fp : e72e3e5c
[ 1768.220000] r10: c0097754 r9 : 000008ab r8 : 00000000
[ 1768.220000] r7 : bf00b124 r6 : 00000000 r5 : 00000000 r4 : 00000004
[ 1768.220000] r3 : 00000002 r2 : e72e2000 r1 : 00000000 r0 : 00000000
[ 1768.220000] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 1768.220000] Control: 10c5387d Table: 67298019 DAC: 00000015
:
:
[ 1768.220000] Backtrace:
[ 1768.220000] [<bf009a50>] (spi_sunxi_register_spidev+0x0/0x2a4 [spi_sunxi]) from [<bf00d728>] (spi_sunxi_init+0xb0/0x174 [spi_sunxi])
[ 1768.220000] r7:e48fd500 r6:00000000 r5:e72e3e64 r4:00000004
[ 1768.220000] [<bf00d678>] (spi_sunxi_init+0x0/0x174 [spi_sunxi]) from [<c003539c>] (do_one_initcall+0x40/0x184)
[ 1768.220000] r6:00000000 r5:e72e2000 r4:c07e7c00
[ 1768.220000] [<c003535c>] (do_one_initcall+0x0/0x184) from [<c0098bec>] (sys_init_module+0x3c8/0x1ad0)
[ 1768.220000] [<c0098824>] (sys_init_module+0x0/0x1ad0) from [<c003ba80>] (ret_fast_syscall+0x0/0x30)
[ 1768.220000] Code: bad PC value
[ 1768.730000] ---[ end trace fa9e0a8b1d7a4898 ]---
Please help me about the above error.
Thank you again.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version