All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Problem compiling local code
@ 2013-07-19  4:11 Ryan Wilkins
  2013-07-19  5:29 ` Thomas De Schampheleire
  0 siblings, 1 reply; 8+ messages in thread
From: Ryan Wilkins @ 2013-07-19  4:11 UTC (permalink / raw)
  To: buildroot

Hello,

I'm having an issue that I can't quite seem to figure out.  The problem I'm having is that I'm trying to add a custom package for buildroot to compile and add to a finished image.  It was simple to get the selection box show up for my sample project in menuconfig, but buildroot never seems to compile my code and install it.  I created a simple program, a hello world kind of thing, including a Makefile.  The program compiles and runs properly if I run "make" manually from the directory and run the executable.  I've created the Config.in and .mk files according to the buildroot documentation online or so I think.

My environment is a x86_64 host cross compiling for x86.  Buildroot is 2013.05.  Toolchain is Sourcery CodeBench 2012.09.  Everything else in buildroot appears to build properly as I've had the produced image loaded and running on the target device and it works fine.  It just lacks my simple program

I'm guessing the issue is with my hello.mk so below is that file.  Can anyone point me in a direction of what I might be doing wrong?

Thanks much!

Ryan Wilkins



#####
#
# hello test program
#
#####

HELLO_VERSION = 0.1
HELLO_SOURCE = hello-$(HELLO_VERSION).tar.gz
HELLO_SITE = /vm/omnia/src/hello/
HELLO_SITE_METHOD = file
#HELLO_LICENSE = Proprietary
#HELLO_LICENSE_FILES =
#HELLO_INSTALL_STAGING =
#HELLO_CONFIG_SCRIPTS =
#HELLO_DEPENDENCIES =

define HELLO_BUILD_CMDS
	$(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) hello
endef

define HELLO_INSTALL_TARGET_CMDS
	$(INSTALL) -m 0755 $(@D)/hello $(TARGET_DIR)/usr/bin
endef

$(eval $(generic-package))

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] Problem compiling local code
  2013-07-19  4:11 [Buildroot] Problem compiling local code Ryan Wilkins
@ 2013-07-19  5:29 ` Thomas De Schampheleire
  2013-07-22 20:14   ` Ryan Wilkins
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas De Schampheleire @ 2013-07-19  5:29 UTC (permalink / raw)
  To: buildroot

Hi Ryan,

On Fri, Jul 19, 2013 at 6:11 AM, Ryan Wilkins <ryan@deadfrog.net> wrote:
> Hello,
>
> I'm having an issue that I can't quite seem to figure out.  The problem I'm having is that I'm trying to add a custom package for buildroot to compile and add to a finished image.  It was simple to get the selection box show up for my sample project in menuconfig, but buildroot never seems to compile my code and install it.  I created a simple program, a hello world kind of thing, including a Makefile.  The program compiles and runs properly if I run "make" manually from the directory and run the executable.  I've created the Config.in and .mk files according to the buildroot documentation online or so I think.
>
> My environment is a x86_64 host cross compiling for x86.  Buildroot is 2013.05.  Toolchain is Sourcery CodeBench 2012.09.  Everything else in buildroot appears to build properly as I've had the produced image loaded and running on the target device and it works fine.  It just lacks my simple program
>
> I'm guessing the issue is with my hello.mk so below is that file.  Can anyone point me in a direction of what I might be doing wrong?
>
> Thanks much!
>
> Ryan Wilkins
>
>
>
> #####
> #
> # hello test program
> #
> #####
>
> HELLO_VERSION = 0.1
> HELLO_SOURCE = hello-$(HELLO_VERSION).tar.gz
> HELLO_SITE = /vm/omnia/src/hello/
> HELLO_SITE_METHOD = file
> #HELLO_LICENSE = Proprietary
> #HELLO_LICENSE_FILES =
> #HELLO_INSTALL_STAGING =
> #HELLO_CONFIG_SCRIPTS =
> #HELLO_DEPENDENCIES =
>
> define HELLO_BUILD_CMDS
>         $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) hello
> endef
>
> define HELLO_INSTALL_TARGET_CMDS
>         $(INSTALL) -m 0755 $(@D)/hello $(TARGET_DIR)/usr/bin
> endef
>
> $(eval $(generic-package))

Is there any output regarding the hello package, like 'downloading',
'extracting', 'building', etc. or nothing at all?
What is the name of the config option that you added, and are you sure
it's enabled in .config?

What happens if you explicitly run 'make hello' ?

Depending on what you did before, you may also need to clear previous
attempts from the output, for example with:
make hello-dirclean

If the hello package is seen correctly by buildroot, but the
compilation doesn't work correctly, you may want to add
KBUILD_VERBOSE=1 to the make command, to see the actual make command
executed.

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] Problem compiling local code
  2013-07-19  5:29 ` Thomas De Schampheleire
