This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62: Facing Issue while building Android

Part Number: SK-AM62


Hi all,

I am trying to build u-boot from  Processor SDK Linux for AM62x  09.01.00

i have follow the this link-->https://software-dl.ti.com/processor-sdk-android/esd/AM62X/09_01_00/docs/android/Overview_Building_the_SDK.html

i have face the some issuse on -->4)Build tispl.bin and u-boot.img:

log as below

make ARCH=arm CROSS_COMPILE=${DOWNLOAD_PATH}/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- BL31=${YOUR_PATH}/ti-bootloader-aosp/arm-trusted-firmware/build/k3/lite/release/bl31.bin TEE=${YOUR_PATH}/ti-bootloader-aosp/optee_os/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=${YOUR_PATH}/ti-bootloader-aosp/ti-linux-firmware
  UPD     include/generated/timestamp_autogenerated.h
  ENVC    include/generated/env.txt
  ENVP    include/generated/env.in
  ENVT    include/generated/environment.h
  CC      cmd/version.o
  AR      cmd/built-in.o
  CC      env/common.o
  AR      env/built-in.o
  CC      lib/efi_loader/dtbdump.o
  LD      lib/efi_loader/dtbdump_efi.so
  OBJCOPY lib/efi_loader/dtbdump.efi
  CC      lib/efi_loader/initrddump.o
  LD      lib/efi_loader/initrddump_efi.so
  OBJCOPY lib/efi_loader/initrddump.efi
  LD      u-boot
  OBJCOPY u-boot.srec
  OBJCOPY u-boot-nodtb.bin
  RELOC   u-boot-nodtb.bin
  CAT     u-boot-fit-dtb.bin
  COPY    u-boot.bin
  SYM     u-boot.sym
  CC      spl/common/spl/spl.o
  AR      spl/common/spl/built-in.o
  CC      spl/env/common.o
  AR      spl/env/built-in.o
  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl-nodtb.bin
  FDTGREP spl/dts/k3-am625-sk.dtb
  MKIMAGE spl/u-boot-spl.multidtb.fit
  CAT     spl/u-boot-spl-dtb.bin
  COPY    spl/u-boot-spl.bin
  SYM     spl/u-boot-spl.sym
  MKIMAGE u-boot.img
  MKIMAGE u-boot-dtb.img
  BINMAN  .binman_stamp
