NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/60814: Kernel build using existing /usr/tools fails with: "src/sys/dev/fdt/files.fdt:205: `fdt' is not a plain attribute"



>Number:         60814
>Category:       kern
>Synopsis:       Kernel build using existing /usr/tools fails with: "src/sys/dev/fdt/files.fdt:205: `fdt' is not a plain attribute"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 27 19:45:00 +0000 2026
>Originator:     Alexander Schreiber
>Release:        NetBSD 11.0 RELEASE
>Organization:
Not Much
>Environment:
NetBSD gondor.angband.thangorodrim.de 10.1 NetBSD 10.1 (GENERIC) #0: Thu Dec 19 22:08:33 CET 2024  root%gondor.angband.thangorodrim.de@localhost:/usr/obj/sys/arch/amd64/compile/GENERIC amd64

>Description:
Build GENERIC kernel from HEAD/20260927052045Z snapshot fails with:

---------- cut here -----------
src/sys/dev/fdt/files.fdt:205: `fdt' is not a plain attribute
*** Stop.

ERROR: nbconfig failed for GENERIC
---------- cut here -----------

And while this can be "fixed" with the following trivial hacksawing:

---------- cut here -----------
--- /zfs/build/HEAD/20260927052045Z/usr/src/sys/dev/fdt/files.fdt.orig  2026-09-27 18:30:17.867019067 +0200
+++ /zfs/build/HEAD/20260927052045Z/usr/src/sys/dev/fdt/files.fdt       2026-09-27 18:30:26.266040396 +0200
@@ -202,7 +202,7 @@
 file   dev/fdt/cdns3_fdt.c                     cdns3_fdt
 
 # Designware USB2 OTG
-attach dwctwo at fdt with dwc2_fdt: fdt, fdt_clock, fdt_phy
+attach dwctwo at fdt with dwc2_fdt: fdt_clock, fdt_phy
 file   dev/fdt/dwc2_fdt.c                      dwc2_fdt
 
 # Designware USB3 XHCI
---------- cut here -----------

I very strongly assume that this is the wrong way to fix it, though ... ;-)

And in fact, if one actually builds new tools from that same
snapshot and uses those, the build completes.

So it should be documented that one needs to build new tools for this
to work, assuming it hasn't been done already. But
https://www.netbsd.org/docs/guide/en/chap-updating.html appears to assume
that an existing /usr/tools as is Just Works? and 
https://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/UPDATING?rev=1.383.2.1;content-type=text%2Fplain
does not mention having to rebuild tools for native builds.

This was originally noticed on an Erlite3 with NetBSD 11, but it reproduces the same
on a fresh NetBSD 11.0 amd64 install.

I assume the autobuilders always build new tools, which would mask this.


>How-To-Repeat:
Grab HEAD/20260927052045Z snapshot, unpack on an existing NetBSD 11.0 install
and build the kernel using 

./build.sh -O ../obj -T /usr/tools -U kernel=GENERIC

Observe build failure.

Build new tools:
./build.sh -U -O ../obj  tools




>Fix:
First, build new tools:
  ./build.sh -U -O ../obj  tools
the use those to build the kernel (
  ./build.sh -j4 -O ../obj -T ../obj/tooldir.NetBSD-11.0-amd64/ -U kernel=GENERIC

Observe a successful build.




Home | Main Index | Thread Index | Old Index