Skip to content

Commit

Permalink
kexec-tools-1.101
Browse files Browse the repository at this point in the history
  - Initial import into git
  - initial nbi image formage support
  - ppc32 initial register setting fixes.
  - gzipped multiboot file support
  • Loading branch information
ebiederm committed Jul 27, 2006
0 parents commit 2832619
Show file tree
Hide file tree
Showing 147 changed files with 28,987 additions and 0 deletions.
6 changes: 6 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Eric Biederman <[email protected]>
Albert Herranz
Jesse Barnes <[email protected]>
Khalid Aziz <[email protected]>
Hariprasad Nellitheertha <[email protected]>
Tim Deegan <[email protected]>
341 changes: 341 additions & 0 deletions COPYING

Large diffs are not rendered by default.

249 changes: 249 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
# Hey Emacs this is a -*- makefile-*-
include Makefile.conf
VERSION=1.101
DATE=15 February 2005
PACKAGE=kexec-tools

pkgdatadir = $(datadir)/$(PACKAGE)
pkglibdir = $(libdir)/$(PACKAGE)
pkgincludedir = $(includedir)/$(PACKAGE)

# You can specify DESTDIR on the command line to do a add
# a prefix to the install so it doesn't really happen
# Useful for building binary packages
DESTDIR =

CPPFLAGS:= -I./include -I./util_lib/include \
-DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"' \
$(DEFS) $(EXTRA_CFLAGS)

PREFIX:=$(OBJDIR)/build
SBINDIR=$(PREFIX)/sbin
BINDIR=$(PREFIX)/bin
LIBEXECDIR=$(PREFIX)/libexec
DATADIR=$(PREFIX)/share
SYSCONFDIR=$(PREFIX)/etc
SHAREDSTATEDIR=$(PREFIX)/com
LOCALSTATEDIR=$(PREFIX)/var
LIBDIR=$(PREFIX)/lib
INFODIR=$(PREFIX)/info
MANDIR=$(PREFIX)/man
MAN1DIR=$(MANDIR)/man1
MAN2DIR=$(MANDIR)/man2
MAN3DIR=$(MANDIR)/man3
MAN4DIR=$(MANDIR)/man4
MAN5DIR=$(MANDIR)/man5
MAN6DIR=$(MANDIR)/man6
MAN7DIR=$(MANDIR)/man7
MAN8DIR=$(MANDIR)/man8
INCLUDEDIR=$(PREFIX)/include

PKGDATADIR=$(DATADIR)/$(PACKAGE)
PKGLIBDIR=$(LIBDIR)/$(PACKAGE)
PKGINCLUDEIR=$(INCLUDEDIR)/$(PACKAGE)

MAN_PAGES:= kexec/kexec.8
BINARIES_i386:= $(SBINDIR)/kexec $(PKGLIBDIR)/kexec_test
BINARIES_x86_64:=$(SBINDIR)/kexec $(PKGLIBDIR)/kexec_test
BINARIES:=$(SBINDIR)/kexec $(SBINDIR)/kdump $(BINARIES_$(ARCH))

TARGETS:=$(BINARIES) $(MAN_PAGES)

all: $(TARGETS)

# cc-option
# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)

# Utility function library
#
include util_lib/Makefile

#
# Stand alone utilities
#
include util/Makefile

#
# purgatory (code between kernels)
#
include purgatory/Makefile

#
# kexec (linux booting linux)
#
include kexec/Makefile


# kdump (read a crashdump from memory)
#
include kdump/Makefile

#
# kexec_test (test program)
#
ifeq ($(ARCH),i386)
include kexec_test/Makefile
endif
ifeq ($(ARCH),x86_64)
include kexec_test/Makefile
endif

GENERATED_SRCS:= ./configure
SPEC=$(OBJDIR)/$(PACKAGE)-$(VERSION).spec
TARBALL=$(OBJDIR)/$(PACKAGE)-$(VERSION).tar.gz
SRCS:=$(shell $(FIND) \
./AUTHORS ./COPYING ./News ./TODO \
./Makefile ./Makefile.conf.in ./configure.ac \
./kexec-tools.spec.in ./config ./doc \
./include ./kexec ./purgatory ./kexec_test ./kdump ./util ./util_lib \
! -path '*CVS*' ! -name '*~' ! -name '.*' \
-type f -print )
SRCS+=$(GENERATED_SRCS)
PSRCS:=$(patsubst ./%,$(PACKAGE)-$(VERSION)/%,$(SRCS))
PSRCS+=$(PACKAGE)-$(VERSION).spec

Makefile.conf: Makefile.conf.in configure
/bin/sh ./configure

configure: configure.ac
autoconf
$(RM) -rf autom4te.cache

tarball: $(TARBALL)

$(TARBALL): $(SRCS) $(SPEC)
$(MKDIR) -p $(OBJDIR)
$(RM) -f $(OBJDIR)/$(PACKAGE)-$(VERSION)
$(LN) -s .. $(OBJDIR)/$(PACKAGE)-$(VERSION)
(cd $(OBJDIR); $(TAR) -cf - $(PSRCS) | gzip -9) > $@

rpm: $(TARBALL)
$(MKDIR) -p $(OBJDIR)/RPM $(OBJDIR)/SRPM $(OBJDIR)/BUILD $(OBJDIR)/SPECS \
$(OBJDIR)/TMP $(OBJDIR)/SOURCES
unset MAKEFLAGS MAKELEVEL; \
$(RPMBUILD) -ta \
--define '_rpmdir $(OBJDIR)/RPM' \
--define '_srcrpmdir $(OBJDIR)/SRPM' \
--define '_builddir $(OBJDIR)/BUILD' \
--define '_specdir $(OBJDIR)/SPECS' \
--define '_tmppath $(OBJDIR)/TMP' \
--define '_sourcedir $(OBJDIR)/SOURCES' \
$(TARBALL)

$(SPEC): kexec-tools.spec.in Makefile
$(SED) -e 's,^Version: $$,Version: $(VERSION),' $< > $@

echo::
@echo ARCH=$(ARCH)
@echo BINARIES=$(BINARIES)
@echo TARGETS=$(TARGETS)
@echo CC=$(CC)
@echo AR=$(AR)
@echo LD=$(LD)

clean:
@$(FIND) $(OBJDIR) ! -name '*.d' -type f | $(XARGS) $(RM) rm -f
@$(RM) -rf rpm
@$(RM) -f config.log config.status config.cache
@$(RM) -f $(TARBALL)

dist-clean: clean
@$(RM) -rf $(OBJDIR)
@$(FIND) . -type f -name '*~' -o -name '*.orig' | $(XARGS) $(RM) -f
@$(RM) -f Makefile.conf

maintainer-clean: dist-clean
@$(RM) -f $(GENERATED_SRCS)


install: $(TARGETS)
for file in $(TARGETS) ; do \
if test `$(DIRNAME) $$file` = "$(SBINDIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(sbindir)/; \
$(INSTALL) -m 555 $$file $(DESTDIR)/$(sbindir)/; \
fi; \
if test `$(DIRNAME) $$file` = "$(BINDIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(bindir)/; \
$(INSTALL) -m 555 $$file $(DESTDIR)/$(bindir)/; \
fi; \
if test `$(DIRNAME) $$file` = "$(LIBEXECDIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(libexecdir)/; \
$(INSTALL) -m 555 $$file $(DESTDIR)/$(libexecdir)/; \
fi; \
if test `$(DIRNAME) $$file` = "$(DATADIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(datadir)/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(datadir)/; \
fi; \
if test `$(DIRNAME) $$file` = "$(SYSCONFDIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(sysconfdir)/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(sysconfdir)/; \
fi; \
if test `$(DIRNAME) $$file` = "$(SHAREDSTATEDIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(sharedstatedir)/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(sharedstatedir)/; \
fi; \
if test `$(DIRNAME) $$file` = "$(LOCALSTATEDIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(localstatedir)/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(localstatedir)/; \
fi; \
if test `$(DIRNAME) $$file` = "$(LIBDIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(libdir)/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(libdir)/; \
fi; \
if test `$(DIRNAME) $$file` = "$(INFODIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(infodir)/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(infodir)/; \
fi; \
if test `$(DIRNAME) $$file` = "$(MAN1DIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(mandir)/man1; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(mandir)/man1; \
fi; \
if test `$(DIRNAME) $$file` = "$(MAN2DIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(mandir)/man2; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(mandir)/man2; \
fi; \
if test `$(DIRNAME) $$file` = "$(MAN3DIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(mandir)/man3/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(mandir)/man3/; \
fi; \
if test `$(DIRNAME) $$file` = "$(MAN4DIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(mandir)/man4/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(mandir)/man4/; \
fi; \
if test `$(DIRNAME) $$file` = "$(MAN5DIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(mandir)/man5/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(mandir)/man5/; \
fi; \
if test `$(DIRNAME) $$file` = "$(MAN6DIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(mandir)/man6/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(mandir)/man6/; \
fi; \
if test `$(DIRNAME) $$file` = "$(MAN7DIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(mandir)/man7/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(mandir)/man7/; \
fi; \
if test `$(DIRNAME) $$file` = "$(MAN8DIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(mandir)/man8/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(mandir)/man8/; \
fi; \
if test `$(DIRNAME) $$file` = "$(INCLUDEDIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(includedir)/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(includedir)/; \
fi; \
if test `$(DIRNAME) $$file` = "$(PKGDATADIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(pkgdatadir)/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(pkgdatadir)/; \
fi; \
if test `$(DIRNAME) $$file` = "$(PKGLIBDIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(pkglibdir)/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(pkglibdir)/; \
fi; \
if test `$(DIRNAME) $$file` = "$(PKGINCLUDEDIR)" ; then \
$(MKDIR) -p $(DESTDIR)/$(pkgincludedir)/; \
$(INSTALL) -m 444 $$file $(DESTDIR)/$(pkgincludedir)/; \
fi; \
done

.PHONY: echo install all clean dist-clean maintainer-clean tarball rpm
52 changes: 52 additions & 0 deletions Makefile.conf.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Hey Emacs this is a -*- makefile-*-

prefix=@prefix@
exec_prefix=@exec_prefix@

bindir=@bindir@
sbindir=@sbindir@
libexecdir=@libexecdir@
datadir=@datadir@
sysconfdir=@sysconfdir@
sharedstatedir=@sharedstatedir@
localstatedir=@localstatedir@
libdir=@libdir@
infodir=@infodir@
mandir=@mandir@
includedir=@includedir@

DEFS=@DEFS@
LIBS=@LIBS@

# The target architecture
ARCH =@ARCH@
OBJDIR=@OBJDIR@

# Compiler for building kexec
CC =@CC@
CPP =@CPP@
LD =@LD@
AS =@AS@
OBJCOPY =@OBJCOPY@
AR =@AR@
CFLAGS =@CFLAGS@
EXTRA_CFLAGS=@EXTRA_CFLAGS@
LDFLAGS =@LDFLAGS@

# Utilities called by the makefiles
INSTALL=@INSTALL@
MKDIR=@MKDIR@
RM=@RM@
CP=@CP@
LN=@LN@
TAR=@TAR@
RPMBUILD=@RPMBUILD@
SED=@SED@
FIND=@FIND@
XARGS=@XARGS@
DIRNAME=@DIRNAME@

# C compiler for building utilities to use
# during the build
BUILD_CC=@BUILD_CC@
BUILD_CFLAGS=@BUILD_CFLAGS@ $(DEFS)
73 changes: 73 additions & 0 deletions News
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
* 2.0
- In purgatory added -fno-zero-initialized-in-bss to prevent issues with
recent versions of gcc
- Add an option to configure to disable zlib support
- Add mismatched architecture support
- Updated the x86 architecture help
- Updated the x86_64 architecture help
- Fixed bzImage support
- Added support for finding either the highest or lowest usable window.
- Change the version number to 2.0 to reflect the major change in
the code base. 1.99 was effectively the release canidate.
* 1.99
- Rearchitect so the code is maintainable.
- Add multiboot support
- Add ia64 support
- Add beoboot image support
- Create generic elf loader code.
- Created the relocated shared object purgatory to hold
the code that runs between kernels.
- Added a configure script
- Added an rpm target
- Added kexec on panic support
- Initial stab at adding documentation
- Added loader support for ET_DYN objects
* 1.98
- Add mysteriously dropped changes to make x86_64 work
- Update the distclean target to remove *.orig and *~ files
* 1.97
- Add support for cross compiling x86_64
* 1.96
- add x86_64 support
- add support for linux style arguments to the elf32-x86 loader
- disable clearing of cr4 on x86
* 1.95
- add kexec-zImage-ppc64.c source file
- GameCube/PPC32 sync'ed to 1.94
- use syscall() to call sys_kexec_load() and reboot()
- add kexec-syscall.h, remove kexec-syscall.c
- makefiles know about ARCH-es
- add noifdown kexec option (Albert Herranz)
* 1.94
- revert a bad 1.92 change (not setting optind & opterr for subsequent
calls to getopt_long())
* 1.93
- restored "shutdown" functionality;
- more help/usage text clarification;
- add GPLv2 license to source files (with permission from Eric Biederman)
* 1.92
- my_kexec(): call kexec() only one time;
- add "unload" option;
- fix some compiler warnings about "<var> might be used uninitialized";
- commented out shutdown capability since it was unreachable;
* 1.91
- fix "-t" option: strcmp() was inverted (Albert Herranz)
- check specified kernel image file for file type (Albert Herranz)
* 1.9
- change reboot function to return type long (was int)
- use kexec reserved syscall numbers (in Linux 2.6.6-mm3)
* 1.8
- Fixed bug where ramdisk wasn't loaded when specified
- Memory information is now read from /proc/iomem.
Information that is not needed is ignored.
* 1.7
- Update to new tentative syscall number....
* 1.6
- Redo all of the command line arguments.
- Use the 32-bit kernel entry point.
- Work around a failure to clear %cr4.
* 1.5
- Port to a new kernel interface (Hopefully the final one).
- Start working on setting up legacy hardware
- Add --load and --exec options so the parts can be done at different times.
###
11 changes: 11 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- Restore enough state that DOS/arbitrary BIOS calls can be run on some
platforms. Currently disk-related calls are quite likely to blow up.
- x86 filling in other kernel parameters.
- Merge reboot via kexec functionality into /sbin/reboot
- In the kexec-on-panic case preserving memory the both kernels
must use.
- Finish the kexec-on-panic case.
- Improve the documentation
- Add support for loading a boot sector
- Autobuilding of initramfs
###
Loading

0 comments on commit 2832619

Please sign in to comment.