diff --git a/Config.in b/Config.in index e69de29..bde9132 100644 --- a/Config.in +++ b/Config.in @@ -0,0 +1 @@ +source "$BR2_EXTERNAL_buildroot_playground_PATH/package/helloworld/Config.in" diff --git a/external.mk b/external.mk index e69de29..0e00384 100644 --- a/external.mk +++ b/external.mk @@ -0,0 +1 @@ +include $(BR2_EXTERNAL_buildroot_playground_PATH)/package/*/*.mk diff --git a/output/.config b/output/.config index 5f1829f..7659657 100644 --- a/output/.config +++ b/output/.config @@ -3802,3 +3802,4 @@ BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION="" # my playground for buildroot, currently on a raspberry pi (in /home/laurens/projects/buildroot_playground) # BR2_EXTERNAL_buildroot_playground_PATH="/home/laurens/projects/buildroot_playground" +BR2_PACKAGE_HELLOWORLD=y diff --git a/package/helloworld/Config.in b/package/helloworld/Config.in new file mode 100644 index 0000000..de92295 --- /dev/null +++ b/package/helloworld/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_HELLOWORLD + bool "helloworld-app" + help + A classic C hello-world application diff --git a/package/helloworld/helloworld.mk b/package/helloworld/helloworld.mk new file mode 100644 index 0000000..5adf079 --- /dev/null +++ b/package/helloworld/helloworld.mk @@ -0,0 +1,13 @@ +HELLOWORLD_VERSION = v1.0 +HELLOWORLD_SITE = $(TOPDIR)/../package/helloworld/src +HELLOWORLD_SITE_METHOD = local + +define HELLOWORLD_BUILD_CMDS + $(TARGET_MAKE_ENV) CC=arm-buildroot-linux-uclibcgnueabihf-gcc $(MAKE) -C $(@D) +endef + +define HELLOWORLD_INSTALL_TARGET_CMDS + rsync -a $(@D) $(TARGET_DIR)/root/ +endef + +$(eval $(generic-package)) diff --git a/package/helloworld/src/main.c b/package/helloworld/src/main.c new file mode 100644 index 0000000..95ab470 --- /dev/null +++ b/package/helloworld/src/main.c @@ -0,0 +1,7 @@ +#include + +int main(void) { + printf("Hello World!\n"); + + return 0; +} diff --git a/package/helloworld/src/makefile b/package/helloworld/src/makefile new file mode 100644 index 0000000..4a67381 --- /dev/null +++ b/package/helloworld/src/makefile @@ -0,0 +1,6 @@ +APP_NAME=main + +$(APP_NAME): + +clean: + rm -rf $(APP_NAME)