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.

Linux/AM5728: Error about building Android Filesystem (AFS)

Guru 10235 points
Part Number: AM5728

Tool/software: Linux

Hello, TI Experts,

 

We have additional question about building Android Filesystem (AFS) from the below E2E-thread.

http://e2e.ti.com/support/processors/f/791/p/789178/2920028#2920028

 

We found another error like below.

(Please refer attached logfile in detail)

 

ninja: build stopped: subcommand failed.
12:53:21 ninja failed with: exit status 1
12:53:23 Unable to parse ninja entry "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00140939\t141391\t0\tsetup-jack-server\t190b1380f220d49a": strconv.Atoi: parsing "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00140939": invalid syntax

#### failed to build some targets (02:47:20 (hh:mm:ss)) ####

Question:

Do you have same experience?

 

We would appreciate if you tell us how to solve this problem.

 

Best regards,

7711.log4.txt
usr@usr-ThinkPad-T520:~$ cd ti-processor-sdk-android-am57xx-evm-05.02.00.10/board-support/aosp-6AO.1.1/
usr@usr-ThinkPad-T520:~/ti-processor-sdk-android-am57xx-evm-05.02.00.10/board-support/aosp-6AO.1.1$ export KERNELDIR=~/ti-processor-sdk-android-am57xx-evm-05.02.00.10/board-support/linux-4.14.80+gitAUTOINC+384658809d-g384658809d/
usr@usr-ThinkPad-T520:~/ti-processor-sdk-android-am57xx-evm-05.02.00.10/board-support/aosp-6AO.1.1$ prebuilts/sdk/tools/jack-admin kill-server
Killing background server
No Jack server to kill
usr@usr-ThinkPad-T520:~/ti-processor-sdk-android-am57xx-evm-05.02.00.10/board-support/aosp-6AO.1.1$ prebuilts/sdk/tools/jack-admin start-server Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m -cp /home/usr/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
usr@usr-ThinkPad-T520:~/ti-processor-sdk-android-am57xx-evm-05.02.00.10/board-support/aosp-6AO.1.1$ make
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-31-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM1.171019.026
OUT_DIR=out
============================================
ninja: no work to do.
[1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
out/build-aosp_arm.ninja is missing, regenerating...
[500/998] including ./hardware/ti/dra7xx/Android.mk ...
build/core/base_rules.mk:238: error: hardware/ti/dra7xx/hwcomposer: MODULE.TARGET.SHARED_LIBRARIES.hwcomposer. already defined by hardware/ti/am65x/libhwcomposer.
09:30:40 ckati failed with: exit status 1
make: *** [run_soong_ui] Error 1
usr@usr-ThinkPad-T520:~/ti-processor-sdk-android-am57xx-evm-05.02.00.10/board-support/aosp-6AO.1.1$ . build/envsetup.sh
including device/asus/fugu/vendorsetup.sh
including device/generic/car/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/uml/vendorsetup.sh
including device/google/dragon/vendorsetup.sh
including device/google/marlin/vendorsetup.sh
including device/google/muskie/vendorsetup.sh
including device/google/taimen/vendorsetup.sh
including device/huawei/angler/vendorsetup.sh
including device/lge/bullhead/vendorsetup.sh
including device/linaro/hikey/vendorsetup.sh
including device/ti/am57xevm/vendorsetup.sh
including device/ti/am65xevm/vendorsetup.sh
including sdk/bash_completion/adb.bash
usr@usr-ThinkPad-T520:~/ti-processor-sdk-android-am57xx-evm-05.02.00.10/board-support/aosp-6AO.1.1$ lunch

You're building on Linux

Lunch menu... pick a combo:
     1. aosp_arm-eng
     2. aosp_arm64-eng
     3. aosp_mips-eng
     4. aosp_mips64-eng
     5. aosp_x86-eng
     6. aosp_x86_64-eng
     7. full_fugu-userdebug
     8. aosp_fugu-userdebug
     9. aosp_car_emu_arm-userdebug
     10. aosp_car_emu_arm64-userdebug
     11. aosp_car_emu_x86-userdebug
     12. aosp_car_emu_x86_64-userdebug
     13. mini_emulator_arm64-userdebug
     14. m_e_arm-userdebug
     15. m_e_mips64-eng
     16. m_e_mips-userdebug
     17. mini_emulator_x86_64-userdebug
     18. mini_emulator_x86-userdebug
     19. uml-userdebug
     20. aosp_dragon-userdebug
     21. aosp_dragon-eng
     22. aosp_marlin-userdebug
     23. aosp_marlin_svelte-userdebug
     24. aosp_sailfish-userdebug
     25. aosp_walleye-userdebug
     26. aosp_walleye_test-userdebug
     27. aosp_taimen-userdebug
     28. aosp_angler-userdebug
     29. aosp_bullhead-userdebug
     30. aosp_bullhead_svelte-userdebug
     31. hikey-userdebug
     32. hikey960-userdebug
     33. am57xevm_full-eng
     34. am57xevm_full-user
     35. am57xevm_full-userdebug
     36. am57xevm_auto-eng
     37. am57xevm_auto-user
     38. am57xevm_auto-userdebug
     39. am65xevm_full-eng
     40. am65xevm_full-user
     41. am65xevm_full-userdebug

Which would you like? [aosp_arm-eng] 35

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=am57xevm_full
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPM1
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a15
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-31-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM1.171019.026
OUT_DIR=out
AUX_OS_VARIANT_LIST=
============================================
usr@usr-ThinkPad-T520:~/ti-processor-sdk-android-am57xx-evm-05.02.00.10/board-support/aosp-6AO.1.1$ make
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=am57xevm_full
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a15
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-31-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM1.171019.026
OUT_DIR=out
============================================
ninja: no work to do.
[1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
No need to regenerate ninja file
[  0% 1/198] Ensuring Jack server is installed and started
Jack server already installed in "/home/usr/.jack-server"
Server is already running
[ 94% 188/198] build out/target/product/am57xevm/obj/NOTICE.xml
Combining NOTICE files into text
Combining NOTICE files into XML
[ 96% 191/198] build out/target/product/am57xevm/obj/NOTICE_VENDOR.xml
Combining NOTICE files into text
Combining NOTICE files into XML
[ 98% 195/198] Target vendor fs image: out/target/product/am57xevm/vendor.img
depmod: WARNING: could not open /home/usr/ti-processor-sdk-android-am57xx-evm-05.02.00.10/board-support/aosp-6AO.1.1/out/target/product/am57xevm/obj/PACKAGING/depmod_vendor_intermediates/lib/modules/0.0/modules.order: No such file or directory
depmod: WARNING: could not open /home/usr/ti-processor-sdk-android-am57xx-evm-05.02.00.10/board-support/aosp-6AO.1.1/out/target/product/am57xevm/obj/PACKAGING/depmod_vendor_intermediates/lib/modules/0.0/modules.builtin: No such file or directory
Running:  mkuserimg_mke2fs.sh -s out/target/product/am57xevm/vendor out/target/product/am57xevm/vendor.img ext4 vendor 268435456 -D out/target/product/am57xevm/system -L vendor out/target/product/am57xevm/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin
MKE2FS_CONFIG=./system/extras/ext4_utils/mke2fs.conf mke2fs -L vendor -E android_sparse -t ext4 -b 4096 out/target/product/am57xevm/vendor.img 65536
mke2fs 1.43.3 (04-Sep-2016)
Creating filesystem with 65536 4k blocks and 65536 inodes
Filesystem UUID: fcaddc74-4376-4370-8e16-ca5286c3a56b
Superblock backups stored on blocks: 
	32768

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

e2fsdroid -p out/target/product/am57xevm/system -S out/target/product/am57xevm/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin -f out/target/product/am57xevm/vendor -a /vendor out/target/product/am57xevm/vendor.img
Created filesystem with 617/65536 inodes and 11986/65536 blocks
out/target/product/am57xevm/vendor.img maxsize=274053120 blocksize=4224 total=23883924 reserve=2770944
[ 99% 197/198] Target system fs image: out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system.img
FAILED: out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system.img 
/bin/bash -c "(if [ -d out/target/product/am57xevm/system/vendor ] && [ ! -h out/target/product/am57xevm/system/vendor ]; then echo 'Non-symlink out/target/product/am57xevm/system/vendor detected!' 1>&2; echo 'You cannot install files to out/target/product/am57xevm/system/vendor while building a separate vendor.img!' 1>&2; exit 1; fi ) && (ln -sf /vendor out/target/product/am57xevm/system/vendor ) && (mkdir -p out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/ out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates && rm -rf out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"ext_mkuserimg=mkuserimg_mke2fs.sh\" >>  out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"fs_type=ext4\" >>  out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"system_size=805306368  \" >>  out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"userdata_size=2147483648 \" >>  out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"cache_fs_type=ext4\" >>  out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"cache_size=268435456  \" >>  out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"vendor_fs_type=ext4\" >>  out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"vendor_size=268435456  \" >>  out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"extfs_sparse_flag=-s\" >>  out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"squashfs_sparse_flag=-s\" >>  out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"selinux_fc=out/target/product/am57xevm/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin\" >>  out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"skip_fsck=true\" >>  out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (PATH=out/host/linux-x86/bin/:\$PATH ./build/tools/releasetools/build_image.py out/target/product/am57xevm/system out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system_image_info.txt out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/am57xevm/system || ( echo \"Out of space? the tree size of out/target/product/am57xevm/system is (MB): \" 1>&2 ; du -sm out/target/product/am57xevm/system 1>&2; if [ \"ext4\" == \"ext4\" ]; then maxsize=805306368  ; if [ \"\" == \"true\" ]; then maxsize=\$((maxsize - 4096 * 4096)); fi; echo \"The max is \$(( maxsize / 1048576 )) MB.\" 1>&2 ; else echo \"The max is \$(( 805306368   / 1048576 )) MB.\" 1>&2 ; fi; mkdir -p out/dist; cp out/target/product/am57xevm/installed-files.txt out/dist/installed-files-rescued.txt; exit 1 ) )"
error: failed to build out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system.img from out/target/product/am57xevm/system
Running:  mkuserimg_mke2fs.sh -s out/target/product/am57xevm/system out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 805306368 -D out/target/product/am57xevm/system -L system out/target/product/am57xevm/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin
MKE2FS_CONFIG=./system/extras/ext4_utils/mke2fs.conf mke2fs -L system -E android_sparse -t ext4 -b 4096 out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system.img 196608
mke2fs 1.43.3 (04-Sep-2016)
Creating filesystem with 196608 4k blocks and 49152 inodes
Filesystem UUID: 171d35b7-c6a5-48e3-94a0-31f1586135ee
Superblock backups stored on blocks: 
	32768, 98304, 163840

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

e2fsdroid -p out/target/product/am57xevm/system -S out/target/product/am57xevm/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin -f out/target/product/am57xevm/system -a /system out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system.img
__populate_fs: Could not allocate block in ext2 filesystem while writing file "libpac.so"
e2fsdroid: Could not allocate block in ext2 filesystem while populating file system
Out of space? the tree size of out/target/product/am57xevm/system is (MB): 
1132	out/target/product/am57xevm/system
The max is 768 MB.
ninja: build stopped: subcommand failed.
12:53:21 ninja failed with: exit status 1
12:53:23 Unable to parse ninja entry "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00140939\t141391\t0\tsetup-jack-server\t190b1380f220d49a": strconv.Atoi: parsing "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00140939": invalid syntax

#### failed to build some targets (02:47:20 (hh:mm:ss)) ####

  • Hi Matusan,

    1. hope you setup build machine as per guidelines at :
    source.android.com/.../initializing

    2. Looks like you are seeing out of memory error . Try the troubleshooting steps at
    source.android.com/.../jack
    >> reduce SERVER_NB_COMPILE in $HOME/.jack
    >> source $HOME/.jack
    >> rebuild
  • The build error is due to Android system image (system.img) not having enough space for what you are trying to build.
    The system image size is set for 768 MB by default, and you have contents for system partition exceeding that limit (1132 MB).


    1) If you have not added additional content on top of release, try doing a clean build
    or
    2) If you have added more content to be built, increase the system partition size (via BOARD_SYSTEMIMAGE_PARTITION_SIZE  variable in BoardConfig.mk)

    __populate_fs: Could not allocate block in ext2 filesystem while writing file "libpac.so"
    e2fsdroid: Could not allocate block in ext2 filesystem while populating file system
    Out of space? the tree size of out/target/product/am57xevm/system is (MB): 1132 out/target/product/am57xevm/system
    The max is 768 MB.