Revision | 40136aff3a34b5d59f2b389b635138501c7c4a0b (tree) |
---|---|
Time | 2022-08-01 18:42:25 |
Author | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
RX: binman support.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
@@ -1014,6 +1014,8 @@ INPUTS-$(CONFIG_X86) += u-boot-x86-start16.bin u-boot-x86-reset16.bin \ | ||
1014 | 1014 | $(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \ |
1015 | 1015 | $(if $(CONFIG_TPL_X86_16BIT_INIT),tpl/u-boot-tpl.bin) |
1016 | 1016 | |
1017 | +INPUTS-$(CONFIG_RX) += u-boot-rx-vector.bin | |
1018 | + | |
1017 | 1019 | LDFLAGS_u-boot += $(LDFLAGS_FINAL) |
1018 | 1020 | |
1019 | 1021 | # Avoid 'Not enough room for program headers' error on binutils 2.28 onwards. |
@@ -1268,7 +1270,8 @@ spl/u-boot-spl.srec: spl/u-boot-spl FORCE | ||
1268 | 1270 | |
1269 | 1271 | OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \ |
1270 | 1272 | $(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) \ |
1271 | - $(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),$(if $(CONFIG_OF_EMBED),,-R .bootpg -R .resetvec)) | |
1273 | + $(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),$(if $(CONFIG_OF_EMBED),,-R .bootpg -R .resetvec)) \ | |
1274 | + $(if $(CONFIG_RX),-R .vector) | |
1272 | 1275 | |
1273 | 1276 | binary_size_check: u-boot-nodtb.bin FORCE |
1274 | 1277 | @file_size=$(shell wc -c u-boot-nodtb.bin | awk '{print $$1}') ; \ |
@@ -1654,6 +1657,13 @@ u-boot-x86-reset16.bin: u-boot FORCE | ||
1654 | 1657 | |
1655 | 1658 | endif # CONFIG_X86 |
1656 | 1659 | |
1660 | +ifdef CONFIG_RX | |
1661 | +OBJCOPYFLAGS_u-boot-rx-vector.bin := -O binary -j .vector | |
1662 | +u-boot-rx-vector.bin: u-boot FORCE | |
1663 | + $(call if_changed,objcopy) | |
1664 | + | |
1665 | +endif # CONFIG_RX | |
1666 | + | |
1657 | 1667 | OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI) |
1658 | 1668 | u-boot-app.efi: u-boot FORCE |
1659 | 1669 | $(call if_changed,zobjcopy) |
@@ -0,0 +1,24 @@ | ||
1 | +// SPDX-License-Identifier: GPL-2.0+ | |
2 | +/* | |
3 | + * Copyright 2022 Yoshinori Sato | |
4 | + */ | |
5 | + | |
6 | +#include <config.h> | |
7 | + | |
8 | +/ { | |
9 | + binman { | |
10 | + filename = "u-boot-with-dtb.bin"; | |
11 | + skip-at-start = <CONFIG_SYS_TEXT_BASE>; | |
12 | + sort-by-offset; | |
13 | + pad-byte = <0xff>; | |
14 | + u-boot-nodtb { | |
15 | + }; | |
16 | + u-boot-dtb { | |
17 | + }; | |
18 | + fdtmap { | |
19 | + }; | |
20 | + rx-vector { | |
21 | + offset = <0xffffff80>; | |
22 | + }; | |
23 | + }; | |
24 | +}; |
@@ -0,0 +1,23 @@ | ||
1 | +# SPDX-License-Identifier: GPL-2.0+ | |
2 | +# Copyright (c) 2022 Yoshinori Sato | |
3 | +# | |
4 | +# Entry-type module for the RX CPU exception vector for U-Boot | |
5 | +# | |
6 | + | |
7 | +from binman.entry import Entry | |
8 | +from binman.etype.blob import Entry_blob | |
9 | + | |
10 | +class Entry_rx_vector(Entry_blob): | |
11 | + """RX CPU exception vector for U-Boot | |
12 | + | |
13 | + Properties / Entry arguments: | |
14 | + - filename: Filename of u-boot-rx-vector.bin (default | |
15 | + 'u-boot-rx-vector.bin') | |
16 | + | |
17 | + RX CPU have exception vector table in top of memory area. | |
18 | + """ | |
19 | + def __init__(self, section, etype, node): | |
20 | + super().__init__(section, etype, node) | |
21 | + | |
22 | + def GetDefaultFilename(self): | |
23 | + return 'u-boot-rx-vector.bin' |