
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!