Yocto – how to initialize your module?
Yocto is a tool box which you can use to build your own Linux distribution. It is a famous for IoT. If your job is related with embedded system, you should know this project. This article will introduce how to setup a module for ourself.
Add two files: your code and project configuration γ€€For code, {root}/apps_proc/{my_codebase} γ€€γ€€γ€€γ€€γ€€including Makefile.am, configure.ac and your programs γ€€For configuration, add a bb, {root of dbm07}/apps_proc/poky/meta-{ooxx}/recipes-{ooxx}/{my_codebase}/my_codebase.bb Build commands: see. Build tool: BitBake cd {root}/apps_proc/poky . build/conf/set_bb_env.sh export PRODUCT=base export MACHINE=mdm9607 rebake my_codebase
References: configure.ac
1
AC_PREREQ(2.61)
2
AC_INIT([hello],0.0)
3
AM_INIT_AUTOMAKE([-Wall -Werror gnu foreign subdir-objects])
4
AC_CONFIG_HEADERS([config.h])
5
AC_CONFIG_MACRO_DIR([m4])
6
​
7
# Checks for programs.
8
AC_PROG_LIBTOOL
9
AC_PROG_CXX
10
AC_PROG_CC
11
AM_PROG_CC_C_O
12
AM_PROG_AR
13
​
14
AC_PROG_AWK
15
AC_PROG_CPP
16
AC_PROG_INSTALL
17
AC_PROG_LN_S
18
AC_PROG_MAKE_SET
19
PKG_PROG_PKG_CONFIG
20
AC_CONFIG_FILES([Makefile])
21
AC_OUTPUT
Copied!
Makefile.am
1
ACLOCAL_AMFLAGS = -I m4
2
​
3
bin_PROGRAMS = hello
4
hello_SOURCES = hello.c
Copied!
Copy link