All of lore.kernel.org
 help / color / mirror / Atom feed
* File system for alternate partition
@ 2014-06-23 11:59 Bollinger, Seth
  2014-06-23 12:38 ` Søren Holm
  0 siblings, 1 reply; 11+ messages in thread
From: Bollinger, Seth @ 2014-06-23 11:59 UTC (permalink / raw)
  To: yocto

Hello All,

I need to generate a new file system for an alternate partition (not rootfs).  What’s the best way to go about this?  I may need to create files with all different users/permission (perhaps root).  Do I need to use pseudo?  Are there any examples of this out there?

Thanks!

Seth


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

* Re: File system for alternate partition
  2014-06-23 11:59 File system for alternate partition Bollinger, Seth
@ 2014-06-23 12:38 ` Søren Holm
  2014-06-23 15:28   ` Bollinger, Seth
  0 siblings, 1 reply; 11+ messages in thread
From: Søren Holm @ 2014-06-23 12:38 UTC (permalink / raw)
  To: yocto; +Cc: Bollinger, Seth

Hi

Make bitbake give you a tar.bz2 and then create the partitions etc. yourself 
using an additional script. Wether it could be integrate I do not know.

Mandag den 23. juni 2014 11:59:30 skrev Bollinger, Seth:
> Hello All,
> 
> I need to generate a new file system for an alternate partition (not
> rootfs).  What’s the best way to go about this?  I may need to create files
> with all different users/permission (perhaps root).  Do I need to use
> pseudo?  Are there any examples of this out there?
> 

-- 
Søren Holm


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

* Re: File system for alternate partition
  2014-06-23 12:38 ` Søren Holm
@ 2014-06-23 15:28   ` Bollinger, Seth
  2014-06-24 17:09     ` Bollinger, Seth
  0 siblings, 1 reply; 11+ messages in thread
From: Bollinger, Seth @ 2014-06-23 15:28 UTC (permalink / raw)
  To: Søren Holm, yocto


>Make bitbake give you a tar.bz2 and then create the partitions etc.
>yourself 
>using an additional script. Wether it could be integrate I do not know.

I guess I didn¹t think about using a full image as I would need to remove
a bunch of stuff, but maybe that is the best way.  That way I can keep the
flexibility of defining recipes that would be installed to my data
partition image.  I will give it a try.

Seth



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

* Re: File system for alternate partition
  2014-06-23 15:28   ` Bollinger, Seth
@ 2014-06-24 17:09     ` Bollinger, Seth
  2014-06-25 10:39       ` Paul Eggleton
  0 siblings, 1 reply; 11+ messages in thread
From: Bollinger, Seth @ 2014-06-24 17:09 UTC (permalink / raw)
  To: Søren Holm, yocto


>I guess I didn¹t think about using a full image as I would need to remove
>a bunch of stuff, but maybe that is the best way.  That way I can keep the
>flexibility of defining recipes that would be installed to my data
>partition image.  I will give it a try.

So I created an empty image without any packages being added.  As I
suspected, there’s cruft that I don’t really need in the FS.  What’s the
best way to remove these, post processing?

data-image-base/1.0-r0/rootfs/
├── etc
│   └── rcS.d
├── lib
│   └── modules
│       └── 3.10.16-dey+gf167640
└── var
    └── lib
        └── opkg

Thanks,

Seth




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

* Re: File system for alternate partition
  2014-06-24 17:09     ` Bollinger, Seth
@ 2014-06-25 10:39       ` Paul Eggleton
  2014-06-25 12:58         ` Bollinger, Seth
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Eggleton @ 2014-06-25 10:39 UTC (permalink / raw)
  To: Bollinger, Seth; +Cc: yocto

On Tuesday 24 June 2014 17:09:29 Bollinger, Seth wrote:
> >I guess I didn¹t think about using a full image as I would need to remove
> >a bunch of stuff, but maybe that is the best way.  That way I can keep the
> >flexibility of defining recipes that would be installed to my data
> >partition image.  I will give it a try.
> 
> 
> So I created an empty image without any packages being added.  As I
> suspected, there’s cruft that I don’t really need in the FS.  What’s the
> best way to remove these, post processing?
> 
> data-image-base/1.0-r0/rootfs/
> ├── etc
> │   └── rcS.d
> ├── lib
> │   └── modules
> │       └── 3.10.16-dey+gf167640
> └── var
>     └── lib
>         └── opkg

You could just delete these within a function added to 
ROOTFS_POSTPROCESS_COMMAND, and that's probably the way to deal with it for 
now; however for the future I do think the build system ought to be able to 
clean these files up itself if they aren't supposed to be there. I've created a 
bug to track the issue:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=6478

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: File system for alternate partition
  2014-06-25 10:39       ` Paul Eggleton
@ 2014-06-25 12:58         ` Bollinger, Seth
  2014-06-25 13:33           ` Bollinger, Seth
  0 siblings, 1 reply; 11+ messages in thread
From: Bollinger, Seth @ 2014-06-25 12:58 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto


>You could just delete these within a function added to
>ROOTFS_POSTPROCESS_COMMAND, and that's probably the way to deal with it
>for 
>now; however for the future I do think the build system ought to be able
>to 
>clean these files up itself if they aren't supposed to be there. I've
>created a 
>bug to track the issue:
>
>https://bugzilla.yoctoproject.org/show_bug.cgi?id=6478

It looks like the POSTPROCESS commands are run too early.  Subsequent
actions depend on that directory structure (pre-linking, etc.).  It looks
like I would need some way to hook _cleanup() in the RootFS subclass.

Seth



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

* Re: File system for alternate partition
  2014-06-25 12:58         ` Bollinger, Seth
@ 2014-06-25 13:33           ` Bollinger, Seth
  2014-06-25 14:12             ` Paul Eggleton
  0 siblings, 1 reply; 11+ messages in thread
From: Bollinger, Seth @ 2014-06-25 13:33 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto


>It looks like the POSTPROCESS commands are run too early.  Subsequent
>actions depend on that directory structure (pre-linking, etc.).  It looks
>like I would need some way to hook _cleanup() in the RootFS subclass.

Actually scratch the above comment.  I wasn¹t reading the log spew
correctly.  The problem comes in at the image process.  So, I was able to
add an IMAGE_POSTPROCESS_COMMAND and that works.

Thanks!

Seth



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

* Re: File system for alternate partition
  2014-06-25 13:33           ` Bollinger, Seth
@ 2014-06-25 14:12             ` Paul Eggleton
  2014-06-25 15:22               ` Bollinger, Seth
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Eggleton @ 2014-06-25 14:12 UTC (permalink / raw)
  To: Bollinger, Seth; +Cc: yocto

On Wednesday 25 June 2014 13:33:46 Bollinger, Seth wrote:
> >It looks like the POSTPROCESS commands are run too early.  Subsequent
> >actions depend on that directory structure (pre-linking, etc.).  It looks
> >like I would need some way to hook _cleanup() in the RootFS subclass.
> 
> Actually scratch the above comment.  I wasn¹t reading the log spew
> correctly.  The problem comes in at the image process.  So, I was able to
> add an IMAGE_POSTPROCESS_COMMAND and that works.

Are you sure? IMAGE_POSTPROCESS_COMMAND runs after all of the image files have 
been created; at that time, the contents of the image has already been 
compressed or otherwise combined into the final output file(s), so I would think 
that would be too late to modify the contents.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: File system for alternate partition
  2014-06-25 14:12             ` Paul Eggleton
@ 2014-06-25 15:22               ` Bollinger, Seth
  2014-06-25 15:35                 ` Paul Eggleton
  0 siblings, 1 reply; 11+ messages in thread
From: Bollinger, Seth @ 2014-06-25 15:22 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto


>Are you sure? IMAGE_POSTPROCESS_COMMAND runs after all of the image files
>have 
>been created; at that time, the contents of the image has already been
>compressed or otherwise combined into the final output file(s), so I
>would think 
>that would be too late to modify the contents.

I just unzipped the bz2 and most dirs were removed, only /var/lib/opkg
remains.  Is there any workaround for this, or should I wait for the bug
fix?

Seth



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

* Re: File system for alternate partition
  2014-06-25 15:22               ` Bollinger, Seth
@ 2014-06-25 15:35                 ` Paul Eggleton
  2014-07-09 13:57                   ` Bollinger, Seth
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Eggleton @ 2014-06-25 15:35 UTC (permalink / raw)
  To: Bollinger, Seth; +Cc: yocto

On Wednesday 25 June 2014 15:22:29 Bollinger, Seth wrote:
> >Are you sure? IMAGE_POSTPROCESS_COMMAND runs after all of the image files
> >have
> >been created; at that time, the contents of the image has already been
> >compressed or otherwise combined into the final output file(s), so I
> >would think
> >that would be too late to modify the contents.
> 
> I just unzipped the bz2 and most dirs were removed, only /var/lib/opkg
> remains.  Is there any workaround for this, or should I wait for the bug
> fix?

I'm not sure without digging into it further (which I'm unable to do at the 
moment, perhaps someone else can.)

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: File system for alternate partition
  2014-06-25 15:35                 ` Paul Eggleton
@ 2014-07-09 13:57                   ` Bollinger, Seth
  0 siblings, 0 replies; 11+ messages in thread
From: Bollinger, Seth @ 2014-07-09 13:57 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto


>I'm not sure without digging into it further (which I'm unable to do at
>the 
>moment, perhaps someone else can.)

Just as an FYI for anyone who might find this thread interesting, I fixed
the problem by adding another hook into poky/lib/oe/image.py before the
IMAGE_CMD hook.

It defaults to doing nothing, but can be overridden by image recipes to
remove directories that have no value for the particular image.

diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index c9b9033..c74821f 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -274,6 +274,7 @@ class Image(ImageDepGraph):
                 bb.data.update_data(localdata)
                 localdata.setVar('type', type)
 
+                cmds.append("\t" + (localdata.getVar("IMAGE_CLEAN_FS",
True) or ""))
                 cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
                 cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))


Seth



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

end of thread, other threads:[~2014-07-09 13:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-23 11:59 File system for alternate partition Bollinger, Seth
2014-06-23 12:38 ` Søren Holm
2014-06-23 15:28   ` Bollinger, Seth
2014-06-24 17:09     ` Bollinger, Seth
2014-06-25 10:39       ` Paul Eggleton
2014-06-25 12:58         ` Bollinger, Seth
2014-06-25 13:33           ` Bollinger, Seth
2014-06-25 14:12             ` Paul Eggleton
2014-06-25 15:22               ` Bollinger, Seth
2014-06-25 15:35                 ` Paul Eggleton
2014-07-09 13:57                   ` Bollinger, Seth

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.