mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 08/10] filetype: Detect Layerscape PBL images
Date: Wed, 8 May 2019 13:02:54 +0200	[thread overview]
Message-ID: <20190508110254.rpupxhasd6lvn7g7@pengutronix.de> (raw)
In-Reply-To: <20190508090307.17729-9-s.hauer@pengutronix.de>

Hi Sascha,

On Wed, May 08, 2019 at 11:03:05AM +0200, Sascha Hauer wrote:
> The Layerscape SoCs have their own boot image format. Add filetype
> detection for it.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  common/filetype.c  | 4 ++++
>  include/filetype.h | 1 +
>  2 files changed, 5 insertions(+)
> 
> diff --git a/common/filetype.c b/common/filetype.c
> index fb029a7739..f8ae214446 100644
> --- a/common/filetype.c
> +++ b/common/filetype.c
> @@ -75,6 +75,7 @@ static const struct filetype_str filetype_str[] = {
>  	[filetype_elf] = { "ELF", "elf" },
>  	[filetype_imx_image_v1] = { "i.MX image (v1)", "imx-image-v1" },
>  	[filetype_imx_image_v2] = { "i.MX image (v2)", "imx-image-v2" },
> +	[filetype_layerscape_image] = { "Layerscape image", "layerscape PBL" },

The comment above that array says for the "shortname" member:

  const char *shortname;  /* short string without spaces for shell scripts */

So I would recommend to "layerscape-pbl" instead.

 - Roland

>  };
>  
>  const char *file_type_to_string(enum filetype f)
> @@ -329,6 +330,9 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize)
>  	if (is_sparse_image(_buf))
>  		return filetype_android_sparse;
>  
> +	if (buf[0] == 0x55aa55aa && buf[1] == 0x0001ee01)
> +		return filetype_layerscape_image;
> +
>  	if (bufsize < 64)
>  		return filetype_unknown;
>  
> diff --git a/include/filetype.h b/include/filetype.h
> index 395053dd59..cdb39fad38 100644
> --- a/include/filetype.h
> +++ b/include/filetype.h
> @@ -45,6 +45,7 @@ enum filetype {
>  	filetype_elf,
>  	filetype_imx_image_v1,
>  	filetype_imx_image_v2,
> +	filetype_layerscape_image,
>  	filetype_max,
>  };
>  
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Roland Hieber                     | r.hieber@pengutronix.de     |
Pengutronix e.K.                  | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-05-08 11:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08  9:02 [PATCH 00/10] Layerscape patches Sascha Hauer
2019-05-08  9:02 ` [PATCH 01/10] mci: imx-esdhc-pbl: ls1046a: Set better divider values Sascha Hauer
2019-05-08  9:02 ` [PATCH 02/10] ARM: Layerscape: TQMLS1046a: Set cpo_sample value Sascha Hauer
2019-05-08  9:03 ` [PATCH 03/10] ddr: fsl: move fsl_ddr_set_memctl_regs prototype to include/ Sascha Hauer
2019-05-08  9:03 ` [PATCH 04/10] ARM: Layerscape: TQMLS1046a: Use static DDR settings Sascha Hauer
2019-05-08  9:03 ` [PATCH 05/10] ARM: Layerscape: TQMLS1046a: Update device tree files from tq repository Sascha Hauer
2019-05-08  9:03 ` [PATCH 06/10] ARM: Layerscape: TQMLS1046a: Unify SD and eMMC images Sascha Hauer
2019-05-08  9:03 ` [PATCH 07/10] ARM: Layerscape: TQMLS1046a: Fix pinmux setup for i2c4 Sascha Hauer
2019-05-08  9:03 ` [PATCH 08/10] filetype: Detect Layerscape PBL images Sascha Hauer
2019-05-08 11:02   ` Roland Hieber [this message]
2019-05-09  9:50     ` Sascha Hauer
2019-05-09 12:31       ` Roland Hieber
2019-05-08  9:03 ` [PATCH 09/10] net: fsl-fman: Sync rx buffers for device initially Sascha Hauer
2019-05-08  9:03 ` [PATCH 10/10] ARM: Layerscape: defconfig: Enable more features Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190508110254.rpupxhasd6lvn7g7@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox