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/AM3351: Building minimal rootfs

Part Number: AM3351

Tool/software: Linux

Hi, i am trying to build minimal file system with QT support  for processor-sdk-04.01.00.06. i am getting errors while building. please check below steps and error log.

$git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk_04_01
$cd tisdk_04_01/
$./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-04.01.00.06-config.txt
$cd build
$sudo gedit conf/local.conf
 /*add blelow line for qt support*/
 IMAGE_INSTALL += "packagegroup-arago-tisdk-qte"

$export PATH=$HOME/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin:$PATH
$MACHINE=am335x-evm bitbake arago-base-tisdk-image

Loading cache: 100% |###########################################################################################################| Time: 0:00:00
Loaded 3257 entries from dependency cache.
WARNING: No recipes available for:
  /home/sridhar/tisdk_04_01/sources/meta-openamp/recipes-bsp/device-tree/device-tree-generation_%.bbappend
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.32.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "arm-linux-gnueabi"
MACHINE           = "am335x-evm"
DISTRO            = "arago"
DISTRO_VERSION    = "2017.06"
TUNE_FEATURES     = "arm armv7a vfp thumb neon       callconvention-hard"
TARGET_FPU        = "hard"
meta-processor-sdk = "HEAD:2b7f7b00654eb3faaea7c66271ebe508b9ffc019"
meta-arago-distro
meta-arago-extras = "HEAD:8f49ed67d0627a04ac72fd388fda7756273ba2d7"
meta-browser      = "HEAD:08576b03af624b65ad949c410d84c11c7d1f2e39"
meta-openamp      = "HEAD:8a214032bfb7e8124bc1485c70c69f7d60abb819"
meta-qt5          = "HEAD:2c9f0e4eb0e9097f6f872ec1e1d81768a8ab5f1b"
meta-networking   
meta-ruby         
meta-python       
meta-oe           
meta-gnome        = "HEAD:fe5c83312de11e80b85680ef237f8acb04b4b26e"
meta-ti           = "HEAD:a18d57af8384ced25996739bb66d197c69efb77b"
meta-linaro-toolchain
meta-optee        = "HEAD:49b0f32d7e955f250b0022d1b2f403f45a2c2d9c"
meta              = "HEAD:e3911133ee9aad7cc3ae89faea80a097f6614fab"

Initialising tasks: 100% |######################################################################################################| Time: 0:00:06
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: autoconf-native-2.69-r11 do_patch: Command Error: 'quilt --quiltrc /home/sridhar/tisdk_04_01/build/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/etc/quiltrc push' exited with 0  Output:
/home/sridhar/tisdk_04_01/build/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/quilt: line 153: /home/sridhar/bin/bash: cannot execute binary file: Exec format error
ERROR: autoconf-native-2.69-r11 do_patch: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /home/sridhar/tisdk_04_01/build/arago-tmp-external-linaro-toolchain/work/x86_64-linux/autoconf-native/2.69-r11/temp/log.do_patch.5266
ERROR: Task (virtual:native:/home/sridhar/tisdk_04_01/sources/oe-core/meta/recipes-devtools/autoconf/autoconf_2.69.bb:do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 20 tasks of which 18 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  virtual:native:/home/sridhar/tisdk_04_01/sources/oe-core/meta/recipes-devtools/autoconf/autoconf_2.69.bb:do_patch
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

thankyou.

  • Hello khageswararao,

    You have accidentally or on purposely extracted ARM rootfs on your home directory. Please, do not do that. To exit from that situation rm -rf /home/sridhar/bin and start your build from the beginning.

    Best regards,
    Kemal

  • thanks kemal for your great support. now its building.
  • hi kemal, i created file system (arago-base-tisdk-image-am335x-evm-20180308104028.rootfs.tar.xz ).
    after extracting rootfs size is 546 mb.

    please tell me to optmize it to fit in 256 MB nand
  • Create a new image by replacing "packagegroup-arago-tisdk-qte" with "packagegroup-arago-qte" and tell me the size.
    /*add blelow line for qt support*/
    IMAGE_INSTALL += "packagegroup-arago-qte"

  • i got error, please check attachment .

    errorlog.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    i got errors
    ERROR: arago-base-tisdk-image-1.0-r0 do_image_complete: Error executing a python function in exec_python_func() autogenerated:
    The stack trace of python calls that resulted in this exception/failure was:
    File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
    0001:
    *** 0002:sstate_task_postfunc(d)
    0003:
    File: '/home/sridhar/tisdk_04_01/sources/oe-core/meta/classes/sstate.bbclass', lineno: 672, function: sstate_task_postfunc
    0668:
    0669:python sstate_task_postfunc () {
    0670: shared_state = sstate_state_fromvars(d)
    0671:
    *** 0672: sstate_install(shared_state, d)
    0673: for intercept in shared_state['interceptfuncs']:
    0674: bb.build.exec_func(intercept, d, (d.getVar("WORKDIR", True),))
    0675: omask = os.umask(0o002)
    0676: if omask != 0o002:
    File: '/home/sridhar/tisdk_04_01/sources/oe-core/meta/classes/sstate.bbclass', lineno: 276, function: sstate_install
    0272:
    0273: # Run the actual file install
    0274: for state in ss['dirs']:
    0275: if os.path.exists(state[1]):
    *** 0276: oe.path.copyhardlinktree(state[1], state[2])
    0277:
    0278: for postinst in (d.getVar('SSTATEPOSTINSTFUNCS', True) or '').split():
    0279: # All hooks should run in the SSTATE_INSTDIR
    0280: bb.build.exec_func(postinst, d, (sstateinst,))
    File: '/home/sridhar/tisdk_04_01/sources/oe-core/meta/lib/oe/path.py', lineno: 81, function: copyhardlinktree
    0077: if (os.stat(src).st_dev == os.stat(dst).st_dev):
    0078: # Need to copy directories only with tar first since cp will error if two
    0079: # writers try and create a directory at the same time
    0080: cmd = "cd %s; find . -type d -print | tar --xattrs --xattrs-include='*' -cf - -C %s -p --no-recursion --files-from - | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, src, dst)
    *** 0081: subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
    0082: source = ''
    0083: if os.path.isdir(src):
    0084: import glob
    0085: if len(glob.glob('%s/.??*' % src)) > 0:
    File: '/usr/lib/python3.4/subprocess.py', lineno: 620, function: check_output
    0616: process.wait()
    0617: raise
    0618: retcode = process.poll()
    0619: if retcode:
    *** 0620: raise CalledProcessError(retcode, process.args, output=output)
    0621: return output
    0622:
    0623:
    0624:def list2cmdline(seq):
    Exception: subprocess.CalledProcessError: Command 'cd /home/sridhar/tisdk_04_01/build/arago-tmp-external-linaro-toolchain/work/am335x_evm-linux-gnueabi/arago-base-tisdk-image/1.0-r0/deploy-arago-base-tisdk-image-image-complete; find . -type d -print | tar --xattrs --xattrs-include='*' -cf - -C /home/sridhar/tisdk_04_01/build/arago-tmp-external-linaro-toolchain/work/am335x_evm-linux-gnueabi/arago-base-tisdk-image/1.0-r0/deploy-arago-base-tisdk-image-image-complete -p --no-recursion --files-from - | tar --xattrs --xattrs-include='*' -xf - -C /home/sridhar/tisdk_04_01/build/arago-tmp-external-linaro-toolchain/deploy/images/am335x-evm' returned non-zero exit status 2
    Subprocess output:
    tar: .: Cannot utime: Operation not permitted
    tar: Exiting with failure status due to previous errors
    ERROR: arago-base-tisdk-image-1.0-r0 do_image_complete: Function failed: sstate_task_postfunc
    ERROR: Logfile of failure stored in: /home/sridhar/tisdk_04_01/build/arago-tmp-external-linaro-toolchain/work/am335x_evm-linux-gnueabi/arago-base-tisdk-image/1.0-r0/temp/log.do_image_complete.17846
    ERROR: Task (/home/sridhar/tisdk_04_01/sources/meta-arago/meta-arago-distro/recipes-core/images/arago-base-tisdk-image.bb:do_image_complete) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 4480 tasks of which 4479 didn't need to be rerun and 1 failed.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • This error is not related to IMAGE_INSTALL += "packagegroup-arago-qte". You have messed up the things with the sudo command again. Start everything from the beginning and do not type sudo anywhere.

  • yes, your correct. unexpectedly i build it in super user mode.
  • with IMAGE_INSTALL += "packagegroup-arago-qte" configuration i created rootfs.
    after extracting size is 398.7 MB
  • Please, NFS boot or SD boot with that image and post me the output of this script.

    #!/bin/sh
    
    FILELIST=""
    
    for package in $(opkg list-installed |  awk '{ print $1 }')
    do
    	FILELIST=""
    	for files in $(opkg files $package | grep /)
    	do
    		FILELIST+=$files" "
    	done
    	du -ch $FILELIST | grep total | awk '{ printf "%s - ", $1 }'
    	echo $package
    done
  • Please check Attachment.

    list.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    2.5M - alsa-conf
    28.0K - alsa-conf-base
    84.0K - alsa-lib
    24.0K - alsa-server
    8.0K - alsa-state
    4.0K - alsa-states
    16.0K - alsa-utils
    16.0K - alsa-utils-aconnect
    200.0K - alsa-utils-alsactl
    64.0K - alsa-utils-alsaloop
    56.0K - alsa-utils-alsamixer
    8.0K - alsa-utils-alsatplg
    12.0K - alsa-utils-alsaucm
    40.0K - alsa-utils-amixer
    60.0K - alsa-utils-aplay
    12.0K - alsa-utils-aseqdump
    12.0K - alsa-utils-aseqnet
    16.0K - alsa-utils-iecset
    52.0K - alsa-utils-midi
    64.0K - alsa-utils-scripts
    3.7M - alsa-utils-speakertest
    496.0K - amx3-cm3
    4.0K - arago-feed-config
    8.0K - arago-gpl-notice
    1.0G - base-files
    16.0K - base-passwd
    656.0K - bash
    100.0K - bc
    9.6M - binutils
    44.0K - bonnie++
    696.0K - busybox
    4.0K - busybox-hwclock
    24.0K - busybox-syslog
    24.0K - busybox-udhcpc
    2.1M - ca-certificates
    32.0K - cifs-utils
    16.0K - cpuburn-neon
    368.0K - cpuloadgen
    992.0K - cpuset
    16.0K - cryptodev-module
    152.0K - curl
    9.6M - dbus-1
    8.0K - devmem2
    124.0K - dosfstools
    336.0K - e2fsprogs
    20.0K - e2fsprogs-badblocks
    1.2M - e2fsprogs-e2fsck
    544.0K - e2fsprogs-mke2fs
    176.0K - e2fsprogs-tune2fs
    256.0K - elfutils
    236.0K - ethtool
    28.0K - evtest
    28.0K - fbset
    4.0K - fbset-modes
    288.0K - flex
    72.0K - fontconfig-utils
    3.1M - gstreamer1.0
    96.0K - hdparm
    92.0K - i2c-tools
    20.0K - init-ifupdown
    4.0K - initscript-telnetd
    88.0K - initscripts-functions
    104.0K - input-utils
    364.0K - iozone3
    56.0K - iperf
    2.0M - iptables
    144.0K - jpeg-tools
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • It is now your turn to take the control and decide which packages you do not need on your board and can remove them from the image in order to reduce its size.

    Open these related recipes and remove the packages you do not want to include in your image.
    <tisdk>/sources/meta-arago/meta-arago-distro/recipes-core/images/arago-base-tisdk-image.bb
    <tisdk>/sources/meta-arago/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-qte.bb
    <tisdk>/sources/meta-arago/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-base.bb
    <tisdk>/sources/meta-arago/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-console.bb
    <tisdk>/sources/meta-arago/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-base-tisdk.bb
    <tisdk>/sources/meta-arago/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-test.bb
    <tisdk>/sources/meta-processor-sdk/recipes-core/packagegroups/packagegroup-arago-test.bbappend
    <tisdk>/sources/meta-processor-sdk/recipes-core/packagegroups/packagegroup-arago-qte.bbappend

  • i modified <tisdk>/sources/meta-arago/meta-arago-distro/recipes-core/images/arago-base-tisdk-image.bb file like below.
    ----------------------------------------------------------------------------------------
    # Arago TI SDK base image with test tools
    # Suitable for initramfs

    require arago-image.inc
    IMAGE_FSTYPES += "cpio.xz"
    IMAGE_INSTALL += "\
    packagegroup-arago-base-tisdk \
    ${VIRTUAL-RUNTIME_initramfs} \
    "
    export IMAGE_BASENAME = "arago-base-tisdk-image"
    ----------------------------------------------------------------------------------------
    now roofs size after extracting 258.5 MB
    but i need to reduce it upto 240 MB then only its possible to load into nand.

    please let me know is there any way to optmization
  • Remove something from <tisdk>/sources/meta-arago/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-qte.bb

    For example to remove qtwebengine, add these lines to your <tisdk>/build/conf/local.conf file.

    QT5_ESSENTIALS_remove = "qtwebengine-qmlplugins"
    IMAGE_INSTALL_remove = "qtwebengine"
    BBMASK="meta-qt5/recipes-qt/qt5/qtwebengine_git.bb"

  • thanks for your great support, now i got 186 MB rootfs after removing qtwebengine.

    its taking 56 sec to get login prompt i want to optmize it. where can i dissable all Ethernet support/services.

    time_stamp_4_1_sdk_rootfs_186mb.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    CTRL-A Z for help | 115200 8N1 | NOR | Minicom 2.7 | VT102 | Online 6:37 | ttyUSB0
    sridhar@sridhar-ThinkCentre-M73:~/Desktop/temp/release$ cat /dev/ttyUSB0 | tstamp
    column1 is elapsed time since first message
    column2 is elapsed time since previous message
    column3 is the message
    0.000 0.000: �
    0.006 0.006: U-Boot SPL 2017.01-00360-gc6c77f9-dirty (Feb 16 2018 - 12:35:34)
    0.061 0.055: Trying to boot from MMC1
    0.163 0.102: reading uboot.env
    0.164 0.001:
    0.168 0.004: ** Unable to read "uboot.env" from mmc0:1 **
    0.170 0.002: Using default environment
    0.171 0.000:
    0.178 0.008: reading u-boot.img
    0.182 0.004: reading u-boot.img
    0.187 0.005: reading u-boot.img
    0.248 0.061: reading u-boot.img
    0.474 0.226:
    0.474 0.000:
    0.480 0.006: U-Boot 2017.01-00360-gc6c77f9-dirty (Feb 16 2018 - 12:35:34 +0530)
    0.480 0.000:
    0.482 0.002: CPU : AM335X-GP rev 2.1
    0.485 0.002: Model: TI AM335x EVM
    0.487 0.002: DRAM: 256 MiB
    0.741 0.254: NAND: 512 MiB
    0.771 0.030: MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    0.879 0.107: reading uboot.env
    0.880 0.002:
    0.884 0.004: ** Unable to read "uboot.env" from mmc0:1 **
    0.886 0.002: Using default environment
    0.887 0.000:
    1.072 0.185: <ethaddr> not set. Validating first E-fuse MAC
    1.077 0.005: Net: No ethernet found.
    3.114 2.037: Hit any key to stop autoboot: 0
    3.225 0.111: switch to partitions #0, OK
    3.227 0.002: mmc0 is current device
    3.330 0.102: SD/MMC found on device 0
    3.334 0.004: reading boot.scr
    3.338 0.005: ** Unable to read file boot.scr **
    3.343 0.004: reading uEnv.txt
    3.347 0.005: ** Unable to read file uEnv.txt **
    3.454 0.107: switch to partitions #0, OK
    3.456 0.002: mmc0 is current device
    3.556 0.100: Scanning mmc 0:1...
    3.711 0.156: switch to partitions #0, OK
    3.713 0.002: mmc0 is current device
    3.815 0.101: SD/MMC found on device 0
    4.532 0.718: 3620032 bytes read in 708 ms (4.9 MiB/s)
    4.590 0.058: 40718 bytes read in 37 ms (1 MiB/s)
    4.595 0.005: ## Flattened Device Tree blob at 88000000
    4.599 0.004: Booting using the fdt blob at 0x88000000
    4.610 0.010: Loading Device Tree to 8df1c000, end 8df28f0d ... OK
    4.650 0.040:
    4.651 0.002: Starting kernel ...
    4.652 0.000:
    11.718 7.067: [ 0.000000] Booting Linux on physical CPU 0x0
    11.734 0.015: [ 0.000000] Linux version 4.9.41-ge3a80a1c5c (mubeen@MUBEEN-ThinkCentre-M83) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #1 PREEMPT Wed Mar 7 12:00:33 IST 2018
    11.741 0.007: [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    11.749 0.008: [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    11.754 0.006: [ 0.000000] OF: fdt:Machine model: TI AM335x BeagleBone Black
    11.759 0.005: [ 0.000000] efi: Getting EFI parameters from FDT:
    11.762 0.003: [ 0.000000] efi: UEFI not found.
    11.767 0.005: [ 0.000000] cma: Reserved 48 MiB at 0x8a800000
    11.772 0.005: [ 0.000000] Memory policy: Data cache writeback
    11.776 0.005: [ 0.000000] CPU: All CPU(s) started in SVC mode.
    11.779 0.003: [ 0.000000] AM335X ES2.1 (neon)
    11.787 0.008: [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64960
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Please, see this post for boot time optimization and create new thread for your new questions in case if they are not already discussed or answered on this forum.