[U-Boot] [PATCH v2] fastboot: Add support for flashing zImage

Tom Rini trini at konsulko.com
Wed May 17 22:20:56 UTC 2017


On Wed, May 17, 2017 at 08:20:47PM +0300, Sam Protsenko wrote:

> This patch adds support for flashing zImage to the Android boot
> partition on eMMC.
[snip]
> +#ifdef CONFIG_ANDROID_BOOT_IMAGE
> +	if (strcmp(cmd, "zImage") == 0 || strcmp(cmd, "zimage") == 0) {

strncasecmp(cmd, "zimage", 6) ?

> diff --git a/include/android_image.h b/include/android_image.h
> index dfd4d9d72c..c058b1d388 100644
> --- a/include/android_image.h
> +++ b/include/android_image.h
> @@ -12,6 +12,8 @@
>  #ifndef _ANDROID_IMAGE_H_
>  #define _ANDROID_IMAGE_H_
>  
> +#include <linux/types.h>
> +
>  typedef struct andr_img_hdr andr_img_hdr;
>  
>  #define ANDR_BOOT_MAGIC "ANDROID!"

Unneeded.

> diff --git a/include/linux/compat.h b/include/linux/compat.h
> index a43e4d6698..b0ff6b91f0 100644
> --- a/include/linux/compat.h
> +++ b/include/linux/compat.h
> @@ -111,6 +111,9 @@ static inline void kmem_cache_destroy(struct kmem_cache *cachep)
>  
>  #define PAGE_SIZE	4096
>  
> +/* to align the pointer to the (next) page boundary */
> +#define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)

Just use ALIGN() in the code you're writing?  This is for things we're
pulling directly from Linux really.

Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170517/e631733d/attachment.sig>


More information about the U-Boot mailing list