无法使用lp构建3.10内核?

时间:2015-07-16 04:48:35

标签: android linux linux-kernel porting

请你给出用lp编译linux 3.10内核的步骤。 我将3.10内核移植到arndale板,即带有设备树的exynos。 我通过运行

创建了defconfig
ARCH=arm scripts/kconfig/merge_config.sh arch/arm/configs/exynos_defconfig android/configs/android-base.cfg

我尝试编译它。

但是会出现像

这样的编译错误
In file included from include/linux/jbd.h:247:0,
             from fs/ext3/ext3.h:23,
             from fs/ext3/balloc.c:16:
include/linux/jbd_common.h: In function 'jbd_lock_bh_state':
include/linux/jbd_common.h:18:16: error: 'BH_State' undeclared (first use in this function)
bit_spin_lock(BH_State, &bh->b_state);
            ^
include/linux/jbd_common.h:18:16: note: each undeclared identifier is reported only once for each function it appears in
include/linux/jbd_common.h: In function 'jbd_trylock_bh_state':
include/linux/jbd_common.h:23:26: error: 'BH_State' undeclared (first use in this function)
  return bit_spin_trylock(BH_State, &bh->b_state);
                      ^
include/linux/jbd_common.h: In function 'jbd_is_locked_bh_state':
include/linux/jbd_common.h:28:28: error: 'BH_State' undeclared (first use in this function)
  return bit_spin_is_locked(BH_State, &bh->b_state);
                        ^
include/linux/jbd_common.h: In function 'jbd_unlock_bh_state':
include/linux/jbd_common.h:33:18: error: 'BH_State' undeclared (first use in this function)
  bit_spin_unlock(BH_State, &bh->b_state);
              ^
include/linux/jbd_common.h: In function 'jbd_lock_bh_journal_head':
include/linux/jbd_common.h:38:16: error: 'BH_JournalHead' undeclared (first use in this function)
  bit_spin_lock(BH_JournalHead, &bh->b_state);
            ^
include/linux/jbd_common.h: In function 'jbd_unlock_bh_journal_head':
include/linux/jbd_common.h:43:18: error: 'BH_JournalHead' undeclared (first use in this function)
  bit_spin_unlock(BH_JournalHead, &bh->b_state);
              ^
make[2]: *** [fs/ext3/balloc.o] Error 1
make[1]: *** [fs/ext3] Error 2
make: *** [fs] Error 2

有谁能说我需要遵循哪些步骤来构建内核?

构建内核时我出错的地方?

1 个答案:

答案 0 :(得分:1)

1.从基于arm的芯片组中获取一个开源3.10安卓内核,如来自http://releases.linaro.org/15.01/android/vexpress-lcr的vexpress

2.上面的内核已经支持基于exynos的芯片组了它在arch / arm / configs / exynos_defconfig中也有exynos defconfig你可以使用这个defconfig并在arndale上刷它,内核应该启动,因为arndale只使用基于exynos的芯片组

3.这个内核只支持在arndale中使用的SoC,即exynos5250,你需要添加对arndale特定更改的支持,比如GUI相关的更改,外围设备相关的更改等,因为你必须从工作的arndale android内核中获取参考像http://releases.linaro.org/14.08/android/arndale这样的来源,并寻找为添加对arndale的支持所做的更改。 下面是他们添加的第一个补丁,他们开始添加对arndale的支持

From 6f50912b63088c098b9a0d14f7384567631df356 Mon Sep 17 00:00:00 2001
From: Girish K S <ks.giri@samsung.com>
Date: Mon, 8 Oct 2012 13:32:56 +0900
Subject: [PATCH 001/130] ARM: DTS: exynos5250-arndale: Add initial board
 support file

及以下是最后添加的补丁

From 5a93c058f6bd377fc5edad3e07b1f4d9f18f0c32 Mon Sep 17 00:00:00 2001
From: Pranav Tipnis <pranav.tipnis@linaro.org>
Date: Tue, 9 Jul 2013 18:20:41 +0530
Subject: [PATCH 085/130] media: vb2: Activate display as soon as mmap is

你必须研究它们之间的所有补丁,包括上面两个补丁并将相关的更改移植到3.10内核。 一切顺利!

谢谢, Devarsh