summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lib/bootm.c3
-rw-r--r--arch/arm/mach-omap/omap_generic.c5
-rw-r--r--arch/blackfin/lib/blackfin_linux.c3
-rw-r--r--arch/efi/efi/efi-image.c9
-rw-r--r--arch/mips/lib/bootm.c6
-rw-r--r--arch/nios2/lib/bootm.c3
-rw-r--r--arch/ppc/lib/ppclinux.c3
7 files changed, 31 insertions, 1 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 010b668e68..eef906a36b 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -110,6 +110,9 @@ static int __do_bootm_linux(struct image_data *data, unsigned long free_mem, int
printf("...\n");
}
+ if (data->dryrun)
+ return 0;
+
start_linux((void *)kernel, swap, initrd_start, initrd_size, data->oftree);
restart_machine();
diff --git a/arch/arm/mach-omap/omap_generic.c b/arch/arm/mach-omap/omap_generic.c
index 4e26c6ba0b..34ed94007e 100644
--- a/arch/arm/mach-omap/omap_generic.c
+++ b/arch/arm/mach-omap/omap_generic.c
@@ -79,6 +79,11 @@ static int do_bootm_omap_barebox(struct image_data *data)
if (!barebox)
return -EINVAL;
+ if (data->dryrun) {
+ free(barebox);
+ return 0;
+ }
+
omap_start_barebox(barebox);
}
diff --git a/arch/blackfin/lib/blackfin_linux.c b/arch/blackfin/lib/blackfin_linux.c
index 2561a7e152..da2f78bcb5 100644
--- a/arch/blackfin/lib/blackfin_linux.c
+++ b/arch/blackfin/lib/blackfin_linux.c
@@ -50,6 +50,9 @@ static int do_bootm_linux(struct image_data *idata)
appl = (void *)(idata->os_address + idata->os_entry);
printf("Starting Kernel at 0x%p\n", appl);
+ if (idata->dryrun)
+ return 0;
+
icache_disable();
strncpy(cmdlinedest, cmdline, 0x1000);
diff --git a/arch/efi/efi/efi-image.c b/arch/efi/efi/efi-image.c
index b6437f4078..c78043b0de 100644
--- a/arch/efi/efi/efi-image.c
+++ b/arch/efi/efi/efi-image.c
@@ -190,7 +190,7 @@ static inline void linux_efi_handover(efi_handle_t handle,
static int do_bootm_efi(struct image_data *data)
{
void *tmp;
- void *initrd;
+ void *initrd = NULL;
size_t size;
efi_handle_t handle;
int ret;
@@ -244,6 +244,13 @@ static int do_bootm_efi(struct image_data *data)
printf("...\n");
}
+ if (data->dryrun) {
+ BS->unload_image(handle);
+ free(boot_header);
+ free(initrd);
+ return 0;
+ }
+
efi_set_variable_usec("LoaderTimeExecUSec", &efi_systemd_vendor_guid,
get_time_ns()/1000);
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 84f72f5ac0..6702372333 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -1,6 +1,7 @@
#include <boot.h>
#include <common.h>
#include <libfile.h>
+#include <malloc.h>
#include <init.h>
#include <fs.h>
#include <errno.h>
@@ -17,6 +18,11 @@ static int do_bootm_barebox(struct image_data *data)
if (!barebox)
return -EINVAL;
+ if (data->dryrun) {
+ free(barebox);
+ return 0;
+ }
+
shutdown_barebox();
barebox();
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index 77da119bde..ac70330729 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -42,6 +42,9 @@ static int do_bootm_linux(struct image_data *idata)
if (ret)
return ret;
+ if (idata->dryrun)
+ return 0;
+
kernel = (void *)(idata->os_address + idata->os_entry);
/* kernel parameters passing
diff --git a/arch/ppc/lib/ppclinux.c b/arch/ppc/lib/ppclinux.c
index 409c0cf261..a36682caf2 100644
--- a/arch/ppc/lib/ppclinux.c
+++ b/arch/ppc/lib/ppclinux.c
@@ -60,6 +60,9 @@ static int do_bootm_linux(struct image_data *data)
return -EINVAL;
}
+ if (data->dryrun)
+ return 0;
+
/* Relocate the device tree if outside the initial
* Linux mapped TLB.
*/