無法compile rockchip linux kernel image
你好我買了RK3288的板子, 我是在MacOS上裝Parallel , 然後在Parallel上裝Ubuntu 16.04
我依照 http://wiki.t-firefly.com/index.php/Firefly-RK3288/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/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/+archive/refs/tags/android-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
HOSTCCscripts/basic/fixdep
HOSTCCscripts/kconfig/conf.o
HOSTCCscripts/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;
^
HOSTLDscripts/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
HOSTCCscripts/pnmtologo
HOSTCCscripts/kallsyms
HOSTCCscripts/sortextable
HOSTCCscripts/conmakehash
CC scripts/mod/empty.o
HOSTCCscripts/selinux/genheaders/genheaders
HOSTCCscripts/dtc/checks.o
CHK include/generated/utsrelease.h
HOSTCCscripts/mod/mk_elfconfig
HOSTCCscripts/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
HOSTCCscripts/selinux/mdp/mdp
HOSTCCscripts/mod/modpost.o
HOSTCCscripts/mod/sumversion.o
HOSTCCscripts/dtc/dtc-lexer.lex.o
HOSTCCscripts/dtc/dtc-parser.tab.o
HOSTCCscripts/dtc/dtc.o
make: 'include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
HOSTCCscripts/dtc/flattree.o
GEN include/generated/bounds.h
HOSTCCscripts/dtc/fstree.o
CC arch/arm/kernel/asm-offsets.s
HOSTCCscripts/dtc/livetree.o
HOSTCCscripts/dtc/srcpos.o
HOSTCCscripts/dtc/treesource.o
HOSTCCscripts/mod/file2alias.o
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCCscripts/dtc/util.o
HOSTLDscripts/dtc/dtc
HOSTLDscripts/mod/modpost
make: *** 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: *** Error 2
make: *** Waiting for unfinished jobs.... make -j8 firefly-rk3288-linux.img 这句有问题,检查下对应的dts文件是什么名字 感謝版主, 一語驚醒夢中人, 我尋著你給的提示, 找到答案了,
正確檔案應該是下面這樣
$ 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了
页:
[1]