mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Setting custom PTXDIST_TEMPDIR for large image gen?
@ 2013-04-09 15:49 Dennis.Herbrich
  2013-04-09 18:55 ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Dennis.Herbrich @ 2013-04-09 15:49 UTC (permalink / raw)
  To: ptxdist

Greetings!

I configured ptxdist 2013.03.0 to generate a rather large (8GB) hd.img for 
me,
but genext2fs fails:

Creating root.ext2 from working 
dir.../home/herbrich/AEOS2/platform-evoc-x86/sysroot-host/bin/genext2fs: 
couldn't allocate a block (no free space)
make: *** [/home/herbrich/AEOS2/platform-evoc-x86/images/root.ext2] Error 
1

Since I had 30+GB free space in my TOPDIR, I went into the lurking depths 
of
ptxdist and discovered what looked like a hardcoded setting of 
PTXDIST_TEMPDIR
in the setup_libs_early() function of ptxdist itself:

#
# source the scripts we need
#
# we need the PTXdist shell library
# we need the version definitions
# we need the static variable definitions
#
# out: "ptxd_*"         library calls
#      "*"              ptxdist version variables
#      "*DIR"           directory definitions (some not correct, due to 
missing PTXDIST_PLATFORMDIR)
#      PTXDIST_TEMPDIR  generic ptxdist temp dir
#
setup_libs_early() {
        local file abs_file

        for file in \
                scripts/ptxdist_vars.sh \
                scripts/libptxdist.sh \
        ; do
                abs_file="${PTXDIST_TOPDIR}/${file}"
                if [ -e "${abs_file}" ]; then
                        source "${abs_file}" || return
                else
                        echo "${PTXDIST_LOG_PROMPT}FATAL didn't find 
${abs_file}"
                        exit 1
                fi
        done

        PTXDIST_TEMPDIR="$(mktemp -d /tmp/ptxdist.XXXXXX)"
        if [ ${?} -ne 0 ]; then
                echo
                echo "${PTXDIST_LOG_PROMPT}error: unable to create 
tempdir"
                echo
                exit 1
        fi
}

Unfortunately I don't have 8+GB of RAM+swap handy, and I failed to find a 
way to
cleanly set this variable to a location on my HDD. In retrospect I'm glad 
that
kernel compilation didn't (yet) die on me with my limited /tmp ramdisk 
space!

So, I guess my questions are:
1. How can I reliably generate a large-ish hd.img with limited /tmp space?
2. How can I set a different PTXDIST_TEMPDIR?

I am not inclined to accept "Dude, ptxdist is for embedded systems, create 
a
smaller image already!" as an answer, though, sorry. ;)

Thanks a lot!
Dennis Herbrich

Hytera Mobilfunk GmbH
Fritz-Hahne-Str. 7
31848 Bad Münder/ Germany
Abteilung E

Tel.: + 49 (0) 5042 998 339
Fax: + 49 (0) 5042 998 305
mailto:dennis.herbrich@hytera.de

------------------------------------------------------------
Geschäftsführer / President:  Matthias Klausing,  Sitz der Gesellschaft / 
Company's Place of Business: Bad Muender,  Registereintrag / Commercial 
Register No.  Amtsgericht / Local Court Hannover: HRB  100300, 
Umsatzsteuer-Identifikationsnummer (USt-IdNr.) / VAT Identification No.: 
DE 115 447 987,  Elektro-Altgeräte Register (EAR) / WEEE Register No.: DE 
187 048 87

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Setting custom PTXDIST_TEMPDIR for large image gen?
  2013-04-09 15:49 [ptxdist] Setting custom PTXDIST_TEMPDIR for large image gen? Dennis.Herbrich
@ 2013-04-09 18:55 ` Michael Olbrich
  2013-04-09 19:07   ` Erwin Rol
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2013-04-09 18:55 UTC (permalink / raw)
  To: ptxdist

Hi,

On Tue, Apr 09, 2013 at 05:49:11PM +0200, Dennis.Herbrich@hytera.de wrote:
> I configured ptxdist 2013.03.0 to generate a rather large (8GB) hd.img for 
> me,
> but genext2fs fails:
> 
> Creating root.ext2 from working 
> dir.../home/herbrich/AEOS2/platform-evoc-x86/sysroot-host/bin/genext2fs: 
> couldn't allocate a block (no free space)
> make: *** [/home/herbrich/AEOS2/platform-evoc-x86/images/root.ext2] Error 
> 1
> 
> Since I had 30+GB free space in my TOPDIR, I went into the lurking depths 
> of
> ptxdist and discovered what looked like a hardcoded setting of 
> PTXDIST_TEMPDIR
> in the setup_libs_early() function of ptxdist itself:
[...]
> Unfortunately I don't have 8+GB of RAM+swap handy, and I failed to find a 
> way to
> cleanly set this variable to a location on my HDD. In retrospect I'm glad 
> that
> kernel compilation didn't (yet) die on me with my limited /tmp ramdisk 
> space!
> 
> So, I guess my questions are:
> 1. How can I reliably generate a large-ish hd.img with limited /tmp space?
> 2. How can I set a different PTXDIST_TEMPDIR?
> 
> I am not inclined to accept "Dude, ptxdist is for embedded systems, create 
> a
> smaller image already!" as an answer, though, sorry. ;)