@ 2013-07-22 20:14   ` Ryan Wilkins
  2013-07-22 20:38     ` Ryan Wilkins
  0 siblings, 1 reply; 8+ messages in thread
From: Ryan Wilkins @ 2013-07-22 20:14 UTC (permalink / raw)
  To: buildroot



On Jul 19, 2013, at 1:29 AM, Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> wrote:

> Hi Ryan,
> 
> Is there any output regarding the hello package, like 'downloading',
> 'extracting', 'building', etc. or nothing at all?
> What is the name of the config option that you added, and are you sure
> it's enabled in .config?
> 
> What happens if you explicitly run 'make hello' ?
> 
> Depending on what you did before, you may also need to clear previous
> attempts from the output, for example with:
> make hello-dirclean
> 
> If the hello package is seen correctly by buildroot, but the
> compilation doesn't work correctly, you may want to add
> KBUILD_VERBOSE=1 to the make command, to see the actual make command
> executed.
> 
> Best regards,
> Thomas

Thomas,

Thanks for the response.  After some digging around, I found that buildroot wasn't even trying to grab or compile my code.  What I discovered earlier today is that the variable names that I was using contained too many underscores.  My Config.in and hello.mk files were using variables set as BR2_PACKAGE_COMPANY_PROJECT_HELLO.  When I shortened it to just BR2_PACKAGE_HELLO then it started working properly.  Apparently the additional underscores confused some parsing of the buildroot and/or Kbuild system.  If that was mentioned in the documentation then I missed it.  Maybe it was assumed.  In any case, it's working now.

Thanks for your help on this.  I appreciate it.

Best,
Ryan Wilkins

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] Problem compiling local code
  2013-07-22 20:14   ` Ryan Wilkins
@ 2013-07-22 20:38     ` Ryan Wilkins
  2013-07-23  7:19       ` Thomas De Schampheleire
  0 siblings, 1 reply; 8+ messages in thread
From: Ryan Wilkins @ 2013-07-22 20:38 UTC (permalink / raw)
  To: buildroot



On Jul 22, 2013, at 4:14 PM, Ryan Wilkins <ryan@deadfrog.net> wrote:

> 
> 
> On Jul 19, 2013, at 1:29 AM, Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> wrote:
> 
>> Hi Ryan,
>> 
>> Is there any output regarding the hello package, like 'downloading',
>> 'extracting', 'building', etc. or nothing at all?
>> What is the name of the config option that you added, and are you sure
>> it's enabled in .config?
>> 
>> What happens if you explicitly run 'make hello' ?
>> 
>> Depending on what you did before, you may also need to clear previous
>> attempts from the output, for example with:
>> make hello-dirclean
>> 
>> If the hello package is seen correctly by buildroot, but the
>> compilation doesn't work correctly, you may want to add
>> KBUILD_VERBOSE=1 to the make command, to see the actual make command
>> executed.
>> 
>> Best regards,
>> Thomas
> 
> Thomas,
> 
> Thanks for the response.  After some digging around, I found that buildroot wasn't even trying to grab or compile my code.  What I discovered earlier today is that the variable names that I was using contained too many underscores.  My Config.in and hello.mk files were using variables set as BR2_PACKAGE_COMPANY_PROJECT_HELLO.  When I shortened it to just BR2_PACKAGE_HELLO then it started working properly.  Apparently the additional underscores confused some parsing of the buildroot and/or Kbuild system.  If that was mentioned in the documentation then I missed it.  Maybe it was assumed.  In any case, it's working now.
> 
> Thanks for your help on this.  I appreciate it.
> 

And I put the wrong variable names down in this email.  Was going from memory while my wife was driving the car. 

Config.in had BR2_PACKAGE_COMPANY_PROJECT_HELLO which changed to BR2_PACKAGE_HELLO.

hello.mk had COMPANY_PROJECT_HELLO_ variable names prefix which changed to HELLO_.

That solved the issues.

Best,
Ryan Wilkins

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] Problem compiling local code
  2013-07-22 20:38     ` Ryan Wilkins
@ 2013-07-23  7:19       ` Thomas De Schampheleire
  2013-07-23  7:27         ` Samuel Martin
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas De Schampheleire @ 2013-07-23  7:19 UTC (permalink / raw)
  To: buildroot

Hi Ryan,

On Mon, Jul 22, 2013 at 10:38 PM, Ryan Wilkins <ryan@deadfrog.net> wrote:
>
>
> On Jul 22, 2013, at 4:14 PM, Ryan Wilkins <ryan@deadfrog.net> wrote:
>
>>
>>
>> On Jul 19, 2013, at 1:29 AM, Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> wrote:
>>
>>> Hi Ryan,
>>>
>>> Is there any output regarding the hello package, like 'downloading',
>>> 'extracting', 'building', etc. or nothing at all?
>>> What is the name of the config option that you added, and are you sure
>>> it's enabled in .config?
>>>
>>> What happens if you explicitly run 'make hello' ?
>>>
>>> Depending on what you did before, you may also need to clear previous
>>> attempts from the output, for example with:
>>> make hello-dirclean
>>>
>>> If the hello package is seen correctly by buildroot, but the
>>> compilation doesn't work correctly, you may want to add
>>> KBUILD_VERBOSE=1 to the make command, to see the actual make command
>>> executed.
>>>
>>> Best regards,
>>> Thomas
>>
>> Thomas,
>>
>> Thanks for the response.  After some digging around, I found that buildroot wasn't even trying to grab or compile my code.  What I discovered earlier today is that the variable names that I was using contained too many underscores.  My Config.in and hello.mk files were using variables set as BR2_PACKAGE_COMPANY_PROJECT_HELLO.  When I shortened it to just BR2_PACKAGE_HELLO then it started working properly.  Apparently the additional underscores confused some parsing of the buildroot and/or Kbuild system.  If that was mentioned in the documentation then I missed it.  Maybe it was assumed.  In any case, it's working now.
>>
>> Thanks for your help on this.  I appreciate it.
>>
>
> And I put the wrong variable names down in this email.  Was going from memory while my wife was driving the car.
>
> Config.in had BR2_PACKAGE_COMPANY_PROJECT_HELLO which changed to BR2_PACKAGE_HELLO.
>
> hello.mk had COMPANY_PROJECT_HELLO_ variable names prefix which changed to HELLO_.
>
> That solved the issues.
>

Thanks for reporting back. Buildroot indeed expects
BR2_PACKAGE_<packagename> in the Config.in files, and
<packagename>_... for the .mk files. I also couldn't find this
restriction explicitly mentioned in the documentation, it's only
implicitly shown in the examples.  You're very welcome to send a patch
to update the documentation in this respect!

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] Problem compiling local code
  2013-07-23  7:19       ` Thomas De Schampheleire
@ 2013-07-23  7:27         ` Samuel Martin
  2013-07-23 13:07           ` Thomas De Schampheleire
  2013-07-23 20:43           ` Ryan Wilkins
  0 siblings, 2 replies; 8+ messages in thread
From: Samuel Martin @ 2013-07-23  7:27 UTC (permalink / raw)
  To: buildroot

Hi Thomas, Ryan, all,

