Re: what is "unpack_to_rootfs()" unpacking, and where is it putting it?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 6 Aug 2008, Thomas Petazzoni wrote:

> Hi Robert,
>
> Le Tue, 5 Aug 2008 18:28:00 -0400 (EDT),
> "Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx> a écrit :
>
> >   this code is particularly ugly because this file includes the
> > source file lib/inflate.c, then promptly uses a plethora of global
> > variables to get things done.  yeesh.
>
> Yes, the way to interact with lib/inflate.c is ugly. I have ~10
> patches from Matt Mackall here that clean up lib/inflate.c quite a
> lot and turn it into something that at least looks sane from the
> outside. I need to update these patches and send them. Probably not
> the coming days, but hopefully by the end of the month.

excellent.  but if you have the time, i'd still like to know what the
purpose of unpack_to_rootfs() is.  that is, what *precisely* do you
get out of it?

as i read it, it initially attempts to "unpack" the internal initramfs
image, which i'm fairly sure is a gzipped cpio image, right?
therefore, and based on logical deduction, i'm assuming that
unpack_to_rootfs() will:

1) gunzip the image, and
2) run something like "cpio -it" to un-cpio the content to the root

is that what's happening?  and if it is, where is that cpio step being
run?  i don't see it in that early kernel code, but maybe i just
missed it.

rday
--


========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux