* [U-Boot] [PATCH] arm: zimage: add other-bootloader image magic number
@ 2019-05-03 10:19 Christoph Fritz
2019-05-03 11:13 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Fritz @ 2019-05-03 10:19 UTC (permalink / raw)
To: u-boot
For chainboot configurations or test environments, this patch allows
booting other-bootloader images by using command bootz.
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
arch/arm/lib/zimage.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/lib/zimage.c b/arch/arm/lib/zimage.c
index 09ab331..bc2768b 100644
--- a/arch/arm/lib/zimage.c
+++ b/arch/arm/lib/zimage.c
@@ -9,6 +9,7 @@
#include <common.h>
#define LINUX_ARM_ZIMAGE_MAGIC 0x016f2818
+#define BAREBOX_IMAGE_MAGIC 0x00786f62
struct arm_z_header {
uint32_t code[9];
@@ -21,9 +22,10 @@ int bootz_setup(ulong image, ulong *start, ulong *end)
{
struct arm_z_header *zi = (struct arm_z_header *)image;
- if (zi->zi_magic != LINUX_ARM_ZIMAGE_MAGIC) {
+ if (zi->zi_magic != LINUX_ARM_ZIMAGE_MAGIC &&
+ zi->zi_magic != BAREBOX_IMAGE_MAGICE) {
#ifndef CONFIG_SPL_FRAMEWORK
- puts("Bad Linux ARM zImage magic!\n");
+ puts("zimage: Bad magic!\n");
#endif
return 1;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [U-Boot] [PATCH] arm: zimage: add other-bootloader image magic number
2019-05-03 10:19 [U-Boot] [PATCH] arm: zimage: add other-bootloader image magic number Christoph Fritz
@ 2019-05-03 11:13 ` Tom Rini
2019-05-03 11:19 ` [U-Boot] [PATCH v2] arm: zimage: add barebox " Christoph Fritz
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2019-05-03 11:13 UTC (permalink / raw)
To: u-boot
On Fri, May 03, 2019 at 12:19:05PM +0200, Christoph Fritz wrote:
> For chainboot configurations or test environments, this patch allows
> booting other-bootloader images by using command bootz.
>
> Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
> ---
> arch/arm/lib/zimage.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/lib/zimage.c b/arch/arm/lib/zimage.c
> index 09ab331..bc2768b 100644
> --- a/arch/arm/lib/zimage.c
> +++ b/arch/arm/lib/zimage.c
> @@ -9,6 +9,7 @@
> #include <common.h>
>
> #define LINUX_ARM_ZIMAGE_MAGIC 0x016f2818
> +#define BAREBOX_IMAGE_MAGIC 0x00786f62
>
> struct arm_z_header {
> uint32_t code[9];
> @@ -21,9 +22,10 @@ int bootz_setup(ulong image, ulong *start, ulong *end)
> {
> struct arm_z_header *zi = (struct arm_z_header *)image;
>
> - if (zi->zi_magic != LINUX_ARM_ZIMAGE_MAGIC) {
> + if (zi->zi_magic != LINUX_ARM_ZIMAGE_MAGIC &&
> + zi->zi_magic != BAREBOX_IMAGE_MAGICE) {
> #ifndef CONFIG_SPL_FRAMEWORK
> - puts("Bad Linux ARM zImage magic!\n");
> + puts("zimage: Bad magic!\n");
> #endif
> return 1;
> }
Please re-word the commit to be clear you're adding the barebox magic
number, but this is otherwise fine. Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190503/d2ffbb8a/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread* [U-Boot] [PATCH v2] arm: zimage: add barebox image magic number
2019-05-03 11:13 ` Tom Rini
@ 2019-05-03 11:19 ` Christoph Fritz
2019-05-10 11:12 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Fritz @ 2019-05-03 11:19 UTC (permalink / raw)
To: u-boot
For chainboot configurations or test environments, this patch allows
booting barebox images by using command bootz.
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
Changes since v1:
- s/other-bootloader/barebox/
arch/arm/lib/zimage.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/lib/zimage.c b/arch/arm/lib/zimage.c
index 09ab331..bc2768b 100644
--- a/arch/arm/lib/zimage.c
+++ b/arch/arm/lib/zimage.c
@@ -9,6 +9,7 @@
#include <common.h>
#define LINUX_ARM_ZIMAGE_MAGIC 0x016f2818
+#define BAREBOX_IMAGE_MAGIC 0x00786f62
struct arm_z_header {
uint32_t code[9];
@@ -21,9 +22,10 @@ int bootz_setup(ulong image, ulong *start, ulong *end)
{
struct arm_z_header *zi = (struct arm_z_header *)image;
- if (zi->zi_magic != LINUX_ARM_ZIMAGE_MAGIC) {
+ if (zi->zi_magic != LINUX_ARM_ZIMAGE_MAGIC &&
+ zi->zi_magic != BAREBOX_IMAGE_MAGICE) {
#ifndef CONFIG_SPL_FRAMEWORK
- puts("Bad Linux ARM zImage magic!\n");
+ puts("zimage: Bad magic!\n");
#endif
return 1;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-10 11:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-03 10:19 [U-Boot] [PATCH] arm: zimage: add other-bootloader image magic number Christoph Fritz
2019-05-03 11:13 ` Tom Rini
2019-05-03 11:19 ` [U-Boot] [PATCH v2] arm: zimage: add barebox " Christoph Fritz
2019-05-10 11:12 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox