]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - tools/ublimage.c
arm: mx5: clock: fix PLL_FREQ_MIN() calculation
[karo-tx-uboot.git] / tools / ublimage.c
index 99874622d057c887032324ef0e4af2381fe689e5..6495db6d6a8bf8488ae56e7740eaa30ed6bd38de 100644 (file)
  * Marvell Semiconductor <www.marvell.com>
  * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
  *
- * 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+ 
  */
 
 /* Required to obtain the getline prototype from stdio.h */
@@ -214,6 +198,11 @@ static int ublimage_check_image_types(uint8_t type)
 static int ublimage_verify_header(unsigned char *ptr, int image_size,
                        struct mkimage_params *params)
 {
+       struct ubl_header *ubl_hdr = (struct ubl_header *)ptr;
+
+       if ((ubl_hdr->magic & 0xFFFFFF00) != UBL_MAGIC_BASE)
+               return -1;
+
        return 0;
 }