diff options
-rw-r--r-- | mk/rootfs.mk | 2 | ||||
-rw-r--r-- | package/kexec-tools/patches/patch-kexec_kexec_c | 24 | ||||
-rw-r--r-- | target/config/Config.in | 1 | ||||
-rw-r--r-- | target/linux/config/Config.in.misc | 6 | ||||
-rw-r--r-- | target/sparc/Makefile | 6 | ||||
-rw-r--r-- | target/sparc64/Makefile | 6 |
6 files changed, 45 insertions, 0 deletions
diff --git a/mk/rootfs.mk b/mk/rootfs.mk index 5080944e6..6b34156a5 100644 --- a/mk/rootfs.mk +++ b/mk/rootfs.mk @@ -9,8 +9,10 @@ endif endef ifeq ($(ADK_HARDWARE_QEMU),y) +ifeq ($(ADK_TARGET_ROOTFS_ARCHIVE),y) ROOTFS:= root=/dev/sda1 endif +endif ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB532),y) ROOTFS:= root=/dev/sda2 diff --git a/package/kexec-tools/patches/patch-kexec_kexec_c b/package/kexec-tools/patches/patch-kexec_kexec_c new file mode 100644 index 000000000..68dc2bee9 --- /dev/null +++ b/package/kexec-tools/patches/patch-kexec_kexec_c @@ -0,0 +1,24 @@ +--- kexec-tools-2.0.2.orig/kexec/kexec.c 2010-07-29 06:19:59.000000000 +0200 ++++ kexec-tools-2.0.2/kexec/kexec.c 2011-09-05 18:50:27.679232756 +0200 +@@ -796,17 +796,14 @@ int k_unload (unsigned long kexec_flags) + static int my_shutdown(void) + { + char *args[] = { +- "shutdown", +- "-r", +- "now", ++ "reboot", ++ "-f", + NULL + }; + +- execv("/sbin/shutdown", args); +- execv("/etc/shutdown", args); +- execv("/bin/shutdown", args); ++ execv("/sbin/reboot", args); + +- perror("shutdown"); ++ perror("reboot"); + return -1; + } + diff --git a/target/config/Config.in b/target/config/Config.in index a6719eb52..0c1bf3d1f 100644 --- a/target/config/Config.in +++ b/target/config/Config.in @@ -326,6 +326,7 @@ config ADK_TARGET_CPU_ARCH default "arm" if ADK_LINUX_ARM && ADK_little default "armeb" if ADK_LINUX_ARM && ADK_big default "sparc" if ADK_LINUX_SPARC + default "sparc64" if ADK_LINUX_SPARC64 default "sh" if ADK_LINUX_SH default "cris" if ADK_CPU_CRIS_V10 default "crisv32" if ADK_CPU_CRIS_V32 diff --git a/target/linux/config/Config.in.misc b/target/linux/config/Config.in.misc index e7891a465..2a2b3e860 100644 --- a/target/linux/config/Config.in.misc +++ b/target/linux/config/Config.in.misc @@ -15,6 +15,12 @@ config ADK_KERNEL_RTC_INTF_DEV menu "Miscellaneous devices support" +config ADK_KERNEL_KEXEC + prompt ".................................. Add KEXEC syscall" + boolean + help + You need also kexec-tools to benefit from it. + config ADK_KERNEL_RTC_DRV_AT91SAM9 prompt ".................................. RTC support for AT91SAM9 (Fox G20)" boolean diff --git a/target/sparc/Makefile b/target/sparc/Makefile index 5fe97c12a..7a19300b4 100644 --- a/target/sparc/Makefile +++ b/target/sparc/Makefile @@ -14,6 +14,12 @@ imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL) @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL} @echo 'The kernel file is: $(BIN_DIR)/${TARGET_KERNEL}' @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)" +ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC),y) + @echo "Use following command to create a QEMU Image:" + @echo "sudo ./scripts/create-image.sh -f ${ADK_TARGET_ROOTFS} qemu-${CPU_ARCH}.img $(BIN_DIR)/$(ROOTFSTARBALL)" + @echo "Start qemu with following command line:" + @echo 'qemu-system-sparc -nographic -kernel $(BIN_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img -append "root=/dev/sda1"' +endif endif ifeq ($(ADK_TARGET_FS),initramfs) imageinstall: $(BIN_DIR)/$(INITRAMFS) diff --git a/target/sparc64/Makefile b/target/sparc64/Makefile index 3e7240621..d3d46d571 100644 --- a/target/sparc64/Makefile +++ b/target/sparc64/Makefile @@ -14,6 +14,12 @@ imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL) @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL} @echo 'The kernel file is: $(BIN_DIR)/${TARGET_KERNEL}' @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)" +ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC64),y) + @echo "Use following command to create a QEMU Image:" + @echo "sudo ./scripts/create-image.sh -f ${ADK_TARGET_ROOTFS} qemu-${CPU_ARCH}.img $(BIN_DIR)/$(ROOTFSTARBALL)" + @echo "Start qemu with following command line:" + @echo 'qemu-system-sparc64 -nographic -kernel $(BIN_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img -append "root=/dev/sda1"' +endif endif ifeq ($(ADK_TARGET_FS),initramfs) imageinstall: $(BIN_DIR)/$(INITRAMFS) |