Newbie wants to build (GL-MT6000)

Before somebody bites me :smiley: : Given the hardware resources of this model, following question doesn't make any sense. I created this topic just to understand build process better and to be sure I'm not going to brick my router as I never built images myself. With that out of the way, let's start!

Hello developers,
First of all, many thanks for your hard work in the OpenWrt community.

I have GL-MT6000 router and would like to build image myself. I downloaded and extracted image builder archive from here and ran make info.

Default packages are following:

base-files ca-bundle dropbear fstools libc libgcc libustream-mbedtls logd mtd netifd opkg uci uclient-fetch urandom-seed urngd busybox procd procd-ujail procd-seccomp kmod-leds-gpio kmod-gpio-button-hotplug fitblk kmod-phy-aquantia kmod-crypto-hw-safexcel kmod-mt7915e wpad-basic-mbedtls uboot-envtools dnsmasq firewall4 nftables kmod-nft-offload odhcp6c odhcpd-ipv6only ppp ppp-mod-pppoe

Under profile for my router, there are additional packages:

    GL.iNet GL-MT6000
    Packages: e2fsprogs f2fsck mkf2fs kmod-usb3 kmod-mt7986-firmware mt7986-wo-firmware
    hasImageMetadata: 1
    SupportedDevices: glinet,gl-mt6000

Are all of these packages absolutely necessary to have operational router (not talking about all the features, but not having brick on my table)?

I've read through docs and tutorials about building your own image and some packages like ppp ppp-mod-pppoe can be removed if you're not using that particular feature. What confuses me are other packages, which, by their description, shouldn't be needed for router operation, only if I want additional feature like e.g. connecting drive to USB to extend storage.

Now, if my use case is following:

  • No need for DHCPv6, only as a client for WAN
  • No need for USB
  • No need for PPPoE

I would build image like this:
make image PROFILE="glinet_gl-mt6000" PACKAGES="-odhcpd-ipv6only -ppp -ppp-mod-pppoe -e2fsprogs -f2fsck -mkf2fs -kmod-usb3"

I would be using sysupgrade image to retain OEM recovery method, limiting the possibility of disaster.

Will resulting image brick my router? How one can know? :smiley:

Bonus question: Is it possible/smart to use the backup archive from current installation and build image with those files for having operational router on first boot?

Or is it better to just restore after flashing?

Many thanks to everybody who got this far :smiley:

You dont have to build anything.
Just download default sysupgrade image from firmware-selector.
Default packages cover installed hardware, like ext4 for non-mtd storage (mandatory to save changed configuration), drivers for onboard wifi and usb.
Glinet firmware is pretty close to openwrt and you can sysupgrade back and forth resetting config cf change between major openwrt revisions.

Bricking is extremely unlikely, as long as you only flash the sysupgrade image and don’t touch the bootloader.

Even if the router becomes unresponsive over LAN after your modifications, you can always flash another sysupgrade from the recovery web UI.

It’s possible of course. You just provide the config files to the image builder as additional files.
I’m doing it for my router.
You don’t have to put all of them into the image.
Only the ones, you want to change.
The rest gets created with default values.

Edit: just to be sure, current installation is OpenWrt current snapshot or 23.05.3, not gl-inet firmware, right?

Many thanks for your answer!
Yes, I'm running snapshot: r26214-a9781a04a1

Best to go with release, then all Luci works for newbie level.

And that's perfectly fine, but as I stated in my first post:

I created this topic just to understand build process better...

...would like to build image myself

I have older router, TL-WR1043n v.5, which probably won't be supported for much longer due to low hardware resources. I could continue using it and get all the benefits from OpenWrt if I can build smaller images and save up some space.

I posted the question regarding the GL-MT6000 since it has really easy recovery method, so you get more room to play around, try out and learn stuff.

Again, release works just fine, I'm doing this to learn more.

Best to go with release, then all Luci works for newbie level.

I'm DevOps engineer IRL, so building and compiling isn't strange to me. Sorry if this "newbie" got understood wrong, I'm asking here to learn specifics about OpenWrt. Better safe than sorry :smiley:

1 Like

have you read [OpenWrt Wiki] Using the Image Builder ?

Yes, I built image using it. Building is easy, not a problem with that, my question was aimed more towards "Can I remove some of these default packages?"

With any of my systems, I like to start minimal and then add on top what I need, something makes me hate having unused packages installed, maybe professional deformation, maybe I'm just an weirdo, maybe both, who knows :smiley:

looks good to me - as long as you can recover over serial you should go ahead and flash it - otherwise there is always a risk of bricking - I would say less than 10% in this case but just a guess

1 Like

Why not take a step back for a moment?

The gl-mt6000 has quite some flash space, removing these packages therefore will not be beneficial from a size aspect (probably under- or around half a MB), a rather high risk for little (~no) reward.

"e2fsprogs f2fsck mkf2fs" wouldn't be explicitly listed, if they weren't required (we can argue about ext4 <> f2fs here and maybe fsck, but still… that should be discussed project wide).

So if you have to ask, removing any of these packages is probably not a good idea - and doesn't actually gain you anything (there's neither any particular potential attack surface involved either).


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