* [Buildroot] makedevs and symbolic links @ 2013-02-06 16:17 Aras Vaichas 2013-02-06 16:26 ` Thomas Petazzoni 0 siblings, 1 reply; 10+ messages in thread From: Aras Vaichas @ 2013-02-06 16:17 UTC (permalink / raw) To: buildroot I use Buildroot with my own custom root fs skeleton. My skeleton contains a few symbolic links that I'd like to move out either into the BR2_ROOTFS_POST_BUILD_SCRIPT or somewhere else. makedevs seemed logical but it doesn't support symbolic link creation. Is there a reason for this? Would it be useful to add it? Aras -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130206/d9f9abbf/attachment.html> ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] makedevs and symbolic links 2013-02-06 16:17 [Buildroot] makedevs and symbolic links Aras Vaichas @ 2013-02-06 16:26 ` Thomas Petazzoni 2013-02-06 16:50 ` Aras Vaichas 0 siblings, 1 reply; 10+ messages in thread From: Thomas Petazzoni @ 2013-02-06 16:26 UTC (permalink / raw) To: buildroot Dear Aras Vaichas, On Wed, 6 Feb 2013 16:17:26 +0000, Aras Vaichas wrote: > I use Buildroot with my own custom root fs skeleton. My skeleton contains a > few symbolic links that I'd like to move out either into > the BR2_ROOTFS_POST_BUILD_SCRIPT or somewhere else. > > makedevs seemed logical but it doesn't support symbolic link creation. > > Is there a reason for this? > > Would it be useful to add it? From my point of view, makedevs is here to do the things you can't do without being root: create device nodes and adjust ownership. Symbolic links can be created as non-root in a post-build script for example, so I'm not sure there's really a need to have support for symbolic links in makedevs. Or maybe I'm missing the point? Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] makedevs and symbolic links 2013-02-06 16:26 ` Thomas Petazzoni @ 2013-02-06 16:50 ` Aras Vaichas 2013-02-06 16:57 ` Thomas Petazzoni 0 siblings, 1 reply; 10+ messages in thread From: Aras Vaichas @ 2013-02-06 16:50 UTC (permalink / raw) To: buildroot On 6 February 2013 16:26, Thomas Petazzoni < thomas.petazzoni@free-electrons.com> wrote: > Dear Aras Vaichas, > > On Wed, 6 Feb 2013 16:17:26 +0000, Aras Vaichas wrote: > > I use Buildroot with my own custom root fs skeleton. My skeleton > contains a > > few symbolic links that I'd like to move out either into > > the BR2_ROOTFS_POST_BUILD_SCRIPT or somewhere else. > > > > makedevs seemed logical but it doesn't support symbolic link creation. > > > > Is there a reason for this? > > > > Would it be useful to add it? > > From my point of view, makedevs is here to do the things you can't do > without being root: create device nodes and adjust ownership. > > Symbolic links can be created as non-root in a post-build script for > example, so I'm not sure there's really a need to have support for > symbolic links in makedevs. > > Or maybe I'm missing the point? > Hi Thomas, I understand that it doesn't make sense if you approach it from a non-root user point of view. From a maintenance point of view, it's a "nice to have" if the creation of the root fs can be defined in as few places as possible. I like how makedevs works because I can look at a single file and I see a nice list of all the files in my system. Ideally it would be great if I could remove my skeleton/ directory and put everything into the BR2_ROOTFS_DEVICE_TABLE file. makedevs currently creates regular files, directories, char dev files, block dev files, and fifos. Adding symbolic links would make it "feature complete". regards, Aras -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130206/8730bcef/attachment.html> ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] makedevs and symbolic links 2013-02-06 16:50 ` Aras Vaichas @ 2013-02-06 16:57 ` Thomas Petazzoni 2013-02-07 10:14 ` Aras Vaichas 0 siblings, 1 reply; 10+ messages in thread From: Thomas Petazzoni @ 2013-02-06 16:57 UTC (permalink / raw) To: buildroot Dear Aras Vaichas, On Wed, 6 Feb 2013 16:50:37 +0000, Aras Vaichas wrote: > I understand that it doesn't make sense if you approach it from a non-root > user point of view. > > From a maintenance point of view, it's a "nice to have" if the creation of > the root fs can be defined in as few places as possible. I like how > makedevs works because I can look at a single file and I see a nice list of > all the files in my system. Ideally it would be great if I could remove my > skeleton/ directory and put everything into the BR2_ROOTFS_DEVICE_TABLE > file. I don't see how this would be possible. The skeleton have files with contents in them. makedevs doesn't allow to create a /etc/inittab that contains something, a /etc/passwd that contains something, etc. The current design is really: * We have a base skeleton in system/skeleton that generally never needs to be modified. The base system/device_table.txt and system/device_table_dev.txt take care of setting the appropriate permissions/ownerships on the files part of the base skeleton. * For each project, we encourage people to create a rootfs overlay in board/<company>/<project>/rootfs-overlay/, where they can add their specific configuration files, symbolic links and so on. And a project-specific device table in board/<company>/<project>/device_table.txt sets the appropriate owernship for the files part of the rootfs-overlay. I think a real filesystem view (be it in the skeleton or in the overlay) is much nicer to look at and modify than the device table. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] makedevs and symbolic links 2013-02-06 16:57 ` Thomas Petazzoni @ 2013-02-07 10:14 ` Aras Vaichas 2013-02-07 10:43 ` Thomas Petazzoni ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Aras Vaichas @ 2013-02-07 10:14 UTC (permalink / raw) To: buildroot On 6 February 2013 16:57, Thomas Petazzoni < thomas.petazzoni@free-electrons.com> wrote: > The current design is really: > > * We have a base skeleton in system/skeleton that generally never > needs to be modified. The base system/device_table.txt and > system/device_table_dev.txt take care of setting the appropriate > permissions/ownerships on the files part of the base skeleton. > > * For each project, we encourage people to create a rootfs overlay in > board/<company>/<project>/rootfs-overlay/, where they can add their > specific configuration files, symbolic links and so on. And a > project-specific device table in > board/<company>/<project>/device_table.txt sets the appropriate > owernship for the files part of the rootfs-overlay. > Aaah, I don't have that version of Buildroot. I'm using 2012.11. I can see from the mailing lists now that patches were added for the "rootfs-overlay". I might have to leave that until it's in the stable release. I'm currently documenting how to use Buildroot for my employer (a company with almost zero Linux knowledge) on their hardware, so I'd rather stick to official release versions for now. I can update my documentation later. My current employer wants me to put my Buildroot configuration into their version control system (MKS). So I am looking at ways that I can avoid using empty directories and symbolic links to make it diff and MKS friendly. I guess there's no getting around using multiple files and scripts to achieve this. Crazy idea: If only patch/diff handled empty directories, symlinks, devices, permissions and ownerships. Then it could be done entirely in a single file that would be 100% friendly in all cases on all operating systems. Thanks! regards Aras Vaichas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130207/36b694d7/attachment-0001.html> ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] makedevs and symbolic links 2013-02-07 10:14 ` Aras Vaichas @ 2013-02-07 10:43 ` Thomas Petazzoni 2013-02-07 17:14 ` Arnout Vandecappelle 2013-02-07 21:58 ` [Buildroot] [PATCH] rootfs-overlay: also exclude .empty files Arnout Vandecappelle 2 siblings, 0 replies; 10+ messages in thread From: Thomas Petazzoni @ 2013-02-07 10:43 UTC (permalink / raw) To: buildroot Dear Aras Vaichas, On Thu, 7 Feb 2013 10:14:18 +0000, Aras Vaichas wrote: > Aaah, I don't have that version of Buildroot. I'm using 2012.11. I can see > from the mailing lists now that patches were added for the "rootfs-overlay". This new "rootfs-overlay" thing is really just a little sugar. You can already do this "rootfs-overlay" by copying board/<company>/<project>/rootfs-overlay/* to $(TARGET_DIR) in your custom post-build script. I've been doing that for 2+ years. > I might have to leave that until it's in the stable release. I'm currently > documenting how to use Buildroot for my employer (a company with almost > zero Linux knowledge) on their hardware, so I'd rather stick to official > release versions for now. I can update my documentation later. > > My current employer wants me to put my Buildroot configuration into their > version control system (MKS). So I am looking at ways that I can avoid > using empty directories and symbolic links to make it diff and MKS > friendly. I guess there's no getting around using multiple files and > scripts to achieve this. > > Crazy idea: If only patch/diff handled empty directories, symlinks, > devices, permissions and ownerships. Then it could be done entirely in a > single file that would be 100% friendly in all cases on all operating > systems. It is not possible: you can't create device files without being root, and you can't change ownership without being root. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] makedevs and symbolic links 2013-02-07 10:14 ` Aras Vaichas 2013-02-07 10:43 ` Thomas Petazzoni @ 2013-02-07 17:14 ` Arnout Vandecappelle 2013-02-07 21:58 ` [Buildroot] [PATCH] rootfs-overlay: also exclude .empty files Arnout Vandecappelle 2 siblings, 0 replies; 10+ messages in thread From: Arnout Vandecappelle @ 2013-02-07 17:14 UTC (permalink / raw) To: buildroot On 07/02/13 11:14, Aras Vaichas wrote: > My current employer wants me to put my Buildroot configuration into their > version control system (MKS). So I am looking at ways that I can avoid > using empty directories and symbolic links to make it diff and MKS > friendly. I guess there's no getting around using multiple files and > scripts to achieve this. Empty directories, I forgot about that! Patch coming up. It excludes the .empty files, so that you can create an empty directory in your VCS by populating it with a '.empty' file. We use the same trick in the skeleton (git doesn't support empty directories either). For symlinks, I don't see a reason to add a workaround in buildroot. A VCS that doesn't have symlinks is broken. I have a customer who uses CVS, and their workaround is to put the overlay in a tar file and extract it before building. Regards, Arnout -- 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] rootfs-overlay: also exclude .empty files 2013-02-07 10:14 ` Aras Vaichas 2013-02-07 10:43 ` Thomas Petazzoni 2013-02-07 17:14 ` Arnout Vandecappelle @ 2013-02-07 21:58 ` Arnout Vandecappelle 2013-02-08 5:15 ` Samuel Martin 2013-02-08 21:18 ` Peter Korsgaard 2 siblings, 2 replies; 10+ messages in thread From: Arnout Vandecappelle @ 2013-02-07 21:58 UTC (permalink / raw) To: buildroot From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> This makes it possible to put empty directories in the overlay. Thanks to Aras Vaichas for pointing that out. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> --- Makefile | 3 ++- docs/manual/customize-rootfs.txt | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d9e5f24..b50c4ed 100644 --- a/Makefile +++ b/Makefile @@ -504,7 +504,8 @@ endif @for dir in $(call qstrip,$(BR2_ROOTFS_OVERLAY)); do \ $(call MESSAGE,"Copying overlay $${dir}"); \ rsync -a \ - --exclude .svn --exclude .git --exclude .hg --exclude '*~' \ + --exclude .empty --exclude .svn --exclude .git \ + --exclude .hg --exclude '*~' \ $${dir}/ $(TARGET_DIR); \ done diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt index fa04d85..1a47d7e 100644 --- a/docs/manual/customize-rootfs.txt +++ b/docs/manual/customize-rootfs.txt @@ -26,8 +26,8 @@ there are a few ways to customize the resulting target filesystem. * Create a filesystem overlay: a tree of files that are copied directly over the target filesystem after it has been built. Set - +BR2_ROOTFS_OVERLAY+ to the top of the tree. +.git+, +.svn+, - +.hg+ directories and files ending with +~+ are excluded. + +BR2_ROOTFS_OVERLAY+ to the top of the tree. +.git+, +.svn+, +.hg+ + directories, +.empty+ files and files ending with +~+ are excluded. _Among these first 3 methods, this one should be preferred_. * In the Buildroot configuration, you can specify the path to a -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] rootfs-overlay: also exclude .empty files 2013-02-07 21:58 ` [Buildroot] [PATCH] rootfs-overlay: also exclude .empty files Arnout Vandecappelle @ 2013-02-08 5:15 ` Samuel Martin 2013-02-08 21:18 ` Peter Korsgaard 1 sibling, 0 replies; 10+ messages in thread From: Samuel Martin @ 2013-02-08 5:15 UTC (permalink / raw) To: buildroot 2013/2/7 Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>: > From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> > > This makes it possible to put empty directories in the overlay. > Thanks to Aras Vaichas for pointing that out. > > Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Acked-by: Samuel Martin <s.martin49@gmail.com> -- Samuel ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] rootfs-overlay: also exclude .empty files 2013-02-07 21:58 ` [Buildroot] [PATCH] rootfs-overlay: also exclude .empty files Arnout Vandecappelle 2013-02-08 5:15 ` Samuel Martin @ 2013-02-08 21:18 ` Peter Korsgaard 1 sibling, 0 replies; 10+ messages in thread From: Peter Korsgaard @ 2013-02-08 21:18 UTC (permalink / raw) To: buildroot >>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes: Arnout> From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> Arnout> This makes it possible to put empty directories in the overlay. Arnout> Thanks to Aras Vaichas for pointing that out. Committed, thanks. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-02-08 21:18 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-02-06 16:17 [Buildroot] makedevs and symbolic links Aras Vaichas 2013-02-06 16:26 ` Thomas Petazzoni 2013-02-06 16:50 ` Aras Vaichas 2013-02-06 16:57 ` Thomas Petazzoni 2013-02-07 10:14 ` Aras Vaichas 2013-02-07 10:43 ` Thomas Petazzoni 2013-02-07 17:14 ` Arnout Vandecappelle 2013-02-07 21:58 ` [Buildroot] [PATCH] rootfs-overlay: also exclude .empty files Arnout Vandecappelle 2013-02-08 5:15 ` Samuel Martin 2013-02-08 21:18 ` Peter Korsgaard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox