[UNDER CONSTRUCTION]
EmbeddedQuickStart
domingo, 19 de agosto de 2018
quinta-feira, 2 de agosto de 2018
Loadable kernel module (LKM) examples
[UNDER CONSTRUCTION]
Simple example adding 2 loadable kernel modules. Module B depends on Module A to be loaded:
In order to load kernel modules, we should push .ko files to device's file system (for example, to /sdcard/):
$ adb push
Simple example adding 2 loadable kernel modules. Module B depends on Module A to be loaded:
In order to load kernel modules, we should push .ko files to device's file system (for example, to /sdcard/):
$ adb push
segunda-feira, 16 de julho de 2018
Building goldfish kernel for Android emulator
[UNDER CONSTRUCTION]
We are going to prepare an environment for next tutorials about Linux Kernel. I choose Android emulator platform because it is familiar to me, and also very convenient when using Android debugging environment such as ADB.
It is a simple task when you are already familiar to Android build environment.
The key point is to match proper CPU architecture, Android system image and Kernel versions. Let's start with current highest Android API level at this moment. Then I checked what is proper Kernel version for selected Android API level. It is also more convenient to run Android simulator over x86 architecture due to performance. But we can also test ARM and other archs.
Combination that works for me: Android API Level 28 (P) x86_64 + Kernel 4.4 x86_64.
Important mention to reference which gave me hints: https://gist.github.com/yan12125/78a9004acb1bed5faf2ffd442163e2ef.
We are going to use branch for Kernel version 4.4.
Reference: https://android.googlesource.com/kernel/goldfish/.
We are going to prepare an environment for next tutorials about Linux Kernel. I choose Android emulator platform because it is familiar to me, and also very convenient when using Android debugging environment such as ADB.
It is a simple task when you are already familiar to Android build environment.
The key point is to match proper CPU architecture, Android system image and Kernel versions. Let's start with current highest Android API level at this moment. Then I checked what is proper Kernel version for selected Android API level. It is also more convenient to run Android simulator over x86 architecture due to performance. But we can also test ARM and other archs.
Combination that works for me: Android API Level 28 (P) x86_64 + Kernel 4.4 x86_64.
Important mention to reference which gave me hints: https://gist.github.com/yan12125/78a9004acb1bed5faf2ffd442163e2ef.
Get cross-compiler toolchain
Get pre-build GCC to cross-compile Kernel source to Android x86 architecture: Reference: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/.Get Android kernel source code
Get Android Kernel source code. goldfish project is the name of Android kernel source code for emulator.We are going to use branch for Kernel version 4.4.
Reference: https://android.googlesource.com/kernel/goldfish/.
Build Android kernel for emulator (x86_64_ranchu)
Running Android emulator with custom kernel (Linux/Windows)
Checking that our custom kernel is running:
Assinar:
Comentários (Atom)
Char device driver example
[UNDER CONSTRUCTION]
-
[UNDER CONSTRUCTION] We are going to prepare an environment for next tutorials about Linux Kernel. I choose Android emulator platform beca...
-
[UNDER CONSTRUCTION] Simple example adding 2 loadable kernel modules. Module B depends on Module A to be loaded: In order to load kern...
-
[UNDER CONSTRUCTION]
