Skip to contentSkip to conversation

initramfs buffer spec -- third draft

DISCUSSION Norbert Kiesel 3 participants 4 messages Jan 13, 2002 – Jan 14, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines · H. Peter Anvin

initramfs buffer format
-----------------------

Al Viro, H. Peter Anvin
Last revision: 2002-01-13

** DRAFT ** DRAFT ** DRAFT ** DRAFT ** DRAFT ** DRAFT **

.....

Quoted 8 lines

The full format of the initramfs buffer is defined by the following grammar, where:
* is used to indicate "0 or more occurrences of"
(|) indicates alternatives
+ indicates concatenation
GZIP() indicates the gzip(1) of the operand
ALGN(n) means padding with null bytes to an n-byte boundary

Quoted 7 lines

initramfs := ("\0" | cpio_archive | cpio_gzip_archive)*

cpio_gzip_archive := GZIP(cpio_archive)

cpio_archive := cpio_file* + (<nothing> | cpio_trailer)

   cpio_file := ALGN(4) + cpio_header + filename + "\0" + ALGN(4) +

data

Quoted 2 lines
   cpio_trailer := ALGN(4) + cpio_header + "TRAILER!!!\0" + ALGN(4)

what's the purpose of the "*" behind cpio_file in the cpio_archive definition? There is already repetition in the initramfs and the "*" behind cpio_archive would e.g. allow a sequence of cpio_trailers without any cpio_file inbetween.

--nk

Signature · 1 line
Key fingerprint = 6C58 F18D 4747 3295 F2DB  15C1 3882 4302 F8B4 C11C
#1 lore raw
Followup to:  <1010958148.8691.0.camel@voyager>
By author:    Norbert Kiesel <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 32 lines

--=-9GEMJ19dnS3OnVEuQ1tM
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Quoted 7 lines · H. Peter Anvin

initramfs buffer format
-----------------------

Al Viro, H. Peter Anvin
Last revision: 2002-01-13

** DRAFT ** DRAFT ** DRAFT ** DRAFT ** DRAFT ** DRAFT **

.....

Quoted 8 lines

The full format of the initramfs buffer is defined by the following grammar, where:
* is used to indicate "0 or more occurrences of"
(|) indicates alternatives
+ indicates concatenation
GZIP() indicates the gzip(1) of the operand
ALGN(n) means padding with null bytes to an n-byte boundary

Quoted 7 lines

initramfs :=3D ("\0" | cpio_archive | cpio_gzip_archive)*

cpio_gzip_archive :=3D GZIP(cpio_archive)

cpio_archive :=3D cpio_file* + (<nothing> | cpio_trailer)

   cpio_file :=3D ALGN(4) + cpio_header + filename + "\0" + ALGN(4) +

data

Quoted 1 line
Quoted 8 lines
Quoted 1 line
   cpio_trailer :=3D ALGN(4) + cpio_header + "TRAILER!!!\0" + ALGN(4)

what's the purpose of the "*" behind cpio_file in the cpio_archive definition? There is already repetition in the initramfs and the "*" behind cpio_archive would e.g. allow a sequence of cpio_trailers without any cpio_file inbetween.

Allow GZIP(cpio_file* + cpio_trailer), which is in fact a very common configuration.

-hpa

Signature · 3 lines
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<[email protected]>
#2 lore raw
In reply to Norbert Kiesel
Quoted 6 lines · H. Peter Anvin
Quoted 3 lines
Quoted 3 lines

initramfs :=3D ("\0" | cpio_archive | cpio_gzip_archive)*

cpio_gzip_archive :=3D GZIP(cpio_archive)

Allow GZIP(cpio_file* + cpio_trailer), which is in fact a very common configuration.

So, just to clarify, if you have multiple cpio archives concatenated, they are gzipped separately before concatenation, or gzipped after concatenation?

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

#3 lore raw
In reply to Norbert Kiesel
Quoted 5 lines · Andreas Dilger

So, just to clarify, if you have multiple cpio archives concatenated, they are gzipped separately before concatenation, or gzipped after concatenation?

gzipped before concatenation.

-hpa