summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/.gitignore1
-rw-r--r--tools/buildman/control.py10
-rw-r--r--tools/buildman/test.py8
-rw-r--r--tools/fit_image.c3
-rw-r--r--tools/ifwitool.c2
-rw-r--r--tools/mtk_image.h86
l---------tools/version.h1
-rw-r--r--tools/zynqmpbif.c2
8 files changed, 55 insertions, 58 deletions
diff --git a/tools/.gitignore b/tools/.gitignore
index bd03d32f68..d0176a7283 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -31,4 +31,5 @@
/spl_size_limit
/sunxi-spl-image-builder
/ubsha1
+/version.h
/xway-swap-bytes
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index fcf531c5f1..9787b86747 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -201,14 +201,14 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
# Work out what subset of the boards we are building
if not boards:
- board_file = os.path.join(options.git, 'boards.cfg')
- status = subprocess.call([os.path.join(options.git,
- 'tools/genboardscfg.py')])
+ board_file = os.path.join(options.output_dir, 'boards.cfg')
+ genboardscfg = os.path.join(options.git, 'tools/genboardscfg.py')
+ status = subprocess.call([genboardscfg, '-o', board_file])
if status != 0:
- sys.exit("Failed to generate boards.cfg")
+ sys.exit("Failed to generate boards.cfg")
boards = board.Boards()
- boards.ReadBoards(os.path.join(options.git, 'boards.cfg'))
+ boards.ReadBoards(board_file)
exclude = []
if options.exclude:
diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index de02f61be6..ed99b9375c 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -156,14 +156,6 @@ class TestBuild(unittest.TestCase):
result.return_code = commit.return_code
result.stderr = (''.join(commit.error_list)
% {'basedir' : base_dir + '/.bm-work/00/'})
- if stage == 'build':
- target_dir = None
- for arg in args:
- if arg.startswith('O='):
- target_dir = arg[2:]
-
- if not os.path.isdir(target_dir):
- os.mkdir(target_dir)
result.combined = result.stdout + result.stderr
return result
diff --git a/tools/fit_image.c b/tools/fit_image.c
index 5aca634b5e..0201cc44d8 100644
--- a/tools/fit_image.c
+++ b/tools/fit_image.c
@@ -229,6 +229,7 @@ static int fit_write_images(struct image_tool_params *params, char *fdt)
for (cont = params->content_head; cont; cont = cont->next) {
if (cont->type != IH_TYPE_FLATDT)
continue;
+ typename = genimg_get_type_short_name(cont->type);
snprintf(str, sizeof(str), "%s-%d", FIT_FDT_PROP, ++upto);
fdt_begin_node(fdt, str);
@@ -253,6 +254,8 @@ static int fit_write_images(struct image_tool_params *params, char *fdt)
fdt_property_string(fdt, FIT_TYPE_PROP, FIT_RAMDISK_PROP);
fdt_property_string(fdt, FIT_OS_PROP,
genimg_get_os_short_name(params->os));
+ fdt_property_string(fdt, FIT_ARCH_PROP,
+ genimg_get_arch_short_name(params->arch));
ret = fdt_property_file(params, fdt, FIT_DATA_PROP,
params->fit_ramdisk);
diff --git a/tools/ifwitool.c b/tools/ifwitool.c
index 2e020a8282..543e9d4e70 100644
--- a/tools/ifwitool.c
+++ b/tools/ifwitool.c
@@ -10,7 +10,9 @@
#include <getopt.h>
#include "os_support.h"
+#ifndef __packed
#define __packed __attribute__((packed))
+#endif
#define KiB 1024
#define ALIGN(x, a) __ALIGN_MASK((x), (typeof(x))(a) - 1)
#define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))
diff --git a/tools/mtk_image.h b/tools/mtk_image.h
index 0a9eab372b..4e78b3d0ff 100644
--- a/tools/mtk_image.h
+++ b/tools/mtk_image.h
@@ -9,14 +9,14 @@
#ifndef _MTK_IMAGE_H
#define _MTK_IMAGE_H
-/* Device header definitions */
+/* Device header definitions, all fields are little-endian */
/* Header for NOR/SD/eMMC */
union gen_boot_header {
struct {
char name[12];
- __le32 version;
- __le32 size;
+ uint32_t version;
+ uint32_t size;
};
uint8_t pad[0x200];
@@ -32,14 +32,14 @@ union nand_boot_header {
char name[12];
char version[4];
char id[8];
- __le16 ioif;
- __le16 pagesize;
- __le16 addrcycles;
- __le16 oobsize;
- __le16 pages_of_block;
- __le16 numblocks;
- __le16 writesize_shift;
- __le16 erasesize_shift;
+ uint16_t ioif;
+ uint16_t pagesize;
+ uint16_t addrcycles;
+ uint16_t oobsize;
+ uint16_t pages_of_block;
+ uint16_t numblocks;
+ uint16_t writesize_shift;
+ uint16_t erasesize_shift;
uint8_t dummy[60];
uint8_t ecc_parity[28];
};
@@ -54,14 +54,14 @@ union nand_boot_header {
/* BootROM layout header */
struct brom_layout_header {
char name[8];
- __le32 version;
- __le32 header_size;
- __le32 total_size;
- __le32 magic;
- __le32 type;
- __le32 header_size_2;
- __le32 total_size_2;
- __le32 unused;
+ uint32_t version;
+ uint32_t header_size;
+ uint32_t total_size;
+ uint32_t magic;
+ uint32_t type;
+ uint32_t header_size_2;
+ uint32_t total_size_2;
+ uint32_t unused;
};
#define BRLYT_NAME "BRLYT"
@@ -90,8 +90,8 @@ struct gen_device_header {
struct gfh_common_header {
uint8_t magic[3];
uint8_t version;
- __le16 size;
- __le16 type;
+ uint16_t size;
+ uint16_t type;
};
#define GFH_HEADER_MAGIC "MMM"
@@ -106,17 +106,17 @@ struct gfh_common_header {
struct gfh_file_info {
struct gfh_common_header gfh;
char name[12];
- __le32 unused;
- __le16 file_type;
+ uint32_t unused;
+ uint16_t file_type;
uint8_t flash_type;
uint8_t sig_type;
- __le32 load_addr;
- __le32 total_size;
- __le32 max_size;
- __le32 hdr_size;
- __le32 sig_size;
- __le32 jump_offset;
- __le32 processed;
+ uint32_t load_addr;
+ uint32_t total_size;
+ uint32_t max_size;
+ uint32_t hdr_size;
+ uint32_t sig_size;
+ uint32_t jump_offset;
+ uint32_t processed;
};
#define GFH_FILE_INFO_NAME "FILE_INFO"
@@ -129,16 +129,16 @@ struct gfh_file_info {
struct gfh_bl_info {
struct gfh_common_header gfh;
- __le32 attr;
+ uint32_t attr;
};
struct gfh_brom_cfg {
struct gfh_common_header gfh;
- __le32 cfg_bits;
- __le32 usbdl_by_auto_detect_timeout_ms;
+ uint32_t cfg_bits;
+ uint32_t usbdl_by_auto_detect_timeout_ms;
uint8_t unused[0x48];
- __le32 usbdl_by_kcol0_timeout_ms;
- __le32 usbdl_by_flag_timeout_ms;
+ uint32_t usbdl_by_kcol0_timeout_ms;
+ uint32_t usbdl_by_flag_timeout_ms;
uint32_t pad;
};
@@ -157,15 +157,15 @@ struct gfh_anti_clone {
uint8_t ac_b2k;
uint8_t ac_b2c;
uint16_t pad;
- __le32 ac_offset;
- __le32 ac_len;
+ uint32_t ac_offset;
+ uint32_t ac_len;
};
struct gfh_brom_sec_cfg {
struct gfh_common_header gfh;
- __le32 cfg_bits;
+ uint32_t cfg_bits;
char customer_name[0x20];
- __le32 pad;
+ uint32_t pad;
};
#define BROM_SEC_CFG_JTAG_EN 1
@@ -184,11 +184,11 @@ struct gfh_header {
union lk_hdr {
struct {
- __le32 magic;
- __le32 size;
+ uint32_t magic;
+ uint32_t size;
char name[32];
- __le32 loadaddr;
- __le32 mode;
+ uint32_t loadaddr;
+ uint32_t mode;
};
uint8_t data[512];
diff --git a/tools/version.h b/tools/version.h
deleted file mode 120000
index bb576071e8..0000000000
--- a/tools/version.h
+++ /dev/null
@@ -1 +0,0 @@
-../include/version.h \ No newline at end of file
diff --git a/tools/zynqmpbif.c b/tools/zynqmpbif.c
index 8c47107c7b..82ce0ac1a5 100644
--- a/tools/zynqmpbif.c
+++ b/tools/zynqmpbif.c
@@ -517,7 +517,7 @@ static int bif_add_bit(struct bif_entry *bf)
debug("Bitstream Length: 0x%x\n", bitlen);
for (i = 0; i < bitlen; i += sizeof(uint32_t)) {
uint32_t *bitbin32 = (uint32_t *)&bitbin[i];
- *bitbin32 = __swab32(*bitbin32);
+ *bitbin32 = __builtin_bswap32(*bitbin32);
}
if (!bf->dest_dev)