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.

AM3352: Issues Encountered While Installing LTP-DDT

Part Number: AM3352

Hello,

I hope this email finds you well. I am currently facing some issues while trying to install LTP-DDT. I obtained the LTP-DDT source code from the following path:
git clone git.ti.com/.../ltp-ddt.git

Problem 1:
I am looking for the alsa header files and libraries listed below:
- alsa-dev (e.g. alsa-dev_1.0.18-r0.1_armv5te.ipk)
- alsa-lib-dev (e.g. alsa-lib-dev_1.0.18-r0.1_armv5te.ipk)
- libasound2 (e.g. libasound2_1.0.18-r0.1_armv5te.ipk)

where can I find these packages?

Problem 2:
Following the steps outlined in the README-DDT file under section 6) "Building LTP-DDT," I tried to cross-compile LTP-DDT using the following steps:

```sh
export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabi-
export PATH=~/Tools/toolchain/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin:$PATH

# Installing headers in the kernel path
make distclean
make tisdk_am335x-evm-rt_defconfig
make menuconfig
make zImage
make headers_install

# Building steps
make autotools

export CROSS_COMPILER=${CROSS_COMPILE}
export CC=${CROSS_COMPILER}gcc
export LD=${CROSS_COMPILER}ld
export AR=${CROSS_COMPILER}ar
export STRIP=${CROSS_COMPILER}strip
export RANLIB=${CROSS_COMPILER}ranlib

export KERNEL_USR_INC=/home/zen/sdk/ti-processor-sdk-linux-rt-am335x-evm-04.03.00.05/board-support/linux-rt-4.9.69+gitAUTOINC+7069a470d5-g7069a470d5/usr/include/
./configure --host=arm-none-linux-gnueabi

make SKIP_IDCHECK=1 clean
make SKIP_IDCHECK=1
```

However, I encountered an error during the 'make' process:

```
CC lib/tst_cgroup.o
CC lib/tst_checkpoint.o
CC lib/tst_checksum.o
In file included from tst_clocks.c:10:0:
../include/tst_timer.h: In function 'tst_ts_from_timespec':
../include/tst_timer.h:614:3: warning: missing initializer [-Wmissing-field-initializers]
../include/tst_timer.h:614:3: warning: (near initialization for 't.ts.libc_ts.tv_nsec') [-Wmissing-field-initializers]
CC lib/tst_clocks.o
CC lib/tst_clone.o
tst_cmd.c:237:2: warning: missing initializer [-Wmissing-field-initializers]
tst_cmd.c:237:2: warning: (near initialization for 'version_parsers[1].cmd') [-Wmissing-field-initializers]
CC lib/tst_cmd.o
CC lib/tst_coredump.o
CC lib/tst_cpu.o
CC lib/tst_crypto.o
tst_device.c:36:25: fatal error: linux/btrfs.h: No such file or directory
compilation terminated.
make[1]: *** [../include/mk/rules.mk:15: tst_device.o] Error 1
make[1]: Leaving directory '/home/zen/Documents/embedded/testsuite/ltp-testsuite/ltp-ddt/ltp-ddt/lib'
make: *** [Makefile:101: lib-all] Error 2
```

I am seeking guidance on resolving this issue. Could you please advise on how to proceed?

Thank you for your time and assistance.

