Add simple hello-world example package

This commit is contained in:
laurens 2019-04-14 18:55:19 +02:00
parent fb00307400
commit 316a0febeb
7 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1 @@
source "$BR2_EXTERNAL_buildroot_playground_PATH/package/helloworld/Config.in"

View file

@ -0,0 +1 @@
include $(BR2_EXTERNAL_buildroot_playground_PATH)/package/*/*.mk

View file

@ -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

View file

@ -0,0 +1,4 @@
config BR2_PACKAGE_HELLOWORLD
bool "helloworld-app"
help
A classic C hello-world application

View file

@ -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))

View file

@ -0,0 +1,7 @@
#include <stdio.h>
int main(void) {
printf("Hello World!\n");
return 0;
}

View file

@ -0,0 +1,6 @@
APP_NAME=main
$(APP_NAME):
clean:
rm -rf $(APP_NAME)