Firefly开源社区

打印 上一主题 下一主题

無法compile rockchip linux kernel image

81

积分

0

威望

0

贡献

游客

积分
81

無法compile rockchip linux kernel image

发表于 2017-5-27 08:57:37      浏览:9272 | 回复:2        打印      只看该作者   [复制链接] 楼主
你好

我買了RK3288的板子, 我是在MacOS上裝Parallel , 然後在Parallel上裝Ubuntu 16.04
我依照 http://wiki.t-firefly.com/index. ... 288/Build_kernel/en 的步驟安裝

詳細安裝步驟如下:
===== prepare working environment on ubuntu 16.04 =====
$ mkdir /home/linweiting/rk3288

===== get linux arm gcc compiler and library =====
$ sudo apt-get install gcc-arm-linux-gnueabihf build-essential lzop libncurses5-dev libssl-dev
$ sudo apt-get install libc6:i386

===== get google android arm compiling toolchain and assign bash shell variables for compiling =====
$ cd ~/rk3288
$ mkdir toolchain
$ cd toolchain
$ wget https://android.googlesource.com ... oid-4.4.2_r1.tar.gz
$ tar zxvf android-4.4.2_r1.tar.gz
$ vim .bashrc
  export ARCH=arm
  export CROSS_COMPILE=/home/linweiting/rk3288/toolchain/bin/arm-eabi-

===== install firefly mkbootimg utility to /usr/local/bin/ =====
$ cd ~/rk3288/
$ git clone https://github.com/neo-technologies/rockchip-mkbootimg.git
$ cd rockchip-mkbootimg
$ make && sudo make install

===== get rockchip linux kernel source code =====
$ cd ~/rk3288/
$ git clone https://bitbucket.org/T-Firefly/firefly-rk3288-kernel.git

===== compile rockchiplinux kernel image =====
$ cd ~/rk3288/firefly-rk3288-kernel
$ make firefly-rk3288-linux_defconfig


結果出現下面錯誤
linweiting@ubuntu:~/rk3288/firefly-rk3288-kernel$ make firefly-rk3288-linux_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2503:0:
scripts/kconfig/menu.c: In function 'get_symbol_str':
scripts/kconfig/menu.c:567:18: warning: 'jump' may be used uninitialized in this function [-Wmaybe-uninitialized]
     jump->offset = r->len - 1;
                  ^
scripts/kconfig/menu.c:528:19: note: 'jump' was declared here
  struct jump_key *jump;
                   ^
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#

而 .config 也有產生, 只是不確定上面的是算warning還是算error

於是我繼續做下一個動作,linweiting@ubuntu:~/rk3288/firefly-rk3288-kernel$ make -j8 firefly-rk3288-linux.img

結果出現下面錯誤
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/generated/uapi/linux/version.h
  HOSTCC  scripts/pnmtologo
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/sortextable
  HOSTCC  scripts/conmakehash
  CC      scripts/mod/empty.o
  HOSTCC  scripts/selinux/genheaders/genheaders
  HOSTCC  scripts/dtc/checks.o
  CHK     include/generated/utsrelease.h
  HOSTCC  scripts/mod/mk_elfconfig
  HOSTCC  scripts/dtc/data.o
  CC      scripts/mod/devicetable-offsets.s
  MKELF   scripts/mod/elfconfig.h
In file included from scripts/sortextable.c:162:0:
scripts/sortextable.c: In function 'main':
scripts/sortextable.h:158:3: warning: 'relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
   memset(relocs, 0, relocs_size);
   ^
scripts/sortextable.h:104:6: note: 'relocs_size' was declared here
  int relocs_size;
      ^
In file included from scripts/sortextable.c:160:0:
scripts/sortextable.h:158:3: warning: 'relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
   memset(relocs, 0, relocs_size);
   ^
scripts/sortextable.h:104:6: note: 'relocs_size' was declared here
  int relocs_size;
      ^
  GEN     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTCC  scripts/dtc/dtc.o
make[1]: 'include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
  HOSTCC  scripts/dtc/flattree.o
  GEN     include/generated/bounds.h
  HOSTCC  scripts/dtc/fstree.o
  CC      arch/arm/kernel/asm-offsets.s
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/mod/file2alias.o
  GEN     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  HOSTCC  scripts/dtc/util.o
  HOSTLD  scripts/dtc/dtc
  HOSTLD  scripts/mod/modpost
make[1]: *** No rule to make target 'arch/arm/boot/dts/firefly-rk3288-linux.dtb'.  Stop.
/home/linweiting/rk3288/firefly-rk3288-kernel/arch/arm/Makefile:302: recipe for target 'firefly-rk3288-linux.dtb' failed
make: *** [firefly-rk3288-linux.dtb] Error 2
make: *** Waiting for unfinished jobs....
回复

使用道具 举报

950

积分

95

威望

72

贡献

超级版主

Rank: 8Rank: 8

积分
950
发表于 2017-5-27 09:52:33        只看该作者  沙发
make -j8 firefly-rk3288-linux.img 这句有问题,检查下对应的dts文件是什么名字
已有 1评分威望 +1 灯泡 +2 贡献 +3 收起 理由
woei + 1 + 2 + 3 很给力!

查看全部评分

回复

使用道具 举报

81

积分

0

威望

0

贡献

游客

积分
81
发表于 2017-5-27 20:57:37        只看该作者  板凳
感謝版主, 一語驚醒夢中人, 我尋著你給的提示, 找到答案了,
正確檔案應該是下面這樣

$ cd ~/rk3288/firefly-rk3288-kernel
$ find ./ -name \*dts | grep 3288
  ./arch/arm/boot/dts/rk3288-tb1.dts
  ./arch/arm/boot/dts/rk3288-chrome.dts
  ./arch/arm/boot/dts/rk3288-tesco.dts
  ./arch/arm/boot/dts/firefly-rk3288_beta.dts
  ./arch/arm/boot/dts/rk3288-fpga.dts
  ./arch/arm/boot/dts/rk3288-box-rk808.dts
  ./arch/arm/boot/dts/rk3288-p977_8846.dts
  ./arch/arm/boot/dts/firefly-rk3288.dts  ===> this file is what we need
  ./arch/arm/boot/dts/rk3288-p977.dts
  ./arch/arm/boot/dts/rk3288-box.dts
  ./arch/arm/boot/dts/rk3288-tb.dts
$ make firefly-rk3288_defconfig
$ make -j8 firefly-rk3288.img
wiki上的文件需要被update了
回复

使用道具 举报

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

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表