Applying distribution patches for u-boot-rpi4-2020.04 fails during build (poudriere-devel context)

Mark Millard marklmi at yahoo.com
Sat Apr 25 07:43:38 UTC 2020


From the log file:

===>  Patching for u-boot-rpi4-2020.04
===>  Applying distribution patches for u-boot-rpi4-2020.04
2 out of 2 hunks failed--saving rejects to scripts/dtc/libfdt/fdt_addresses.c.rej
*** Error code 1

Details:

amd64 head -r360289 context. Ports head -r532914 context.

# svnlite status /usr/ports/sysutils/u-boot-rpi4/
# 

# svnlite status /usr/ports/sysutils/u-boot-master/
# 

# more /wrkdirs/usr/ports/sysutils/u-boot-rpi4/work/u-boot-2020.04/scripts/dtc/libfdt/fdt_addresses.c.rej
@@ -1,6 +1,7 @@
 /*
  * libfdt - Flat Device Tree manipulation
  * Copyright (C) 2014 David Gibson <david at gibson.dropbear.id.au>
+ * Copyright (C) 2018 embedded brains GmbH
  *
  * libfdt is dual licensed: you can use it either under the terms of
  * the GPL, or the BSD license, at your option.
@@ -55,42 +56,32 @@
 
 #include "libfdt_internal.h"
 
-int fdt_address_cells(const void *fdt, int nodeoffset)
+static int fdt_cells(const void *fdt, int nodeoffset, const char *name)
 {
-       const fdt32_t *ac;
+       const fdt32_t *c;
        int val;
        int len;
 
-       ac = fdt_getprop(fdt, nodeoffset, "#address-cells", &len);
-       if (!ac)
+       c = fdt_getprop(fdt, nodeoffset, name, &len);
+       if (!c)
                return 2;
 
-       if (len != sizeof(*ac))
+       if (len != sizeof(*c))
                return -FDT_ERR_BADNCELLS;
 
-       val = fdt32_to_cpu(*ac);
+       val = fdt32_to_cpu(*c);
        if ((val <= 0) || (val > FDT_MAX_NCELLS))
                return -FDT_ERR_BADNCELLS;
 
        return val;
 }
 
-int fdt_size_cells(const void *fdt, int nodeoffset)
+int fdt_address_cells(const void *fdt, int nodeoffset)
 {
-       const fdt32_t *sc;
-       int val;
-       int len;
-
-       sc = fdt_getprop(fdt, nodeoffset, "#size-cells", &len);
-       if (!sc)
-               return 2;
-
-       if (len != sizeof(*sc))
-               return -FDT_ERR_BADNCELLS;
-
-       val = fdt32_to_cpu(*sc);
-       if ((val < 0) || (val > FDT_MAX_NCELLS))
-               return -FDT_ERR_BADNCELLS;
+       return fdt_cells(fdt, nodeoffset, "#address-cells");
+}
 
-       return val;
+int fdt_size_cells(const void *fdt, int nodeoffset)
+{
+       return fdt_cells(fdt, nodeoffset, "#size-cells");
 }


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-ports mailing list