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

Official website: https://www.yoctoproject.org/ bitbake manual: https://www.yoctoproject.org/docs/1.6/bitbake-user-manual/bitbake-user-manual.html

References: configure.ac

AC_PREREQ(2.61)
AC_INIT([hello],0.0)
AM_INIT_AUTOMAKE([-Wall -Werror gnu foreign subdir-objects])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])

# Checks for programs.
AC_PROG_LIBTOOL
AC_PROG_CXX
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_AR

AC_PROG_AWK
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
PKG_PROG_PKG_CONFIG
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

Makefile.am

ACLOCAL_AMFLAGS = -I m4

bin_PROGRAMS = hello
hello_SOURCES = hello.c

Last updated