This has nothing to do with PTXDIST_TEMPDIR. The images are all created in
platform-XXX/images/. The error means, that the specified size of the
ext2fs (as defined in the platformconfig) is too small.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Setting custom PTXDIST_TEMPDIR for large image gen?
  2013-04-09 18:55 ` Michael Olbrich
@ 2013-04-09 19:07   ` Erwin Rol
  2013-04-10  5:47     ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Erwin Rol @ 2013-04-09 19:07 UTC (permalink / raw)
  To: ptxdist

Hey ,

On 9-4-2013 20:55, Michael Olbrich wrote:
> Hi,
> 
> On Tue, Apr 09, 2013 at 05:49:11PM +0200, Dennis.Herbrich@hytera.de wrote:
>> I configured ptxdist 2013.03.0 to generate a rather large (8GB) hd.img for 
>> me,
>> but genext2fs fails:

Last time I tried to use genext2fs it was not capable of generating
images larger than 2G (or was it 4G), cause I also needed 8G.

- Erwin



-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Setting custom PTXDIST_TEMPDIR for large image gen?
  2013-04-09 19:07   ` Erwin Rol
@ 2013-04-10  5:47     ` Michael Olbrich
  2013-04-10  5:55       ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2013-04-10  5:47 UTC (permalink / raw)
  To: ptxdist

On Tue, Apr 09, 2013 at 09:07:57PM +0200, Erwin Rol wrote:
> On 9-4-2013 20:55, Michael Olbrich wrote:
> > On Tue, Apr 09, 2013 at 05:49:11PM +0200, Dennis.Herbrich@hytera.de wrote:
> >> I configured ptxdist 2013.03.0 to generate a rather large (8GB) hd.img for 
> >> me,
> >> but genext2fs fails:
> 
> Last time I tried to use genext2fs it was not capable of generating
> images larger than 2G (or was it 4G), cause I also needed 8G.

On a 32bit host system? Probably 2.xG. genext2fs seems to map the whole
Image, so the limit is you're virtual address space. Hmm, I tried a 6G
image here. I could create it, but it seems to be broken.
Why would you need such a large image anyways? Unless you have that much
contents initially, starting smaller and running resize2fs when booting for
the first time is better.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Setting custom PTXDIST_TEMPDIR for large image gen?
  2013-04-10  5:47     ` Michael Olbrich
@ 2013-04-10  5:55       ` Michael Olbrich
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2013-04-10  5:55 UTC (permalink / raw)
  To: ptxdist

On Wed, Apr 10, 2013 at 07:47:45AM +0200, Michael Olbrich wrote:
> On Tue, Apr 09, 2013 at 09:07:57PM +0200, Erwin Rol wrote:
> > On 9-4-2013 20:55, Michael Olbrich wrote:
> > > On Tue, Apr 09, 2013 at 05:49:11PM +0200, Dennis.Herbrich@hytera.de wrote:
> > >> I configured ptxdist 2013.03.0 to generate a rather large (8GB) hd.img for 
> > >> me,
> > >> but genext2fs fails:
> > 
> > Last time I tried to use genext2fs it was not capable of generating
> > images larger than 2G (or was it 4G), cause I also needed 8G.
> 
> On a 32bit host system? Probably 2.xG. genext2fs seems to map the whole
> Image, so the limit is you're virtual address space. Hmm, I tried a 6G
> image here. I could create it, but it seems to be broken.
> Why would you need such a large image anyways? Unless you have that much
> contents initially, starting smaller and running resize2fs when booting for
> the first time is better.

Btw, if you know any good alternative for genext2fs then I'd be happy to
hear about it. I know there are limitations. genext2fs cannot create ext4
images, so we can't take advantage of the new features for the initial
files. I don't know if there is a performance impact here. And so far I
have found no way to add extended attributes.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2013-04-10  5:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-09 15:49 [ptxdist] Setting custom PTXDIST_TEMPDIR for large image gen? Dennis.Herbrich
2013-04-09 18:55 ` Michael Olbrich
2013-04-09 19:07   ` Erwin Rol
2013-04-10  5:47     ` Michael Olbrich
2013-04-10  5:55       ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox