Add simple hello-world example package
This commit is contained in:
parent
fb00307400
commit
316a0febeb
7 changed files with 33 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
source "$BR2_EXTERNAL_buildroot_playground_PATH/package/helloworld/Config.in"
|
||||
|
|
@ -0,0 +1 @@
|
|||
include $(BR2_EXTERNAL_buildroot_playground_PATH)/package/*/*.mk
|
||||
|
|
@ -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
|
||||
|
|
|
|||
4
package/helloworld/Config.in
Normal file
4
package/helloworld/Config.in
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
config BR2_PACKAGE_HELLOWORLD
|
||||
bool "helloworld-app"
|
||||
help
|
||||
A classic C hello-world application
|
||||
13
package/helloworld/helloworld.mk
Normal file
13
package/helloworld/helloworld.mk
Normal 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))
|
||||
7
package/helloworld/src/main.c
Normal file
7
package/helloworld/src/main.c
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
printf("Hello World!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
6
package/helloworld/src/makefile
Normal file
6
package/helloworld/src/makefile
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
APP_NAME=main
|
||||
|
||||
$(APP_NAME):
|
||||
|
||||
clean:
|
||||
rm -rf $(APP_NAME)
|
||||
Loading…
Add table
Add a link
Reference in a new issue