How to build an OpenWrt image // Compile and Install for Raspberry Pi 4B

preview_player
Показать описание
Support Me

Get a 5% off Ekster Products
(PAID Link)

Follow me on Twitter and Facebook

Description

Welcome back to Dev Odyssey Home Networking! In this episode, we learn how to create our own custom image of OpenWrt. You might be wondering, why would you build a custom image of OpenWrt? With a custom built image of OpenWrt, you can preconfigure your router so that it’s ready to go out of the box. All you have to do is power it on. If there is any configuration you have to do afterwards, a custom image reduces post deployment configuration time. Custom images also make upgrading a breeze. Upgrading with a custom image lets you add packages and new configurations to your existing instance, during the upgrade process without using opkg.

To build OpenWrt, you will need the following.

A Linux/GNU based operating system
At least 2 GB or RAM, and at least 10 to 15 GB of disk space.
4 Core CPU

For this video, I’ll be using:
Debian 11.2 Bullseye VM
8 GB of RAM
50 GB of disk space
4 Core CPU

Links

Build System Setup

Build System Usage

UCI Defaults

00:00 Intro
00:36 Why Build OpenWrt
01:12 Build Requirements
01:40 Prepare Build Environment
03:00 Clone Source Code
05:07 Customize Image
08:02 Choose Packages
10:40 Customize Settings
15:16 Build Image
16:43 Outro

Attributions

Music | "Eternal Sunshine" by LiQWYD & Luke Bergs
LiQWYD:
Luke:

Hammer Icons
Freepik - Flaticon

Debian is a registered trademark owned by Software in the Public Interest, Inc.
OpenWrt is a registered trademark owned by Software Freedom Conservancy (SFC)

#OpenWrt #Compile
Рекомендации по теме
Комментарии
Автор

Would you build your own OpenWrt images? Or continue to download the base OpenWrt image?

DevOdyssey
Автор

This was an excellent and detailed tutorial. I am planning on building a custom OpenWRT image for a new Compute Module 4 cellular router I'm building soon... so this came at almost exactly the right moment. Thanks!

JeffGeerling
Автор

Who Hoo! I just followed your instructions and have a custom firmware for my R2 S router. I have never compiled anything before and cannot believe it was this easy thank you. Lots of fun

kenmcconnell
Автор

Found this right after I built my image but still learned some things, appreciate the work

tjkent
Автор

Thank you for the comprehensive guide, I got my old laptop to work as openwrt router

maxheat
Автор

Thank you for this great and inspiring tutorial!! Just perfect

Alex-pnom
Автор

This video is awesome - thank you! It helped me compile a build for the first time and it worked!

SBigDrop
Автор

Thank you so much for this guide. I was always frustrated that my OpenWrt + RPi4B combination didn't have the "kmod-usb-net-asix-ax88179" driver I needed to run my USB LAN adapter out of the box. This made it really difficult to set up a new RPi4B from scratch since you couldn't connect to OpenWrt and the internet at the same time in order to download the drivers. Now that I have my own custom images with the driver included, this makes upgrading to newer versions of OpenWrt so much quicker/easier, meaning I'm more likely to keep things up to date in the future.

ksflyinghigh
Автор

Nice dev...👍
I will try this, if i have the raspberry...👍👍👍

achannel
Автор

Thanks for this tutorial, I built openwrt with a custom patch for netgear r6850 to fix badly behaving wifi with stock openwrt for r6850

eyzinn
Автор

Hi there, glad i have chanced upon your clear n detailed how to video on how to creatd a openwrt image. I am wondering if this customised image can be docker build into openwrt image for use in a docker container? I am running rpi4 with docker pihole n docker immortalwrt as 1 arm router for my network n learning to create my own customised openwrt for it. Any adivse is greatly appreciated. Thanks

wilk
Автор

Hello, thanks for the great tutorial, I have an imx8 mini verdin toradex, but I'm wondering what I should choose for the target system?

maktabesaei
Автор

A really great guide. I have a Raspberry Pi 2b and I want to make a USB Ethernet router. Since 10:00 I have been entering these commands: nano~/openwrt etc. and it shows that the folder does not exist. I guess I have to create everything myself / etc/config... and so on What do you think?
I think it may also be because I connect via a NAT network card and port 2223, because my network is protected, so I chose it and took a shortcut with SSH.

flfskeg
Автор

Great video, as allways. I will kindly ask you to let some extra time after you type the comands, it get to be somehow difficult to follow and "copy" many times. Thanks for the info, I'll give it a try.

oskar
Автор

That was a great and helpful video. Thank you.
do you have any experience with GL-MT300N-V2 and OpenWrt?

miladmohtashamirad
Автор

Great tutorial! But could you pause about 2 seconds after typing in a command before hitting "enter" so the command doesn't fly by before I can read it?

danahuff
Автор

So I am trying to run this on Debian on a Pi4... eventually following your other video on how to make a 4glte router. I'm new but running into this issue for the open wrt: " Package 'gcc-multilib' has no installation candidate" Thoughts? Do I need to just run this on another version of Debian then use that WRT image to run the Pi?

jasharkey
Автор

From which step should i start if i want to create another build?

jithinsankar
Автор

Great video!!
and i have one question. can we built Openwrt with older kernel? I mean, i want to build Openwrt 21 with kernel version 3.x because the newest kernel (4.x and 5.x) is not stable on my device.
especially the WiFi driver. my device is XiaoMiWifi Mini.
or may be you have another solution for this problem?
thanks in advance.

boluch
Автор

Great video! Thank you. I successfully built a custom image for x86. The x86 is very flexible to tweak but consumes too much power.
Is it possible to build custom firmware image for router that isn't officially supported by OpenWRT? It's not just a random router. For example, there was TP-Link TL-WR840N v4 (version v4) that's still being supported by OpenWRT today but the router was an old model and the manufacturer doesn't make it anymore. Instead, the manufacturer make a newer TL-WR840N (same name) but different version (v6.20). I've checked the hardware is almost identical (same SoC at the very least, Mediatek MT7628N), but different RAM and flash capacity (both downgraded from 8/64 to 4/32). This makes OpenWRT team drops their support. There are many other devices those have the same fate. Can I do something about it? It would be great if there's a way to make a custom firmware image for it. I understand the limitation of a 4/32 device. Just basic routing function would be nice.

sigitharyadi