Skip to content

Commit

Permalink
fs2dt: Add a generic copy of fs2dt
Browse files Browse the repository at this point in the history
The motivation for this is to remove duplicated code by sharing the fs2dt
between different architectures.

The code added by this patch is very close to the code currently used by
ppc64, and thus migrating that architecture should not be difficult.  The
32bit powerpc code is a little different and thus more care is needed when
migrating that architecture to this code.

Unfortunately I do not have any powerpc equipment available to test this
code.

Signed-off-by: Simon Horman <horms@verge.net.au>
  • Loading branch information
horms committed Sep 12, 2012
1 parent ce9d37c commit b3c2962
Show file tree
Hide file tree
Showing 5 changed files with 832 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kexec/Makefile
Expand Up @@ -64,6 +64,10 @@ dist += kexec/kexec-uImage.c
$(ARCH)_UIMAGE =
KEXEC_SRCS += $($(ARCH)_UIMAGE)

dist += kexec/fs2dt.c kexec/fs2dt.h
$(ARCH)_FS2DT =
KEXEC_SRCS += $($(ARCH)_FS2DT)

include $(srcdir)/kexec/arch/alpha/Makefile
include $(srcdir)/kexec/arch/arm/Makefile
include $(srcdir)/kexec/arch/i386/Makefile
Expand Down Expand Up @@ -95,6 +99,8 @@ $(KEXEC): $(KEXEC_OBJS) $(UTIL_LIB)

$(KEXEC): CPPFLAGS+=-I$(srcdir)/kexec/arch/$(ARCH)/include

kexec/fs2dt.o: CPPFLAGS+=$($(ARCH)_FS2DT_INCLUDE)

$(KEXEC_MANPAGE): kexec/kexec.8
@$(MKDIR) -p $(MANDIR)/man8
cp $^ $(KEXEC_MANPAGE)
Expand Down
2 changes: 2 additions & 0 deletions kexec/arch_reuse_initrd.c
@@ -1,5 +1,7 @@
#include "kexec.h"

unsigned char reuse_initrd = 0;

void arch_reuse_initrd(void)
{
die("--reuseinitrd not implemented on this architecture\n");
Expand Down

0 comments on commit b3c2962

Please sign in to comment.