summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-02-20kexec-tools-testing 20080219-gitSimon Horman
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>
2008-02-19kexec-tools-testing 20080219-rcSimon Horman
Please ignore the previous "kexec-tools-testing 20080217-rc" commit, obviously its not still last year :-) Signed-off-by: Simon Horman <horms@verge.net.au>
2008-02-19kexec-tools-testing 20071019-rcSimon Horman
2008-02-19kexec: Use target linker for purgatoryGeoff Levand
Pugatory files need to be linked with the target linker, not the build linker. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-02-19Remove some extraneous whitespaceSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2008-02-19Add ARM support to kexecRichard Purdie
Add ARM support to kexec including commandline support through ATAGs. The kernel syscall support has already been merged and kernel ATAG exporting is queued for 2.6.25 (its optional for kexec). Based on work by various people, notably Uli Luckas <u.luckas@road.de> for adding ATAG support. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-02-19sh: Remove hardcoded PAGE_SIZE in NetBSD loaderPaul Mundt
The Linux host supports a multitude of page sizes, so having this hardcoded doesn't really help matters. This also has the benefit of killing off dependence on asm/ headers when none is needed. While I'm not suggesting that anyone actually boot NetBSD, without this, my build also ends up breaking. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-02-19kexec buffer overflow on ppc platformStefan Assmann
This patch fixes buffer overflows when buf is allocated MAXBYTES-1 and fread(buf, 1, MAXBYTES, file) is invoked. Signed-off-by: Stefan Assmann <sassmann@suse.de> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-02-19Use zlib if presentSimon Horman
Hi, This fixes a minor regression that occured with Jeremy's recent reworking of the build system. I guess he wasn't dealing with compressed images and thus didn't notice that zlib support had been disabled. The fix involves updating an #ifdef to use the new symbol, and ensuring that -lz is passed to the linker as neccessary. Cc: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2008-01-18Log unknown reloc name instead of its numberKevin Tegtmeier
I included a one-line patch to kexec-tools-testing, at Bernhard Walle's request. This prints the relocation type as a string. I noticed that other architectures do not use reloc_name, but instead just print the r_type. I find the reloc_name useful. Cc: Kevin Tegtmeier <kevint@lanl.gov> Signed-off-By: Simon Horman <horms@verge.net.au>
2008-01-18Subject: [doc] Add documentation on creating include/config.h.in to INSTALLSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au>
2007-12-19Don't assume we can re-make MakefileJeremy Kerr
We currently assume that we can recreate the Makefile by running ./configure, but we don't have the args available, so it's likely that the Makefile will be generated incorrectly. This change depends on config.status instead. We won't get the configure re-run if configure.ac is updated, but we still have the Makefile.in dependency. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2007-12-19make clean cleanupJeremy Kerr
Use a $(clean) variable to store all items that need to be removed on 'make clean' (eg, .o files). Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Simon Horman <horms@verge.net.au> Conflicts: Makefile.in
2007-12-19Use general _SRCS and _OBJS, rather and _C_{SRCS, OBJS} and _S_{SRCS, OBJS}Jeremy Kerr
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>
2007-12-19removed partially duplicated system headersSimon Horman
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>
2007-12-19Build system simplification/standardisationJeremy Kerr
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>
2007-12-19Add gamecube to config.h definesJeremy Kerr
.. instead of messing with CFLAGS. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2007-12-19Use config.h for definesJeremy Kerr
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>
2007-12-19Consolidate BOOTLOADER definesJeremy Kerr
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>
2007-12-19Use --target for target architecture specificationJeremy Kerr
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>
2007-12-19Enable building a 32 bit binary for ppc64 platforms.David Woodhouse
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>
2007-11-14Update mailing list contact to kexec@lists.infradead.orgSimon Horman
2007-11-14Fix the feature determining ELF32/ELF64 automaticallyKen'ichi Ohmichi
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>
2007-11-1420071030-gitSimon Horman
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>
2007-10-30kexec-tools-testing 20071030 releaseSimon Horman
2007-10-19Pass vmcoreinfo's address and size #2Ken'ichi Ohmichi
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>
2007-10-18Pass vmcoreinfo's address and sizeKen'ichi Ohmichi
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>
2007-10-17kexec-tools-testing 20071017-rcSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au> Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 62d6d7da745d45edee6c2e9ab781bd1f58c193e7
2007-10-17Set alternate location for /proc/iomem on ia64 xenSimon Horman
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
2007-10-17Allow architectures to specify the location of /proc/iomemSimon Horman
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
2007-10-08Use fclose() to close the file pointerBernhard Walle
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>
2007-09-05kexec-tools: fix typosRandy Dunlap
Correct spelling/typos in baud_rate. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2007-07-27Determine ELF32/ELF64 automatically on i386Bernhard Walle
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>
2007-06-19kexec ppc64: fix misaligned cmdlineMichael Neuling
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>
2007-06-11minor cleanup in check_reuse_initrdMichael Neuling
Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2007-05-25fix kexec-tools optionsManeesh Soni
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>
2007-05-15kexec fix ppc64 device-tree mem nodeGeoff Levand
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>
2007-05-10kexec rename dprintf to dbgprintfGeoff Levand
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>
2007-05-10kexec remove last remaining dfprintfGeoff Levand
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>
2007-05-10Handle maloc() failure in xen_get_nr_phys_cpus()Simon Horman
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>
2007-05-09kexec fix prototypes for ppc64Geoff Levand
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>
2007-05-09kexec add strict-prototypesGeoff Levand
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>
2007-05-09use dprintfSimon Horman
Use the new fprintf macro where possible Cc: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2007-05-09kexec debug output improvmentsGeoff Levand
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>
2007-05-08kexec improve build for ppc64Geoff Levand
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>
2007-05-01kexec ppc64: cleanup get_devtree_detailsMichael Neuling
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>
2007-05-01kexec ppc64: Add arch specific --reuseinitrd hooksMichael Neuling
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>
2007-05-01kexec: Added generic --reuseinitrd optionMichael Neuling
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>
2007-04-18kexec-tools: remove initrd_foundMichael Neuling
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>
2007-04-13kexec-tools: Add distclean and maintainerclean targetsSimon Horman
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>