Make image stops at random number generator (bcm27xx)

Hi,

I've been compiling my own image for a Raspberry Pi 4 for a couple months with no problem.

Lately, "make" has been stopping at a particular phase of the build process. It hangs with no error message. I've tried "make clean", "make distclean" and recloning via git.

The last couple lines from the log file are below.

Is there a way that I can debug this further?

Thanks

*
* Restart config...
*
*
* Hardware Random Number Generator Core support
*
Hardware Random Number Generator Core support (HW_RANDOM) [Y/n/m/?] y
  Timer IOMEM HW Random Number Generator support (HW_RANDOM_TIMERIOMEM) [N/m/y/?] n
  Broadcom BCM2835/BCM63xx Random Number Generator support (HW_RANDOM_BCM2835) [Y/n/m/?] (NEW) 

Compile blocked by interactive questions - #2 by vgaetera

1 Like

Thanks for the help. I ran "make defconfig" and got the following output:

$ make defconfig
#
# No change to .config
#

Unfortunately, that didn't help the issue. The compilation still stopped at the same point when I tried to compile an image after running "make defconfig".

I ended up running the make command from the shell directly and selecting Y when the question popped up. It seems to be compiling fine. I ran it with the following:

make -j1 V=s

instead of this:

make -j7 V=s 2>&1 | tee build.log | grep -i -E "^make.*(error|[12345]...Entering dir)"

Remove your .config before running make defconfig, then run make menuconfig.

make defconfig will create your initial .config file with the defaults, but it doesn't overwrite an existing config file.

2 Likes

The problem is some kernel config symbol is missing in OpenWrt, so probably a bug.
You should use make kernel_menuconfig.

2 Likes

I suspect you might be using your own kernel config and have changed the target's default config. Then an update to the kernel in openwrt has introduced new symbols or suchlike, but your kernel config doesn't have them, so this is why it's prompting you.

If this is what you're doing, I generally find, for me at least, that it's easiest to manage a custom kernel config by leaving the target's kernel config alone and running

make kernel_menuconfig CONFIG_TARGET=env

It then puts any changes you make to the base config in env/kernel-config, adds them whenever you compile, and you won't have these problems again if the base kernel configuration adds new symbols.

3 Likes

This worked. I think there is a symbol missing from the default kernel configuration file /target/linux/bcm27xx/bcm2711/config-5.4. There was a new line (just one) added to the file after I ran make kernel_menuconfig

CONFIG_HW_RANDOM_BCM2835=y

Thanks so much for the help.

Source code is your friend...
https://git.openwrt.org/?p=openwrt/openwrt.git;a=history;f=target/linux/bcm27xx;hb=HEAD

That line was intentionally removed two weeks ago from bcm27xx: bcm2711 by @Noltari with this commit:

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=bac74aff5e36288ee9a3b1eb9d6c0cc94274be82

bcm27xx: bcm2711: disable HW_RANDOM_BCM2835

This driver is only present on BCM2708, BCM2709 and BCM2710.

1 Like

Might be that it should be introduced from the whole bcm27xx as disabled (or into bcm2711), as apparently now there is no default value for it in bcm2711 ???

Does that mean the line should be there as:

CONFIG_HW_RANDOM_BCM2835=n

When I compile it with a default configuration file, the compilation stops waiting for user input. when I run make kernel_menuconfig, HW_RANDOM gets set to "y" for bcm2711.

Is there a way I could track down that dependency?

No.
If you look at the config file, you can see that the "disabled" items are like this:

# CONFIG_HW_RANDOM_BCM2835 is not set

.

By looking at the full Linux kernel sources?

2 Likes

Thanks for the help @hnyman. I added the following line to the /target/linux/bcm27xx/bcm2711/config-5.4 file and the compilation ran perfectly.

Fixed in https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=f93b544f012e958884fefb24448a66867e55d63b

Thanks @hnyman!

Thanks @Noltari.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.