Compiled Latest Vim2 Source From Scratch - Fails to Boot

I just downloaded the latest source code and compiled it from scratch on two different machines. I apply the resulting “update.img” on my Vim2 v1.2 hardware using USB Burning Tool v2.1.2. Everything appears to be fine and normal. When I reboot, the Vim2 is stuck on the “KHADAS” bootup bitmap image. It’s stuck here and doesn’t go on to the bootanimation.zip process.

If I download the firmware from your website, everything works fine. What am I missing?

Steps:

  • Vim2 MAX
  • v1.2 Hardware
  • Latest source code:
  • – repo init -u https://github.com/khadas/android_manifest.git -b Nougat
  • – repo sync -j4
  • Compiled Successfully:
  • – source build/envsetup.sh
  • – lunch kvim-userdebug-64
  • – make -j12 otapackage
  • Copied “update.img” to Windows PC
  • Applied “update.img” to Vim2 via Amlogic USB Burning Tool v2.1.2
  • Successful flash
  • Reboots
  • Stuck on “Khadas” bootup bitmap image for hours.

It seem that you compile the VIM1, should be kvim2 instead.

Hi,

you also need (I think, so I always do) to build U-boot before main build.

Also you don’t need windows to flash, just copy kvim2-ota-{date}.zip to usb stick (fat32 formated) or micro sdcard if you have it and flash it over recovery console.

S.

I believe if you forget to build uboot first, Android build will fail as there will be image missing when update.img is being generated.

Thanks everyone!! I truly appreciate your help!!! It would appear I followed the directions to the LETTER (which was the wrong thing to do :slight_smile: )

First, did I understand this correctly:

  1. lunch kvim-userdebug-64 needs to be lunch kvim2-userdebug-64?

Next, I definitely built the u-boot first. However, I’m starting to doubt that I did that correctly now. Here is what I typed:
make CROSS_COMPILE=aarch64-linux-gnu- kvim_defconfig
make CROSS_COMPILE=aarch64-linux-gnu-

Sounds like this should have been this?
$ make CROSS_COMPILE=aarch64-linux-gnu- kvim2_defconfig
$ make CROSS_COMPILE=aarch64-linux-gnu-

Correct?

BTW - thanks ssehovic for the tip regarding the OTA package. I’m so familiar with modifying the firmware images that I’ve downloaded that I forget there’s an easier way. As you can tell, I’m new to compiling the source code. But, I’m reading and learning.

Finally, I hooked up a serial interface and captured the log. It looks like everything goes pear shape after the Kernel starts “Unpacking initramfs…”. I compared my log to a working firmware log.

I will try all new suggestions now and let you guys know my progress.

Thanks again!!

Hi,

that is why I wrote this little helper script to build vim2 from source.

I am lazy :smiley:
S.

1 Like

Your’e not lazy … you’re working smarter, not harder!! :wink:

I’ve followed your script’s instructions. I’m not able to compile the source code now. It fails every time I’ve tried to compile it on two different machines. The latest error:

ERROR: /home/epitirodev/proj/vim2/frameworks/support/compat/kitkat/android/support/v4/os/EnvironmentCompatKitKat.java:0: The type android.view.View cannot be found in source files, imported jack libs or the classpath
[ 6% 2352/38220] target C++: libicui18n <= external/icu/icu4c/source/i18n/valueformatter.cpp
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] Error 1

make failed to build some targets (06:02 (mm:ss))

Thoughts?

Thanks again!!

Hmm strange I have no problem with it. I am on arch linux.
Maybe you are missing libicui18n lib?

Edit: here

my installclean build.

S.

Thanks again for all of your support. I was finally able to get it to compile this morning. The only thing I did differently is to:

Use 7GB RAM for Jack Server -1GB from 8GB

export JACK_SERVER_VM_ARGUMENTS=“-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx7000m”

Killing…

out/host/linux-x86/bin/jack-admin kill-server

Starting…

out/host/linux-x86/bin/jack-admin start-server

I then did a:

make clean

Command followed by:

make -j4 otapackage

Previously, I was using -j8 and -j12 (which worked for me before).

I’m not sure what’s going on. It appears that the make process for the VIM2 is extremely particular and brittle. Thoughts on something else I could have been doing wrong?

Thanks again!!

I can’t compile Vim2 on my Ubuntu 16.04.3 LTE machine at all. It keeps crashing at the same spot (5%). Thoughts? Here is the error message:

[ 5% 2739/50828] host C++: libart <= art/runtime/gc/accounting/mod_union_table.cc
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target ‘ninja_wrapper’ failed
make: *** [ninja_wrapper] Error 1

make failed to build some targets (05:24 (mm:ss))

Thanks,
Jeff

Maybe you must use older python on your build machine.
As you can see from my screenshoot I am using virtual environment with python 2.7something as with latest python 3 I can’t build.

S.

1 Like

I rebuilt the machine as 14.04 and this fixed my problem. I’m all set. Thanks ssehovic! You were a huge help. I appreciate your time.

Sincerely,
-j