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.

TDA4VH-Q1: bitbake(or any scripts) to build a linux with jailhouse

Part Number: TDA4VH-Q1
Other Parts Discussed in Thread: TDA4VH, TDA4VM

Hello all,

I have installed the following package:

ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03

executed what says here: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-j784s4/09_00_01_03/exports/docs/linux/Overview_Building_the_SDK.html?highlight=jailhouse

Now, when running the command:

"MACHINE=j784s4-evm bitbake jailhouse"

i got and error saying: bitbake not found.

Shouln't it come already installed when running the previous scripts?

Anyway, the workarround was:

"MACHINE=j784s4-evm /opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/bitbake/bin/bitbake jailhouse"

call it with full path, but this gave me the following error:

"

Traceback (most recent call last):
 File "/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/bitbake/bin/bitbake", line 36, in <module>
   sys.exit(bitbake_main(BitBakeConfigParameters(sys.argv),
 File "/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/bitbake/lib/bb/main.py", line 378, in bitbake_main
   return ui_module.main(server_connection.connection, server_connection.events,
 File "/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/bitbake/lib/bb/ui/knotty.py", line 415, in main
   params.updateToServer(server, os.environ.copy())
 File "/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/bitbake/lib/bb/cookerdata.py", line 75, in updateToServer
   raise Exception("Unable to update the server configuration with local parameters: %s" % error)
Exception: Unable to update the server configuration with local parameters: Traceback (most recent call last):
 File "/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/bitbake/lib/bb/command.py", line 90, in runCommand
   result = command_method(self, commandline)
 File "/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/bitbake/lib/bb/command.py", line 286, in updateConfig
   command.cooker.updateConfigOpts(options, environment, cmdline)
 File "/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/bitbake/lib/bb/cooker.py", line 535, in updateConfigOpts
   self.reset()
 File "/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/bitbake/lib/bb/cooker.py", line 1774, in reset
   self.initConfigurationData()
 File "/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/bitbake/lib/bb/cooker.py", line 360, in initConfigurationData
   self.setupConfigWatcher()
 File "/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/bitbake/lib/bb/cooker.py", line 235, in setupConfigWatcher
   self.configwatcher = pyinotify.WatchManager()
 File "/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/bitbake/lib/pyinotify.py", line 1728, in __init__
   raise OSError(err % self._inotify_wrapper.str_errno())
OSError: Cannot initialize new instance of inotify, Errno=Too many open files (EMFILE)

"

I increased the allowed file descriptors from 1024 to 2048, but I get the same error. Can somebody tell me too how much it should be raised?

I have 16gb of ram and (old) I7 :(

512 ssd

My target is too have flash an SD card with a linux that has jailhouse, so that I boot 2 Linuxes, if anybody has any tips and tricks, I would appreciate it.

Br, Mircea

  • LE, after a restart it started working, but I got this:

    "

    nux-adas-j784s4-evm-09_00_01_03/yocto-build/build/arago-tmp-default-glibc/hosttools:FIXME_HOSTTOOLS_DIR:g''
    | DEBUG: Python function sstate_hardcode_path finished
    | DEBUG: Executing python function native_add_do_populate_sysroot_deps
    | DEBUG: Python function native_add_do_populate_sysroot_deps finished
    | DEBUG: Executing python function sstate_report_unihash
    | DEBUG: Reported task 4ed6d559a8af64ad46e7a9eea3708e74f631d7ec3b4bc6c39191e32f253d23cf as unihash 4ed6d559a8af64ad46e7a9eea3708e74f631d7ec3b4bc6c39191e32f2
    53d23cf to unix:///opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/build/hashserve.sock
    | DEBUG: Python function sstate_report_unihash finished
    | DEBUG: Executing shell function sstate_create_package
    | mkdir: cannot create directory ‘/build’: Permission denied
    | WARNING: exit code 1 from a shell command.
    | DEBUG: Python function sstate_task_postfunc finished
    ERROR: Task (/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/oe-core/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_deploy_
    source_date_epoch) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 42 tasks of which 33 didn't need to be rerun and 1 failed.
    NOTE: Writing buildhistory
    NOTE: Writing buildhistory took: 2 seconds
    NOTE: Writing buildhistory
    NOTE: Writing buildhistory took: 2 seconds

    Summary: 1 task failed:
     /opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/oe-core/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_deploy_source_date
    _epoch
    Summary: There was 1 ERROR message, returning a non-zero exit code.

    "

    this is the command.

    MACHINE=j784s4-evm /opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/sources/bitbake/bin/bitbake tisdk-adas-image

    BTW, the command initialy did not worked, it showed the machine as "arago", I had to update the makefiles to have it work, have the machine default j784s4-evm

  • Hi  Mircea,

    Everything should work out of box without having to modify any files. For the "bitbake not found" error, had you run:

    . conf/setenv

    For a general walk through of how to build the images, please take a look at this FAQ. Note the variation in steps for the adas and edgeai images.

    Best,
    Jared

  • Hi Jared, I managed to start the bitbake yesterday. One think is not clear, how do I tell it to also install jailhouse on the linux it is building?

    is it the same as this chapter:

    "

    Installing a Package

    "

    ?

  • Hello again:

    any ideea what this might be:

    |    sed 's/ko$/o/'  /opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/build/arago-tmp-default-glibc/work/j784s4_evm-oe-linux/jailhouse/0.12+gitAUTOINC+e57d1eff6d-r0/git/modules.order | scripts/mod/modpost      -o /opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/build/arago-tmp-default-glibc/work/j784s4_evm-oe-linux/jailhouse/0.12+gitAUTOINC+e57d1eff6d-r0/git/Module.symvers -e -i Module.symvers -T -
    | ERROR: modpost: "__hyp_stub_vectors" [/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/build/arago-tmp-default-glibc/work/j784s4_evm-oe-linux/jailhouse/0.12+gitAUTOINC+e57d1eff6d-r0/git/driver/jailhouse.ko] undefined!
    | ERROR: modpost: "ioremap_page_range" [/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/build/arago-tmp-default-glibc/work/j784s4_evm-oe-linux/jailhouse/0.12+gitAUTOINC+e57d1eff6d-r0/git/driver/jailhouse.ko] undefined!
    | ERROR: modpost: "__get_vm_area_caller" [/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/build/arago-tmp-default-glibc/work/j784s4_evm-oe-linux/jailhouse/0.12+gitAUTOINC+e57d1eff6d-r0/git/driver/jailhouse.ko] undefined!
    | make[2]: *** [/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/build/arago-tmp-default-glibc/work-shared/j784s4-evm/kernel-source/scripts/Makefile.modpost:126: /opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/build/arago-tmp-default-glibc/work/j784s4_evm-oe-linux/jailhouse/0.12+gitAUTOINC+e57d1eff6d-r0/git/Module.symvers] Error 1
    | make[1]: *** [/opt/ti-processor-sdk-linux-adas-j784s4-evm-09_00_01_03/yocto-build/build/arago-tmp-default-glibc/work-shared/j784s4-evm/kernel-source/Makefile:1964: modpost] Error 2
    | make: *** [Makefile:40: modules] Error 2
    | ERROR: oe_runmake failed

  • Hi Mircea,

    Support for the Jailhouse hypervisor was descoped in SDK version 7.1, so I can't offer extensive support. I can raise an internal request for this feature to be added back in a future release.

    I found a forum post discussing the errors your encountered, and it looks like they're caused by linux upstream dropping the functions.

    I also found a different forum post that mentions a script that contains the patches to apply to fix the issues.

    If you have any further issues with jailhouse, I recommend asking the jailhouse community within their IRC channel.

    Best,
    Jared

  • Thank you Jared!

    One last question and I will close this thread: any other hypervisor (free) available from TI or thirdparty that I can test on my tda4vh dev board?

    Br, Mircea

  • Hi Mircea,

    Here are a couple options:

    1. Since the Jailhouse Hypervisor was supported in older versions of the TI SDK, those can be used as a reference as-needed.

    2. For recent SDKs, you can try contacting a third party that offers a hypervisor framework (e.g. QNX Software Systems/Blackberry).

    Best,
    Jared

  • applying the patch from the locations you shared is not a 100% success, some failed, probably because of how new the linux kernel is, can you tell me how to specify a linux kernel version to the TI build( yocto build)?

  • I started a new build for jailhouse and saw that bitbake receipe is fetching a new linux kernel, where can I tell it to apply the patch for it?

  • one last(er) question: can you give me the download link for the sdk that has a working jailhouse?

  • Hi Mircea,

    applying the patch from the locations you shared is not a 100% success, some failed, probably because of how new the linux kernel is, can you tell me how to specify a linux kernel version to the TI build( yocto build)?

    I wouldn't recommend reverting the kernel version due to issues that could/would occur due to having to incompatibilities and backporting.

    But to answer your question: you would need to set the "PREFERRED_VERSION_linux-yocto" variable and place the corresponding .bb file in the oe-core/meta/recipes-kernel/linux/ directory.

    I started a new build for jailhouse and saw that bitbake receipe is fetching a new linux kernel, where can I tell it to apply the patch for it?

    To patch the kernel, I'd recommend reading and following the steps found within the Yocto Project documentation, specifically:

    1. Getting Ready for Traditional Kernel Development
    2. Using Traditional Kernel Development to Patch the Kernel
    can you give me the download link for the sdk that has a working jailhouse?

    Since the TDA4VH hadn't been released when we had an SDK that supported jailhouse, I do not have an SDK for the TDA4VH to provide. I do have some for the TDA4VM however.

    PROCESSOR-SDK-LINUX-J721E versions

    Going off the release notes, versions 6.1 to 7.0 should all have a working version of Jailhouse.

    Best,
    Jared