binman: 'type' object is not subscriptable
Makefile:1108: recipe for target '.binman_stamp' failed
make: *** [.binman_stamp] Error 1

  • 1. Is your host build machine Ubuntu 22.04 ?

    2. For standalone u-boot build, Have you installed all necessary and mentioned packages here ?

    Ref: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_02_01_09/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html# 

  • 1. No, my host machine is Ubuntu 18.04.

    2. Processor SDK Android for AM62x 09.01.00, I have build the android follow the below link.

    Ref:software-dl.ti.com/.../Overview_Building_the_SDK.html

  •  The recommended host machine for building bootloader or android distro is Ubuntu 22.04. I suggest you to switch to that , you will face similar build issues moving forward if you don't have the right host tools. Ubuntu 18 comes with a older python version,so unless you create a docker container with all needed compatible tools and python version, you will see build failures like this

    As you can see a related discussion here : 

    https://lore.kernel.org/all/20231011-binman-firewalling-v4-1-a08085d300e9@ti.com/t/#u

    For sdk , use the recommended host and tools mentioned in release notes 

  • Hi everyone,

    My System Config:-

    ubuntu 22.04

    RAM16.0GiB

    Processor 11th Gen Intel® CoreTm i5-11400 @ 2.60GHz × 12

    1)we have change the ubunt22.04 and follow the below link as 09.01.00 version

    software-dl.ti.com/.../Overview_Building_the_SDK.html

    2)we have successfully built with bootloader components.

    3)We have follow below steps on Bootloader components as above the link, still we have get the error from Android file system. How to  resolve this issue?

    ~/09_01_00/ti-aosp-14$ m TARGET_SDCARD_BOOT=true
    
    
    19:02:52 ************************************************************
    19:02:52 You are building on a machine with 15.4GB of RAM
    19:02:52 
    19:02:52 The minimum required amount of free memory is around 16GB,
    19:02:52 and even with that, some configurations may not work.
    19:02:52 
    19:02:52 If you run into segfaults or other errors, try reducing your
    19:02:52 -j value.
    19:02:52 ************************************************************
    ============================================
    PLATFORM_VERSION_CODENAME=REL
    PLATFORM_VERSION=14
    PRODUCT_INCLUDE_TAGS=com.android.mainline
    TARGET_PRODUCT=am62x
    TARGET_BUILD_VARIANT=userdebug
    TARGET_ARCH=arm64
    TARGET_ARCH_VARIANT=armv8-a
    TARGET_CPU_VARIANT=cortex-a53
    TARGET_2ND_ARCH=arm
    TARGET_2ND_ARCH_VARIANT=armv8-a
    TARGET_2ND_CPU_VARIANT=cortex-a53
    HOST_OS=linux
    HOST_OS_EXTRA=Linux-6.5.0-28-generic-x86_64-Ubuntu-22.04.4-LTS
    HOST_CROSS_OS=windows
    BUILD_ID=UP1A.231105.003.A1
    OUT_DIR=out
    ============================================
    [100% 415/415] analyzing Android.bp files and generating ninja file at out/soong/build.ninja
    FAILED: out/soong/build.ninja
    cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i  "$BUILDER" 
        --top "$TOP"     --soong_out "out/soong"     --out "out"     -o out/soong/build.ninja --bazel-mode --globListDir build --globFile out/soong/globs-
    build.ninja -t -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.
    build Android.bp
    Killed
    19:05:07 soong bootstrap failed with: exit status 1
    
    #### failed to build some targets (02:16 (mm:ss)) ####
    
  • You are running out of swap space most likely.
    Android builds need more memory - https://source.android.com/docs/setup/start/requirements#hardware-requirements

    Can you give a try with build option -j1 and check?

  • Hi,

     
    we are tried two host machines:

    1 st host machine:  
    =======================

          1st host machine is Ubuntu 22.04 & 16 GB RAM & 11th Gen Intel® CoreTm i5-11400 @ 2.60GHz × 12 processor.

    During the Android build we encountered an error,

     I have already mentioned this error in a previous post.when i attempted the build again,using both make -j1 and make -j2,my PC was experiencing hanging issue,How can i resolve this problem? i mentioned details of my swap space below
    $ free -h

                   total        used        free      shared  buff/cache   available
    Mem:            15Gi       1.2Gi        12Gi       403Mi       1.8Gi        13Gi
    Swap:          2.0Gi          0B       2.0Gi


    2nd Host machine:
    =====================
    system:

    Ubuntu 18.04 & 32 GB RAM used,previously i was build-ed Android 13 .this is successfully completed,Now,i am building android sdk version like 09.01.00.

    During the Android build we encountered an error,

    below i mentioned logs..that logs is continuously going after that ninja failed came.how to solve this issue?

    ~/09_01_00/ti-aosp-14$make -j1
    ============================================
    PLATFORM_VERSION_CODENAME=REL
    PLATFORM_VERSION=14
    PRODUCT_INCLUDE_TAGS=com.android.mainline
    TARGET_PRODUCT=am62x
    TARGET_BUILD_VARIANT=userdebug
    TARGET_ARCH=arm64
    TARGET_ARCH_VARIANT=armv8-a
    TARGET_CPU_VARIANT=cortex-a53
    TARGET_2ND_ARCH=arm
    TARGET_2ND_ARCH_VARIANT=armv8-a
    TARGET_2ND_CPU_VARIANT=cortex-a53
    HOST_OS=linux
    HOST_OS_EXTRA=Linux-5.4.0-150-generic-x86_64-Ubuntu-18.04.6-LTS
    HOST_CROSS_OS=windows
    BUILD_ID=UP1A.231105.003.A1
    OUT_DIR=out
    ============================================
    [0% 0/1] analyzing Android.bp files and generate the ninja file at out/soong/build.ninja
    
    
    4:20 analyzing Android.bp files and generate the ninja file at out/soong/build.ninja
    #### failed to build some targets (12:22 (mm:ss)) #### 

    $free -h
    total used free shared buff/cache available Mem: 23G 23G 147M 776K 183M 70M Swap: 2.0G 1.6G 384M

  • Can you try increasing the SWAP space to 16GB?

  • Can you please tell the required swap space, Currently is 2GB.

  • Hi  Vishal,

    I have successfully increased the swapfile space to 16GB on my Ubuntu 18.04 machine with 32GB of RAM. After doing this, i run the command make -j4 and now it's building. Here are the details of my swapfile logs below:

    $ sudo swapon --show
    NAME      TYPE SIZE   USED PRIO
    /swapfile file  16G 380.1M   -2

  • Build Issuse:

         Using the command "make -j1 TARGET_SDCARD_BOOT=true" it's taking more time(I.e 3 hours) and after start to build, below mention the log.

      

         [0% 0/1] analyzing Android.bp files and generate the ninja file at out/soong/build.ninja

      4:20 analyzing Android.bp files and generate the ninja file at out/soong/build.ninja

    please answer the follow the qustions:


        Can you please tell us the SK-AM62 E3 revision board support PROCESSOR-SDK-ANDROID-AM62X 09.01.00?

         We want to know this version 09.01.00 android image will boot up the SK-AM62 E3 revision board or not.

  • Hi,

    for PC requirements you can check on aosp website was google say :  https://source.android.com/docs/setup/start/requirements


    For E3 support Yes this revision was supported in SDK

    Regards 
    Guillaume


  • Hello all,

    I have successfully completed "Build Android" steps for the Am62x board using SDK version 09_01_00. However, when attempting to "Flashing SD card" following the steps from the provided link,

    software-dl.ti.com/.../Application_Notes_Android_SD_CARD.html

    run the below command
    sudo ./flashall.sh --board="am62x-sk" --sdcard="/dev/sdX"

    only the boot partition  image is created, including uboot.img, tispl.bin, and tiboot3.bin.why root file system is  not creating..why not creating another partitions?

    How to boot SD card procedure on SK-AM62x board?

  • Hi , 

    Boot procedure was on same page as you share.

    we don't put all image directly on sdcard it's a historic decision it's more simple to use same process as emmc instead of creating an special sd card image but perhaps we need to change this in the future .

    Guillaume

  • Hi,

    I have run the below command, This boot images only created(I.e  uboot.img, tispl.bin, tiboot3.bin) on SD Card.
    sudo ./flashall.sh --board="am62x-sk" --sdcard="/dev/sdX"

    I Need rootf and system image on sd card.

    For example:
    I have flash the board on emmc boot this is created to boot, rootfs and system image. I want to rootfs, system image to "SD Card boot".


    How to copy rootfs and system image on SD Card?


    How many partitions to create on sd card? 

  • Hi,

    Can you please tell me any update?

  • Hi,

    we will work to have in next release a solution to flash all image on SD card.

    i have no quickly solution for you for now , i ping you on this ticket when we have a solution for you

    Guillaume