### Compile libmetal Library Source: https://github.com/openamp/open-amp/blob/main/README.md Builds the libmetal library on a host system. Ensure you have the libsysfs and libhugetlbfs development packages installed. Replace `` with the path to the libmetal source directory and `` with the desired installation path. ```bash $ mkdir -p build-libmetal $ cd build-libmetal $ cmake $ make VERBOSE=1 DESTDIR= install ``` -------------------------------- ### Compile OpenAMP Library for Linux Processes Source: https://github.com/openamp/open-amp/blob/main/README.md Compiles the OpenAMP library for communication between Linux processes after libmetal has been built. Specify the paths to the libmetal include and library directories using CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH. The compiled library and headers will be installed into the `build/usr/local/lib` and `build/usr/local/include` directories respectively. ```bash $ mkdir -p build-openamp $ cd build-openamp $ cmake -DCMAKE_INCLUDE_PATH= \ -DCMAKE_LIBRARY_PATH= $ make VERBOSE=1 DESTDIR=$(pwd) install ``` -------------------------------- ### OpenAMP Library Components Source: https://github.com/openamp/open-amp/blob/main/README.md Lists the main directories within the 'lib/' folder that constitute the OpenAMP library. ```text * `virtio/` * `rpmsg/` * `remoteproc/` * `proxy/` ``` -------------------------------- ### Enable Virtio MMIO Driver Build Source: https://github.com/openamp/open-amp/blob/main/lib/virtio_mmio/CMakeLists.txt Conditionally includes the virtio_mmio_drv.c source file when the WITH_VIRTIO_MMIO_DRV option is enabled in CMake. ```cmake if (WITH_VIRTIO_MMIO_DRV) collect (PROJECT_LIB_SOURCES virtio_mmio_drv.c) endif (WITH_VIRTIO_MMIO_DRV) ``` -------------------------------- ### Required libmetal APIs for OpenAMP Porting Source: https://github.com/openamp/open-amp/blob/main/README.md This list details the essential libmetal APIs that must be implemented when porting OpenAMP to a new system. These APIs cover memory management, caching, I/O, interrupt handling, synchronization, and time-related functions. ```text * alloc, for memory allocation and memory free * cache, for flushing cache and invalidating cache * io, for memory mapping. OpenAMP required memory mapping in order to access vrings and carved out memory. * irq, for IRQ handler registration, IRQ disable/enable and global IRQ handling. * mutex * shmem (For RTOS, you can usually use the implementation from `lib/system/generic/`) * sleep, at the moment, OpenAMP only requires microseconds sleep as when OpenAMP fails to get a buffer to send messages, it will call this function to sleep and then try again. * time, for timestamp * init, for libmetal initialization. * atomic ``` -------------------------------- ### OpenAMP Source Structure Overview Source: https://github.com/openamp/open-amp/blob/main/README.md This code block outlines the directory structure of the OpenAMP library, detailing the purpose of each subdirectory within the 'lib/' folder. ```text |- lib/ | |- virtio/ # virtio implementation | |- rpmsg/ # rpmsg implementation | |- remoteproc/ # remoteproc implementation | |- proxy/ # implement one processor access device on the | | # other processor with file operations |- cmake # CMake files |- scripts # helper scripts (such as checkpatch) for contributors. ``` -------------------------------- ### Run gitlint Locally Source: https://github.com/openamp/open-amp/blob/main/README.md Execute the gitlint command to verify commit messages meet project requirements before submitting. ```bash gitlint ``` -------------------------------- ### Set Git User Information Source: https://github.com/openamp/open-amp/blob/main/README.md Configure your global Git settings for name and email, which are required for commit authorship. ```bash git config --global user.name "first-name Last-Namer" git config --global user.email "yourmail@company.com" ``` -------------------------------- ### Check Coding Style with checkpatch.pl Source: https://github.com/openamp/open-amp/blob/main/README.md Use the checkpatch.pl script to enforce Linux kernel coding style on your commits. ```bash ./scripts/checkpatch.pl --strict -g HEAD- ``` -------------------------------- ### SPDX License Identifiers Source: https://github.com/openamp/open-amp/blob/main/README.md Use these SPDX identifiers in files to indicate licensing compatibility with the BSD license. ```text SPDX-License-Identifier: BSD-3-Clause SPDX-License-Identifier: BSD-2-Clause ``` -------------------------------- ### Atomic Operations for GCC Compiler Source: https://github.com/openamp/open-amp/blob/main/README.md Specifies the location of atomic operations header file required by OpenAMP when using the GNU GCC compiler. ```text `lib/compiler/gcc/atomic.h` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.