Android 9 Source Codes for VIM3

Hi, Khadas Staffs!

When will you upload source codes and write instruction for they?

Thank you!

1 Like

Hi @davemf
We haven’t seen you for a some while :smile:

@terry will response the schedule.

1 Like

I have uploaded the source code on github for VIM3. You can try to download and compile. Please give me some feedbacks. Thanks !

2 Likes
repo init -u https://github.com/khadas/android_manifest.git -b khadas-vim3-pie
repo sync
2 Likes

@terry
Thanks.
I’ll try it in the evening.

Hi, @Gouwa
I’m here.
I had not build new ROM for VIM1&2, because they work fine (with some VESA issues) more than one year in our cars. But users request to build the new Android firmware for VIM3 and Edge for automotive use. I’ll do it for them.

Also, I want to upload my VIM1&2 FW for all on official site. How to do it?

1 Like

@Frank will follow up.

@terry
I started to sync VIM3 source.
Which Toolchains do I need to install for VIM3 Platform? Is it like Rockchip or not?

@davemf , There is How To Boot Into Upgrade Mode && Upgrade Via a USB-C Cable.You can follow it to upload. And there is the new ubuntu firmware or android firmware.

1 Like

Hi @davemf:
Can you create a new topic on this, would be better for us to discuss this new features there :blush:

Thanks!

1 Like

I mean that: I want to present my custom FW for all users. Not upload on board.

@terry
Sync finished:

Skipped fetching project platform/prebuilts/tools (already have persistent ref)
Fetching projects: 100% (685/685)
Fetching projects: 100% (685/685), done.  
Checking out files: 100% (58385/58385), done.iles:  16% (9882/58385)   
Checking out files: 100% (15939/15939), done.
Checking out files: 100% (8013/8013), done.
Checking out files: 100% (6701/6701), done.t files:  27% (1843/6701)   
Checking out files: 100% (9166/9166), done.
Checking out files: 100% (9195/9195), done.t files:  13% (1250/9195)   
Checking out files: 100% (3965/3965), done.t files:   3% (138/3965)   
Checking out files: 100% (12382/12382), done. files:  20% (2524/12382)   
Checking out files: 100% (9487/9487), done.
Checking out files: 100% (761/761), done. out files:  42% (325/761)   
Checking out files: 100% (266/266), done.
Checking out files: 100% (21720/21720), done.
Checking out files: 100% (259/259), done. out files:  18% (49/259)   
Checking out files: 100% (679/679), done. out files:  27% (189/679)   
Checking out files: 100% (4112/4112), done.ut files:  26% (1089/4112)   
Checking out files: 100% (488/488), done. out files:   6% (31/488)   
Checking out files: 100% (2842/2842), done.ut files:  35% (1011/2842)   
Checking out files: 100% (30065/30065), done. files:  11% (3346/30065)   
Checking out files: 100% (1478/1478), done.ut files:  31% (471/1478)   
Checking out files: 100% (8122/8122), done.ut files:  37% (3006/8122)   
Checking out files: 100% (4276/4276), done.ut files:  28% (1205/4276)   
Checking out files: 100% (3226/3226), done.ut files:  33% (1091/3226)   
Checking out files: 100% (1521/1521), done.ut files:  50% (766/1521)   
Checking out files: 100% (15073/15073), done. files:   0% (22/15073)   
Checking out files: 100% (16166/16166), done.
Checking out files: 100% (37036/37036), done.
Checking out files: 100% (3541/3541), done.ut files:   5% (199/3541)   
Checking out files: 100% (4427/4427), done.
Checking out files: 100% (7584/7584), done.ut files:   9% (685/7584)   
Checking out files: 100% (7584/7584), done.
Checking out files: 100% (33748/33748), done.
Checking out files: 100% (683/683), done.
Checking out files: 100% (763/763), done.
Checking out files: 100% (12188/12188), done. files:  11% (1459/12188)   
Checking out files: 100% (2218/2218), done.
Checking out files: 100% (8081/8081), done.
Checking out files: 100% (4084/4084), done.ut files:   0% (12/4084)   
Checking out files: 100% (10157/10157), done.
Checking out files: 100% (1150/1150), done.
Checking out files: 100% (891/891), done. out files:  12% (111/891)   
Checking out files: 100% (67/67), done.ng out files:  38% (26/67)   
Checking out files: 100% (18572/18572), done.
Checking out files: 100% (17/17), done.ng out files:  41% (7/17)   
Checking out files: 100% (7434/7434), done.ut files:  50% (3776/7434)   
Checking out files: 100% (4567/4567), done.ut files:  33% (1520/4567)   
git-lfs smudge --skip -- 'sharelib/libOpenVX.so': 1: git-lfs smudge --skip -- 'sharelib/libOpenVX.so': git-lfs: not found
error: external filter git-lfs smudge --skip -- %f failed -1
error: external filter git-lfs smudge --skip -- %f failed
Checking out files: 100% (508/508), done.
Syncing work tree: 100% (685/685), done.

@davemf ,I am so sorry. I misunderstood what you meant.We plan to add a location on the document in the future to show the user a custom configuration.

1 Like

You can provide the links of the images, I’ll add them to the docs.:wink:

1 Like

About how to install Toolchains and build rom, you can follow this.


2 Likes

@terry

I have some issue. I had done all the ‘Preparations’. How to fix it?

>   LD      lib/built-in.o
>   LD      drivers/mtd/nand/built-in.o
>   LD      drivers/display/lcd/built-in.o
>   LD      drivers/display/built-in.o
>   LD      common/built-in.o
>   LD      drivers/built-in.o
>   CC      examples/standalone/stubs.o
>   CC      examples/standalone/hello_world.o
>   CC      examples/standalone/atmel_df_pow2.o
>   LD      examples/standalone/libstubs.o
>   LD      examples/standalone/hello_world
>   LD      examples/standalone/atmel_df_pow2
>   OBJCOPY examples/standalone/hello_world.srec
>   OBJCOPY examples/standalone/hello_world.bin
>   OBJCOPY examples/standalone/atmel_df_pow2.srec
>   OBJCOPY examples/standalone/atmel_df_pow2.bin
>   LD      u-boot
>   OBJCOPY u-boot.srec
>   OBJCOPY u-boot.bin
>   OBJCOPY u-boot.hex
>   DEPS    /home/davemf/VIM3_Pie/bootloader/uboot/build/board/khadas/kvim3/firmware/acs.ld.d
>   DEPS    /home/davemf/VIM3_Pie/bootloader/uboot/build/board/khadas/kvim3/firmware/acs_entry.d
>   DEPS    /home/davemf/VIM3_Pie/bootloader/uboot/build/board/khadas/kvim3/firmware/acs.d
> Building board/khadas/kvim3/acs.bin
>   CC      acs.c
>   AS      acs_entry.S
>   PP      acs.ld.S
>   LD      /home/davemf/VIM3_Pie/bootloader/uboot/build/board/khadas/kvim3/firmware/acs.elf
>   OD      /home/davemf/VIM3_Pie/bootloader/uboot/build/board/khadas/kvim3/firmware/acs.dump
>   BIN     /home/davemf/VIM3_Pie/bootloader/uboot/build/board/khadas/kvim3/firmware/acs.bin
> 
> Built /home/davemf/VIM3_Pie/bootloader/uboot/build/board/khadas/kvim3/firmware/acs.bin successfully
> 
> 
> 	CPP task_entry.s
> make[2]: arm-none-eabi-cpp: Command not found
> make[2]: *** [/home/davemf/VIM3_Pie/bootloader/uboot/build/scp_task/task_entry.s] Error 127
> make[1]: *** [bl301.bin] Error 2
> make: *** [sub-make] Error 2
> Error: U-boot build failed... abort

You can try to install arm-none-eabi-cpp tool

sudo apt-get install gcc-arm-none-eabi
2 Likes

You are right. It fix this issue.
Thank you.

@terry I have some issue. How to fix it?

