questions about initial ramdisks and related stuff

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

 



  just trying to clarify some issues for a little HOWTO i'm writing,
so i'll start with some really fundamental questions:


* as i read it, the Kconfig variable CONFIG_BLK_DEV_INITRD entirely
  dictates whether you have any sort of initrd support whatsoever --
  that includes in-kernel cpio image, or any external initial ramdisk,
  right?  it seems pretty clear, but i just wanted to make sure i
  wasn't missing something subtle.


* in arch/x86/kernel/setup_32.c, you can see how, based on that
  Kconfig variable, the setup routine will access an external
  initrd image that was handed in by the boot loader:

  #ifdef CONFIG_BLK_DEV_INITRD
        if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) {
                unsigned long ramdisk_image = boot_params.hdr.ramdisk_image;
                unsigned long ramdisk_size  = boot_params.hdr.ramdisk_size;
                unsigned long ramdisk_end   = ramdisk_image + ramdisk_size;
  ...
  and will set initrd_start and initrd_end accordingly.  i'm guessing
  that, even if you don't select initrd support, the boot loader will
  still have loaded that information at those locations -- you just
  won't bother accessing it, is that correct?


* while CONFIG_BLK_DEV_INITRD identifies general initrd support, you
  still need to additionally select CONFIG_BLK_DEV_RAM if you want
  external initrd support that isn't just a compressed cpio image, but
  is instead a filesystem image (perhaps ext2).  right?


  that should do for now.

rday

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[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