2013/7/23 Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>:
> Hi Ryan,
>
> On Mon, Jul 22, 2013 at 10:38 PM, Ryan Wilkins <ryan@deadfrog.net> wrote:
>>
>>
>> On Jul 22, 2013, at 4:14 PM, Ryan Wilkins <ryan@deadfrog.net> wrote:
>>
>>>
>>>
>>> On Jul 19, 2013, at 1:29 AM, Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> wrote:
>>>
>>>> Hi Ryan,
>>>>
>>>> Is there any output regarding the hello package, like 'downloading',
>>>> 'extracting', 'building', etc. or nothing at all?
>>>> What is the name of the config option that you added, and are you sure
>>>> it's enabled in .config?
>>>>
>>>> What happens if you explicitly run 'make hello' ?
>>>>
>>>> Depending on what you did before, you may also need to clear previous
>>>> attempts from the output, for example with:
>>>> make hello-dirclean
>>>>
>>>> If the hello package is seen correctly by buildroot, but the
>>>> compilation doesn't work correctly, you may want to add
>>>> KBUILD_VERBOSE=1 to the make command, to see the actual make command
>>>> executed.
>>>>
>>>> Best regards,
>>>> Thomas
>>>
>>> Thomas,
>>>
>>> Thanks for the response.  After some digging around, I found that buildroot wasn't even trying to grab or compile my code.  What I discovered earlier today is that the variable names that I was using contained too many underscores.  My Config.in and hello.mk files were using variables set as BR2_PACKAGE_COMPANY_PROJECT_HELLO.  When I shortened it to just BR2_PACKAGE_HELLO then it started working properly.  Apparently the additional underscores confused some parsing of the buildroot and/or Kbuild system.  If that was mentioned in the documentation then I missed it.  Maybe it was assumed.  In any case, it's working now.
>>>
>>> Thanks for your help on this.  I appreciate it.
>>>
>>
>> And I put the wrong variable names down in this email.  Was going from memory while my wife was driving the car.
>>
>> Config.in had BR2_PACKAGE_COMPANY_PROJECT_HELLO which changed to BR2_PACKAGE_HELLO.
>>
>> hello.mk had COMPANY_PROJECT_HELLO_ variable names prefix which changed to HELLO_.
>>
>> That solved the issues.
>>
>
> Thanks for reporting back. Buildroot indeed expects
> BR2_PACKAGE_<packagename> in the Config.in files, and
> <packagename>_... for the .mk files. I also couldn't find this
> restriction explicitly mentioned in the documentation, it's only
> implicitly shown in the examples.  You're very welcome to send a patch
> to update the documentation in this respect!
Actually it's already in the documentation:
http://buildroot.org/downloads/manual/manual.html#package-name-variable-relation

Anyway, you're more than welcome to submit patch for the doc ;-), to
make this point more obvious,
or any other things you've found uncovered in the manual.


Regards,

