From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] problem to configure to make helloworld program and helloworld module be compiled and added to the tartget with a local external source
Date: Tue, 19 Nov 2013 09:26:41 +0100 [thread overview]
Message-ID: <528B20C1.9000606@mind.be> (raw)
In-Reply-To: <E5B506F1A019418BB170B8E07A87655B@NKDELL>
On 18/11/13 17:00, Nils Koehler wrote:
> Hi,
>
> I have goggled a lot the last three days to find out how to implement a
> own program and device driver, which is compiled and added to the target
> due buildroot make command, but I did not had success to solve it.
>
> Actually my problems is that:
>
> HELLOWORLD_SOURCE_DIR = /home/koehler/Desktop/Kernel/ldt/
Where did you get this variable from? We don't use SOURCE_DIR.
>
> seems not to be computed.
>
> In helloworld.c I have added a typo to force an error message if
> buildroot try to compile helloworld.c but until now I did not see it
Buildroot doesn't check if you change anything in the source code. You
have to explicitly force a rebuild with
make helloworld-rebuild all
>
> I found hints at:
>
> http://buildroot.uclibc.org/downloads/manual/manual.html#customize-store-package-config
Hm, that section doesn't say anything about adding packages to
buildroot. You should refer to
http://buildroot.net/downloads/manual/manual.html#_the_literal_mk_literal_file
>
> And openWRT:
>
> http://www.ccs.neu.edu/home/noubir/Courses/CS6710/S12/material/OpenWrt_Dev_Tutorial.pdf
OpenWRT is a different project, that forked from buildroot many years
ago. There are a few similarities, but the OpenWRT documentation is
useless for buildroot questions and vice versa.
>
> but the used Keywords are very different and no of the approaches helped
> me right now.
>
> So I think I need some help from outside...
>
> The outgoing situation is I have a helloworld.c program and a Hello world
> module.
>
> Located in /home/koehler/ldt/
Err, you refer to /home/koehler/Desktop/Kernel/ldt/ in your
helloworld.mk file...
>
> I can compile them from outside buildroot for Kernel 3.10.17
>
> To be able to make it cinfigurable I have added in
> /buildroot-2013.08/package/Config.in :
>
> menu "Hardware handling"
>
> menu "Misc devices firmwares"
>
> source "package/helloworld/Config.in"
>
> endmenu
>
> And in /buildroot-2013.08/package/helloworld/Config.in :
>
> config BR2_PACKAGE_HELLOWORLD
>
> bool "helloworld"
>
> help
>
> This is a comment that explains what libfoo is.
This looks good.
>
> This is the in /buildroot-2013.08/package/helloworld/heloworld.mk
>
> Based on the example of builroot manual:
>
> ################################################################################
>
> #
>
> # helloworld
>
> #
>
> ################################################################################
>
> HELLOWORLD_VERSION = 1.0
>
> HELLOWORLD_SOURCE_DIR = /home/koehler/Desktop/Kernel/ldt/
>
> #HELLOWORLD_SITE = http://www.foosoftware.org/download
This should be
HELLOWORLD_SITE = /home/koehler/Desktop/Kernel/ldt/
HELLOWORLD_SITE_METHOD = local
Regards,
Arnout
>
> HELLOWORLD_LICENSE = GPLv3+
>
> HELLOWORLD_LICENSE_FILES = COPYING
>
> HELLOWORLD_INSTALL_STAGING = YES
>
> #HELLOWORLD_CONFIG_SCRIPTS = helloworld-config
>
> #HELLOWORLD_DEPENDENCIES = host-libaaa libbbb
>
> define HELLOWORLD_BUILD_CMDS
>
> $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all
>
> endef
>
> define HELLOWORLD_INSTALL_STAGING_CMDS
>
> # $(INSTALL) -D -m 0755 $(@D)/helloworld.a
> $(STAGING_DIR)/usr/lib/helloworld.a
>
> # $(INSTALL) -D -m 0644 $(@D)/foo.h $(STAGING_DIR)/usr/include/foo.h
>
> # $(INSTALL) -D -m 0755 $(@D)/helloworld.so* $(STAGING_DIR)/usr/lib
>
> endef
>
> define HELLOWORLD_INSTALL_TARGET_CMDS
>
> # $(INSTALL) -D -m 0755 $(@D)/helloworld.so* $(TARGET_DIR)/usr/lib
>
> # $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/foo.d
>
> endef
>
> define HELLOWORLD_DEVICES
>
> # /dev/foo c 666 0 0 42 0 - - -
>
> endef
>
> define HELLOWORLD_PERMISSIONS
>
> # /bin/foo f 4755 0 0 - - - - -
>
> endef
>
> define HELLOWORLD_USERS
>
> # foo -1 helloworld -1 * - - - LibFoo daemon
>
> endef
>
> $(eval $(generic-package))
>
> Regards
>
> Nils
>
>
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
next prev parent reply other threads:[~2013-11-19 8:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-18 16:00 [Buildroot] problem to configure to make helloworld program and helloworld module be compiled and added to the tartget with a local external source Nils Koehler
2013-11-19 8:26 ` Arnout Vandecappelle [this message]
2013-11-19 14:01 ` Nils Koehler
2013-11-19 14:29 ` Thomas Petazzoni
2013-11-19 16:59 ` Nils Koehler
2013-11-19 17:05 ` Thomas Petazzoni
2013-11-19 17:56 ` Nils Koehler
2013-11-19 22:17 ` Arnout Vandecappelle
2013-11-19 22:30 ` Yann E. MORIN
2013-11-19 22:33 ` Arnout Vandecappelle
2013-11-20 8:32 ` Nils Koehler
2013-11-19 22:03 ` Arnout Vandecappelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=528B20C1.9000606@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox