Age | Commit message (Collapse) | Author |
|
Since we use the implicit ruls for .c and .S, just colelct all sources
in the one variable.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Purgatory seems to partially duplicate system headers.
It seems a log cleaner not to do so.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
This change makes kexec-tools work more like a standard configure-make-
make-install-type project:
* Remove $(OBJDIR) stuff. To do an out-of-tree build, just configure
from a different directory.
* Use the implicit Makefile rules more, and just edit the compiler
flags for specific targets.
* Simplify compiler/linker flags - no need for EXTRA_*
* Add TARGET_CC, and improve checks for BUILD_CC too.
* Set arch-specific flags in arch-specific makefiles, not conditional
on $(ARCH).
* Generate dependency files in the main compile, rather than as a
separate step.
* Don't #include sha256.c, but re-build it into the purgatory.
Still a work-in-progress.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
.. instead of messing with CFLAGS.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Instead of putting a heap of -D directives in CPPFLAGS, use a config.h
header.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The BOOTLOADER and BOOTLOADER_VERSION #defines are repeated in multiple
files. This change removes the unnecessary definition of these, and
keeps the kexec/kexec.h as the main source.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Instead of using a combination of ARCH and --host, use --target.
It's possible to have host != target. For example, building a ppc
kexec binary for a ppc64 kernel. In this case, the kexec binary is
compiled for 32-bit, while the purgatory object is 64-bit.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Based on
http://cvs.fedora.redhat.com/viewcvs/rpms/kexec-tools/devel/kexec-tools-1.101-ppc-boots-ppc64.patch?rev=1.2&view=auto
64 bit: OK
32 bit: purgatory build fails
Work-in-progress-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
|
|
Hi,
This patch fixes the problem that the kexec command cannot determine
ELF32/ELF64 automatically.
On i386 system, the kexec command always determined an ELF32 /proc/vmcore
even if the memory is 4GB or larger, because of referring the outside
of the array "range[]".
Thanks
Ken'ichi Ohmichi
Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Add -git to version so it doesn't look like a release
Add -git to version so it doesn't look like a release.
This is just so when people built stuff from git it can
be identified as such from the version string.
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
|
|
There is a compatibility problem that the kexec command fails on
kernels which don't have /sys/kernel/vmcoreinfo:
# ls /sys/kernel/
debug kexec_crash_loaded kexec_loaded security uevent_helper
uevent_seqnum
#
(There is not /sys/kernel/vmcoreinfo.)
#
# kexec -p --args-linux vmlinuz --initrd=initrd.img
Could not open "/sys/kernel/vmcoreinfo": No such file or directory
#
To fix the problem, could you please apply the attached patch ?
The fixed part is the same as the patch in the following mail.
Cc: "Ken'ichi Ohmichi" <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The patch is for kexec-tools-testing-20070330.
(http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/)
The kexec command gets the address and size of the vmcoreinfo data from
/sys/kernel/vmcoreinfo, and passes them to the second kernel through
ELF header of /proc/vmcore. When the second kernel is booting, the
kernel gets them from the ELF header and creates vmcoreinfo's PT_NOTE
segment into /proc/vmcore.
Signed-off-by: Dan Aloni <da-x@monatomic.org>
Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Simon Horman <horms@verge.net.au>
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
62d6d7da745d45edee6c2e9ab781bd1f58c193e7
|
|
Use /proc/iomem_machine for ia64 xen where pysical and machine efi maps
differ. Without this kexec gets a very jaded view of the world, and
/proc/vmcore after a kdump will only have a partial memory dump. Requires a
companion patch to kexec-tools.
Signed-off-by: Simon Horman <horms@verge.net.au>
kexec/arch/ia64/Makefile | 1 +
kexec/arch/ia64/kexec-iomem.c | 23 +++++++++++++++++++++++
2 files changed, 24 insertions(+)
1e7eca377b0b84a638c49eae614103b5e6fa7b42
|
|
On ia64 XEN it is sometimes neccessary to use an alternate location for the
information that is usually provided by /proc/iomem. By having the path
returned by a function, which can be overriden on a per-architecture basis,
it is possible for ia64 XEN to make use of existing generic code. Hopefully
other achitectures can use this infastructure as the need arises.
If the machine parameter is zero, then iomem file relating to the currently
running kernel should be returned. If the machine parameter is non-zero
then iomem file, relating to the underlying hypervisor, should be returned.
In the simple case, these will be the same file.
Signed-off-by: Simon Horman <horms@verge.net.au>
kexec/arch/i386/crashdump-x86.c | 4 ++--
kexec/arch/i386/kexec-x86.c | 2 +-
kexec/arch/i386/x86-linux-setup.c | 2 +-
kexec/arch/ia64/crashdump-ia64.c | 9 +++++----
kexec/arch/ia64/kexec-elf-ia64.c | 2 +-
kexec/arch/ia64/kexec-ia64.c | 5 +++--
kexec/arch/ppc/kexec-ppc.c | 2 +-
kexec/arch/s390/kexec-s390.c | 5 +++--
kexec/arch/x86_64/crashdump-x86_64.c | 10 +++++-----
kexec/arch/x86_64/kexec-x86_64.c | 2 +-
kexec/crashdump-xen.c | 6 ++++--
kexec/kexec-iomem.c | 31 +++++++++++++++++++++++--------
kexec/kexec.h | 6 +++---
13 files changed, 53 insertions(+), 33 deletions(-)
9079040b40f643cfc9eb3d425dffa0ca8fd573e1
|
|
Just use fclose() instead of close() to close a pointer of type FILE *.
That fixes the compile warning
kexec/kexec.c: In function 'check_reuse_initrd':
kexec/kexec.c:793: warning: passing argument 1 of 'close' makes integer from pointer without a cast
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Correct spelling/typos in baud_rate.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
On i386, kexec generates ELF64 core headers by default if the user doesn't
override this via a command line option. Because GDB cannot analyse
ELF64 core dumps on 32 bit platforms, it's a bad idea to use ELF64 if it's not
needed.
This patch selects ELF32 if the biggest memory address fits in 32 bit address
space, which should be the case on non PAE systems. If the user specifies
a command line option, that option overrides the detection.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
If the cmdline changes between boots, we can get misalignment of the
bootargs entry, which in turn corrupts our device tree blob and hence
kills our kexec boot. Also, if there was no /chosen/bootargs
previously, we'd never add a new one.
This ignores the bootargs while parsing the tree and inserts it later.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
o value for OPT_REUSE_INITRD clashes with arch specific options which
are defined as (OPT_MAX + 1), like --serial option on x86_64. Changed
the values so that OPT_REUSE_INITRD is less than OPT_MAX.
Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Change the ppc64 device-tree memory node name spec to match the allowable names
specified in the booting-without-of document.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The recently introduce kexec debug routine dprintf clashes with an existing
libc symbol. Rename dprintf to dbgprintf.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Remove the last remaining dfprintf call and remove the dfprintf
definition.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Currently xen_get_nr_phys_cpus() doesn't write to xen_phys_notes if
allocation fails, but it doesn't return an error either, leaving
xen_phys_notes wide open to be accessed by other functions later.
Acked-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Fixup the ppc64 files to remove warnings generated by the -Wstrict-prototypes
compiler flag.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Add the complier flag -Wstrict-prototypes to EXTRA_CFLAGS.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Use the new fprintf macro where possible
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
kexec debug output improvments.
- Add better type checking for the debug output macro dfprintf().
- Add a convenence macro dprintf().
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Powerpc 64 bit platforms support both 64 bit and 32 bit runtimes. Allow
ARCH= to be specified on the command line to separate the processor arch
from the compiler machine. This also helps cross-builds with non-standard
compiler names.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Cleanup error paths in get_devtree_details. Also convert fstat from a
pointer to avoid malloc.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Adds ppc64 specific hooks for the --reuseinitrd option.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Adds a generic --reuseinitrd option and performs some sanity checks on
it. Can be used with the retain_initrd kernel option.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
initrd_found is not used, so remove it. Minor cleanup.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Make maintainerclean and distclean aliases for the existing
maintainer-clean and dist-clean targets respectively.
I believe that the former names are a little more common so it
makes sense to have them there.
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Purgatory doesn't really care about the SMP cpus. But if we leave them
behind, they end up getting lost when the kernel overwrites purgatory or
the previous kernel. The current slave handling in purgatory doesn't
have any handshaking to make sure the cpus have moved on before leaving.
Instead of moving the slave cpus up to purgatory and then back down to
the kernel, just copy bytes 4-255 from the kernel and use it as the
purgatory start / slave hold block.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
The @ha relocation is supposed to account for the @l relocation being
a signed quantity by adding 1 if the msb of @l is set.
The trick of adding 0x8000 stolen from the linux kernel file
arch/powerpc/kernel/module_64.c which credits binutils.
Signed-off-by: Milton Miller <miltonm@bga.com>
Acked-by: Mohan Kumar M <mohan@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Add -git to version so it doesn't look like a release.
This is just so when people built stuff from git it can
be identified as such from the version string.
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
<horms@verge.net.au>
|
|
kexec-tools-testing 20070319-rc
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Acked-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
It seems safe enough to enable --with_xen by default as
the required header is checked for later on in confiugre,
and will turn off --with_xen if needed.
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
architecture.
This is necessary when running Xen with a 64 bit hypervisor and 32 bit
domain 0 since the CPU crash notes will be 64 bit.
Detecting the hypervisor archiecture requires libxenctrl and therefore this
support is optional and disabled by default.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Acked-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
There is a binutils bug which causes PT_NOTE segments to have an offset of
zero (http://sourceware.org/bugzilla/show_bug.cgi?id=594). The fix has not
made it into any release binutils, although several distributions have
backported it.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Acked-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Move memory range variables
The common kexec code is currently using two global variables to keep
track of memory ranges. Other data is kept in a per-instance structure.
This mix is of per-instance and global variables is confusing and leads
to messy code in general. So let's not.
This patch moves the global variables into struct kexec_info and makes
sure that structure is passed along where needed. No logic is changed.
Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
arch_options, declared in kexec/arch/sh/kexec-sh.c seems to be unused,
so remove it.
Signed-off-by: Simon Horman <horms@verge.net.au>
Acked-by: Paul Mundt <lethal@linux-sh.org>
|
|
The value of max_memory_ranges is calculated in count_memory_ranges() and only
counts the memory@ nodes. However, in get_devtree_details(), pci@ nodes are also
added to exclude_range just at the end of the loop.
This patch changes count_memory_ranges() to also consider pci@ nodes in
/proc/device-tree.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
Remove duplicate MAX_LINE
MAX_LINE is already defined in kexec/kexec.h
Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
|