Android的安装内核自定义配置 [英] Android Installing kernel with custom config

查看:420
本文介绍了Android的安装内核自定义配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的三星I9300安装不同的内核(启用一些配置标志)

I want to install a different kernel on my Samsung i9300 (some config flags enabled)

到目前为止,我已经安装了定制ROM

So far I have installed the custom ROM

Slim-4.4.2.build.3-OFFICIAL-3091

它使用以下内核版本至今:

It uses the following kernel version so far:

$ adb shell
shell@android:/ $ uname -a
Linux localhost 3.0.80+ #1 SMP PREEMPT Sat Feb 15 15:10:26 CET 2014 armv7l GNU/Linux

源的内核版本从创建我kernel.zip有较新的版本:

The kernel version of my source from which I create my kernel.zip has a newer version:

.../kernel_samsung_smdk4412$ gedit Makefile 
VERSION = 3
PATCHLEVEL = 0
SUBLEVEL = 80
EXTRAVERSION =
NAME = Sneaky Weasel
...

我用下面的工具链打造成功的内核:

I used the following toolchain to build the kernel successfully:

1)

git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7

2)

sudo gedit .bashrc

export PATH=${PATH}:~/arm-linux-androideabi-4.7/bin

3)

cd /kernel_samsung_smdk4412/

make clean -j4 ARCH=arm CROSS_COMPILE=arm-linux-androideabi-

make ARCH=arm CROSS_COMPILE=arm-linux-androideabi- slim_i9300_defconfig

make -j4 ARCH=arm CROSS_COMPILE=arm-linux-androideabi-

我用本指南创建快擦写的zip文件。
它采用koush的AnyKernel与TWRP安装新内核2.6.3.1

I use this guide to create the flashable zip file. It uses koush's AnyKernel to install the new Kernel with TWRP 2.6.3.1

借助更新脚本<​​/一>的样子,到目前为止:

The updater-script looks like that so far:

ui_print("AnyKernel Updater by Koush.");
ui_print("Extracting System Files...");
set_progress(1.000000);
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
package_extract_dir("system", "/system");
unmount("/system");
ui_print("Extracting Kernel files...");
package_extract_dir("kernel", "/tmp");
ui_print("Installing kernel...");
set_perm(0, 0, 0777, "/tmp/dump_image");
set_perm(0, 0, 0777, "/tmp/mkbootimg.sh");
set_perm(0, 0, 0777, "/tmp/mkbootimg");
set_perm(0, 0, 0777, "/tmp/unpackbootimg");
run_program("/tmp/dump_image", "boot", "/tmp/boot.img");
run_program("/tmp/unpackbootimg", "/tmp/boot.img", "/tmp/");
run_program("/tmp/mkbootimg.sh");
write_raw_image("/tmp/newboot.img", "boot");
ui_print("Done!");

第四行被编辑,因为我已经找到<一个href=\"https://github.com/AOKP-i9100/buildscripts/blob/master/samsung/i9300/kernel%5fupdater-script#L11\"相对=nofollow>这里的I9300。

当我闪的zip通过TWRP似乎一切都很好,但在重新启动旧内核版本和安装日期设置的关于手机一节中所示的系统的时候。

When I flash the zip via TWRP everything seems fine but when rebooting the system the old kernel version and installation date is shown in the "About Phone" section of the Settings.

我错过了什么?

推荐答案

,我使用的本指南,然后通过的海姆达尔我的I9300:

Instead of using AnyKernel to flash the zImage, I created a boot.img out of the zImage using this guide and then flashed it via heimdall on my i9300:

user@ubuntu1210:~/bootimg_tools$ perl split_bootimg.pl boot.img


user@ubuntu1210:~/bootimg_tools$ perl unpack_ramdisk boot.img-ramdisk.gz ramdisk


user@ubuntu1210:~/bootimg_tools$ perl repack_ramdisk ramdisk boot.img-ramdisk.cpio.gz


user@ubuntu1210:~/bootimg_tools$ cp /home/user/kernel_samsung_smdk4412/arch/arm/boot/zImage boot.img-kernel


user@ubuntu1210:~/bootimg_tools$ ./mkbootimg --kernel boot.img-kernel --ramdisk boot.img-ramdisk.cpio.gz --cmdline 'console=null androidboot.hardware=qcom user_debug=31 zcache' --base 0x80200000 --pagesize 2048 -o boot.img


user@ubuntu1210:~/bootimg_tools$ adb reboot bootloader

user@ubuntu1210:~/bootimg_tools$ sudo heimdall flash --BOOT boot.img --verbose

这篇关于Android的安装内核自定义配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