From 69ff678711f2c0360b64bec02265797cec5a5783 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Wed, 1 Mar 2023 22:18:14 +0100 Subject: [PATCH] dtc: update to 1.7.0 Changelog: 039a994 Bump version to v1.7.0 3f29d6d pylibfdt: add size_hint parameter for get_path 2022bb1 checks: Update #{size,address}-cells check for 'dma-ranges' abbd523 pylibfdt: Work-around SWIG limitations with flexible arrays a41509b libfdt: Replace deprecated 0-length arrays with proper flexible arrays 2cd89f8 dtc: Warning rather than error on possible truncation of cell values 55778a0 libfdt: tests: add get_next_tag_invalid_prop_len 7359034 libfdt: prevent integer overflow in fdt_next_tag 035fb90 libfdt: add fdt_get_property_by_offset_w helper 98a0700 Makefile: fix infinite recursion by dropping non-existent `%.output` a036cc7 Makefile: limit make re-execution to avoid infinite spin c6e9210 libdtc: remove duplicate judgments e37c256 Don't generate erroneous fixups from reference to path 5045465 libfdt: Don't mask fdt_get_name() returned error e64a204 manual.txt: Follow README.md and remove Jon f508c83 Update README in MANIFEST.in and setup.py to README.md c2ccf8a Add description of Signed-off-by lines 90b9d9d Split out information for contributors to CONTRIBUTING.md 0ee1d47 Remove Jon Loeliger from maintainers list b33a73c Convert README to README.md 7ad6073 Allow static building with meson fd9b8c9 Allow static building with make fda71da libfdt: Handle failed get_name() on BEGIN_NODE c7c7f17 Fix test script to run also on dash shell 01f23ff Add missing relref_merge test to meson test list ed31080 pylibfdt: add FdtRo.get_path() c001fc0 pylibfdt: fix swig build in install 26c54f8 tests: add test cases for label-relative path references ec7986e dtc: introduce label relative path references 651410e util: introduce xstrndup helper 4048aed setup.py: fix out of tree build ff5afb9 Handle integer overflow in check_property_phandle_args() ca72944 README: Explain how to add a new API function c0c2e11 Fix a UB when fdt_get_string return null cd5f69c tests: setprop_inplace: use xstrdup instead of unchecked strdup a04f690 pylibfdt: add Property.as_*int*_array() 8310271 pylibfdt: add Property.as_stringlist() d152126 Fix Python crash on getprop deallocation 17739b7 Support 'r' format for printing raw bytes with fdtget 45f3d1a libfdt: overlay: make overlay_get_target() public c19a4ba libfdt: fix an incorrect integer promotion 1cc41b1 pylibfdt: Add packaging metadata db72398 README: Update pylibfdt install instructions 383e148 pylibfdt: fix with Python 3.10 23b56cb pylibfdt: Move setup.py to the top level 69a7607 pylibfdt: Split setup.py author name and email 0b106a7 pylibfdt: Use setuptools_scm for the version c691776 pylibfdt: Use setuptools instead of distutils 5216f3f libfdt: Add static lib to meson build 4eda259 CI: Cirrus: bump used FreeBSD from 12.1 to 13.0 0a3a9d3 checks: Add an interrupt-map check 8fd2474 checks: Ensure '#interrupt-cells' only exists in interrupt providers d8d1a9a checks: Drop interrupt provider '#address-cells' check 52a16fd checks: Make interrupt_provider check dependent on interrupts_extended_is_cell 37fd700 treesource: Maintain phandle label/path on output e33ce1d flattree: Use '\n', not ';' to separate asm pseudo-ops d24cc18 asm: Use assembler macros instead of cpp macros ff3a30c asm: Use .asciz and .ascii instead of .string 5eb5927 fdtdump: fix -Werror=int-to-pointer-cast 0869f82 libfdt: Add ALIGNMENT error string 69595a1 checks: Fix bus-range check 72d09e2 Makefile: add -Wsign-compare to warning options b587787 checks: Fix signedness comparisons warnings 69bed6c dtc: Wrap phandle validity check 9102211 fdtget: Fix signedness comparisons warnings d966f08 tests: Fix signedness comparisons warnings ecfb438 dtc: Fix signedness comparisons warnings: pointer diff 5bec74a dtc: Fix signedness comparisons warnings: reservednum 24e7f51 fdtdump: Fix signedness comparisons warnings Remove upstreamed: - 0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch Signed-off-by: Nick Hainke --- package/utils/dtc/Makefile | 4 +- ...t-for-printing-raw-bytes-with-fdtget.patch | 137 ------------------ 2 files changed, 2 insertions(+), 139 deletions(-) delete mode 100644 package/utils/dtc/patches/0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch diff --git a/package/utils/dtc/Makefile b/package/utils/dtc/Makefile index 94534b9c5e9a..5b1a38d50f82 100644 --- a/package/utils/dtc/Makefile +++ b/package/utils/dtc/Makefile @@ -5,11 +5,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dtc -PKG_VERSION:=1.6.1 +PKG_VERSION:=1.7.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=65cec529893659a49a89740bb362f507a3b94fc8cd791e76a8d6a2b6f3203473 +PKG_HASH:=29edce3d302a15563d8663198bbc398c5a0554765c83830d0d4c0409d21a16c4 PKG_SOURCE_URL:=@KERNEL/software/utils/dtc PKG_MAINTAINER:=Yousong Zhou diff --git a/package/utils/dtc/patches/0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch b/package/utils/dtc/patches/0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch deleted file mode 100644 index f7731f1a9d53..000000000000 --- a/package/utils/dtc/patches/0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch +++ /dev/null @@ -1,137 +0,0 @@ -From 17739b7ef510917471409d71fb45d8eaf6a1e1fb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Thu, 9 Dec 2021 07:14:20 +0100 -Subject: [PATCH] Support 'r' format for printing raw bytes with fdtget -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -FT is sometimes used for storing raw data. That is quite common for -U-Boot FIT images. - -Extracting such data is not trivial currently. Using type 's' (string) -will replace every 0x00 (NUL) with 0x20 (space). Using type 'x' will -print bytes but in xxd incompatible format. - -This commit adds support for 'r' (raw) format. Example usage: -fdtget -t r firmware.itb /images/foo data > image.raw - -Support for encoding isn't added as there isn't any clean way of passing -binary data as command line argument. - -Signed-off-by: Rafał Miłecki -Message-Id: <20211209061420.29466-1-zajec5@gmail.com> -Signed-off-by: David Gibson ---- - Documentation/manual.txt | 2 +- - fdtget.c | 5 +++++ - fdtput.c | 2 ++ - tests/run_tests.sh | 2 ++ - tests/utilfdt_test.c | 5 ++++- - util.c | 4 ++-- - util.h | 3 ++- - 7 files changed, 18 insertions(+), 5 deletions(-) - ---- a/Documentation/manual.txt -+++ b/Documentation/manual.txt -@@ -712,7 +712,7 @@ The syntax of the fdtget command is: - - where options are: - -- s=string, i=int, u=unsigned, x=hex -+ s=string, i=int, u=unsigned, x=hex, r=raw - Optional modifier prefix: - hh or b=byte, h=2 byte, l=4 byte (default) - ---- a/fdtget.c -+++ b/fdtget.c -@@ -91,6 +91,11 @@ static int show_data(struct display_info - if (len == 0) - return 0; - -+ if (disp->type == 'r') { -+ fwrite(data, 1, len, stdout); -+ return 0; -+ } -+ - is_string = (disp->type) == 's' || - (!disp->type && util_is_printable_string(data, len)); - if (is_string) { ---- a/fdtput.c -+++ b/fdtput.c -@@ -433,6 +433,8 @@ int main(int argc, char *argv[]) - if (utilfdt_decode_type(optarg, &disp.type, - &disp.size)) - usage("Invalid type string"); -+ if (disp.type == 'r') -+ usage("Unsupported raw data type"); - break; - - case 'v': ---- a/tests/run_tests.sh -+++ b/tests/run_tests.sh -@@ -852,6 +852,8 @@ fdtget_tests () { - run_fdtget_test 8000 -tx $dtb /cpus/PowerPC,970@1 d-cache-size - run_fdtget_test "61 62 63 0" -tbx $dtb /randomnode tricky1 - run_fdtget_test "a b c d de ea ad be ef" -tbx $dtb /randomnode blob -+ run_fdtget_test "MyBoardName\0MyBoardFamilyName\0" -tr $dtb / compatible -+ run_fdtget_test "\x0a\x0b\x0c\x0d\xde\xea\xad\xbe\xef" -tr $dtb /randomnode blob - - # Here the property size is not a multiple of 4 bytes, so it should fail - run_wrap_error_test $DTGET -tlx $dtb /randomnode mixed ---- a/tests/utilfdt_test.c -+++ b/tests/utilfdt_test.c -@@ -73,6 +73,9 @@ static void check_sizes(char *modifier, - - *ptr = 's'; - check(fmt, 's', -1); -+ -+ *ptr = 'r'; -+ check(fmt, 'r', -1); - } - - static void test_utilfdt_decode_type(void) -@@ -90,7 +93,7 @@ static void test_utilfdt_decode_type(voi - /* try every other character */ - checkfail(""); - for (ch = ' '; ch < 127; ch++) { -- if (!strchr("iuxs", ch)) { -+ if (!strchr("iuxsr", ch)) { - *fmt = ch; - fmt[1] = '\0'; - checkfail(fmt); ---- a/util.c -+++ b/util.c -@@ -353,11 +353,11 @@ int utilfdt_decode_type(const char *fmt, - } - - /* we should now have a type */ -- if ((*fmt == '\0') || !strchr("iuxs", *fmt)) -+ if ((*fmt == '\0') || !strchr("iuxsr", *fmt)) - return -1; - - /* convert qualifier (bhL) to byte size */ -- if (*fmt != 's') -+ if (*fmt != 's' && *fmt != 'r') - *size = qualifier == 'b' ? 1 : - qualifier == 'h' ? 2 : - qualifier == 'l' ? 4 : -1; ---- a/util.h -+++ b/util.h -@@ -143,6 +143,7 @@ int utilfdt_write_err(const char *filena - * i signed integer - * u unsigned integer - * x hex -+ * r raw - * - * TODO: Implement ll modifier (8 bytes) - * TODO: Implement o type (octal) -@@ -160,7 +161,7 @@ int utilfdt_decode_type(const char *fmt, - */ - - #define USAGE_TYPE_MSG \ -- "\ts=string, i=int, u=unsigned, x=hex\n" \ -+ "\ts=string, i=int, u=unsigned, x=hex, r=raw\n" \ - "\tOptional modifier prefix:\n" \ - "\t\thh or b=byte, h=2 byte, l=4 byte (default)"; - -- 2.30.2