Closed tfa2012 closed 6 years ago
refer to http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M1#Make_Your_Own_Android: $ cd lichee/fa_tools/ $ ./build.sh -b nanopi-m1 -p android -t all $ cd ../../android $ export PATH=/usr/lib/jvm/jdk1.6.0_45/bin:$PATH $ ./build.sh -b nanopi-m1
And please post your step.
@wuweidong0107 Thank you for your reply.
My host(VM) is Ubuntu 16.04 LTS 64bit
1. I download source files and toolchain from baidu netdisk(https://pan.baidu.com/s/1dF7HL0P): gcc-linaro-arm.tar h3-android-20170608.7z(4 files) h3-lichee-20170608
2. copy file gcc-linaro-arm.tar to lichee/brandy/toochain/
check compile environment
merlin@ubuntu:~$ sudo apt-get install gawk git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
bison is already the newest version (2:3.0.4.dfsg-1).
build-essential is already the newest version (12.1ubuntu2).
flex is already the newest version (2.6.0-11).
g++-multilib is already the newest version (4:5.3.1-1ubuntu1).
gawk is already the newest version (1:4.1.3+dfsg-0.1).
x11proto-core-dev is already the newest version (7.0.28-2ubuntu1).
zip is already the newest version (3.0-11).
libncurses5-dev:i386 is already the newest version (6.0+20160213-1ubuntu1).
libreadline6-dev:i386 is already the newest version (6.3-8ubuntu2).
libx11-dev:i386 is already the newest version (2:1.6.3-1ubuntu2).
gperf is already the newest version (3.0.4-2).
python-markdown is already the newest version (2.6.6-1).
tofrodos is already the newest version (1.7.13+ds-2ubuntu1).
curl is already the newest version (7.47.0-1ubuntu2.2).
git is already the newest version (1:2.7.4-0ubuntu1.1).
gnupg is already the newest version (1.4.20-1ubuntu3.1).
libc6-dev is already the newest version (2.23-0ubuntu9).
libgl1-mesa-dev is already the newest version (12.0.6-0ubuntu0.16.04.1).
libxml2-utils is already the newest version (2.9.3+dfsg1-1ubuntu0.2).
xsltproc is already the newest version (1.1.28-2.1ubuntu0.1).
libgl1-mesa-glx:i386 is already the newest version (12.0.6-0ubuntu0.16.04.1).
zlib1g-dev:i386 is already the newest version (1:1.2.8.dfsg-2ubuntu4.1).
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-21 linux-headers-4.4.0-21-generic
linux-image-4.4.0-21-generic linux-image-extra-4.4.0-21-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 96 not upgraded.
Attention, I can't install mingw32 package(E: Unable to locate package mingw32), so I install mingw-64w package instead, here is its information: mingw-w64 - Development environment targeting 32- and 64-bit Windows
Setup environment
merlin@ubuntu:~$ sudo apt-get install bison g++-multilib git gperf libxml2-utils make python-networkx zip flex libncurses5-dev zlib1g-dev gawk minicom
Reading package lists... Done
Building dependency tree
Reading state information... Done
bison is already the newest version (2:3.0.4.dfsg-1).
flex is already the newest version (2.6.0-11).
g++-multilib is already the newest version (4:5.3.1-1ubuntu1).
gawk is already the newest version (1:4.1.3+dfsg-0.1).
libncurses5-dev is already the newest version (6.0+20160213-1ubuntu1).
make is already the newest version (4.1-6).
python-networkx is already the newest version (1.11-1ubuntu1).
zip is already the newest version (3.0-11).
gperf is already the newest version (3.0.4-2).
minicom is already the newest version (2.7-1build1).
git is already the newest version (1:2.7.4-0ubuntu1.1).
libxml2-utils is already the newest version (2.9.3+dfsg1-1ubuntu0.2).
zlib1g-dev is already the newest version (1:1.2.8.dfsg-2ubuntu4.1).
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-21 linux-headers-4.4.0-21-generic
linux-image-4.4.0-21-generic linux-image-extra-4.4.0-21-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 96 not upgraded.
My jdk merlin@ubuntu:~$ java -version java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
In lichee/fa_tools, enter $./build.sh -b nanopi-m1 -p android -t all I dump these message to following files. compile_android_step1-201706221804.txt compile_android_step1_warning.txt
In android, enter $export PATH=/usr/lib/jvm/jdk1.6.0_45/bin:$PATH $./build.sh -b nanopi-m1
I dump these message to following files. compile_android_step2-201706221837.txt compile_android_step2_warning.txt
Can't find anything wrong... But your compile_android_step2-201706221837.txt is a little wired. This is mine: build_h3_android.txt
OK It works.
1 I install ubuntu 14.04 2 compile with make(not mak -j8) 3 deal with the libwebviewchromium.so error(need larger swap, need several hours to compile it) 4 copy boot.img to android/output/target/product/nanopi-h3/
thanks everyone.
I build android with source code from https://pan.baidu.com/s/1dF7HL0P#list/path=%2FNanoPi-M1%2Fsources%2Fnanopi-H3-bsp
Anything was ok but at last pack android failed, here is error tips:
packing for android normal /home/merlin/projects/nano_pi_m1/lichee/tools/pack/pctools/linux/eDragonEx/ /home/merlin/projects/nano_pi_m1/lichee/tools/pack/out Begin Parse sys_partion.fex Add partion bootloader.fex BOOTLOADER_FEX00 Add partion very bootloader.fex BOOTLOADER_FEX00 FilePath: bootloader.fex FileLength=5b4400Add partion env.fex ENV_FEX000000000 Add partion very env.fex ENV_FEX000000000 FilePath: env.fex FileLength=20000Add partion boot.fex BOOT_FEX00000000 Add partion very boot.fex BOOT_FEX00000000 FilePath: boot.fex CreateFile failed 2 Add partion system.fex SYSTEM_FEX000000 Add partion very system.fex SYSTEM_FEX000000 FilePath: system.fex CreateFile failed 2 Add partion recovery.fex RECOVERY_FEX0000 Add partion very recovery.fex RECOVERY_FEX0000 FilePath: recovery.fex CreateFile failed 2 Add partion sysrecovery.fex SYSRECOVERY_FEX0 Add partion diskfs.fex DISKFS_FEX000000 sys_config.fex Len: 0x504c config.fex Len: 0x8448 split_xxxx.fex Len: 0x200 sys_partition.fex Len: 0x117a boot0_nand.fex Len: 0x8000 boot0_sdcard.fex Len: 0x8000 u-boot.fex Len: 0xe4000 fes1.fex Len: 0x31e0 toc1.fex Len: 0x8 toc0.fex Len: 0x8 usbtool.fex Len: 0x23000 aultools.fex Len: 0x26ead aultls32.fex Len: 0x238dd cardtool.fex Len: 0x14000 cardscript.fex Len: 0x6ea sunxi_mbr.fex Len: 0x10000 dlinfo.fex Len: 0x4000 arisc.fex Len: 0x217aa bootloader.fex Len: 0x5b4400 Vbootloader.fex Len: 0x4 env.fex Len: 0x20000 Venv.fex Len: 0x4 The file boot.fex length = 0 BuildImg 400 Dragon execute image.cfg Failed ! ArgCnt = 3, 400 pack finish
I find that these three boot.fex system.fex recovery.fex files link to android/out/target/product/nanopi-h3/xxx arn't exist.
What should I do to generate these three files?