> [ 30% 21112/70033] build out/target/pr...ows_intermediates/reqd_policy_mask.cil
> out/host/linux-x86/bin/checkpolicy:  loading policy configuration from out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/reqd_policy_mask.conf
> out/host/linux-x86/bin/checkpolicy:  policy configuration loaded
> out/host/linux-x86/bin/checkpolicy:  writing CIL to out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/reqd_policy_mask.cil
> [ 30% 21115/70033] build out/target/pr...policy.recovery_intermediates/sepolicy
> FAILED: out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy 
> /bin/bash -c "(ASAN_OPTIONS=detect_leaks=0 out/host/linux-x86/bin/checkpolicy -M -c 		30 -o out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.recovery.conf ) && (out/host/linux-x86/bin/sepolicy-analyze out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp permissive > out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains ) && (if [ \"userdebug\" = \"user\" -a -s out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains ]; then echo \"==========\" 1>&2; 		echo \"ERROR: permissive domains not allowed in user builds\" 1>&2; 		echo \"List of invalid domains:\" 1>&2; cat out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains 1>&2; 		exit 1; 		fi ) && (mv out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy )"
> device/khadas/common/sepolicy/priv_app.te:8:ERROR 'unknown type dvb_device' at token ';' on line 45228:
> allow priv_app dvb_device:chr_file { { getattr open read ioctl lock map } { open append write lock map } };
> allow priv_app media_prop:file { read };
> checkpolicy:  error(s) encountered while parsing configuration
> out/host/linux-x86/bin/checkpolicy:  loading policy configuration from out/target/product/kvim3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.recovery.conf
> [ 30% 21116/70033] build out/target/pr...ows_intermediates/sepolicy_neverallows
> FAILED: out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows 
> /bin/bash -c "(rm -f out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows ) && (ASAN_OPTIONS=detect_leaks=0 out/host/linux-x86/bin/checkpolicy -M -c 		30 -o out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/policy.conf )"
> device/khadas/common/sepolicy/priv_app.te:8:ERROR 'unknown type dvb_device' at token ';' on line 43344:
> allow priv_app dvb_device:chr_file { { getattr open read ioctl lock map } { open append write lock map } };
> allow priv_app media_prop:file { read };
> checkpolicy:  error(s) encountered while parsing configuration
> out/host/linux-x86/bin/checkpolicy:  loading policy configuration from out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/policy.conf
> [ 30% 21118/70033] build out/target/pr...lows_intermediates/plat_pub_policy.cil
> out/host/linux-x86/bin/checkpolicy:  loading policy configuration from out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/plat_pub_policy.conf
> out/host/linux-x86/bin/checkpolicy:  policy configuration loaded
> out/host/linux-x86/bin/checkpolicy:  writing CIL to out/target/product/kvim3/obj/ETC/sepolicy_neverallows_intermediates/plat_pub_policy.cil.tmp
> [ 30% 21122/70033] //external/sfntly:l...ang++ cpp/src/sfntly/data/font_data.cc
> ninja: build stopped: subcommand failed.
> 10:03:10 ninja failed with: exit status 1

I’m sorry for that. You can refer at this

1 Like

Hi @terry, can you have a look at this

Blockquote
git-lfs filter-process --skip: 1: git-lfs filter-process --skip: git-lfs: not found
fatal: The remote end hung up unexpectedly
Traceback (most recent call last):
File “/media/superceleron/Data/Vim3_Pie/.repo/repo/main.py”, line 547, in
_Main(sys.argv[1:])
File “/media/superceleron/Data/Vim3_Pie/.repo/repo/main.py”, line 522, in _Main
result = repo._Run(argv) or 0
File “/media/superceleron/Data/Vim3_Pie/.repo/repo/main.py”, line 184, in _Run
result = cmd.Execute(copts, cargs)
File “/media/superceleron/Data/Vim3_Pie/.repo/repo/subcmds/sync.py”, line 855, in Execute
project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
File “/media/superceleron/Data/Vim3_Pie/.repo/repo/project.py”, line 1380, in Sync_LocalHalf
self._InitWorkTree(force_sync=force_sync, submodules=submodules)
File “/media/superceleron/Data/Vim3_Pie/.repo/repo/project.py”, line 2594, in _InitWorkTree
raise GitError("cannot initialize work tree for " + self.name)
error.GitError: cannot initialize work tree for android_vendor_amlogic_npu

already tried 3 different pc’s(one of them is my work build server) and it always have same problem in same place…
I wanted to download since i wanted to do some work on uboot, since that one i can touch but like this is hard!
Can you have a look? maybe something got corrupted on the upload to git!
Thks