Skip to content

Commit

Permalink
not much ...
Browse files Browse the repository at this point in the history
  • Loading branch information
amamory committed Dec 19, 2021
1 parent 02955ec commit a32625c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
18 changes: 17 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ This tutorial is not meant to be a complete Yocto reference. The idea is to be t

We use a docker container with Yocto and VNC installed. Check-out the cointerner manual to see it's features and how to install it.

## Building the image for raspberry pi3

$ bitbake core-image-minimal -c populate_sdk


## Creating a Custom Layer

Everywhere you read about Yocto recommends that you create your own layer to dploy your software in the Linux image. So this section goes through this process of creating the layer where your recipes will be added.
Expand Down Expand Up @@ -442,7 +447,7 @@ int main()
```


/mnt/yocto/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/hellodep/1.0-r0/recipe-sysroot/usr/lib/libhello.a

## Recipe HelloGit

Expand Down Expand Up @@ -488,3 +493,14 @@ Build your Image $ bitbake -k core-image-sato -c populate_sdk
Default yocto images
https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#ref-images





rootfs
/mnt/yocto/tmp/work/raspberrypi3-poky-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/


crosscompiling
cmake .. -DCMAKE_SYSROOT=/mnt/yocto/tmp/work/raspberrypi3-poky-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/

5 changes: 4 additions & 1 deletion recipes-example/hellodep/files/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ project (hellodep)
message (STATUS "CROOOOOOOOOSSS: ${CMAKE_SYSROOT}")
# tlls the CMake find_*() functions to search for programs, libraries and headers in the target sysroot directory ${CMAKE_SYSROOT}.
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# Search libraries only under *target* paths.
#https://stackoverflow.com/questions/41294056/cmake-using-find-package-cross-compiling
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

# enforce the depedency to libfred. It must be installed before compiling an application
find_library(LIBHELLO
Expand Down

0 comments on commit a32625c

Please sign in to comment.