Rpi4 build failing due to missing files

I'm trying to build an openwrt image for my rpi 4. I'm getting this error on target/linux/install:

mcopy -i /home/skupien/dev-openwrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/tmp/openwrt-bcm27xx-bcm2711-rpi-4-squashfs-factory.img.gz.boot /home/skupien/dev-openwrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/LICENCE.broadcom ::
/home/skupien/dev-openwrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/LICENCE.broadcom: No such file or directory

touch on the missing file moves the build process one step ahead and there are a couple more files missing. The same fix on them ends up in the build succeding but this doesn't feel right. Why are those files missing?``

Did you use the firmware selector and use "Customize installed packages and/or first boot script"?

No I haven't. Didn't know this thing existed. It's the first time I'm building openwrt and following a youtube tutorial that didn't mention this. Is there any comprehensive guide on building openwrt for rpi?

I've walked people through this before but every build is different.

When you have time, repost here. I'll track this thread as 'watching' and make it work.

It takes up to an hour of back and forth and I'm on EDT.

And if you were trying NETWORK CHUCK on YT, just give up and come back here.

I watched this:

How to build an OpenWrt image // Compile and Install for Raspberry Pi 4B (youtube.com)

But this doesn't seem to work on my debian 11 machine with latest openwrt tag...
I seem to be missing firmware files that are copied to boot partition during target/linux/install build stage. I could just probably copy them there to destinantion path but shouldn't build system fetch them? Now I checked out the same tag as the tutorial guy to see if it works.

I don't build OpenWrt in VMs.

If that is your goal, you are really taxing the Pi4.
I'm willing to watch that video to see where it messes up but the first 20 seconds said "build from the ground up".

It is your call.

I'm not building in a vm either. I've cloned openwrt, have all the build dependencies, ran thefeed update and install script, configured menuconfig for rpi4, ran make download and then make -j4 and it failed during target/linux/install as I mentioned. I have no idea if there's anything wrong with the video. It seemed to work for the author. Is there a way to make build system fetch those missing firmware files? Is there perhaps a step that I'm missing?

I do not know. I can help you make the Pi4 a dedicated OpenWrt router.
I feel like we might have different goals.?

I want to build openwrt image for rpi4 using openwrt build system - that's my goal.

If the Pi4 has nothing else to do we will make it work.

You will need:
A USB ethernet dongle. I suggest this one. or a very smart switch. Regardless, you will need it and a switch if you want ethernet too.

You will need an industrial grade sd card, eventually. (not to start, but for longevity)
I suggest this one.

If you want whole house (as opposed to apartment size) WiFi you will need a cheap WiFi router; preferably one that can be flashed to OpenWrt. Your choice.
If you only want one spectrum (2.4 or 5) the Pi is fine for short distances.

I don't need it to work at all at this point. I'm just learning how the build system works because that's what I do for a living. If I wanted an rpi4 router I'd just get a ready image. I want to make the image build.

Understood and no problem.

Do you have any USB dongles you want to use?
Can we set this up for tomorrow or later? I was up at 4 and it is getting late.

or, you can use the link to the firmware and it will run but the WiFi will be off by default and you will need to set a device to 192.168.1.x to get into the router @192.168.1.1 using ethernet.

I'm pretty sure I don't need a dongle at this point cause I'm not going to use this image on target. I just want to build it. I'm a bit tired as well, so thanks for your advice and if you know how to resolve the issue I described in my initial post then please let me know whenever it's ok with you.

I'll watch the video but I doubt it is going to resolve anything.

You can build anything you want using the link and choose "Customize installed packages and/or first boot script" then add or subtract.

Or just use the link and build away.

You can chop down a tree with a hammer but I discourage it.
Play around with the build and then go wild.

The video does not have the fix for my issue. Using a script to build an image does not help me achieve my goal - learning openwrt build system.

Agree to disagree.

But I'm not watching that video when I know how to walk you through this when you won't even try baby steps because of ego.
No one here knows how that video tripped you up.

We don't fix YT videos here. We provide solutions.

I'm cool with that. Perhaps someone else will know. And... Ego?

1 Like

Pure ego. You watched a ~20 minute video, spent gawd knows how much time trying to make it work, and got nowhere. I'm trying to help but you want to code.

@psherman has much more patience than me, maybe you and he will work this out. And there are many that know the basic code you reject. (someone put a lot of effort into that firmware build and customizations you reject).

Regardless, I'll keep the thread as 'watching'.

Is the bcm27xx-gpu-fw package part of your make config? It gets downloaded from the RPi github repo during make download. It should be selected by default for rpi4.

What’s your scripts/diffconfig.sh output?

https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem#configure_using_config_diff_file

2 Likes

Thanks :slight_smile: I'm almost certain it's been included but I'll double check after I get some sleep :slight_smile: