wgtdkp  
                
                  
                    July 25, 2024,  9:36am
                   
                  1 
               
             
            
              Android
image is built from the latest AOSP source code
Following the guide Home · Wiki · BayLibre / amlogic / Android TV / aosp / device / amlogic / yukawa · GitLab 
Note that I have to change the lunch target to “yukawa-trunk_staging-userdebug” to build the image
The build and fastboot commands are successful, but the device can’t boot after reboot. It stucks at “Starting kernel…” and then screen turns black.
➜  main-aosp-2 sudo ~/myvenv/bin/boot-g12.py ${BOOTLOADER_NAME}
[sudo] password for wgtdkp: 
/usr/local/google/home/wgtdkp/myvenv/bin/boot-g12.py:8: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
Firmware Version :
ROM: 3.2 Stage: 0.0
Need Password: 0 Password OK: 1
Writing device/amlogic/yukawa/bootloader/u-boot_kvim3_noab.bin at 0xfffa0000...
[DONE]
Running at 0xfffa0000...
[DONE]
AMLC dataSize=16384, offset=65536, seq=0...
[DONE]
AMLC dataSize=49152, offset=393216, seq=1...
[DONE]
AMLC dataSize=16384, offset=229376, seq=2...
[DONE]
AMLC dataSize=49152, offset=245760, seq=3...
[DONE]
AMLC dataSize=49152, offset=294912, seq=4...
[DONE]
AMLC dataSize=16384, offset=65536, seq=5...
[DONE]
AMLC dataSize=1135472, offset=81920, seq=6...
[DONE]
[BL2 END]
➜  main-aosp-2 fastboot oem format
fastboot flash bootloader ${BOOTLOADER_NAME}
fastboot erase bootenv
fastboot reboot bootloader
OKAY [  0.172s]
Finished. Total time: 0.172s
Warning: skip copying bootloader image avb footer (bootloader partition size: 0, bootloader image size: 1217392).
Sending 'bootloader' (1188 KB)                     OKAY [  0.060s]
Writing 'bootloader'                               OKAY [  0.118s]
Finished. Total time: 0.245s
Erasing 'bootenv'                                  OKAY [  0.013s]
Finished. Total time: 0.079s
Rebooting into bootloader                          OKAY [  0.006s]
Finished. Total time: 0.106s
➜  main-aosp-2 fastboot devices
C863147585CE	 Android Fastboot
➜  main-aosp-2 adb devices
List of devices attached
41101FDAP0008F	device
➜  main-aosp-2 fastboot lsusb
fastboot: usage: unknown command lsusb
➜  main-aosp-2 cd out/target/product/yukawa
➜  yukawa fastboot flash boot boot.img
fastboot flash super super.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
fastboot flash recovery recovery.img
fastboot flash dtbo dtbo-unsigned.img
fastboot reboot
Sending 'boot' (32768 KB)                          OKAY [  1.505s]
Writing 'boot'                                     OKAY [  1.734s]
Finished. Total time: 3.264s
Sending sparse 'super' 1/14 (114684 KB)            OKAY [  5.285s]
Writing 'super'                                    OKAY [  6.239s]
Sending sparse 'super' 2/14 (112052 KB)            OKAY [  5.188s]
Writing 'super'                                    OKAY [  6.186s]
Sending sparse 'super' 3/14 (114684 KB)            OKAY [  5.314s]
Writing 'super'                                    OKAY [  6.305s]
Sending sparse 'super' 4/14 (114684 KB)            OKAY [  5.376s]
Writing 'super'                                    OKAY [  6.191s]
Sending sparse 'super' 5/14 (107304 KB)            OKAY [  5.000s]
Writing 'super'                                    OKAY [  5.825s]
Sending sparse 'super' 6/14 (114684 KB)            OKAY [  5.337s]
Writing 'super'                                    OKAY [  6.199s]
Sending sparse 'super' 7/14 (109200 KB)            OKAY [  5.101s]
Writing 'super'                                    OKAY [  5.994s]
Sending sparse 'super' 8/14 (114684 KB)            OKAY [  5.376s]
Writing 'super'                                    OKAY [  6.340s]
Sending sparse 'super' 9/14 (114684 KB)            OKAY [  5.328s]
Writing 'super'                                    OKAY [  6.229s]
Sending sparse 'super' 10/14 (114684 KB)           OKAY [  5.409s]
Writing 'super'                                    OKAY [  6.302s]
Sending sparse 'super' 11/14 (114368 KB)           OKAY [  5.344s]
Writing 'super'                                    OKAY [  6.148s]
Sending sparse 'super' 12/14 (114685 KB)           OKAY [  5.330s]
Writing 'super'                                    OKAY [  6.776s]
Sending sparse 'super' 13/14 (114684 KB)           OKAY [  5.350s]
Writing 'super'                                    OKAY [  6.569s]
Sending sparse 'super' 14/14 (67708 KB)            OKAY [  3.189s]
Writing 'super'                                    OKAY [  3.706s]
Finished. Total time: 157.055s
Warning: skip copying cache image avb footer due to sparse image.
Sending 'cache' (56 KB)                            OKAY [  0.022s]
Writing 'cache'                                    OKAY [  0.033s]
Finished. Total time: 0.087s
Warning: skip copying userdata image avb footer due to sparse image.
Sending 'userdata' (128 KB)                        OKAY [  0.026s]
Writing 'userdata'                                 OKAY [  0.042s]
Finished. Total time: 0.102s
Sending 'recovery' (32768 KB)                      OKAY [  1.547s]
Writing 'recovery'                                 OKAY [  1.697s]
Finished. Total time: 3.281s
Sending 'dtbo' (7 KB)                              OKAY [  0.020s]
Writing 'dtbo'                                     OKAY [  0.018s]
Finished. Total time: 0.070s
Rebooting                                          OKAY [  0.000s]
Finished. Total time: 0.100s
 
            
              
            
           
          
            
              
                wgtdkp  
              
                  
                    July 25, 2024,  9:37am
                   
                  2 
               
             
            
              Are there continuous build that I know VIM3 is expected to work with the latest AOSP code?
             
            
              
            
           
          
            
            
              Hello, you need to follow my document to burn fastboot
  
  
    #Preface 
As we all know, Google often uses dessert names to label Android versions, and this tradition has been going on for a decade, with each version increasing with the addition of a new letter in the alphabet. Hence, the latest Android 14, with the letter “U,” is now dubbed as Upside Down Cake. 
Upside Down Cake is a type of cake baked in a skillet, where the ingredients (usually apple or pineapple slices) are placed on the bottom of the skillet. The batter is then poured on top and placed…
   
 
             
            
              
            
           
          
            
              
                wgtdkp  
              
                  
                    July 25, 2024, 10:53am
                   
                  4 
               
             
            
              Hi, yes I am using the fastboot binary built from source:
➜  yukawa which fastboot 
fastboot: aliased to /usr/local/google/home/wgtdkp/sdb/main-aosp-2/out/host/linux-x86/bin/fastboot
 
            
              
            
           
          
            
              
                wgtdkp  
              
                  
                    July 26, 2024,  6:31pm
                   
                  5 
               
             
            
              FYI, I am a Google engineer who works on a new wireless technology (Thread ) added to Android 15. I am trying to use VIM3 as the reference board to demonstrate how device vendors can make their own products with the technology. But it looks like VIM3 support for Android is not working on AOSP head (e.g. the doc  should be updated to use “yukawa-trunk_staging-userdebug”).
@xiong.zhang  Is it possible for you to follow the instructions in Home · Wiki · BayLibre / amlogic / Android TV / aosp / device / amlogic / yukawa · GitLab  to see if the guide still works?
             
            
              
            
           
          
            
            
              You need to follow the instructions in the following document to burn. The latest v20240613 is verified OK. You can download this to verify
  
  
    #Preface 
As we all know, Google often uses dessert names to label Android versions, and this tradition has been going on for a decade, with each version increasing with the addition of a new letter in the alphabet. Hence, the latest Android 14, with the letter “U,” is now dubbed as Upside Down Cake. 
Upside Down Cake is a type of cake baked in a skillet, where the ingredients (usually apple or pineapple slices) are placed on the bottom of the skillet. The batter is then poured on top and placed…
   
 
             
            
              
            
           
          
            
              
                wgtdkp  
              
                  
                    July 30, 2024,  8:53am
                   
                  7 
               
             
            
              In your linked doc, it mentions
The latest version 20240613 still needs vbmeta.img.
 
But I can’t find this file from the downloaded 20240613 prebuilt. Where can’t I get this?
Secondly, there is a recent AOSP change https://cs.android.com/android/_/android/device/amlogic/yukawa/+/2318974a95c2c43d85fb7cbfbf7450a633c235b5 , do you think it can break your guide?
             
            
              
            
           
          
            
            
              After downloading you need to unzip it as shown below
             
            
              
            
           
          
            
            
              
It is possible. We regularly verify this based on their latest version. The last time the verification was ok, it was the version I uploaded.
             
            
              
            
           
          
            
              
                wgtdkp  
              
                  
                    July 30, 2024,  9:12am
                   
                  10 
               
             
            
              Sorry I somehow didn’t notice the vbmeta file there.
But I still failed with below error:
➜  vim3-u-aosp-v240613 ls -all
total 1691188
drwxr-xr-x 2 wgtdkp primarygroup       4096 Jul 30 17:09 .
drwxr-xr-x 3 wgtdkp primarygroup       4096 Jul 30 17:09 ..
-rw-r--r-- 1 wgtdkp primarygroup   54846072 Jul 30 17:09 adb
-rw-r--r-- 1 wgtdkp primarygroup   67108864 Jul 30 17:09 boot.img
-rw-r--r-- 1 wgtdkp primarygroup       4600 Jul 30 17:09 dtbo-unsigned.img
-rw-r--r-- 1 wgtdkp primarygroup   15170192 Jul 30 17:09 fastboot
-rw-r--r-- 1 wgtdkp primarygroup    3398192 Jul 30 17:09 mke2fs
-rw-r--r-- 1 wgtdkp primarygroup 1587607312 Jul 30 17:09 super.img
-rw-r--r-- 1 wgtdkp primarygroup    1280880 Jul 30 17:09 u-boot_kvim3_ab.bin
-rw-r--r-- 1 wgtdkp primarygroup    2314516 Jul 30 17:09 userdata.img
-rw-r--r-- 1 wgtdkp primarygroup       4096 Jul 30 17:09 vbmeta.img
➜  vim3-u-aosp-v240613 fastboot flash boot_a boot.img && fastboot flash boot_b boot.img && fastboot flash super super.img && fastboot flash userdata userdata.img && fastboot flash dtbo_a dtbo-unsigned.img && fastboot flash dtbo_b dtbo-unsigned.img && fastboot erase misc && fastboot erase frp && fastboot format metadata && fastboot flash vbmeta_a vbmeta.img && fastboot flash vbmeta_b vbmeta.img
Warning: skip copying boot_a image avb footer (boot_a partition size: 33554432, boot_a image size: 67108864).
Sending 'boot_a' (65536 KB)                        OKAY [  2.790s]
Writing 'boot_a'                                   FAILED (remote: 'too large for partition')
fastboot: error: Command failed
I am testing with VIM3.
The screen shows error messages like:
** Bad device specification mmc boot_a_a **
Couldn't find partition mmc boot_a_a
 
            
              
            
           
          
            
            
              Hello, is the pyamlboot environment installed?
fastboot flash bootloader ${BOOTLOADER_NAME}
fastboot erase bootenv && fastboot oem format && fastboot reboot bootloader
Have you executed these two steps?
             
            
              
            
           
          
            
              
                wgtdkp  
              
                  
                    July 30, 2024,  1:19pm
                   
                  12 
               
             
            
              Yes I did the two steps
fastboot flash bootloader ${BOOTLOADER_NAME}
fastboot erase bootenv && fastboot oem format && fastboot reboot bootloader
By “unbuntun”, do you mean ubuntu? No, but I am running on a linux machine.
             
            
              
            
           
          
            
            
              Among them this
BOOTLOADER_NAME=u-boot_kvim3_ab.bin
It is best to use Ubuntu system to burn
             
            
              
            
           
          
            
              
                wgtdkp  
              
                  
                    August 5, 2024,  1:16pm
                   
                  14 
               
             
            
              Unfortunately, it’s not feasible for me to get an ubuntu machine while I can’t understand why there is a difference between ubuntu and another linux variant…
This wiki doc uses noab images Khadas_VIM3 · Wiki · BayLibre / amlogic / Android TV / aosp / device / amlogic / yukawa · GitLab , is it outdated now? Should I expect noab images continue working?
             
            
              
            
           
          
            
              
                wgtdkp  
              
                  
                    August 5, 2024,  3:19pm
                   
                  15 
               
             
            
              I am able to flash and launch with the vim3-u-aosp-v240613.rar prebuilt images. My previous issue is resolved by replacing my fastboot and mke2fs to the one in the prebuilt package.
But I still can’t get it work with the AOSP image built from AOSP HEAD. The immediate issue is that there is no vbmeta.img in out/target/product/yukawa/.
             
            
              
            
           
          
            
            
              vbmeta partition needs to add this when compiling
export TARGET_AVB_ENABLE=true
export TARGET_VIM3=true
export TARGET_AVB_ENABLE=true
export TARGET_USE_TABLET_LAUNCHER=true
source build/envsetup.sh && lunch yukawa-user/yukawa-userdebug
time make -j50 2>&1 | tee build_vim3_14_android.log
Your reference document is 5.4 kernel, the following document corresponds to the 6.1 kernel, and BayLibre provides me for referencehttps://baylibre.pages.baylibre.com/amlogic/atv/doc/android/android-build.html#fetching-the-code 
             
            
              
            
           
          
            
              
                wgtdkp  
              
                  
                    August 6, 2024,  2:58am
                   
                  17 
               
             
            
              Thanks! The command
export TARGET_AVB_ENABLE=true
works for the vbmeta.img missing issue.
After executing the flashing commands, my VIM3 board failed to boot Android…
I am using the AOSP HEAD, not the version in your link (Building Android — khadas-android-14 documentation ).
I have to use AOSP HEAD because our feature is added to Android after version U.
             
            
              
            
           
          
            
            
              
 wgtdkp:
 
AOSP HEAD
 
 
Do you mean that the HEAD means the latest code? Or is it a mirror that is compiled
You tell me the meaning of this HEAD first
The following link is Baylibre. They are based on the latest code -based burning mirror image every dayhttps://public.amlogic.binaries.baylibre.com/ci/build/baylibre/ 
             
            
              
            
           
          
            
              
                wgtdkp  
              
                  
                    August 6, 2024,  3:17am
                   
                  19 
               
             
            
              Sorry, to be clear, AOSP HEAD means init the repo with:
repo init -c -u https://android.googlesource.com/platform/manifest -b main                                                                                                
 
            
              
            
           
          
            
            
              What version of Android code is this?I need to ask Baylibre about this