A customer is building an image using OpenEmbedded. His distro is based on poky and he’s building core-image-minimal. All the recipes he’ll use are added to local.conf using IMAGE_INSTALL_append.
His build works accept when he adds a custom recipe of his which builds a C application. This is his recipe:
[upload|t4iRgGbpBkxtWEtaDVncO+Ww/jY=]
And his makefile:
TARGET = satpe
OBJDIR = output
SRC_DIR = common \
driver \
charger/src \
metrology/src \
src \
INCLUDE_DIR = common \
driver \
charger/inc \
metrology/inc \
inc \
PROJECT_INC_LIB = $(addprefix -I, $(INCLUDE_DIR))
FILES = $(shell find $(SRC_DIR) \( -name \*.c \) -printf '%T@\t%p\n' | sort -k 1nr | cut -f2-)
SRC_FILES = $(FILES:./%=%)
OB_FILES = $(SRC_FILES:.c=.o)
OBJS_FILES = $(addprefix $(OBJDIR)/, $(OB_FILES:./%=%))
OBJ = $(OBJS_FILES)
OBJDIRCOM = $(addprefix $(OBJDIR)/, $(SRC_DIR))
SRCDIRCOM = $(SRC_DIR)
LIBS = libconfig libmodbus
GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)
CFLAGS = $(shell pkg-config --cflags $(LIBS)) -DAPP_VERSION=\"$(GIT_VERSION)\" -DDEBUG_PRINT #-DDEBUG_GDB
LDFLAGS = $(shell pkg-config --libs $(LIBS)) -lpthread -lgsoap -lnetsnmpmibs -ldl -lnetsnmpagent -Wl,-E -lnetsnmp -lcrypto -lm -lwebsockets
###############################################################################
# Makefile execution
###############################################################################
.PHONY: all clean
all: $(OBJDIRCOM) $(TARGET)
$(OBJDIRCOM):
mkdir -p $(OBJDIRCOM)
cd $(OBJDIR)
@echo $(OBJS_FILES)
$(OBJDIR)/%.o: %.c
#$(CC) $(CFLAGS) $(LDFLAGS) -I$(INCLUDE_DIR) -O0 -g -Wall -c -pedantic -ansi $< -o $@ # Insane checking
$(CC) $(CFLAGS) $(LDFLAGS) $(PROJECT_INC_LIB) -O0 -g -Wall -std=gnu99 -c $< -o $@
$(TARGET): $(OBJ)
$(CC) $(LDFLAGS) -o $(OBJDIR)/$@ $^
clean:
@rm -f $(TARGET) $(wildcard *.o)
@rm -rf $(OBJDIR)
This application build if bitbake is invoked. However, when adding the recipe to IMAGE_INSTALL_append on local.conf, an error arises while running do_rootfs. The following screenshot shows the error on the left and the local.conf file on the right hand side:
[upload|3g66tj3ZSswldbakGPsH1iGv4YU=]
The task fails with
No match for argument: satpe
Error: unable to find a match
Where satpe is his the name of his recipe.
I can figure his local.conf is set to use RPM, not OPKG, because do_rootfs is invoking dnf. What I’m trying to figure out is why is do_rootfs failing to find his recipe.
I guess it has something to do with his recipe, since his application builds fine without the image and the image builds fine without his application added to IMAGE_INSTALL_append.
Thanks,
Gustavo