* [Buildroot] Where does post-build script belong?
@ 2012-02-20 20:41 Grant Edwards
2012-02-20 21:00 ` J.C. Woltz
0 siblings, 1 reply; 16+ messages in thread
From: Grant Edwards @ 2012-02-20 20:41 UTC (permalink / raw)
To: buildroot
I'm trying to use a post-build script to fix up the init.d/S59snmpd
file, but I can't figure out what the post-build script path should
be.
It would be awfully nice if the help text for "path" config options
explained what directory the path is relative to. Alternatively, it
might be nice if there were some variables that could be used in
user-configured paths to anchor the path to specific points in the
build, output, or source tree.
Putting an absolute path in a config file doesn't really seem like a
workable option.
--
Grant Edwards grant.b.edwards Yow! Now, let's SEND OUT
at for QUICHE!!
gmail.com
^ permalink raw reply [flat|nested] 16+ messages in thread* [Buildroot] Where does post-build script belong? 2012-02-20 20:41 [Buildroot] Where does post-build script belong? Grant Edwards @ 2012-02-20 21:00 ` J.C. Woltz 2012-02-20 21:45 ` Grant Edwards 0 siblings, 1 reply; 16+ messages in thread From: J.C. Woltz @ 2012-02-20 21:00 UTC (permalink / raw) To: buildroot On Mon, Feb 20, 2012 at 3:41 PM, Grant Edwards <grant.b.edwards@gmail.com> wrote: > > I'm trying to use a post-build script to fix up the init.d/S59snmpd > file, but I can't figure out what the post-build script path should > be. The post-build script can be where you want it :) When you define the post build script to run, it is relative to the buildroot main directory Personally, I keep my post-build is a directory structure like: board/manufacture/model/post-build.sh Then I have a board/manufacture/model/root-additions/ directory structure. > > It would be awfully nice if the help text for "path" config options > explained what directory the path is relative to. Alternatively, it > might be nice if there were some variables that could be used in > user-configured paths to anchor the path to specific points in the > build, output, or source tree. > > Putting an absolute path in a config file doesn't really seem like a > workable option. Agreed Somewhere I saw some slides that had a recommended way to do this. It also had a minimal post-build script to run. It is on the mailing list somewhere. J.C. Woltz ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-20 21:00 ` J.C. Woltz @ 2012-02-20 21:45 ` Grant Edwards 2012-02-21 8:44 ` Luca Ceresoli 0 siblings, 1 reply; 16+ messages in thread From: Grant Edwards @ 2012-02-20 21:45 UTC (permalink / raw) To: buildroot On 2012-02-20, J.C. Woltz <jwoltz@gmail.com> wrote: > On Mon, Feb 20, 2012 at 3:41 PM, Grant Edwards ><grant.b.edwards@gmail.com> wrote: >> >> I'm trying to use a post-build script to fix up the init.d/S59snmpd >> file, but I can't figure out what the post-build script path should >> be. > > The post-build script can be where you want it :) When you define the > post build script to run, it is relative to the buildroot main > directory That's the bit of info I was looking for. I'd been trying to figure that out via trial-and-error for a while, but I'd been editing the defautl config file without ever regenerating the .config file in the output directory -- so it was all "error" and no "trial". > Personally, I keep my post-build is a directory structure like: > board/manufacture/model/post-build.sh I prefer to modify the buildroot source tree as little as possible (it makes upgrading to a new version easier). So I keep everything outside it that I can. I've put what used to be my package/customize/source directory in "../customfiles", my post-build script in "../postbuild.sh", and my output directory is "../output". >> It would be awfully nice if the help text for "path" config options >> explained what directory the path is relative to. Alternatively, it >> might be nice if there were some variables that could be used in >> user-configured paths to anchor the path to specific points in the >> build, output, or source tree. >> >> Putting an absolute path in a config file doesn't really seem like a >> workable option. > > Agreed > > Somewhere I saw some slides that had a recommended way to do this. It > also had a minimal post-build script to run. It is on the mailing > list somewhere. I think somebody posted a pointer to a week or so back when I was asking about a change to the customize.mk file. -- Grant Edwards grant.b.edwards Yow! I'm having a RELIGIOUS at EXPERIENCE ... and I don't gmail.com take any DRUGS ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-20 21:45 ` Grant Edwards @ 2012-02-21 8:44 ` Luca Ceresoli 2012-02-21 14:54 ` Grant Edwards 0 siblings, 1 reply; 16+ messages in thread From: Luca Ceresoli @ 2012-02-21 8:44 UTC (permalink / raw) To: buildroot Grant Edwards wrote: ... >> Personally, I keep my post-build is a directory structure like: >> board/manufacture/model/post-build.sh > I prefer to modify the buildroot source tree as little as possible (it > makes upgrading to a new version easier). So I keep everything > outside it that I can. I've put what used to be my > package/customize/source directory in "../customfiles", my post-build > script in "../postbuild.sh", and my output directory is "../output". Buildroot can be used in different ways, so yours is not necessarily wrong. But the structure of Buildroot is such that you can put your customizations in a few, well-defined places, which typically are the board/mycompany/myproduct dir and your config file. To add proprietary packages what I do is to create a packages/mcompany/ dir with packages inside. If you need to add currently unsupported opensource packages you can just submit a patch to this mailing-list for mainline inclusion. Finally, especially if you need many customizations, I suggest you think about using git. You can have mainline Buildroot in the master branch and you modifications in another branch. It is very quick to merge your branch with an updated Buildroot, if you follow the guidelines above. >>> It would be awfully nice if the help text for "path" config options >>> explained what directory the path is relative to. Alternatively, it >>> might be nice if there were some variables that could be used in >>> user-configured paths to anchor the path to specific points in the >>> build, output, or source tree. >>> >>> Putting an absolute path in a config file doesn't really seem like a >>> workable option. >> Agreed >> >> Somewhere I saw some slides that had a recommended way to do this. It >> also had a minimal post-build script to run. It is on the mailing >> list somewhere. > I think somebody posted a pointer to a week or so back when I was > asking about a change to the customize.mk file. > Here it is: > For more details, seehttp://free-electrons.com/blog/elce-2011-videos/, > search for "Using Buildroot For a Real Project". There's a video of > Thomas Petazzoni with many best practices for using Buildroot. > My above suggestion comes from slide 24 of his presentation. Thanks > Thomas. From: http://lists.busybox.net/pipermail/buildroot/2012-February/049989.html Look at slide 25 too. Luca ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-21 8:44 ` Luca Ceresoli @ 2012-02-21 14:54 ` Grant Edwards 2012-02-28 20:38 ` Arnout Vandecappelle 0 siblings, 1 reply; 16+ messages in thread From: Grant Edwards @ 2012-02-21 14:54 UTC (permalink / raw) To: buildroot On 2012-02-21, Luca Ceresoli <luca@lucaceresoli.net> wrote: > Grant Edwards wrote: > ... > >>> Personally, I keep my post-build is a directory structure like: >>> board/manufacture/model/post-build.sh >> >> I prefer to modify the buildroot source tree as little as possible >> (it makes upgrading to a new version easier). So I keep everything >> outside it that I can. I've put what used to be my >> package/customize/source directory in "../customfiles", my post-build >> script in "../postbuild.sh", and my output directory is "../output". > > Buildroot can be used in different ways, so yours is not necessarily > wrong. But the structure of Buildroot is such that you can put your > customizations in a few, well-defined places, which typically are the > board/mycompany/myproduct dir and your config file. I don't want to replace the default skeleton. I want to add some files to it, and possible modify a few. The documentation describes two ways to do that: 1) package/customize 2) post-build script I'm told 1) is now depricated, so I'm switching to 2). Where under board/mycompany/myproduct do you put "extra" files that will be added to the standard skeleton? > To add proprietary packages what I do is to create a > packages/mcompany/ dir with packages inside. > > If you need to add currently unsupported opensource packages you can > just submit a patch to this mailing-list for mainline inclusion. That's not what I'm doing. I'm mainly adding some basic web pages and a few init scripts that do things like set the hostname, and start some of the busybox daemons like httpd, inetd, etc. My "extra" applications are built externally and bundled as as ipkg packages that are installed/managed outside of buildroot's package system. > Finally, especially if you need many customizations, I suggest you > think about using git. I'd love to use git, but we're standardized on subversion (which does not handle branching merging at all well). :/ In the past I've tried combining svn and git and it just didn't work. > You can have mainline Buildroot in the master branch and you > modifications in another branch. It is very quick to merge your > branch with an updated Buildroot, if you follow the guidelines above. -- Grant Edwards grant.b.edwards Yow! I know things about at TROY DONAHUE that can't gmail.com even be PRINTED!! ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-21 14:54 ` Grant Edwards @ 2012-02-28 20:38 ` Arnout Vandecappelle 2012-02-28 21:06 ` Grant Edwards 0 siblings, 1 reply; 16+ messages in thread From: Arnout Vandecappelle @ 2012-02-28 20:38 UTC (permalink / raw) To: buildroot On Tuesday 21 February 2012 14:54:47 Grant Edwards wrote: [snip] > I don't want to replace the default skeleton. I want to add some > files to it, and possible modify a few. The documentation describes > two ways to do that: > > 1) package/customize > > 2) post-build script > > I'm told 1) is now depricated, so I'm switching to 2). > > Where under board/mycompany/myproduct do you put "extra" files that > will be added to the standard skeleton? I put it in board/mycompany/myproduct/skeleton. Although rootfs-additions would be a better name than skeleton. I would like to add a feature to buildroot to simplify out-of-tree additions (rootfs files, patches, config files, extra packages, ...). I'll send out an RFC for that soonish. Regards, Arnout -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-28 20:38 ` Arnout Vandecappelle @ 2012-02-28 21:06 ` Grant Edwards 2012-02-28 21:29 ` Steve Calfee 0 siblings, 1 reply; 16+ messages in thread From: Grant Edwards @ 2012-02-28 21:06 UTC (permalink / raw) To: buildroot On 2012-02-28, Arnout Vandecappelle <arnout@mind.be> wrote: > On Tuesday 21 February 2012 14:54:47 Grant Edwards wrote: > [snip] >> I don't want to replace the default skeleton. I want to add some >> files to it, and possible modify a few. The documentation describes >> two ways to do that: >> >> 1) package/customize >> >> 2) post-build script >> >> I'm told 1) is now depricated, so I'm switching to 2). >> >> Where under board/mycompany/myproduct do you put "extra" files that >> will be added to the standard skeleton? > > I put it in board/mycompany/myproduct/skeleton. Although > rootfs-additions would be a better name than skeleton. Ah, perhaps I've misunderstood what a custom skeleton was for the past several years. I thought it was the basis for the filesystem. Is the custom skeleton something that's _added_ on top of the default skeleton rather than used in place of it? -- Grant Edwards grant.b.edwards Yow! How many retured at bricklayers from FLORIDA gmail.com are out purchasing PENCIL SHARPENERS right NOW?? ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-28 21:06 ` Grant Edwards @ 2012-02-28 21:29 ` Steve Calfee 2012-02-28 21:36 ` Grant Edwards 0 siblings, 1 reply; 16+ messages in thread From: Steve Calfee @ 2012-02-28 21:29 UTC (permalink / raw) To: buildroot On 02/28/2012 01:06 PM, Grant Edwards wrote: > On 2012-02-28, Arnout Vandecappelle<arnout@mind.be> wrote: >> On Tuesday 21 February 2012 14:54:47 Grant Edwards wrote: >> [snip] >>> I don't want to replace the default skeleton. I want to add some >>> files to it, and possible modify a few. The documentation describes >>> two ways to do that: >>> >>> 1) package/customize >>> >>> 2) post-build script >>> >>> I'm told 1) is now depricated, so I'm switching to 2). >>> >>> Where under board/mycompany/myproduct do you put "extra" files that >>> will be added to the standard skeleton? >> I put it in board/mycompany/myproduct/skeleton. Although >> rootfs-additions would be a better name than skeleton. > Ah, perhaps I've misunderstood what a custom skeleton was for the past > several years. I thought it was the basis for the filesystem. Is the > custom skeleton something that's _added_ on top of the default > skeleton rather than used in place of it? > Perhaps, but it is your script. If you want to completely replace the existing skeleton you can, but I think it makes more sense to just overlay new stuff on top of the default skeleton. This makes your new skeleton much smaller, and since it is run after every build, you don't have to wonder if changes make it to the target filesystem, it always does. Regards, Steve ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-28 21:29 ` Steve Calfee @ 2012-02-28 21:36 ` Grant Edwards 2012-02-28 22:06 ` Steve Calfee 2012-02-28 22:18 ` Arnout Vandecappelle 0 siblings, 2 replies; 16+ messages in thread From: Grant Edwards @ 2012-02-28 21:36 UTC (permalink / raw) To: buildroot On 2012-02-28, Steve Calfee <stevecalfee@gmail.com> wrote: > On 02/28/2012 01:06 PM, Grant Edwards wrote: >> On 2012-02-28, Arnout Vandecappelle<arnout@mind.be> wrote: >>> On Tuesday 21 February 2012 14:54:47 Grant Edwards wrote: >>> [snip] >>>> I don't want to replace the default skeleton. I want to add some >>>> files to it, and possible modify a few. The documentation describes >>>> two ways to do that: >>>> >>>> 1) package/customize >>>> >>>> 2) post-build script >>>> >>>> I'm told 1) is now depricated, so I'm switching to 2). >>>> >>>> Where under board/mycompany/myproduct do you put "extra" files that >>>> will be added to the standard skeleton? >>> I put it in board/mycompany/myproduct/skeleton. Although >>> rootfs-additions would be a better name than skeleton. >> Ah, perhaps I've misunderstood what a custom skeleton was for the past >> several years. I thought it was the basis for the filesystem. Is the >> custom skeleton something that's _added_ on top of the default >> skeleton rather than used in place of it? >> > Perhaps, but it is your script. If you want to completely replace the > existing skeleton you can, but I think it makes more sense to just > overlay new stuff on top of the default skeleton. I seem to be completely lost. Is board/mycompany/myproduct/skeleton above a post-build script or a custom skelecton (something you set BR2_ROOTFS_SKELETON_CUSTOM_PATH to point to)? > This makes your new skeleton much smaller, and since it is run after > every build, you don't have to wonder if changes make it to the > target filesystem, it always does. -- Grant Edwards grant.b.edwards Yow! A can of ASPARAGUS, at 73 pigeons, some LIVE ammo, gmail.com and a FROZEN DAQUIRI!! ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-28 21:36 ` Grant Edwards @ 2012-02-28 22:06 ` Steve Calfee 2012-02-28 22:18 ` Grant Edwards 2012-02-28 22:19 ` Arnout Vandecappelle 2012-02-28 22:18 ` Arnout Vandecappelle 1 sibling, 2 replies; 16+ messages in thread From: Steve Calfee @ 2012-02-28 22:06 UTC (permalink / raw) To: buildroot On 02/28/2012 01:36 PM, Grant Edwards wrote: > On 2012-02-28, Steve Calfee<stevecalfee@gmail.com> wrote: >> On 02/28/2012 01:06 PM, Grant Edwards wrote: >>> On 2012-02-28, Arnout Vandecappelle<arnout@mind.be> wrote: >>>> On Tuesday 21 February 2012 14:54:47 Grant Edwards wrote: >>>> [snip] >>>>> I don't want to replace the default skeleton. I want to add some >>>>> files to it, and possible modify a few. The documentation describes >>>>> two ways to do that: >>>>> >>>>> 1) package/customize >>>>> >>>>> 2) post-build script >>>>> >>>>> I'm told 1) is now depricated, so I'm switching to 2). >>>>> >>>>> Where under board/mycompany/myproduct do you put "extra" files that >>>>> will be added to the standard skeleton? >>>> I put it in board/mycompany/myproduct/skeleton. Although >>>> rootfs-additions would be a better name than skeleton. >>> Ah, perhaps I've misunderstood what a custom skeleton was for the past >>> several years. I thought it was the basis for the filesystem. Is the >>> custom skeleton something that's _added_ on top of the default >>> skeleton rather than used in place of it? >>> >> Perhaps, but it is your script. If you want to completely replace the >> existing skeleton you can, but I think it makes more sense to just >> overlay new stuff on top of the default skeleton. > I seem to be completely lost. Is board/mycompany/myproduct/skeleton > above a post-build script or a custom skelecton (something you set > BR2_ROOTFS_SKELETON_CUSTOM_PATH to point to)? Hi Grant, I was not aware of that config option. In fact there are no uses of it in the current /board... stuff. What I and what I think others have done is create my own mini-skeleton in the board.... directory. I can then stick in scripts, /etc/ files and maybe even externally built binaries into /usr/bin/ in my local area. Then when the post build script is executed I just copy all the files from my skeleton to the target skeleton. This will overlay the default stuff (that are duplicates in my area) and add any new stuff. After the post-build script the target skeleton will get all packaged up as a rootfs for your target system. Someone else will have to describe what that option is for. Regards, Steve >> This makes your new skeleton much smaller, and since it is run after >> every build, you don't have to wonder if changes make it to the >> target filesystem, it always does. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-28 22:06 ` Steve Calfee @ 2012-02-28 22:18 ` Grant Edwards 2012-03-16 21:30 ` Peter Korsgaard 2012-02-28 22:19 ` Arnout Vandecappelle 1 sibling, 1 reply; 16+ messages in thread From: Grant Edwards @ 2012-02-28 22:18 UTC (permalink / raw) To: buildroot On 2012-02-28, Steve Calfee <stevecalfee@gmail.com> wrote: >>>>>> Where under board/mycompany/myproduct do you put "extra" files that >>>>>> will be added to the standard skeleton? >>>>> I put it in board/mycompany/myproduct/skeleton. Although >>>>> rootfs-additions would be a better name than skeleton. >>>> Ah, perhaps I've misunderstood what a custom skeleton was for the past >>>> several years. I thought it was the basis for the filesystem. Is the >>>> custom skeleton something that's _added_ on top of the default >>>> skeleton rather than used in place of it? >>>> >>> Perhaps, but it is your script. If you want to completely replace the >>> existing skeleton you can, but I think it makes more sense to just >>> overlay new stuff on top of the default skeleton. >> I seem to be completely lost. Is board/mycompany/myproduct/skeleton >> above a post-build script or a custom skelecton (something you set >> BR2_ROOTFS_SKELETON_CUSTOM_PATH to point to)? > I was not aware of that config option. In fact there are no uses of it > in the current /board... stuff. It's in the config file from buildroot-2011.05, and the docs still talk about it: http://buildroot.uclibc.org/downloads/buildroot.html#custom_targetfs What I may have misunderstood is whether that custom skeleton replaces the default skeleton or is copied on top of it. My reading of the doc is that it replaces the default skeleton, and that wasn't what I wanted, so I used the customize package. I have since switched to using a post-build script that copies my "extras" tree onto the default skeleton present in output/target. > What I and what I think others have done is create my own > mini-skeleton in the board.... directory. I can then stick in > scripts, /etc/ files and maybe even externally built binaries into > /usr/bin/ in my local area. Then when the post build script is > executed I just copy all the files from my skeleton to the target > skeleton. Yep. That's what I was doing via the customize package and what I'm now doing now a post-build script. > This will overlay the default stuff (that are duplicates in my area) > and add any new stuff. After the post-build script the target > skeleton will get all packaged up as a rootfs for your target system. > > Someone else will have to describe what that option is for. The doc says one of the options for customizing the filesystem is * Create your own target skeleton. You can start with the default skeleton available under fs/skeleton and then customize it to suit your needs. The BR2_ROOTFS_SKELETON_CUSTOM and BR2_ROOTFS_SKELETON_CUSTOM_PATH will allow you to specify the location of your custom skeleton. At build time, the contents of the skeleton are copied to output/target before any package installation. I read that as meaning buildroot will use my own customized target skeleton instead of the default one. Previously in the thread when people mentioned custom skeletons, I thought that option was what they were talking about. This is all academic at this point, since a post-build script appears to be the recommeded method and is how I'm doing things now. -- Grant Edwards grant.b.edwards Yow! The PILLSBURY DOUGHBOY at is CRYING for an END to gmail.com BURT REYNOLDS movies!! ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-28 22:18 ` Grant Edwards @ 2012-03-16 21:30 ` Peter Korsgaard 0 siblings, 0 replies; 16+ messages in thread From: Peter Korsgaard @ 2012-03-16 21:30 UTC (permalink / raw) To: buildroot >>>>> "Grant" == Grant Edwards <grant.b.edwards@gmail.com> writes: Hi, Grant> The doc says one of the options for customizing the filesystem is Grant> * Create your own target skeleton. You can start with the default Grant> skeleton available under fs/skeleton and then customize it to suit Grant> your needs. The BR2_ROOTFS_SKELETON_CUSTOM and Grant> BR2_ROOTFS_SKELETON_CUSTOM_PATH will allow you to specify the Grant> location of your custom skeleton. At build time, the contents of Grant> the skeleton are copied to output/target before any package Grant> installation. Grant> I read that as meaning buildroot will use my own customized target Grant> skeleton instead of the default one. Previously in the thread when Grant> people mentioned custom skeletons, I thought that option was what they Grant> were talking about. We had support for custom target skeletons pretty much forever, and that is still supported. What the recent discussion has been about is a different approach to pretty much do the same. Stick with the default skeleton, but add any customization at the END of the build sequence using the post-build script. Both approaches have advantages and disadvantages, it depends on how closely your needs are to the default skeleton, and if you want to automatically use any changes to the default skeleton when you upgrade your buildroot version. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-28 22:06 ` Steve Calfee 2012-02-28 22:18 ` Grant Edwards @ 2012-02-28 22:19 ` Arnout Vandecappelle 2012-02-29 7:41 ` Thomas De Schampheleire 1 sibling, 1 reply; 16+ messages in thread From: Arnout Vandecappelle @ 2012-02-28 22:19 UTC (permalink / raw) To: buildroot On Tuesday 28 February 2012 22:06:28 Steve Calfee wrote: > > I seem to be completely lost. Is board/mycompany/myproduct/skeleton > > above a post-build script or a custom skelecton (something you set > > BR2_ROOTFS_SKELETON_CUSTOM_PATH to point to)? > Hi Grant, > > I was not aware of that config option. In fact there are no uses of it > in the current /board... stuff. What I and what I think others have done > is create my own mini-skeleton in the board.... directory. I can then > stick in scripts, etc files and maybe even externally built binaries > into /usr/bin/ in my local area. Then when the post build script is > executed I just copy all the files from my skeleton to the target > skeleton. This will overlay the default stuff (that are duplicates in my > area) and add any new stuff. After the post-build script the target > skeleton will get all packaged up as a rootfs for your target system. > > Someone else will have to describe what that option is for. If you ask me, BR2_ROOTFS_SKELETON_CUSTOM_PATH is indeed useless and should be deprecated. Regards, Arnout -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-28 22:19 ` Arnout Vandecappelle @ 2012-02-29 7:41 ` Thomas De Schampheleire 2012-03-16 21:32 ` Peter Korsgaard 0 siblings, 1 reply; 16+ messages in thread From: Thomas De Schampheleire @ 2012-02-29 7:41 UTC (permalink / raw) To: buildroot On Tue, Feb 28, 2012 at 11:19 PM, Arnout Vandecappelle <arnout@mind.be> wrote: > On Tuesday 28 February 2012 22:06:28 Steve Calfee wrote: >> > I seem to be completely lost. ?Is board/mycompany/myproduct/skeleton >> > above a post-build script or a custom skelecton (something you set >> > BR2_ROOTFS_SKELETON_CUSTOM_PATH to point to)? >> Hi Grant, >> >> I was not aware of that config option. In fact there are no uses of it >> in the current /board... stuff. What I and what I think others have done >> is create my own mini-skeleton in the board.... directory. I can then >> stick in scripts, etc files and maybe even externally built binaries >> into /usr/bin/ in my local area. Then when the post build script is >> executed I just copy all the files from my skeleton to the target >> skeleton. This will overlay the default stuff (that are duplicates in my >> area) and add any new stuff. After the post-build script the target >> skeleton will get all packaged up as a rootfs for your target system. >> >> Someone else will have to describe what that option is for. > > ?If you ask me, BR2_ROOTFS_SKELETON_CUSTOM_PATH is indeed useless and > should be deprecated. Although I'm not using it myself, I don't think this needs to be deprecated. I can imagine that there are users who have a significantly different skeleton that it would be a nuisance to have to tweak it from a script. Although we may recommend in the docs to use the post-build script + rootfs-additions, I would keep the custom option as well. Best regards, Thomas ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-29 7:41 ` Thomas De Schampheleire @ 2012-03-16 21:32 ` Peter Korsgaard 0 siblings, 0 replies; 16+ messages in thread From: Peter Korsgaard @ 2012-03-16 21:32 UTC (permalink / raw) To: buildroot >>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes: Hi, >> ?If you ask me, BR2_ROOTFS_SKELETON_CUSTOM_PATH is indeed useless and >> should be deprecated. Thomas> Although I'm not using it myself, I don't think this needs to be Thomas> deprecated. I can imagine that there are users who have a Thomas> significantly different skeleton that it would be a nuisance to have Thomas> to tweak it from a script. Thomas> Although we may recommend in the docs to use the post-build script + Thomas> rootfs-additions, I would keep the custom option as well. Agreed. It doesn't add much complexity to BR, and we've had it for a very long time, so chances are people are using it (E.G. I know some people at work do). -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] Where does post-build script belong? 2012-02-28 21:36 ` Grant Edwards 2012-02-28 22:06 ` Steve Calfee @ 2012-02-28 22:18 ` Arnout Vandecappelle 1 sibling, 0 replies; 16+ messages in thread From: Arnout Vandecappelle @ 2012-02-28 22:18 UTC (permalink / raw) To: buildroot On Tuesday 28 February 2012 21:36:15 Grant Edwards wrote: > On 2012-02-28, Steve Calfee <stevecalfee@gmail.com> wrote: > > On 02/28/2012 01:06 PM, Grant Edwards wrote: > >> On 2012-02-28, Arnout Vandecappelle<arnout@mind.be> wrote: > >>> On Tuesday 21 February 2012 14:54:47 Grant Edwards wrote: > >>> [snip] > >>>> I don't want to replace the default skeleton. I want to add some > >>>> files to it, and possible modify a few. The documentation describes > >>>> two ways to do that: > >>>> > >>>> 1) package/customize > >>>> > >>>> 2) post-build script > >>>> > >>>> I'm told 1) is now depricated, so I'm switching to 2). > >>>> > >>>> Where under board/mycompany/myproduct do you put "extra" files that > >>>> will be added to the standard skeleton? > >>> I put it in board/mycompany/myproduct/skeleton. Although > >>> rootfs-additions would be a better name than skeleton. > >> Ah, perhaps I've misunderstood what a custom skeleton was for the past > >> several years. I thought it was the basis for the filesystem. Is the > >> custom skeleton something that's _added_ on top of the default > >> skeleton rather than used in place of it? > >> > > Perhaps, but it is your script. If you want to completely replace the > > existing skeleton you can, but I think it makes more sense to just > > overlay new stuff on top of the default skeleton. > > I seem to be completely lost. Is board/mycompany/myproduct/skeleton > above a post-build script or a custom skelecton (something you set > BR2_ROOTFS_SKELETON_CUSTOM_PATH to point to)? The BR2_ROOTFS_SKELETON_CUSTOM_PATH is a real skeleton: it is copied to the target fs before anything else is done. It's called a skeleton because it's mostly empty directories (/proc, /sys, /mnt, /usr/bin, ...). There are a few files in /etc/ and /root as well. If you copy board/mycompany/myproduct/skeleton to the target in the post-build script, that will go over everything else, because the post-build script runs at the end. That's why I say it should be called rootfs-additions: it's added to the rootfs, it isn't the skeleton of the rootfs. The post-build script (BR2_ROOTFS_POST_BUILD_SCRIPT) is just a script; you have to add the command to copy it yourself. For one customer, for instance, I have: BR2_ROOTFS_POST_BUILD_SCRIPT=board/mycompany/myproduct/cp-skeleton.sh where cp-skeleton.sh contains: dir="$(dirname $0)"/skeleton if [ -d "$dir" ]; then rsync --exclude .svn --exclude '*~' -a "$dir"/* "$1" fi (indeed, this customer is using subversion :-) Ideally there should be a BR2_ROOTFS_ADDITIONS config option that does exactly that, but I haven't gotten around to implementing it yet. Regards, Arnout -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2012-03-16 21:32 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-02-20 20:41 [Buildroot] Where does post-build script belong? Grant Edwards 2012-02-20 21:00 ` J.C. Woltz 2012-02-20 21:45 ` Grant Edwards 2012-02-21 8:44 ` Luca Ceresoli 2012-02-21 14:54 ` Grant Edwards 2012-02-28 20:38 ` Arnout Vandecappelle 2012-02-28 21:06 ` Grant Edwards 2012-02-28 21:29 ` Steve Calfee 2012-02-28 21:36 ` Grant Edwards 2012-02-28 22:06 ` Steve Calfee 2012-02-28 22:18 ` Grant Edwards 2012-03-16 21:30 ` Peter Korsgaard 2012-02-28 22:19 ` Arnout Vandecappelle 2012-02-29 7:41 ` Thomas De Schampheleire 2012-03-16 21:32 ` Peter Korsgaard 2012-02-28 22:18 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox