1. 13 4月, 2007 2 次提交
    • D
      [POWERPC] Clean up zImage handling of the command line · 3af82a8b
      David Gibson 提交于
      This cleans up how the zImage code manipulates the kernel
      command line.  Notable improvements from the old handling:
      	- Command line manipulation is consolidated into a new
      prep_cmdline() function, rather than being scattered across start()
      and some helper functions
      	- Less stack space use: we use just a single global command
      line buffer, which can be initialized by an external tool as before,
      we no longer need another command line sized buffer on the stack.
      	- Easier to support platforms whose firmware passes a
      commandline, but not a device tree.  Platform code can now point new
      loader_info fields to the firmware's command line, rather than having
      to do early manipulation of the /chosen bootargs property which may
      then be rewritten again by the core.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3af82a8b
    • D
      [POWERPC] Add device tree utility functions to zImage · 27fbaa97
      David Gibson 提交于
      This patch adds a library of useful device tree manipulation functions
      to the zImage library, for use by platform code.  These functions are
      based on the hooks already in dt_ops, so they're not dependent on a
      particular device tree implementation.  This patch also slightly
      streamlines the code in main.c using these new functions.
      
      This is a consolidation of my work in this area with Scott Wood's
      patches to a very similar end.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      27fbaa97
  2. 26 3月, 2007 3 次提交
  3. 21 3月, 2007 1 次提交
  4. 13 3月, 2007 3 次提交
    • D
      [POWERPC] zImage: Cleanup and improve zImage entry point · cd197ffc
      David Gibson 提交于
      This patch re-organises the way the zImage wrapper code is entered, to
      allow more flexibility on platforms with unusual entry conditions.
      After this patch, a platform .o file has two options:
      
      1) It can define a _zimage_start, in which case the platform code gets
         control from the very beginning of execution.  In this case the
         platform code is responsible for relocating the zImage if necessary,
         clearing the BSS, performing any platform specific initialization, and
         finally calling start() to load and enter the kernel.
      
      2) It can define platform_init().  In this case the generic crt0.S
         handles initial entry, and calls platform_init() before calling
         start().  The signature of platform_init() is changed, however, to
         take up to 5 parameters (in r3..r7) as they come from the platform's
         initial loader, instead of a fixed set of parameters based on OF's
         usage.
      
         When using the generic crt0.S, the platform .o can optionally
         supply a custom stack to use, using the BSS_STACK() macro.  If this
         is not supplied, the crt0.S will assume that the loader has
         supplied a usable stack.
      
      In either case, the platform code communicates information to the
      generic code (specifically, a PROM pointer for OF systems, and/or an
      initrd image address supplied by the bootloader) via a global
      structure "loader_info".
      
      In addition the wrapper script is rearranged to ensure that the
      platform .o is always linked first.  This means that platforms where
      the zImage entry point is at a fixed address or offset, rather than
      being encoded in the binary header can be supported using option (1).
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      cd197ffc
    • D
      [POWERPC] zImage: Cleanup and improve prep_kernel() · 79c85419
      David Gibson 提交于
      This patch rewrites prep_kernel() in the zImage wrapper code to be
      clearer and more flexible.  Notable changes:
      
      	- Handling of the initrd image from prep_kernel() has moved
      into a new prep_initrd() function.
      	- The address of the initrd image is now added as device tree
      properties, as the kernel expects.
      	- We only copy a packaged initrd image to a new location if it
      is in danger of being clobbered when the kernel moves to its final
      location, instead of always.
      	- By default we decompress the kernel directly to address 0,
      instead of requiring it to relocate itself.  Platforms (such as OF)
      where doing this could clobber still-live firmware data structures can
      override the vmlinux_alloc hook to provide an alternate place to
      decompress the kernel.
      	- We no longer pass lots of information between functions in
      global variables.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      79c85419
    • D
      [POWERPC] zImage: Add more flexible gunzip convenience functions · ad9d2716
      David Gibson 提交于
      At present, arch/powerpc/boot/main.c includes a gunzip() function
      which is a convenient wrapper around zlib.  However, it doesn't
      conveniently allow decompressing part of an image to one location,
      then the remainder to a different address.
      
      This patch adds a new set of more flexible convenience wrappers around
      zlib, moving them to their own file, gunzip_util.c, in the process.
      These wrappers allow decompressing sections of the compressed image to
      different locations.  In addition, they transparently handle
      uncompressed data, avoiding special case code to handle uncompressed
      vmlinux images.
      
      The patch also converts main.c to use the new wrappers, using the new
      flexibility to avoid decompressing the vmlinux's ELF header twice as
      we did previously.  That in turn means we avoid extending our
      allocations for the vmlinux to allow space for the extra copy of the
      ELF header.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ad9d2716
  5. 04 12月, 2006 2 次提交
    • D
      [POWERPC] Cleanup zImage handling of kernel entry with flat device tree · 35af89eb
      David Gibson 提交于
      This makes 2 changes to clean up the flat device tree handling
      logic in the zImage wrapper.
      
      First, there were two callbacks from the dt_ops structure used for
      producing a final flat tree to pass to the kerne: dt_ops.ft_pack()
      which packed the flat tree (possibly a no-op) and dt_ops.ft_addr()
      which retreived the address of the final blob.  Since they were only
      ever called together, this patch combines the two into a single new
      callback, dt_ops.finalize().  This new callback does whatever
      platform-dependent things are necessary to produce a final flat device
      tree blob, and returns the blob's addres.
      
      Second, the current logic calls the kernel with a flat device tree if
      one is build into the zImage wrapper, otherwise it boots the kernel
      with a PROM pointer, expecting the kernel to copy the OF device tree
      itself.  This approach precludes the possibility of the platform
      wrapper code building a flat device tree from whatever
      platform-specific information firmware provides.  Thus, this patch
      takes the more sensible approach of invoking the kernel with a flat
      tree if the dt_ops.finalize callback provides one (by whatever means).
      
      So, the dt_ops.finalize callback can be NULL, or can be a function
      which returns NULL.  In either case, the zImage wrapper logic assumes
      that this is a platform with OF and invokes the kernel accordingly.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      35af89eb
    • D
      [POWERPC] Small clarification of initrd handling · f79e083c
      David Gibson 提交于
      This patch makes the handling of the initrd (or initramfs) in the
      zImage wrapper a little easier to follow.  Instead of passing the
      initrd addresses out from prep_kernel() via the cryptic a1 and a2
      parameters, use the global struct add_range, 'initrd'.  prep_kernel()
      already passes information through the 'vmlinux' addr_range struct, so
      this seems like a reasonable extension.
      
      Some comments also clarify the logic with prep_kernel(): we use an
      initrd included in the zImage if present, otherwise we use an initrd
      passed in by the bootloader in the a1 and a2 parameters (yaboot, at
      least, uses this mechanism to pass an initrd).
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f79e083c
  6. 18 10月, 2006 1 次提交
  7. 20 9月, 2006 1 次提交
  8. 15 6月, 2006 1 次提交
  9. 07 2月, 2006 1 次提交
  10. 14 1月, 2006 1 次提交
  11. 16 11月, 2005 1 次提交
  12. 07 11月, 2005 1 次提交
  13. 29 10月, 2005 6 次提交
  14. 09 9月, 2005 1 次提交
    • M
      [PATCH] PPC64: large INITRD causes kernel not to boot · 3cc747e9
      Mark Bellon 提交于
      In PPC64 there are number of problems in arch/ppc64/boot/main.c that
      prevent a kernel from making use of a large (greater than ~16MB) INITRD.
      This is 64 bit architecture and really large INITRD images should be
      possible.
      
      Simply put the existing code has a fixed reservation (claim) address and
      once the kernel plus initrd image are large enough to pass this address
      all sorts of bad things occur. The fix is the dynamically establish the
      first claim address above the loaded kernel plus initrd (plus some
      "padding" and rounding). If PROG_START is defined this will be used as
      the minimum safe address - currently known to be 0x01400000 for the
      firmwares tested so far.
      Signed-off-by: NMark Bellon <mbellon@mvista.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3cc747e9
  15. 29 8月, 2005 1 次提交
    • O
      [PATCH] ppc64: make arch/ppc64/boot standalone · decd300b
      Olaf Hering 提交于
      Make the bootheader for ppc64 independent from kernel and libc headers.
      * add -nostdinc -isystem $gccincludes to not include libc headers
      * declare all functions in header files, also the stuff from string.S
      * declare some functions static
      * use stddef.h to get size_t (hopefully ok)
      * remove ppc32-types.h, only elf.h used the __NN types
      
      With further modifications by Paul Mackerras and Stephen Rothwell.
      Signed-off-by: NOlaf Hering <olh@suse.de>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      decd300b
  16. 28 6月, 2005 2 次提交
  17. 06 5月, 2005 1 次提交
  18. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4