lkmc_many_files: create package to test a rootfs with many files

Automatically pick up packages from under packages/ into BR2_EXTERNAL.

Move many subdirectory READMEs into the toplevel and link to toplevel from those subreadmes instead.
This commit is contained in:
Ciro Santilli
2018-06-10 13:55:45 +01:00
parent 4484e866cb
commit 57dbe81f33
16 changed files with 118 additions and 31 deletions

View File

@@ -0,0 +1,4 @@
config BR2_PACKAGE_SAMPLE_PACKAGE
bool "sample_package"
help
Sample Buildroot package.

View File

@@ -0,0 +1,16 @@
.PHONY: all clean
CFLAGS_EXTRA ?= -fopenmp -std=c99 -Wall -Werror -Wextra
IN_EXT ?= .c
LIBS :=
OUT_EXT ?= .out
OUTS := $(addsuffix $(OUT_EXT), $(basename $(wildcard *$(IN_EXT))))
all: $(OUTS)
%$(OUT_EXT): %$(IN_EXT)
$(CC) $(CFLAGS) $(CFLAGS_EXTRA) -o '$@' '$<' $(LIBS)
clean:
rm -f *'$(OUT_EXT)'

View File

@@ -0,0 +1 @@
name: SAMPLE_PACKAGE

View File

@@ -0,0 +1,22 @@
################################################################################
#
# sample_package
#
################################################################################
SAMPLE_PACKAGE_VERSION = 1.0
SAMPLE_PACKAGE_SITE = $(BR2_EXTERNAL_SAMPLE_PACKAGE_PATH)
SAMPLE_PACKAGE_SITE_METHOD = local
define SAMPLE_PACKAGE_BUILD_CMDS
# D contains the source code of this package.
# TARGET_CONFIGURE_OPTS contains several common options such as CFLAGS and LDFLAGS.
$(MAKE) -C '$(@D)' $(TARGET_CONFIGURE_OPTS)
endef
define SAMPLE_PACKAGE_INSTALL_TARGET_CMDS
# Anything put inside TARGET_DIR will end up on the guest relative to the root directory.
$(INSTALL) -D -m 0755 $(@D)/*.out '$(TARGET_DIR)'
endef
$(eval $(generic-package))

View File

@@ -0,0 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
int main(void) {
puts("hello sample_package");
return EXIT_SUCCESS;
}