Skip to contentSkip to conversation

Suggestion for config menu help for path values

Buildroot Grant Edwards 2 participants 4 messages Jun 22, 2010 – Jun 23, 2010

lore
Share & tools
lore
#0 lore raw

Just a suggestion for anytime somebody is working on the config menu help for an option that allows a path to be entered: always specify in the item's help whether an absolute path is required, and if not, where the starting point is for a relative path.

For several different options, it's taken me many guesses to figure out from what working direction a relative path should be referenced. When each guess requires a build from-scratch, you can spend hours trying to figure out what path value to enter for a particular script or config file.

Right now I'm trying to figure out the CWD when the post-build script is called, and I'll submit a help patch when I figure out the answer.

Another source of confusion I've run into a few times are cases where the title for a config item doesn't match up with either the config variable name or the phrase commonly used elsewhere to refer to that item. For example, it takes a bit if digging to figure out that in the config menus, what the documentation calls the "post-build script", who's value is "BR2_ROOTFS_POST_BUILD_SCRIPT" is titled "Custom script to run before packing files".

A title including the words "post build script" would seem to be a more obvious/consistent choice.

Signature · 3 lines
Grant Edwards               grant.b.edwards        Yow! !  I'm in a very
                                  at               clever and adorable INSANE
                              gmail.com            ASYLUM!!
#1 lore raw
Quoted 2 lines · Grant Edwards

Right now I'm trying to figure out the CWD when the post-build script is called, and I'll submit a help patch when I figure out the answer.

So far it appears buildroot looks in $PATH for the post-build script, but I can't figure out what directories (if any) in the buildroot source/build tree it looks in.

Signature · 3 lines
Grant Edwards               grant.b.edwards        Yow! You were s'posed
                                  at               to laugh!
                              gmail.com            
#2 lore raw
In reply to Grant Edwards
Quoted 5 lines · On Tue, 22 Jun 2010 21:10:57 +0000 (UTC) Grant Edwards…

Just a suggestion for anytime somebody is working on the config menu help for an option that allows a path to be entered: always specify in the item's help whether an absolute path is required, and if not, where the starting point is for a relative path.

Quoted 8 lines

For several different options, it's taken me many guesses to figure out from what working direction a relative path should be referenced. When each guess requires a build from-scratch, you can spend hours trying to figure out what path value to enter for a particular script or config file.

Right now I'm trying to figure out the CWD when the post-build script is called, and I'll submit a help patch when I figure out the answer.

All Buildroot Makefiles are interpreted from the top Buildroot source directory, as we only use Makefile inclusion and not recursive make. So, in general, relative paths are interpreted relatively to the top Buildroot source directory.

Quoted 7 lines

Another source of confusion I've run into a few times are cases where the title for a config item doesn't match up with either the config variable name or the phrase commonly used elsewhere to refer to that item. For example, it takes a bit if digging to figure out that in the config menus, what the documentation calls the "post-build script", who's value is "BR2_ROOTFS_POST_BUILD_SCRIPT" is titled "Custom script to run before packing files".

Don't hesitate to point us those inconsistencies, and either submit a patch to fix them or ask us to do so :-)

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw
Quoted 7 lines · Thomas Petazzoni
Quoted 2 lines

Right now I'm trying to figure out the CWD when the post-build script is called, and I'll submit a help patch when I figure out the answer.

All Buildroot Makefiles are interpreted from the top Buildroot source directory, as we only use Makefile inclusion and not recursive make. So, in general, relative paths are interpreted relatively to the top Buildroot source directory.

I had initially assumed that scripts belonged in the "scripts" directory. That didn't work. Then I tried the top of the source directory. That didn't work either. I finally figured out that the script path wasn't interpreted relative to a fixed point, but it was left up to the shell to find using the normal PATH mechanism (so it had to be ./filename rather than filename).

I'll submit a patch to the docs.

Quoted 2 lines

Don't hesitate to point us those inconsistencies, and either submit a patch to fix them or ask us to do so :-)

I will.

Signature · 3 lines
Grant Edwards               grant.b.edwards        Yow! It's a lot of fun
                                  at               being alive ... I wonder if
                              gmail.com            my bed is made?!?