- Android-x86
- Run Android on your PC
- Customize Kernel
- Prepare the source tree
- Build the target default kernel
- Build and update kernel solely
- Specify kernel architecture
- Force recompilation of the kernel
- Replace the kernel
- Build a customized kernel
- Customize the kernel configuration
- Use a prebuilt kernel
- Compile kernel for ARM (deprecated)
- Install Kernel Modules¶
- Install with DKMS¶
- Install DKMS package from PPA¶
- Install with in-tree modules¶
- Herzeleid
- Scribbles of an unstable mind
- Archives
- Android Kernel module support. Running a simple hello-world kernel module in Android emulator
- Share this:
- Like this:
- Related
- 44 Comments
Android-x86
Run Android on your PC
Customize Kernel
The Android build system doesn’t compile kernel on-fly. It just contains a prebuilt kernel binary which will be added to the target image. This approach may be good enough for the arm emulator target, but not suitable for x86 platforms. The x86 platforms have various hardware. The kernel binary and its modules may need to be adjusted at compile time or runtime.
This article explains an extra feature of the android-x86 build system. That is, the ability to build kernel and modules by a predefined or customized config during the building process.
Prepare the source tree
We have modified the Android build system to compile a kernel image on-fly. You need to use our repository to get this feature. Read the article for details.
Build the target default kernel
We put default configs of supported targets of android-x86 in kernel/arch/x86/configs/. The corresponding defconfig of a selected target will be used automatically. For example,
By specifying the TARGET_PRODUCT to android_x86_64, the build system automatically selects the config android-x86_64_defconfig to compile the kernel binary and its modules. The binary will be generated in out/target/product/x86_64/kernel, and the modules is put under out/target/product/x86_64/system/lib/modules/. The final target out/target/product/x86_64/android_x86_64.iso will contain the kernel binary and its modules.
Build and update kernel solely
To build the kernel and its modules solely, change the goal iso_img to kernel:
Then you can copy $OUT/kernel and $OUT/system/lib/modules/ to the target device. Put the former to the android-x86 installation directory, and the latter to /system/lib/modules. Note the /system must be installed as read-write mode.
Specify kernel architecture
Since Android 5.0 it supports both 32-bit and 64-bit images. Usually 32-bit userspace works with 32-bit kernel, while 64-bit userspace must work with 64-bit kernel. Android-x86 build system supports both since lollipop-x86.
Sometimes you may want to run 32-bit userspace with 64-bit kernel. In this case, you may specify kernel architecture by TARGET_KERNEL_ARCH:
Force recompilation of the kernel
Android and kernel use entirely different build systems. Though we combine them together, the integration doesn’t work very well. An example is if you modify the kernel tree, Android build system won’t notice the change. That means, the kernel won’t be rebuilt automatically if you rebuild the image.
There are several ways to overcome that. One is to touch the defconfig like:
Or remove the kernel config in the out/ directory:
Or remove the kernel image:
Replace the kernel
Since we build kernel with modules support, to replace the kernel of an installed system, you have to replace the corresponding modules as well. To do that, copy the kernel image to the android-x86 installation directory, and copy modules to /system/lib/modules. You can do that by booting to debug mode like:
Detecting Android-x86. found at /dev/sda1
Type ‘exit’ to continue booting.
Running MirBSD Korn Shell.
exit
Use Alt-F1/F2/F3 to switch between virtual consoles
Type ‘exit’ to enter Android.
Running MirBSD Korn Shell.
mount /dev/sdb1 /hd
cp /hd/kernel /src
rm -rf /system/lib/modules/*
cp -a /hd/modules/* /system/lib/modules
sync; umount /hd; reboot -f
Build a customized kernel
Suppose you already have a workable kernel config for you hardware, it’s easy to tell the build system to use your config to build the iso. Just put your config file to kernel/arch/x86/configs/, and run (suppose the name of your config is my_defconfig)
Customize the kernel configuration
It is never advisable to edit the kernel config file directly, as it may generate faulty configuration (dependencies not met etc.). The correct way to customize the kernel config is (on the top of android-x86 tree)
If you get an error message Unknown option: -C, change make to /usr/bin/make. That’s because since Android 8 the build system overrides the default make command of the system by its own make function (to invoke soong rules) which doesn’t recognize the -C option. To overcome that, just use the make command of the system.
The generated config is $OUT/obj/kernel/.config. Copy it to where you want it to be.
DO NOT issue make menuconfig in the kernel/ directory directly. If you do so, the build rules may be broken. In this case, try this way to recover it (on the top of android-x86 tree):
Use a prebuilt kernel
If you have a workable prebuilt kernel binary for your hardware, you can generate the iso with it:
Compile kernel for ARM (deprecated)
The kernel build system can also be used to compile kernel for ARM. For example, to compile kernel 2.6.29 for the goldfish CPU of the arm emulator, run
Источник
Install Kernel Modules¶
Install with DKMS¶
In order to support the mandatory kernel subsystems ashmem and binder for the Android container you have to install two DKMS based kernel modules. The source for the kernel modules is maintained by the Anbox project here.
At the moment we only have packages prepared for Ubuntu in a PPA on Launchpad. If you want to help to get the packages in your favorite distribution please come and talk to us or submit a PR with the distribution specific packaging.
Install DKMS package from PPA¶
Starting with Ubuntu 19.04 binder and ashmem are now build with the standard Ubuntu kernel (>= 5.0) and you don’t have to install the modules from the PPA anymore.
In order to add the PPA to your Ubuntu system please run the following commands:
In case add-apt-repository is missing, install it via:
These will add the PPA to your system and install the anbox-modules-dkms package which contains the ashmem and binder kernel modules. They will be automatically rebuild every time the kernel packages on your system update.
Please install the corresponding header package for your running kernel, if you’re not using the default one.
After you installed the anbox-modules-dkms package you have to manually load the kernel modules. The next time your system starts they will be automatically loaded.
Now you should have two new nodes in your systems /dev directory:
Install with in-tree modules¶
Android ashmem and binder modules are in linux kernel tree. So it’s possible to build them as in-tree modules.
You can enable them, by looking at the following configuration,
However if you don’t want these modules to be built-in for your kernel, you can apply the following patches, to build them as modules.
Debian has enabled these modules since kernel 4.17.3. So you don’t need to bother how to install. Currently kernel 4.17.3 and above are only available in Debian Unstable.
Other distributions are welcome to take these patches and enable them by default.
Источник
Herzeleid
Scribbles of an unstable mind
Archives
Android Kernel module support. Running a simple hello-world kernel module in Android emulator
I was playing with android code and suddenly I thought lets have a small exercise of learning android kernel compilation and loading modules in it.
The following are the steps which I did in order to recompile android kernel for my emulator, write a simple hello world module, compile it, push it to emulator and load it.
Read for some fun? Read on.
Go to http://source.android.com/source/download.html and download the source code.
I downloaded the gingerbread branch
repo init -u git://android.git.kernel.org/platform/manifest.git -b gingerbread
repo sync
|
|
|
and the usual commands to get your platform code…
Note: These days the android kernel source is removed from platform code.
So I need to download the kernel source too.
I went to http://android.git.kernel.org/?p=kernel/qemu.git;a=shortlog;h=refs/heads/android-goldfish-2.6.29 and downloaded the kernel for emulator.
Now, I compiled the platform code. (source /build/envsetup.sh && lunch 1 && make -j2)
Once the platform is built, I started building the linux kernel.
Android kernel, by default do not support loadable modules. So I needed to edit some files.
Here is what I did:
1. make ARCH=arm goldfish_defconfig (This will create our .config)
2. Edit the .config file and searched for the line “CONFIG_MODULES”
It was unset for me and the line looked liked this
# CONFIG_MODULES is not set
I changed the line to CONFIG_MODULES=y , saved and closed the file.
3. Now, I fired the command to build the kernel
make ARCH=arm CROSS_COMPILE=
/timepass/mydroid” with your KERNEL SOURCE TREE
Note: This command might ask for the following
======================================
scripts/kconfig/conf -s arch/arm/Kconfig
*
* Restart config.
*
*
* General setup
*
Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [Y/n/?] y
Local version — append to kernel release (LOCALVERSION) []
Automatically append version information to the version string (LOCALVERSION_AUTO) [Y/n/?] y
Support for paging of anonymous memory (swap) (SWAP) [Y/n/?] y
System V IPC (SYSVIPC) [Y/n/?] y
POSIX Message Queues (POSIX_MQUEUE) [N/y/?] n
BSD Process Accounting (BSD_PROCESS_ACCT) [N/y/?] n
Export task/process statistics through netlink (EXPERIMENTAL) (TASKSTATS) [N/y/?] n
Auditing support (AUDIT) [N/y/?] n
Kernel .config support (IKCONFIG) [Y/n/m/?] y
Enable access to .config through /proc/config.gz (IKCONFIG_PROC) [Y/n/?] y
Kernel log buffer size (16 => 64KB, 17 => 128KB) (LOG_BUF_SHIFT) [16] 16
Group CPU scheduler (GROUP_SCHED) [Y/n/?] y
Group scheduling for SCHED_OTHER (FAIR_GROUP_SCHED) [Y/n] y
Group scheduling for SCHED_RR/FIFO (RT_GROUP_SCHED) [Y/n/?] y
Basis for grouping tasks
1. user id (USER_SCHED)
> 2. Control groups (CGROUP_SCHED)
choice2: 2
Create deprecated sysfs layout for older userspace tools (SYSFS_DEPRECATED_V2) [N/y/?] n
Kernel->user space relay support (formerly relayfs) (RELAY) [N/y/?] n
Namespaces support (NAMESPACES) [Y/?] y
UTS namespace (UTS_NS) [N/y/?] n
IPC namespace (IPC_NS) [N/y/?] n
User namespace (EXPERIMENTAL) (USER_NS) [N/y/?] n
PID Namespaces (EXPERIMENTAL) (PID_NS) [N/y/?] n
Network namespace (NET_NS) [N/y/?] n
Initial RAM filesystem and RAM disk (initramfs/initrd) support (BLK_DEV_INITRD) [Y/n/?] y
Initramfs source file(s) (INITRAMFS_SOURCE) []
Optimize for size (CC_OPTIMIZE_FOR_SIZE) [Y/n/?] y
Default panic timeout (PANIC_TIMEOUT) [0] 0
Enable the Anonymous Shared Memory Subsystem (ASHMEM) [Y/n/?] y
Disable heap randomization (COMPAT_BRK) [Y/n/?] y
Choose SLAB allocator
> 1. SLAB (SLAB)
2. SLUB (Unqueued Allocator) (SLUB)
choice[1-2?]: 1
Profiling support (EXPERIMENTAL) (PROFILING) [N/y/?] n
Kprobes (KPROBES) [N/y/?] (NEW) ———- I said N here
*
* Enable loadable module support
*
Enable loadable module support (MODULES) [Y/n/?] y
Forced module loading (MODULE_FORCE_LOAD) [N/y/?] (NEW) y
Forced module unloading (MODULE_FORCE_UNLOAD) [N/y/?] (NEW) y
Module versioning support (MODVERSIONS) [N/y/?] (NEW) y
Source checksum for all modules (MODULE_SRCVERSION_ALL) [N/y/?] (NEW) y
*
* Memory Technology Device (MTD) support
*
Memory Technology Device (MTD) support (MTD) [Y/n/m/?] y
Debugging (MTD_DEBUG) [N/y/?] n
MTD concatenating support (MTD_CONCAT) [N/m/y/?] n
MTD partitioning support (MTD_PARTITIONS) [N/y/?] n
MTD tests support (MTD_TESTS) [N/m/?] (NEW) n
*
* User Modules And Translation Layers
*
Direct char device access to MTD devices (MTD_CHAR) [Y/n/m/?] y
Common interface to block layer for MTD ‘translation layers’ (MTD_BLKDEVS) [Y] y
Caching block device access to MTD devices (MTD_BLOCK) [Y/n/m/?] y
FTL (Flash Translation Layer) support (FTL) [N/m/y/?] n
NFTL (NAND Flash Translation Layer) support (NFTL) [N/m/y/?] n
INFTL (Inverse NAND Flash Translation Layer) support (INFTL) [N/m/y/?] n
Resident Flash Disk (Flash Translation Layer) support (RFD_FTL) [N/m/y/?] n
NAND SSFDC (SmartMedia) read only translation layer (SSFDC) [N/m/y/?] n
Log panic/oops to an MTD buffer (MTD_OOPS) [N/m/y/?] n
*
* Meilhaus support
*
Meilhaus support (MEILHAUS) [N/m/?] (NEW) n
*
* Staging drivers
*
Staging drivers (STAGING) [Y/n/?] y
Exclude Staging drivers from being built (STAGING_EXCLUDE_BUILD) [N/y/?] n
Line Echo Canceller support (ECHO) [N/m/y/?] n
Data Acquision support (comedi) (COMEDI) [N/m/?] (NEW) n
*
* Cryptographic API
*
Cryptographic API (CRYPTO) [Y/?] y
*
* Crypto core or helper
*
FIPS 200 compliance (CRYPTO_FIPS) [N/y/?] n
Cryptographic algorithm manager (CRYPTO_MANAGER) [Y/?] y
GF(2^128) multiplication functions (EXPERIMENTAL) (CRYPTO_GF128MUL) [N/m/y/?] n
Null algorithms (CRYPTO_NULL) [N/m/y/?] n
Software async crypto daemon (CRYPTO_CRYPTD) [N/m/y/?] n
Authenc support (CRYPTO_AUTHENC) [Y/?] y
Testing module (CRYPTO_TEST) [N/m/?] (NEW) n
*
* Authenticated Encryption with Associated Data
*
CCM support (CRYPTO_CCM) [N/m/y/?] n
GCM/GMAC support (CRYPTO_GCM) [N/m/y/?] n
Sequence Number IV Generator (CRYPTO_SEQIV) [N/m/y/?] n
================================================
Once I answered, the compilation continued and now I had a zImage of kernel with loadble module support.
At this point I have kernel with module support and compiled platform. So without much ado I fired up the emulator.
/mydroid/out/
$ ./emulator -system
/mydroid/sdk/emulator/skins/ -skin HVGA -verbose -show-kernel
Once emulator is up, I wrote the simple “Hello-world” module: Source is as follows:
1 #include»linux/module.h»
2 #include»linux/kernel.h»
3//replace the «» with angular brackets
4 int init_module(void)
5 <
6 printk(KERN_INFO «Hello android kernel. \n»);
7 return 0;
8 >
9
10 void cleanup_module(void)
11 <
12 printk(KERN_INFO «Goodbye android kernel. \n»);
13 >
14
I saved the file as android_module.c
Kernel modules as we know have to be compiled slightly differently than traditional programs.
My makefile for this simple module is as follows:
1 obj-m += android_module.o
2
3 all:
4 make -C /home/user/android_goldfish_kernel/goldfish-2.6.29/ M=$(PWD) modules
5
6 clean:
7
8 make -C /home/user/android_goldfish_kernel/goldfish-2.6.29/ M=$(PWD) clean
Now we are ready to compile our android kernel module
CROSS_COMPILE=/home/user/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- ARCH=arm make
Once compilation is done, I got android_module.ko
I pushed the newly build module inside emulator by:
adb push android_module.ko /data/local
Now that my module is inside the emulator which was already running kernel with module support, I opened a shell by:
adb shell
Inside this emulator shell prompt, I navigated to /data/local and executed
insmod android_module.ko
rmmod android_module
dmesg
The result is
android_module: module license ‘unspecified’ taints kernel.
Hello android kernel.
Goodbye android kernel.
If you have any doubt, please feel free to drop a comment here 🙂
Share this:
Like this:
Related
44 Comments
Hi, great tutorial but I have some questions:
1. I can’t find no way to get the android kernel – both the git and the link for download are down.
2. Where do you save your module.c and custom makefile?
3. From which directory do you execute the CROSS_COMPILE make?
4. Can I compile a module if I have the arm toolchain, but don’t have the kernel?
1. Today it seems both android.git.kernel.org and main linux kernel repository (kernel.org) is down. Please wait a while they will be up soon.
2. You can write your own module.c and Makefile in any directory you prefer. There are no restrictions.
3. You have to execute the command “make CROSS_COMPILE….”
from the top level source directory of your kernel tree.
4. You will at-least need the “sanitized kernel headers” to compile the module. And they should match against the version you want to deploy and test your module.
Check by running:
cd /usr/src/linux-headers-`uname -r`
10x for the quick reply. I hope they will bring the kernel back, but a couple of days ago there was a message in the git in the spirit of “you’re hacking us to much, we’re taking it down”.
I’ve downloaded the android-2.3.4_r1 ROM sources and managed to cook my own ROM, that even works on my Nexus S. In
/android-2.3.4_r1/external/kernel-headers/original/linux I’ve a lot of headers. Are they the “sanitized kernel headers”? Can you please give me a hint or even better some steps how to compile a module against them? 🙂
match the headers directory with your uname -r
For procedure to compile a kernel module you can refer the steps in this blog entry.
how to create patch with own module?
Hamsterksu: I will post a tutorial about it soon, subscribe and you will receive updates as I post.
Hi, Nice post. I have tried this on emulator have you tried this for a real device? I want a module I have written to be pushed into a Galaxy S. Will pulling the current configuration from the phone and enabling the MODULE support to y will work?
To do this in Galaxy S you will need to “root” the phone, i.e. get root-access and then only you will be able to insert a kernel module. Yes, you can pull current config from the phone.
Great tutorial. I read it and successfully inserted module in emulator. Now i want to insert module on my Nexus S. I have already rooted it but when i insert module it automatically reboots after 2-3 seconds without showing anything. Can you help ?
Thank you 🙂
Check the dmesg, make a little background service that captures dmesg every 0.5 seconds and appends to a file. When the phone reboots, check the contents of that file. From there we can understand what went wrong, if you can modify kernel command-line parameters, run with loglevel=7
OK. One thing i want to tell you, i have not flashed my custom kernel in Nexus S instead i have just rooted it and trying to insert my module. Secondly I have download Samsung kernel used for Nexus S from source.android.com and compiled it with Android 2.2 and then compiled my LKM with it but my device has Android 4.1.2 . This can be the reason ? should i need to compile Samsung-kernel with Android 4.1.2 ?
Undeniably believe that which you stated. Your favorite reason seemed to be on the
net the simplest thing to be aware of. I say to you, I certainly
get annoyed while people think about worries that they plainly don’t know about. You managed to hit the nail upon the top and also defined out the whole thing without having side effect , people could take a signal. Will probably be back to get more. Thanks
Hii v followed ua steps 4 developing android kernel module support bt v r nt able to get .ko file so vl u plz tell us how to get it
Are you getting any error message, if yes, please paste it here.
Now I am able to get .ko file. But when i execute the insmod command, then i got this error : “insmod: init_module ‘/data/local/android_module.ko’ failed (Exec format error)”
Sathya, can you post the dmesg logs as well? I presume you’re carrying out the experiment on Goldfish (emulator) kernel.
When execute the ‘dmesg’, I got this message:
Initializing cgroup subsys cpu
Linux version 2.6.290.10I_Love_My_Karnataka-ge3d684d-dirty (root@localhost.localdomain) (gcc version 4.4.3 (GCC) ) #1 Wed Jul 3 09:48:40 IST 2013
CPU: ARMv7 Processor [410fc080] revision 0 (ARMv7), cr=10c5387f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Goldfish
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 131072
free_area_init_node: node 0, pgdat c03690c4, node_mem_map c082d000
Normal zone: 1024 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 130048 pages, LIFO batch:31
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: qemu.gles=0 qemu=1 console=ttyS0 android.qemud=ttyS1 android.checkjni=1 ndns=4
Unknown boot option `qemu.gles=0′: ignoring
Unknown boot option `android.qemud=ttyS1′: ignoring
Unknown boot option `android.checkjni=1′: ignoring
PID hash table entries: 2048 (order: 11, 8192 bytes)
Console: colour dummy device 80×30
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 512MB = 512MB total
Memory: 515072KB available (3284K code, 771K data, 128K init)
Calibrating delay loop… 576.71 BogoMIPS (lpj=2883584)
Mount-cache hash table entries: 512
Initializing cgroup subsys debug
Initializing cgroup subsys cpuacct
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
net_namespace: 936 bytes
NET: Registered protocol family 16
bio: create slab at 0
NET: Registered protocol family 2
IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
Switched to high resolution mode on CPU 0
TCP established hash table entries: 65536 (order: 7, 524288 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 65536 bind 65536)
TCP reno registered
NET: Registered protocol family 1
checking if image is initramfs… it is
Freeing initrd memory: 176K
goldfish_new_pdev goldfish_interrupt_controller at ff000000 irq -1
goldfish_new_pdev goldfish_device_bus at ff001000 irq 1
goldfish_new_pdev goldfish_timer at ff003000 irq 3
goldfish_new_pdev goldfish_rtc at ff010000 irq 10
goldfish_new_pdev goldfish_tty at ff002000 irq 4
goldfish_new_pdev goldfish_tty at ff011000 irq 11
goldfish_new_pdev goldfish_tty at ff012000 irq 12
goldfish_new_pdev smc91x at ff013000 irq 13
goldfish_new_pdev goldfish_fb at ff014000 irq 14
goldfish_new_pdev goldfish_audio at ff004000 irq 15
goldfish_new_pdev goldfish_memlog at ff006000 irq -1
goldfish_new_pdev goldfish-battery at ff015000 irq 16
goldfish_new_pdev goldfish_events at ff016000 irq 17
goldfish_new_pdev goldfish_nand at ff017000 irq -1
goldfish_new_pdev qemu_pipe at ff018000 irq 18
goldfish_new_pdev goldfish-switch at ff01a000 irq 19
goldfish_new_pdev goldfish-switch at ff01b000 irq 20
goldfish_pdev_worker registered goldfish_interrupt_controller
goldfish_pdev_worker registered goldfish_device_bus
goldfish_pdev_worker registered goldfish_timer
goldfish_pdev_worker registered goldfish_rtc
goldfish_pdev_worker registered goldfish_tty
goldfish_pdev_worker registered goldfish_tty
goldfish_pdev_worker registered goldfish_tty
goldfish_pdev_worker registered smc91x
goldfish_pdev_worker registered goldfish_fb
goldfish_pdev_worker registered goldfish_audio
goldfish_pdev_worker registered goldfish_memlog
goldfish_pdev_worker registered goldfish-battery
goldfish_pdev_worker registered goldfish_events
goldfish_pdev_worker registered goldfish_nand
goldfish_pdev_worker registered qemu_pipe
goldfish_pdev_worker registered goldfish-switch
goldfish_pdev_worker registered goldfish-switch
ashmem: initialized
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
fuse init (API version 7.11)
yaffs Jul 3 2013 09:46:48 Installing.
msgmni has been set to 1006
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
allocating frame buffer 480 * 800, got ffa00000
console [ttyS0] enabled
brd: module loaded
loop: module loaded
nbd: registered device at major 43
goldfish_audio_probe
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre
eth0 (smc91x): not using net_device_ops yet
eth0: SMC91C11xFD (rev 1) at e080c000 IRQ 13 [nowait]
eth0: Ethernet addr: 52:54:00:12:34:56
eth0: No PHY found
goldfish nand dev0: size c5e0000, page 2048, extra 64, erase 131072
goldfish nand dev1: size c200000, page 2048, extra 64, erase 131072
goldfish nand dev2: size 4000000, page 2048, extra 64, erase 131072
mice: PS/2 mouse device common for all mice
*** events probe ***
events_probe() addr=0xe0814000 irq=17
events_probe() keymap=qwerty2
input: qwerty2 as /devices/virtual/input/input0
goldfish_rtc goldfish_rtc: rtc core: registered goldfish_rtc as rtc0
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.14.0-ioctl (2008-04-23) initialised: dm-devel@redhat.com
logger: created 64K log ‘log_main’
logger: created 256K log ‘log_events’
logger: created 64K log ‘log_radio’
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (8192 buckets, 32768 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
nf_conntrack.acct=1 kernel paramater, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
ctnetlink v0.93: registering with nfnetlink.
NF_TPROXY: Transparent proxy support initialized, version 4.1.0
NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd.
xt_time: kernel timezone is -0000
ip_tables: (C) 2000-2006 Netfilter Core Team
arp_tables: (C) 2002 David S. Miller
TCP cubic registered
NET: Registered protocol family 10
ip6_tables: (C) 2000-2006 Netfilter Core Team
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
802.1Q VLAN Support v1.8 Ben Greear
All bugs added by David S. Miller
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 0
goldfish_rtc goldfish_rtc: setting system clock to 2013-07-03 04:19:13 UTC (1372825153)
Freeing init memory: 128K
init: cannot open ‘/initlogo.rle’
yaffs: dev is 32505856 name is “mtdblock0”
yaffs: passed flags “”
yaffs: Attempting MTD mount on 31.0, “mtdblock0”
yaffs_read_super: isCheckpointed 0
save exit: isCheckpointed 1
yaffs: dev is 32505857 name is “mtdblock1”
yaffs: passed flags “”
yaffs: Attempting MTD mount on 31.1, “mtdblock1”
yaffs_read_super: isCheckpointed 0
yaffs: dev is 32505858 name is “mtdblock2”
yaffs: passed flags “”
yaffs: Attempting MTD mount on 31.2, “mtdblock2”
yaffs_read_super: isCheckpointed 0
init: cannot find ‘/system/etc/install-recovery.sh’, disabling ‘flash_recovery’
eth0: link up
warning: `rild’ uses 32-bit capabilities (legacy support in use)
eth0: no IPv6 routers present
request_suspend_state: wakeup (3->0) at 44215238700 (2013-07-03 04:19:57.180215505 UTC)
init: sys_prop: permission denied uid:1003 name:service.bootanim.exit
android_module: unknown relocation: 27
So what was the mistake here?
You have pasted the dmesg of your custom kernel bootup (as evident from I_Love_My_Karnataka string from linux_banner). 🙂
But what I need you to do is:
1. Bootup your emulator
2. Try to insmod your module
3. dmesg > a_file
4. Paste the file contents here.
Источник