-- 
Samuel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] Problem compiling local code
  2013-07-23  7:27         ` Samuel Martin
@ 2013-07-23 13:07           ` Thomas De Schampheleire
  2013-07-23 20:43           ` Ryan Wilkins
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas De Schampheleire @ 2013-07-23 13:07 UTC (permalink / raw)
  To: buildroot

On Tue, Jul 23, 2013 at 9:27 AM, Samuel Martin <s.martin49@gmail.com> wrote:
> Hi Thomas, Ryan, all,
>
> 2013/7/23 Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>:
>> Hi Ryan,
>>
>> On Mon, Jul 22, 2013 at 10:38 PM, Ryan Wilkins <ryan@deadfrog.net> wrote:
>>>
>>>
>>> On Jul 22, 2013, at 4:14 PM, Ryan Wilkins <ryan@deadfrog.net> wrote:
>>>
>>>>
>>>>
>>>> On Jul 19, 2013, at 1:29 AM, Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> wrote:
>>>>
>>>>> Hi Ryan,
>>>>>
>>>>> Is there any output regarding the hello package, like 'downloading',
>>>>> 'extracting', 'building', etc. or nothing at all?
>>>>> What is the name of the config option that you added, and are you sure
>>>>> it's enabled in .config?
>>>>>
>>>>> What happens if you explicitly run 'make hello' ?
>>>>>
>>>>> Depending on what you did before, you may also need to clear previous
>>>>> attempts from the output, for example with:
>>>>> make hello-dirclean
>>>>>
>>>>> If the hello package is seen correctly by buildroot, but the
>>>>> compilation doesn't work correctly, you may want to add
>>>>> KBUILD_VERBOSE=1 to the make command, to see the actual make command
>>>>> executed.
>>>>>
>>>>> Best regards,
>>>>> Thomas
>>>>
>>>> Thomas,
>>>>
>>>> Thanks for the response.  After some digging around, I found that buildroot wasn't even trying to grab or compile my code.  What I discovered earlier today is that the variable names that I was using contained too many underscores.  My Config.in and hello.mk files were using variables set as BR2_PACKAGE_COMPANY_PROJECT_HELLO.  When I shortened it to just BR2_PACKAGE_HELLO then it started working properly.  Apparently the additional underscores confused some parsing of the buildroot and/or Kbuild system.  If that was mentioned in the documentation then I missed it.  Maybe it was assumed.  In any case, it's working now.
>>>>
>>>> Thanks for your help on this.  I appreciate it.
>>>>
>>>
>>> And I put the wrong variable names down in this email.  Was going from memory while my wife was driving the car.
>>>
>>> Config.in had BR2_PACKAGE_COMPANY_PROJECT_HELLO which changed to BR2_PACKAGE_HELLO.
>>>
>>> hello.mk had COMPANY_PROJECT_HELLO_ variable names prefix which changed to HELLO_.
>>>
>>> That solved the issues.
>>>
>>
>> Thanks for reporting back. Buildroot indeed expects
>> BR2_PACKAGE_<packagename> in the Config.in files, and
>> <packagename>_... for the .mk files. I also couldn't find this
>> restriction explicitly mentioned in the documentation, it's only
>> implicitly shown in the examples.  You're very welcome to send a patch
>> to update the documentation in this respect!
> Actually it's already in the documentation:
> http://buildroot.org/downloads/manual/manual.html#package-name-variable-relation
>

Ah, thanks for pointing that out, I didn't read that far in the section :-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] Problem compiling local code
  2013-07-23  7:27         ` Samuel Martin
  2013-07-23 13:07           ` Thomas De Schampheleire
@ 2013-07-23 20:43           ` Ryan Wilkins
  1 sibling, 0 replies; 8+ messages in thread
From: Ryan Wilkins @ 2013-07-23 20:43 UTC (permalink / raw)
  To: buildroot


On Jul 23, 2013, at 3:27 AM, Samuel Martin <s.martin49@gmail.com> wrote:

> Hi Thomas, Ryan, all,
> 
> 2013/7/23 Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>:
>> Hi Ryan,
>> 
>> On Mon, Jul 22, 2013 at 10:38 PM, Ryan Wilkins <ryan@deadfrog.net> wrote:
>> 
>> Thanks for reporting back. Buildroot indeed expects
>> BR2_PACKAGE_<packagename> in the Config.in files, and
>> <packagename>_... for the .mk files. I also couldn't find this
>> restriction explicitly mentioned in the documentation, it's only
>> implicitly shown in the examples.  You're very welcome to send a patch
>> to update the documentation in this respect!
> Actually it's already in the documentation:
> http://buildroot.org/downloads/manual/manual.html#package-name-variable-relation
> 
> Anyway, you're more than welcome to submit patch for the doc ;-), to
> make this point more obvious,
> or any other things you've found uncovered in the manual.
> 

Going and (re)reading the section, I would say that it's not at all obvious.  In fact, as I read it, it seems to promote the use of the variables as I had tried and failed to use them.  I haven't submitted patches for documentation in the past so I'll have to research it and then type something up to submit.

Thanks for pointing out the section.

Best,
Ryan Wilkins

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-07-23 20:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-19  4:11 [Buildroot] Problem compiling local code Ryan Wilkins
2013-07-19  5:29 ` Thomas De Schampheleire
2013-07-22 20:14   ` Ryan Wilkins
2013-07-22 20:38     ` Ryan Wilkins
2013-07-23  7:19       ` Thomas De Schampheleire
2013-07-23  7:27         ` Samuel Martin
2013-07-23 13:07           ` Thomas De Schampheleire
2013-07-23 20:43           ` Ryan Wilkins

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.