Best regards,
liangzw

  • export KERNEL_USR_INC=/home/zen/sdk/ti-processor-sdk-linux-rt-am335x-evm-04.03.00.05/board-support/linux-rt-4.9.69+gitAUTOINC+7069a470d5-g7069a470d5/usr/include/

    Looks like you are using a Linux SDK that is about 5 years old; we do not provide support for such old releases but I would like to offer some pointers nevertheless.

    It looks like you are trying to use this in conjunction with the top-of-the tree https://git.ti.com/cgit/test-automation/ltp-ddt/ project? That is also likely cause a lot of issues/incompatibilities. If you must use that old SDK you should roll back to a corresponding older version of ltp-ddt as well. Digging through the Yocto sources associated with the recipe for building that package we can find the latest version that should be compatible with SDK v4.x here...

    https://git.ti.com/cgit/arago-project/meta-arago/tree/meta-arago-extras/recipes-devtools/ltp-ddt/ltp-ddt_20170929.bb?id=d839fc557b1d4582f8001af3e87ef32b2d2e8954#n42

    ...which is pointing to SRCREV = "c2ca6740c240ccb9780868a52317b82f2a30fcc1"

    ...which is this commit here of ltp-ddt:

    https://git.ti.com/cgit/test-automation/ltp-ddt/commit/?id=c2ca6740c240ccb9780868a52317b82f2a30fcc1

    So try checking out that commit specifically, and then go through the exact steps as per documentation of this old SDK at:

    https://software-dl.ti.com/processor-sdk-linux/esd/docs/04_03_00_05/linux/Foundational_Components.html#ltp-ddt-validation

    If this doesn't work, I'd recommend you try two other things:

    1. Setup a Yocto build for that old SDK, to build this package inside the final image (SD card image, for example). This way you can be sure it will get build correctly. Note that due to the Yocto build being dependent on external servers etc. expect to spend some time to update/refresh various Git repository URLs and/or branch names, in alignment with how the different projects changed over the last years, or
    2. Move to the current SDK which is v8.2 as of now. I'd expect the build steps there to "just work" 
      https://www.ti.com/tool/PROCESSOR-SDK-AM335X

    Regards, Andreas

  • Hello,Mr. Dannenberg. 

    I followed the instructions from this link https://software-dl.ti.com/processor-sdk-linux-rt/esd/AM335X/08_02_00_24/exports/docs/linux/Overview_Building_the_SDK.html

    to compile the filesystem for sdk-08.02.00.24.

    However, I encountered this error:

    ~/sdk/tisdk/tisdk/build$ MACHINE="am335x-evm" bitbake tisdk-base-image
    ERROR: Unable to start bitbake server (None)
    ERROR: Server log for this session (/home/zen/sdk/tisdk/tisdk/build/bitbake-cookerdaemon.log):
    --- Starting bitbake server pid 1282713 at 2023-09-06 10:32:34.766453 ---
    Traceback (most recent call last):
    File "/home/zen/sdk/tisdk/tisdk/sources/bitbake/lib/bb/daemonize.py", line 87, in createDaemon
    function()
    File "/home/zen/sdk/tisdk/tisdk/sources/bitbake/lib/bb/server/process.py", line 481, in _startServer
    self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
    File "/home/zen/sdk/tisdk/tisdk/sources/bitbake/lib/bb/cooker.py", line 195, in __init__
    self.initConfigurationData()
    File "/home/zen/sdk/tisdk/tisdk/sources/bitbake/lib/bb/cooker.py", line 375, in initConfigurationData
    self.add_filewatch(mc.getVar("__base_depends", False), self.configwatcher)
    File "/home/zen/sdk/tisdk/tisdk/sources/bitbake/lib/bb/cooker.py", line 291, in add_filewatch
    watcher.add_watch(f, self.watchmask, quiet=False)
    File "/home/zen/sdk/tisdk/tisdk/sources/bitbake/lib/pyinotify.py", line 1908, in add_watch
    raise WatchManagerError(err, ret_)
    pyinotify.WatchManagerError: add_watch: cannot watch /home/zen/sdk/tisdk/tisdk/sources/meta-openembedded/meta-gnome/conf WD=-1, Errno=No space left on device (ENOSPC)
    NOTE: Your conf/bblayers.conf has been automatically updated.
    NOTE: Your conf/bblayers.conf has been automatically updated.
    ERROR: No space left on device or exceeds fs.inotify.max_user_watches?
    ERROR: To check max_user_watches: sysctl -n fs.inotify.max_user_watches.
    ERROR: To modify max_user_watches: sysctl -n -w fs.inotify.max_user_watches=<value>.
    ERROR: Root privilege is required to modify max_user_watches.

    How can I resolve this issue?

  • Prodigy 30 points

    Hello,Mr. Dannenberg. 

    I also used "git checkout c2ca6740c240ccb9780868a52317b82f2a30fcc1" to obtain an older version of ltp-ddt, but I encountered an error during the compilation process.

    arm-arago-linux-gnueabi-gcc -std=gnu99 -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_FORTIFY_SOURCE=2 -I../../../../include -I../../../../include -I../../../../include/old/ -L../../../../lib clock_nanosleep01.c -lltp -lpthread -lrt -o clock_nanosleep01
    clock_nanosleep01.c:62:17: error: initializer element is not constant
    clock_nanosleep01.c:62:17: error: (near initialization for 'tcase[0].rq')
    clock_nanosleep01.c: In function 'do_test':
    clock_nanosleep01.c:100:9: warning: missing initializer
    clock_nanosleep01.c:100:9: warning: (near initialization for 'rm.tv_nsec')
    make[2]: *** [<builtin>: clock_nanosleep01] Error 1
    make[2]: Leaving directory '/home/zen/Documents/embedded/testsuite/ltp-testsuite/ltp-ddt/ltp-ddt/testcases/kernel/syscalls/clock_nanosleep'
    make[1]: *** [../../../include/mk/generic_trunk_target.inc:93: all] Error 2
    make[1]: Leaving directory '/home/zen/Documents/embedded/testsuite/ltp-testsuite/ltp-ddt/ltp-ddt/testcases/kernel/syscalls'
    make: *** [Makefile:133: testcases/kernel/syscalls-all] Error 2

    I check the ./testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c file

    I don't understand what is causing the error on line 62?

  • pyinotify.WatchManagerError: add_watch: cannot watch /home/zen/sdk/tisdk/tisdk/sources/meta-openembedded/meta-gnome/conf WD=-1, Errno=No space left on device (ENOSPC)
    NOTE: Your conf/bblayers.conf has been automatically updated.
    NOTE: Your conf/bblayers.conf has been automatically updated.
    ERROR: No space left on device or exceeds fs.inotify.max_user_watches?

    I'm not familiar with this error, but it could be related to what's posted here:

    (from https://askubuntu.com/questions/1295431/no-space-left-on-device-even-though-there-is#comment2200931_1295431)

    This can sometimes happen when the Inotify Watches Limit has been reached. Check the current limit with cat /proc/sys/fs/inotify/max_user_watches. If the value is somewhere around 8192, consider (temporarily) bumping it up a bit with: echo "16384" > /proc/sys/fs/inotify/max_user_watches.

    You can also try re-starting your PC to see if this makes a difference. If the issue persists, perhaps try another PC to build the SDK?

    If it is memory/resourcing related, sometimes it may help increase the swap space, and also decrease the workload Yocto causes (by adjusting number of parallel threads and parallel make options in conf/local.conf, see https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1228585/processor-sdk-am62a-building-tisdk-edgeai-image-doesn-t-finish/4647290#4647290)

    Regards, Andreas

  • Looks like some header file is either missing, or not in the correct version (so it's missing elements that are needed). Usually `CLOCK_REALTIME` is defined in /usr/include/linux/time.h, so you could check your cross-compile sysroot if that definition is present, and/or perhaps why that specific header file isn't getting included.

    I'd recommend building this via Yocto, I'd think that would be easier as all thats needed is enabling/adding one package, and then all _should_ just work.

    Regards, Andreas