Android Kernel save defalut config

Posted zengjf

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android Kernel save defalut config相关的知识,希望对你有一定的参考价值。

/*********************************************************************************
 *                    android Kernel save defalut config
 * 说明:
 *     一个没注意设置环境变量,把默认的配置文件给操作没了。
 *
 *                                       2017-11-13 深圳 南山平山村 曾剑锋
 ********************************************************************************/

一、获取config文件名
    including ./system/netd/server/Android.mk ...
    including ./system/security/keystore-engine/Android.mk ...
    including ./system/security/keystore/Android.mk ...
    including ./system/security/softkeymaster/Android.mk ...
    including ./system/vold/Android.mk ...
    including ./tools/external/fat32lib/Android.mk ...
    No private recovery resources for TARGET_DEVICE sabresd_6dq
    make -C kernel_imx imx_v7_android_defconfig ARCH=arm CROSS_COMPILE=`pwd`/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi- LOADADDR=0x10008000
    make[1]: Entering directory `/home/desk/myandroid/kernel_imx    #
    # configuration written to .config
    #
    make[1]: Leaving directory `/home/desk/myandroid/kernel_imx    install -D kernel_imx/.config out/target/product/sabresd_6dq/.config
    make -C kernel_imx -j20 uImage ARCH=arm CROSS_COMPILE=`pwd`/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi- LOADADDR=0x10008000
    make[1]: Entering directory `/home/desk/myandroid/kernel_imx    scripts/kconfig/conf --silentoldconfig Kconfig
    make[1]: Leaving directory `/home/desk/myandroid/kernel_imx    make[1]: Entering directory `/home/desk/myandroid/kernel_imx      CHK     include/config/kernel.release
      CHK     include/generated/uapi/linux/version.h
    ^Cmake[1]: *** [include/config/kernel.release] Interrupt
    make: *** [out/target/product/sabresd_6dq/kernel] Interrupt

二、找出文件位置
    [email protected]-ubuntu:~/myandroid/kernel_imx$ find * -iname imx_v7_android_defconfig
    arch/arm/configs/imx_v7_android_defconfig

三、操作过程
    1. 设置ARM环境变量,否者会进入x86内核状态:
        export ARCH=arm
        export CROSS_COMPILE=~/myandroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
    2. make menuconfig
    3. make savedefconfig 
    4. cp defconfig arch/arm/configs/imx_v7_android_defconfig

 

以上是关于Android Kernel save defalut config的主要内容,如果未能解决你的问题,请参考以下文章

SAVE : UBOOT PARA

如何编译android kernel

如何编译Android的kernel

怎样用git获取指定的Android Linux Kernel

linux kernel 从cmdline 提取值

转Android kernel启动流程