Skip to contentSkip to conversation

How do you add a package subdirectory?

Buildroot Grant Edwards 2 participants 3 messages Apr 24, 2012 – Apr 25, 2012

lore
Share & tools
lore
#0 lore raw

I'm trying to add local packages to 2012.02, and I'd like them to live in a subdirectory underneath "package" (e.g. package/mycompany). I've created the "mycompany" directory which contains a Config.in that declares a submenu that in turn sources the individual package Config.in files: package/mycompany/foo/Config.in, package/mycompany/bar/Config.in, etc.

The "mycompany" submenu shows up where it's supposed to, and that menu has the entries for "foo" and "bar" as it should. Selecting those entries sets BR2_PACKAGE_FOO in the .config file as expected.

But, when I actually do the "make", buildroot won't attempt to build packages "foo" and "bar" unless I create symlinks in the packages directory that point to the corresponding directories in the mycompany subdirectory like this:

package/foo -> mycompany/foo
package/bar -> mycompany/bar

Inside foo.mk, bar.mk the various settings/commands have the "mycompany" directory in them, and once buildroot _finds_ the .mk files, they build fine.

I've searched the existing scripts and .in files for some mechanism that's used by the other packages that live in subdirectories underneat packages, but couldn't find anything. As far as I can tell, I've done everything in my new subdirectory exactly the same way it's done in the other subdirectories, but it just doesn't work.

How does buildroot know that when BR2_PACKAGE_AUMIX is set it's supposed to look for package/multimedia/aumix/aumix.mk and not package/aumix/aumix.mk?

How do I get buildroot to look in package/mycompany for the foo and bar package directories?

Signature · 3 lines
Grant Edwards               grant.b.edwards        Yow! I'm definitely not
                                  at               in Omaha!
                              gmail.com            
#1 lore raw

Hi Grant,

Quoted 29 lines · Grant Edwards

I'm trying to add local packages to 2012.02, and I'd like them to live in a subdirectory underneath "package" (e.g. package/mycompany). I've created the "mycompany" directory which contains a Config.in that declares a submenu that in turn sources the individual package Config.in files: package/mycompany/foo/Config.in, package/mycompany/bar/Config.in, etc.

The "mycompany" submenu shows up where it's supposed to, and that menu has the entries for "foo" and "bar" as it should. ?Selecting those entries sets BR2_PACKAGE_FOO in the .config file as expected.

But, when I actually do the "make", buildroot won't attempt to build packages "foo" and "bar" unless I create symlinks in the packages directory that point to the corresponding directories in the mycompany subdirectory like this:

? package/foo -> mycompany/foo
? package/bar -> mycompany/bar

Inside foo.mk, bar.mk the various settings/commands have the "mycompany" directory in them, and once buildroot _finds_ the .mk files, they build fine.

I've searched the existing scripts and .in files for some mechanism that's used by the other packages that live in subdirectories underneat packages, but couldn't find anything. As far as I can tell, I've done everything in my new subdirectory exactly the same way it's done in the other subdirectories, but it just doesn't work.

Quoted 6 lines

How does buildroot know that when BR2_PACKAGE_AUMIX is set it's supposed to look for package/multimedia/aumix/aumix.mk and not package/aumix/aumix.mk?

How do I get buildroot to look in package/mycompany for the foo and bar package directories?

Have a look at http://elinux.org/images/2/2a/Using-buildroot-real-project.pdf,
pages 27-28 where this scenario is described.

What I think you are missing is the top-level .mk file in /package/company/company.mk which includes all sub-mk files.

In Buildroot, all makefiles are included into one big top-level Makefile whenever you type 'make'. For the packages, this is done with
wildcards: Makefile includes package/*/*.mk
If you have .mk files in other locations (package/*/*/*.mk), you have to include them yourself, inside a .mk file at package/*/*.mk level.

Best regards,
Thomas

#2 lore raw
Quoted 6 lines · Thomas De Schampheleire

Hi Grant,

Quoted 2 lines · Grant Edwards

I'm trying to add local packages to 2012.02, and I'd like them to live in a subdirectory underneath "package" (e.g. package/mycompany).

[...]

Quoted 1 line
Quoted 1 line

The "mycompany" submenu shows up where it's supposed to,

[...]

Quoted 4 lines
Quoted 4 lines

But, when I actually do the "make", buildroot won't attempt to build packages "foo" and "bar" unless I create symlinks in the packages directory that point to the corresponding directories in the mycompany subdirectory

[...]

Quoted 2 lines

Have a look at http://elinux.org/images/2/2a/Using-buildroot-real-project.pdf,
pages 27-28 where this scenario is described.

Cool. There should be a link to this on the "Documentation" page.

Quoted 2 lines

What I think you are missing is the top-level .mk file in /package/company/company.mk which includes all sub-mk files.

That's it. I swear I looked for files like that and they weren't there yesterday...

Thanks!

Signature · 4 lines
Grant Edwards               grant.b.edwards        Yow! If elected, Zippy
                                  at               pledges to each and every
                              gmail.com            American a 55-year-old
                                                   houseboy ...