colibri_imx6: fix video stdout in default environment
[oweals/u-boot.git] / tools / mksunxiboot.c
index db0f10ec2967e0f8fbb0df561d856088e14f2288..a18c9d98bc7d1b814b1e0c775bcfcbc1809ab512 100644 (file)
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2007-2011
  * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
  * Tom Cubie <tangliang@allwinnertech.com>
  *
  * a simple tool to generate bootable image for sunxi platform.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <fcntl.h>
 #include <stdio.h>
@@ -15,6 +14,7 @@
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include "imagetool.h"
 #include "../arch/arm/include/asm/arch-sunxi/spl.h"
 
 #define STAMP_VALUE                     0x5F0A6C39
@@ -45,9 +45,6 @@ int gen_check_sum(struct boot_file_head *head_p)
        return 0;
 }
 
-#define ALIGN(x, a) __ALIGN_MASK((x), (typeof(x))(a)-1)
-#define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))
-
 #define SUNXI_SRAM_SIZE 0x8000 /* SoC with smaller size are limited before */
 #define SRAM_LOAD_MAX_SIZE (SUNXI_SRAM_SIZE - sizeof(struct boot_file_head))