pmaports/device/linux-samsung-hero2lte/02-fix-dtbtool.patch
William O-D 8ebafdf992 New device: samsung-hero2lte (Samsung Galaxy S7 Edge) (!179)
Display is working in both X and wayland (tested with weston and XFCE).
Not tried with osk-sdl yet, charging-sdl seems to work fine.
USB networking and SSH is working too.

Camera subsystem disabled to prevent bootloops. This device brings its
own dtb.img format, but there's a generator in the kernel source that
is used at build time (patched to make it work properly).

[skip ci]: already built in CI successfully
2019-02-13 21:09:48 +00:00

31 lines
1.2 KiB
Diff

Exynos devices have a special device tree image format, which the built in
script in this kernel source facilitates.
Unfortunately, the script is badly written in the part where command line
arguments are parsed, so this fixes it to create a valid dtb.
diff --git a/scripts/dtbtool_exynos/dtbtool.c b/scripts/dtbtool_exynos/dtbtool.c
index f72fe8662ee..cacd8c69a32 100644
--- a/scripts/dtbtool_exynos/dtbtool.c
+++ b/scripts/dtbtool_exynos/dtbtool.c
@@ -378,13 +378,14 @@ int main(int argc, char **argv)
dt_subtype_code = strtoul(val, 0, 16);
} else if (*arg != '-') {
/* skip over already allocated file names */
- for (; dtb_files[dt_count]; dt_count++)
- if (dt_count >= DTB_MAX)
- fail("reached dtb file limit (%d)", DTB_MAX);
-
- dtb_files[dt_count] = strdup(arg);
- if (!dtb_files[dt_count])
- fail("failed to allocate memory");
+ for (; dtb_files[dt_count]; dt_count++) {
+ if (dt_count >= DTB_MAX) {
+ fail("reached dtb file limit (%d)", DTB_MAX);
+ } else {
+ dtb_files[dt_count] = strdup(arg);
+ if (!dtb_files[dt_count]) fail("failed to allocate memory");
+ }
+ }
} else
usage();
}