meta-tegra

markyang92·2022년 7월 14일
0

yocto

목록 보기
37/53
post-thumbnail

BSP - "linux4Tegra"

  • Linux kernel (NVIDIA downsteram)
  • Bootloaders (NVIDIA proprietary and U-Boot)
  • Firmware
  • Drivers and hw-specific libraries
  • Power management
  • Userland graphics and multimedia support
    • libdrm-shim, GL/EGL/GLES, Vulkan loader, X.org driver, v4l2, gstreamer plugins
  • Configuration files
  • tools for flashing
  • Ubuntu 18-04-based "sample" rootfilesystem

JetPack - SDKs for application dev

  • CUDA tools and libraries
  • NVIDIA Nsight
  • CuDNN
  • VisionWorks and VPI
  • TensorRT
  • Jetson Multimedia API
  • DeepStream SDK

meta-tegra layer

  • Begin in 2015(oe-core jethro, L4T R23.1) for Jetson-TX1
  • Integrated into an existing distro
  • Needed hw-specific features enabled by NVIDIA binary blobs, including CUDA
  • Initial development with Jetson-TX1 development kit, but needed to support custom product based on the module

BSP layer provides

  • Basic for booing the board
    • kernel, bootloader, drivers, firmware
  • Machine configuration files
  • Any other board specifics
    • Image creation
    • Board-specific config files (ALSA, Bluetooth, network, etc.)
  • Recipes for board-specific tools and examples
    • such as diagnostics/manufacturing tools

Kernel recipe in meta-tegra

  • Vendor-provided downtream kernel
    • Available via git, spread across 15 (!) separate repositories
    • 4.9 base plus Android and vendor-specific patches
    • Used git subtrees to re-integrate into a single repo
  • Minimal additional patches
    • mostly for compiling with newer toolchains
    • with a few bugfixes
  • Uses in-tree defconfigs and linux-yocto.bbclass
    • Originally used per-machine defconfig files with recipe

bootloader recipe

  • Complex boot sequence with multiple stages of bootloaders (varies by SoC) and Trusted OS
  • some boot components are binary-only
  • TX1/Nano and TX2 support U-Boot
    • Optional on TX2, no U-Boot on Xavier
    • U-Boot patches mostly upstreamed now
    • All of the heavy lifting is done by cboot
  • Sources for cboot sometimes available

Machine config

  • Configurations for all current dev kits are available
  • Using SOC_FAMILY support for SoC-specific recipes/packages
  • Additional machine overrides for tegra,cuda
  • Added TEGRA_PKGARCH for generic (but Tegra-specific) packages

Image and flashing tools

  • Added an image types bbclass for creating a tegraflash package
    • includes everything needed to flash the target - scripts, tools and all target components
  • Flash and SDcard helper scripts to wrap the lower-level tools
  • Additional handling for bootloader update payloads
  • Hooks for signing boot components during the build

Firmware, configuration files, etc.

  • Recipes to extract other runtime components from the BSP package
    • Power model daemon and profiles
    • Power Hinting Service
    • "Driver" libraries
    • Argus (camera/ISP control) daemon and libraries
    • Firmware loaded by the kernel (BT/Wifi, GPU, etc.)
  • Initscripts/systemd service units
    • Just those needed by hw

Graphic support

  • SoC combines CPU and GPU
  • GPU driver provided in source from with kernel
  • Some userland components are binary-only
    • libdrm.so shim (no DRM/DRI in kernel)
      • libdrm-tegra-shim을 사용한다.
      • libdrm -> libdrm-tegra-shim 이란 말이겠지?
    • OpenGL/EGL/GLES vendor library for use with libglvnd
      • virtual/libgl = libglvnd 를 사용한다는 말 이겠지?
      • virtual/egl = libglvnd
      • virtual/libgles2 = libglvnd
    • Xorg driver
  • Wayland support via egl-wayland
    • Weston with eglstream patches
  • Vulkan loader

libdrm-tegra-shim


multimedia support

  • Plugins for libv4l2 and gstreamer1.0
    • mostly sources in recent versions
    • interfaces to HW video encoder/decoders, CUDA, ISP
    • Output to EGL surface
    • Handling of NVMM buffers
  • Jetson-specific multimedia APIs
    • "SDK" provided (headers and sample code)

wayland weston support on jetson platfrom

  • Wayland/Weston has been adapted from the open-source libraries and patches that NVIDIA has published, rather than using the binary-only libraries packeaged into the L4T BSP.

DRM/KMS support

  • 링크
  • Starting with L4T R32.2.x, DRM/KMS support in the BSP is provided through a combination of a custom libdrm.so shared library and the tegra-udrm kernel module.
    • 이 라이브러리는 DRM API Call을 intercepts한다. anyAPIs it does not handle directly are passed through to the standard implementation of libdrm
  • L4T R32.2.x 부터, DRM/KMS는 BSP에서 custom libdrm.so + tegra-udrm 커널모듈로서 제공된다.
    • DRM API를 intercepts
    • intercepts 되지 않는 몇몇의 original DRM API는 표준 libdrm 으로 처리된다.

Builds that include weston will also include a configuration file (via the tegra-udrm-probeconf recipe) that loads the tegra-udrm module with the parameter modeset=1. This enables KMS support in the L4T-specific libdrm library. If your build includes a different Wayland-based compositor, you may also need to include this configuration file.

(Earlier versions of L4T used a different custom libdrm implementation that had no KMS support and was not ABI-compatible with the standard libdrm implementation.)


weston-eglsteram

  • Builds that include weston will also include a configuration file (via the tegra-udrm-probeconf recipe)
  • weston activating 때, --use-egldevice 필요하다.
  • libgbm -> libnvgbm.so

kernel

kernel defconfig file removed

  • The kernel (linux-tegra) recipe has been changed to generate the default configuration from the arch/arm64/configs/tegra_defconfig file in the source tree, rather than including the full kernel configuration as a defconfig file.
  • If you have a customized kernel configuration and were overriding the default configuration by supplying your own defconfig file, you will either need to convert your modifications into config fragment files (see the YP Linux Kernel Dev Manual for documentation), or use a .bbappend file to add your defconfig file back into the SRC_URI.
profile
pllpokko@alumni.kaist.ac.kr

0개의 댓글