凌云实验室推出的ARM Linux物联网网关开发板IGKBoard(IoT Gateway Kit Board)项目源码
guowenxue
2022-10-06 432da2e89f7f876f912fd24bfba90087b0320dce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
SUMMARY = "A simple Hello application"
  
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 
python do_display_banner() {
    bb.plain("***********************************************");
    bb.plain("*                                             *");
    bb.plain("*    Example recipe for hello application     *");
    bb.plain("*                                             *");
    bb.plain("***********************************************");
}
 
# An example to add a new task
addtask display_banner before do_build
 
# Source file list, will auto search in the subdir
 
FILESEXTRAPATHS_prepend := "${THISDIR}/src:"
SRC_URI = "file://hello.c \
           file://Makefile \
          "   
          
# Application version and reversion
PV = "1" 
PR = "r0"
 
# Must add this line, or throw error: No GNU_HASH
TARGET_CC_ARCH += "${LDFLAGS}"
 
S = "${WORKDIR}"
 
do_compile() {
    make
}
 
# There is /usr/bin/hello in lmbench: dpkg-query -S hello
do_install() {
    install -d ${D}${sbindir}
    install -m 0755 ${S}/hello ${D}${sbindir}
}
 
# Install application to image file
FILES_${PN} = "${sbindir}/hello"