@RDFTKV
I officially withdraw my newbie status and move firmly into the beginner plus category.
I have worked out all the packages needed to repo sync and compile under Ubuntu 20.04 and have a compile operation of the VIM3 Android 11 AOSP going right now
Now all I have to work out when its done is how to flash it to the VIM3
mkdir -p “workspace name of your choice”
cd “whatever named folder you did above”
sudo repo init -u platform/manifest - Git at Google -b master
sudo repo sync -j3
Android Build Env instructions : (no sudo on these steps)
. ./build/envsetup.sh
lunch yukawa-userdebug
make TARGET_USE_TABLET_LAUNCHER=true TARGET_VIM3=true TARGET_KERNEL_USE=5.4 -j3
Notes:
I only use -j3 as my cpu is a four core i5 desktop CPU and I want to keep one core free.
If your CPU has more cores or HT by all means increase -jxx to suit. On my i9 at work I would do -j18
I suggest more than 16gb ram, I had 16 and it was complaining but I had some spare 4gb sticks so I expanded to 24Gb if you have a bunch more threads to process with you may need more than that.
@goenjoy
Can you (or anyone else) help me with a few things please:
in building the AOSP do I need to build the kernel separately?
I ask this one because it appears as I follow the directions I repo sync -> Build AOSP -> Flash Android Boot-loader-> Flash Android Images -> Build Kernel Source -> rebuild and flash your board…???
It seams strange to me that I have to build the kernel and flash it in AFTER the other steps?? it seems like I should build the kernel before the flash, not after and then flash again??
in building the kernel I am running into errors:
ale@ShopUB20:~/workspace-andy11/hikey-linaro$ export PATH=workspace-andy11/prebuilts/clang/host/linux-x86/clang-r399163b/bin:$PATH
dale@ShopUB20:~/workspace-andy11/hikey-linaro$ export PATH=workspace-andy11/prebuilts/gas/linux-x86:$PATH
dale@ShopUB20:~/workspace-andy11/hikey-linaro$ export PATH=workspace-andy11/prebuilts/misc/linux-x86/lz4:$PATH
dale@ShopUB20:~/workspace-andy11/hikey-linaro$ export ARCH=arm64
dale@ShopUB20:~/workspace-andy11/hikey-linaro$ export CROSS_COMPILE=aarch64-linux-gnu-
dale@ShopUB20:~/workspace-andy11/hikey-linaro$ export LLVM=1
dale@ShopUB20:~/workspace-andy11/hikey-linaro$ sudo make meson_defconfig
In most cases you shouldn’t need to compile the kernel separately, although this does seem to be the case of android R (11.x) the practice of pre building the kernel image, at least from what I’ve seen. If the rom you are building is pie based and the rom isn’t able to compile properly, you might be missing a prerequisite for building the kernel.
@JustSumDad for android 11 aosp ,
1 : building the AOSP do not need to build the kernel separately ,under device/amlogic/yukawa-kernel directory has kernel image
2 : no need to install toolchains outlined in the instructions
3 : export AOSP_TOPDIR=/home/lxx/Downloads/android_pie/vim3l
export PATH=${AOSP_TOPDIR}/prebuilts/clang/host/linux-x86/clang-r399163b/bin:$PATH
export PATH=${AOSP_TOPDIR}/prebuilts/gas/linux-x86:$PATH
export PATH=${AOSP_TOPDIR}/prebuilts/misc/linux-x86/lz4:$PATH
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
export LLVM=1
make meson_defconfig
make DTC_FLAGS="-@" -j10
these is my kernel build steps ,you can reference
only according to the docs Khadas_VIM3 · Wiki · BayLibre / amlogic / Android TV / aosp / device / amlogic / yukawa · GitLab
The link you have provided for reference is the one I am following. I the only error I can decern is the setting of the variable APSP_TOPDIR=
I believe I should use:
export AOSP_TOPDIR=workspace-andy11
yes, I am following the guide very carefully, I think both the things you just asked are in the cut paste above. Or maybe I am not recognizing them correctly?
I have deleted my “workspace-andy11” folder as a friend told me that problems happen with folder and computer names with a dash in them. I am starting from scratch with “aosp” as my folder name now.
I will follow every step very carefully following the 5.4 make.
I will test boot after first flash before the separate kernel build stages that appear not needed.
if I want to recompile from scratch all I should have to do is remove the “out” folder right?
sudo rm -r -f out
is this correct?
also, I have been having a lot of issues with each step so I have been sudo a lot.
Today in an effort to get around all the problems I have started from scratch but running in a sudo -s environment, not done yet but so far seems ok.
I have now gone thru the steps maybe twenty times, loaded fresh ubuntu at least a dozen times.
I can go thru the steps with ZERO errors! Total apparent success!
Even the image flashing steps go thru!
Sadly I do not get a boot-able device out of it tho
The only thing that I have not been able to get to work is the separate and I think supposedly not needed kernel build steps, they error out no matter what I do!!!
This last time I ran the entire process end to end on a fresh loaded ubuntu 20.04 system under a sudo -i environment to ensure there was no way some folder permission or other thing was holding me back. Same as before tho, every step zero errors EXCEPT the separate kernel build steps… That I think are not needed unless you want to change kernel version…
root@ub20usb:~/aosp# cd hikey-linaro
root@ub20usb:~/aosp/hikey-linaro# make meson_defconfig
HOSTCC scripts/basic/fixdep
/bin/sh: 1: clang: not found
make[1]: *** [scripts/Makefile.host:107: scripts/basic/fixdep] Error 127
make: *** [Makefile:524: scripts_basic] Error 2
root@ub20usb:~/aosp/hikey-linaro#
I gotta take a break. I dont want to get frustrated and throw this thing at something hard
I don’t think the kernel is the issue. but just to confirm, when you try to boot the device with the newly compiled rom, do you get the white led blinking?
yes, it blinks like its loading something but nothing on the screen.
I thought maybe it was a resolution compatibility issue so I tried it on two monitors and a 4k TV too.
I went and found the u-boot_kvim3_noab.bin file you made back in Nov and posted up!
dropped it into the aosp/device/amlogic/yukawa/bootloader/ folder over writeing the one I had.
redid the flash and…
This worked, I have a booting up Android 11 Vim3 now
now that I am booted up, I see that it is reporting an ATV build.
Is this because perhaps the u-boot_kvim3_noab.bin I got from your build is an ATV build?
I am getting corrupted memory on pretty much everything, it boots lets me look around but all memory seems useless, its also reporting 16gb ram rather than 32gb.
Not complaining on you Just wondering if this is due to the U-Boot mismatch maybe?
It’s possible, but i also ran it with one of the previous uboots and it’s working for me. Userdata may just need to be reflashed or maybe the whole thing needs to be redone, not too sure.