九鼎创展论坛中文版English
登录 | 立即注册 设为首页收藏本站 切换到宽版
查看: 6768|回复: 0

九鼎s5p4418开发板Android4.4-将uboot,内核放到源码根目录编译

[复制链接]
发表于 2015-6-23 11:04:34 | 显示全部楼层 |阅读模式
从x4412到x4418我们发现在九鼎发布的源码包x4418_kitkat.tar.bz2的根目录下的uboot和内核的源码都在源码的根目录/linux下,
为了迎合我们的习惯,希望把他们都考到根目录,要怎么办呢。
一、Uboot源码包:
它原来的路径为/linux/bootloader$:
u1.png
把它拷到源码根目录下,
u2.png
接下来我们修改脚本文件 mk。修改uboot路径:
BS_DIR_UBOOT=${BS_DIR_TOP}/linux/bootloader/u-boot-2014.07
BS_DIR_UBOOT=${BS_DIR_TOP}/bootloader / u-boot-2014.07
如图:
u3.png
接下来执行一下 ./mk  -u 看看是不是直接就完事了。
但是直接报错:
wu@ubuntu:~/x4418-kitkat$ ./mk -u
  CLEAN   examples/standalone
  CLEAN   tools
  CLEAN   tools/lib tools/common
  CLEAN   u-boot.lds include/autoconf.mk include/autoconf.mk.dep
  CLEAN   u-boot u-boot.bin u-boot.map u-boot.srec System.map
  CLEAN   scripts/basic
  CLEAN   include/config include/generated
  CLEAN   include/config.h include/config.mk
Configuring for x4418 board...
  GEN     include/autoconf.mk.dep
  GEN     include/autoconf.mk
In file included from /home/wu/x4418-kitkat/u-boot-2014.07/arch/arm/include/asm/arch-s5p4418/platform.h:27:0,
                 from include/configs/x4418.h:33,
                 from include/config.h:10,
                 from /home/wu/x4418-kitkat/u-boot-2014.07/include/common.h:18:
/home/wu/x4418-kitkat/u-boot-2014.07/arch/arm/include/asm/arch-s5p4418/s5p4418.h:255:23: fatal error: nx_clkpwr.h: No such file or directory
compilation terminated.
In file included from /home/wu/x4418-kitkat/u-boot-2014.07/arch/arm/include/asm/arch-s5p4418/platform.h:27:0,
                 from include/configs/x4418.h:33,
                 from include/config.h:10,
                 from /home/wu/x4418-kitkat/u-boot-2014.07/include/common.h:18:
/home/wu/x4418-kitkat/u-boot-2014.07/arch/arm/include/asm/arch-s5p4418/s5p4418.h:255:23: fatal error: nx_clkpwr.h: No such file or directory
compilation terminated.
  CHK     include/config/uboot.release
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  HOSTCC  scripts/basic/fixdep
  UPD     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  UPD     include/generated/version_autogenerated.h
  CC      lib/asm-offsets.s
  CC      arch/arm/lib/asm-offsets.s
In file included from /home/wu/x4418-kitkat/u-boot-2014.07/arch/arm/include/asm/arch-s5p4418/platform.h:27:0,
                 from include/configs/x4418.h:33,
                 from include/config.h:10,
                 from include/common.h:18,
                 from lib/asm-offsets.c:15:
/home/wu/x4418-kitkat/u-boot-2014.07/arch/arm/include/asm/arch-s5p4418/s5p4418.h:255:23: fatal error: nx_clkpwr.h: No such file or directory
compilation terminated.
In file included from /home/wu/x4418-kitkat/u-boot-2014.07/arch/arm/include/asm/arch-s5p4418/platform.h:27:0,
                 from include/configs/x4418.h:33,
                 from include/config.h:10,
                 from include/common.h:18,
                 from arch/arm/lib/asm-offsets.c:15:
/home/wu/x4418-kitkat/u-boot-2014.07/arch/arm/include/asm/arch-s5p4418/s5p4418.h:255:23: fatal error: nx_clkpwr.h: No such file or directory
compilation terminated.
make[1]: *** [lib/asm-offsets.s] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [arch/arm/lib/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
wu@ubuntu:~/x4418-kitkat$
发现在原来的uboot源码下~/x4418-kitkat/linux/bootloader/u-boot-2014.07/arch/arm/cpu/slsiap/s5p4418$
有个链接prototype对应到:~/x4418-kitkat/linux/prototype/s5p4418$路径
u4.png
就是说编译uboot还要依赖/linux/prototype/的内容,虽然我们把它靠过来了,但是可以看出来这个链接是个相对路径,拷出来之后就找不到原来的路径了。
有两种方法来修改这个错误,一个就是把整个prototype文件的内容都拷到源码根目录下,
和uboot源码同一等级,还有一个就是删掉这个链接,然后新建一个链接。
用第二种方法,新建的连接:
u5.png
我们重新编译一下,编译通过:
u6.png
当然我们也可以用第一种方法。就是把x4418-kitkat/linux/下的prototype文件夹拷到源码根目录下。
效果应该是一样的,如果不过,有可能还是链接路径有错。

二、内核源码包:
它原来的路径为/linux/kernel$:
u7.png
把它拷到源码包根目录:
u8.png
接下来我们修改脚本文件 mk。修改uboot路径:
BS_DIR_UBOOT=${BS_DIR_TOP} /linux/kernel/kernel-3.4.39
BS_DIR_UBOOT=${BS_DIR_TOP} /kernel/kernel-3.4.39
如图:
u9.png
接下来执行一下 ./mk  -k
看看是不是直接就完事了。
也直接报错,跟uboot的情况是一样的。
原来的uboot源码下~/x4418_kitkat/linux/kernel/kernel-3.4.39/arch/arm/mach-s5p4418$
有个链接prototype对应到:~/x4418-kitkat/linux/prototype/s5p4418$路径
u10.png
就是说编译内核时还要依赖/linux/prototype/的内容,虽然我们把它靠过来了,
但是可以看出来这个链接是个相对路径,拷出来之后就找不到原来的路径了。
有两种方法来修改这个错误,一个就是把整个prototype文件的内容都拷到源码根目录下,
和uboot源码同一等级,还有一个就是删掉这个链接,然后新建一个链接。
用第二种方法,新建的连接:ln  -s  /home/wu/x4418_kitkat/linux/prototype/s5p4418  prototype
u11.png
u12.png
我们重新编译一下,编译通过:
u13.png
当然我们也可以用第一种方法。就是把x4418-kitkat/linux/下的prototype文件夹拷到源码根目录下。
效果应该是一样的,如果不过,有可能还是链接路径有错。

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|深圳市九鼎创展科技官方论坛 ( 粤ICP备11028681号-2  

GMT+8, 2024-3-29 05:13 , Processed in 0.023416 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表