Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails with rpi-6.12.y bcmrpi_defconfig (armv6) #6503

Open
ncopa opened this issue Nov 29, 2024 · 6 comments
Open

build fails with rpi-6.12.y bcmrpi_defconfig (armv6) #6503

ncopa opened this issue Nov 29, 2024 · 6 comments

Comments

@ncopa
Copy link
Contributor

ncopa commented Nov 29, 2024

Describe the bug

building the 6.12.y kernel with bcmrpi_defconfig for armv6 fails with:

  CC      kernel/debug/kdb/gen-kdb_cmds.o
kernel/debug/kdb/gen-kdb_cmds.c:3:60: error: expected ',' or ';' before 'Common'
    3 | static __initdata char kdb_cmd0[] = "defcmd dumpcommon "" "Common kdb debugging"\n";
      |                                                            ^~~~~~
kernel/debug/kdb/gen-kdb_cmds.c:12:57: error: expected ',' or ';' before 'First'
   12 | static __initdata char kdb_cmd9[] = "defcmd dumpall "" "First line debugging"\n";
      |                                                         ^~~~~
kernel/debug/kdb/gen-kdb_cmds.c:17:58: error: expected ',' or ';' before 'Same'
   17 | static __initdata char kdb_cmd14[] = "defcmd dumpcpu "" "Same as dumpall but only tasks on cpus"\n";
      |                                                          ^~~~
make[5]: *** [/home/ncopa/aports/main/linux-rpi/src/linux-6.12/scripts/Makefile.build:244: kernel/debug/kdb/gen-kdb_cmds.o] Error 1
make[4]: *** [/home/ncopa/aports/main/linux-rpi/src/linux-6.12/scripts/Makefile.build:485: kernel/debug/kdb] Error 2
make[3]: *** [/home/ncopa/aports/main/linux-rpi/src/linux-6.12/scripts/Makefile.build:485: kernel/debug] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/home/ncopa/aports/main/linux-rpi/src/linux-6.12/scripts/Makefile.build:485: kernel] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/ncopa/aports/main/linux-rpi/src/linux-6.12/Makefile:1936: .] Error 2
make: *** [/home/ncopa/aports/main/linux-rpi/src/linux-6.12/Makefile:224: __sub-make] Error 2

Steps to reproduce the behaviour

make bcmrpi_defconfig && make

Device (s)

Raspberry Pi 1 Mod. B+

System

alpine linux edge

Logs

No response

Additional context

Building the 6.12 RPi kernel for Alpine Linux.

disabling CONFIG_KGDB_KDB makes it build.

@ncopa
Copy link
Contributor Author

ncopa commented Nov 29, 2024

I also got this error:

  INSTALL /home/ncopa/aports/main/linux-rpi/pkg/linux-rpi/boot/bcm2711-rpi-cm4s.dtb                                                                                                 
  INSTALL /home/ncopa/aports/main/linux-rpi/pkg/linux-rpi/boot/overlays/overlay_map.dtb                                                                                             
make[2]: *** No rule to make target '/home/ncopa/aports/main/linux-rpi/pkg/linux-rpi/boot//home/ncopa/aports/main/linux-rpi/src/linux-6.12/arch/arm/boot/dts/overlays/README', neede
d by '__dtbs_install'.  Stop.                                                                                                                                                       
make[2]: *** Waiting for unfinished jobs....                                                                                                                                        
  INSTALL /home/ncopa/aports/main/linux-rpi/pkg/linux-rpi/boot/overlays/hat_map.dtb                                                                                                 
make[1]: *** [/home/ncopa/aports/main/linux-rpi/src/linux-6.12/Makefile:1424: dtbs_install] Error 2                          
make[1]: *** Waiting for unfinished jobs....      

@popcornmix
Copy link
Collaborator

popcornmix commented Nov 29, 2024

I've just tried and it built for me with bcmrpi_defconfig.
Are you able to build the 6.6 kernel?

My line of that file looks like (after building):
static __initdata char kdb_cmd0[] = "defcmd dumpcommon \"\" \"Common kdb debugging\"\n";

Note the extra escape \ characters. I believe this file gets autogenerated by make scripts.
Possibly one of the tools you are using is incompatible.

@pelwell
Copy link
Contributor

pelwell commented Nov 29, 2024

Does arch/arm/boot/dts/overlays/README exist?

@ncopa
Copy link
Contributor Author

ncopa commented Nov 29, 2024

Are you able to build the 6.6 kernel?

I assume I do. I usually do (Haven't tried since 6.6.56 though)

Note the extra escape \ characters. I believe this file gets autogenerated by make scripts.
Possibly one of the tools you are using is incompatible.

This is very helpful. I think this may be a buggy busybox awk. Will investigate.

Does arch/arm/boot/dts/overlays/README exist?

Yes. huh..

ncopa-edge-armhf [~/aports/main/linux-rpi/src/linux-6.12]$ ls -la arch/arm/boot/dts/overlays/README 
-rw-r--r--    1 ncopa    ncopa       252599 Nov 29 13:50 arch/arm/boot/dts/overlays/README

@popcornmix
Copy link
Collaborator

Possibly one of the tools you are using is incompatible.

see kernel/debug/kdb/Makefile. Looks like awk is used to generate that file.

@ncopa
Copy link
Contributor Author

ncopa commented Nov 29, 2024

see kernel/debug/kdb/Makefile. Looks like awk is used to generate that file.

Yes. this is definitively a bug in busybox awk. With AWK=mawk it builds.

make[2]: *** No rule to make target '/home/ncopa/aports/main/linux-rpi/pkg/linux-rpi/boot//home/ncopa/aports/main/linux-rpi/src/linux-6.12/arch/arm/boot/dts/overlays/README', needed by '__dtbs_install'. Stop.

This one is a bug though. I'm installing with something that corresponds to:

_outdir=/home/ncopa/aports/main/linux-rpi/pkg/linux-rpi/boot
make modules_install zinstall dtbs_install \
INSTALL_MOD_PATH="$_outdir" \
INSTALL_PATH="$_outdir"/boot \
INSTALL_DTBS_PATH="$_outdir/boot"

Looks like make rule prefix the source for the README with the target dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants