]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - tools/imximage.h
Merge branch 'tx48-devel' into uboot-merge
[karo-tx-uboot.git] / tools / imximage.h
index 42b60906fd3adfef0e82caa38f0e77b01bc76af5..214187bb8c5aa308760116524be4b126ceaf89ed 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2009
  * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+ 
  */
 
 #ifndef _IMXIMAGE_H_
 
 #define HEADER_OFFSET  0x400
 
+/*
+ * NOTE: This file must be kept in sync with arch/arm/include/asm/\
+ *       imx-common/imximage.cfg because tools/imximage.c can not
+ *       cross-include headers from arch/arm/ and vice-versa.
+ */
 #define CMD_DATA_STR   "DATA"
 #define FLASH_OFFSET_UNDEFINED 0xFFFFFFFF
 #define FLASH_OFFSET_STANDARD  0x400
@@ -52,6 +41,7 @@ enum imximage_cmd {
        CMD_INVALID,
        CMD_IMAGE_VERSION,
        CMD_BOOT_FROM,
+       CMD_BOOT_OFFSET,
        CMD_DATA
 };
 
@@ -151,13 +141,14 @@ typedef struct {
        dcd_v2_t dcd_table;
 } imx_header_v2_t;
 
+/* The header must be aligned to 4k on MX53 for NAND boot */
 struct imx_header {
        union {
                imx_header_v1_t hdr_v1;
                imx_header_v2_t hdr_v2;
        } header;
        uint32_t flash_offset;
-};
+} __attribute__((aligned(4096)));
 
 typedef void (*set_dcd_val_t)(struct imx_header *imxhdr,
                                        char *name, int lineno,