Brume mv1000, compile and sysupgrade image

Hello,
I’m trying to compile and install the image to the brume.

I checked out https://github.com/gl-inet/openwrt/tree/openwrt-19.07, make menuconfig and picked the target “GL.iNet GL-MV1000 EMMC” and make -j8.

After the compile i get a file “openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img” and i’m able to do an upgrade in the default gl-ui.

But afterwards there ist no gl-ui anymore (of course) and i want to use Luci sysupgrade to update the device.

But this is not possible through sysupgrade:

First i get:

Device gl-mv1000 not supported by this image
Supported devices: gl-mv1000-emmc

Ok, just an name mismatch, so i use -F switch.

But when it ends up in this error:

Could not open mtd device: firmware
Can't open device for writing!

Of course there is no mtd device “firmware”, brume has a emmc.

But why is sysupgrade trying to write to a mtd device?

Am i missing something?

P.S. i can update the device only in u-boot recovery. So the image itself is working fine.

Using the GitHub - gl-inet/openwrt: This repository is fork from openwrt official repo, we will update the latest tag and release GL.iNet firmware based on it. (for any router) gives you a Vanilla OpenWRT with the small changes GL has made, but without the GL UI.

The GL UI is proprietary. If you want to still use the GL UI but want to make your own image, use the image builder. The GL image builder is basically a precompiled version of what you did, but it adds the GL UI and any config+packages you want to a custom image.

Yes i’am aware of the gl-ui.
But this wasn’t the main point.

The point is, it’s not possible to flash a brume through openWRT sysupgrade procedure, neither with a self compiled image nor an official image from gl.inet.

From my point of view this is a bug.

Is there something special in the firmware upgrade procedure in the gl-ui on the brume (especially the emmc)?

I’m experiencing the same issue.

I tried using the github repo GitHub - gl-inet/imagebuilder: Warning!Please look at 'GL.iNET Imagebuilder Introduction' section.

I ran ./gl_image -p mv1000-emmc and then went to the directory
imagebuilder/imagebuilder/3.5/openwrt-imagebuilder-mvebu-emmc-19075_mv1000_3.5

afterwhich I built my custom image with the files and packages

make image PROFILE=“gl-mv1000-emmc” PACKAGES=“-dnsmasq -ppp -ppp-mod-pppoe -odhcp6c -odhcpd-ipv6only bash port-mirroring tcpdump vim nmap openvpn-openssl netcat kmod-usb-net-pl kmod-usb-serial-pl2303 screen kmod-usb-serial-ftdi” FILES=“files/”

no errors here. when I tried to utilize thje resulting file openwrt-mvebu-cortexa53-gl-mv1000-emmc-squash-fs-emmc.img i get the same error

root@GL-MV1000:/tmp# sysupgrade -T openwrt-mvebu-cortexa53-gl-mv1000-emmc-squash
fs-emmc.img
Device gl-mv1000 not supported by this image
Supported devices: gl-mv1000-emmc
Image check failed.
root@GL-MV1000:/tmp#

Thank you very much for your feedback.
At current,the problem has been fixed:7beffa498714f68b23e4ead6a38da91ec9117734.

You could update the code and test it again.

BESTREGARDS!

Thank you @lizh I see the commit here. I’ll checkout the latest, try again and report back.

Hi I’ve tried the latest patch and am still having the issue. Here are the steps below.

Check GIT

rambler@imgbuilder:~/mv1000/openwrt$ git status
On branch openwrt-19.07.7
Your branch is up to date with ‘origin/openwrt-19.07.7’.
nothing to commit, working tree clean

Make sure I have the patch

rambler@imgbuilder:~/mv1000/openwrt$ git log | head -n 5
commit 7beffa498714f68b23e4ead6a38da91ec9117734
Author: Li Zhang li.zhang@gl-inet.com
Date: Tue Apr 27 15:24:52 2021 +0800
fix: Support GL.iNet GL-MV1000 EMMC upgrade with sysupgrade

make menuconfig:
I select the following parameters, nothing else.

Target System (Marvell EBU Armada)
Subtarget (Marvell Armada 3700LP (ARM64))
Target Profile (GL.iNet GL-MV1000 EMMC)
Build the OpenWrt Image Builder
Include package repositories (NEW)

build

rambler@imgbuilder:~/mv1000/openwrt$ make V=s -j4

build completes successfully, no warnings/errors

I navigate to the directory

rambler@imgbuilder:~/mv1000/openwrt$ cd bin/targets/mvebu/cortexa53/

list out the current files from the build

rambler@imgbuilder:~/mv1000/openwrt/bin/targets/mvebu/cortexa53$ ls -l
total 77168
-rw-r–r-- 1 rambler rambler 143 Apr 27 16:48 config.buildinfo
-rw-r–r-- 1 rambler rambler 557 Apr 27 16:48 feeds.buildinfo
-rw-r–r-- 1 rambler rambler 39593348 Apr 27 16:56 openwrt-imagebuilder-mvebu-cortexa53.Linux-x86_64.tar.xz
-rw-r–r-- 1 rambler rambler 2122 Apr 27 16:54 openwrt-mvebu-cortexa53-device-gl-mv1000-emmc.manifest
-rw-r–r-- 1 rambler rambler 6639509 Apr 27 16:54 openwrt-mvebu-cortexa53-gl-mv1000-emmc-ext4-emmc.img.gz
-rwxr-xr-x 1 rambler rambler 13932552 Apr 27 16:54 openwrt-mvebu-cortexa53-gl-mv1000-emmc-initramfs-kernel.bin
-rw-r–r-- 1 rambler rambler 20881330 Apr 27 16:54 openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img
drwxr-xr-x 2 rambler rambler 4096 Apr 27 16:56 packages
-rw-r–r-- 1 rambler rambler 864 Apr 27 16:56 sha256sums
-rw-r–r-- 1 rambler rambler 18 Apr 27 16:48 version.buildinfo

Check the MD5 checksum of the image

rambler@imgbuilder:~/mv1000/openwrt/bin/targets/mvebu/cortexa53$ md5sum openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img
51bcb3beb3c7ebe5b741432091caa5f1 openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img

Now I copy openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img to the MV1000

While on the CLI of the MV1000, validate the MD5 checksum

root@GL-MV1000:~# md5sum /tmp/openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img
51bcb3beb3c7ebe5b741432091caa5f1 /tmp/openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img

sysupgrade still fails

root@GL-MV1000:~# sysupgrade -T /tmp/openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img
Device gl-mv1000 not supported by this image
Supported devices: gl-mv1000-emmc
Image check failed.
root@GL-MV1000:~#

I also tried using the imagebuilder that was produced during the build process.

Under the directory

rambler@imgbuilder:~/mv1000/openwrt/bin/targets/mvebu/cortexa53/openwrt-imagebuilder-mvebu-cortexa53.Linux-x86_64/bin/targets/mvebu/cortexa53$

list of files

rambler@imgbuilder:~/mv1000/openwrt/bin/targets/mvebu/cortexa53/openwrt-imagebuilder-mvebu-cortexa53.Linux-x86_64/bin/targets/mvebu/cortexa53$ ll
total 24976
drwxrwxr-x 2 rambler rambler 4096 Apr 27 17:06 ./
drwxrwxr-x 3 rambler rambler 4096 Apr 27 17:06 …/
-rw-rw-r-- 1 rambler rambler 2122 Apr 27 17:06 openwrt-mvebu-cortexa53-device-gl-mv1000-emmc.manifest
-rw-rw-r-- 1 rambler rambler 6639087 Apr 27 17:06 openwrt-mvebu-cortexa53-gl-mv1000-emmc-ext4-emmc.img.gz
-rw-rw-r-- 1 rambler rambler 20881117 Apr 27 17:06 openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img
-rw-rw-r-- 1 rambler rambler 366 Apr 27 17:06 sha256sums

I’m trying the file openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img

Get the hash

rambler@imgbuilder:~/mv1000/openwrt/bin/targets/mvebu/cortexa53/openwrt-imagebuilder-mvebu-cortexa53.Linux-x86_64/bin/targets/mvebu/cortexa53$ md5sum openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img
b8364c0400c3e68a0f3a0f5b2e4a23d0 openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img

Upload the file openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img to the MV1000

Confirm the hash

root@GL-MV1000:~# md5sum /tmp/openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img
b8364c0400c3e68a0f3a0f5b2e4a23d0 /tmp/openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img

Test the image with sysupgrade

root@GL-MV1000:~# sysupgrade -T /tmp/openwrt-mvebu-cortexa53-gl-mv1000-emmc-squashfs-emmc.img
Device gl-mv1000 not supported by this image
Supported devices: gl-mv1000-emmc
Image check failed.
root@GL-MV1000:~#

Thanks for any feedback

Hi rambler:
I test it is ok.

What’s your version number with GL-MV1000.

You could send your firmware to me if it is convenient for you?

Hi @lizh , sorry for my late response.

my model number is GL-MV1000W
Device ID : VF9D95D

I will private message you a URL to the firmware I compiled with steps outlined above.

Thank you for your help.

Reza

Hi rambler:
It is compatible for gl-mv1000 and gl-mv1000w.You could check ‘/lib/upgrade/fwtool.sh’.

Hi @lizh

Something must have been wrong with the image existing on my MV1000. I went into uboot and applied the OEM firmware release from GL, version 3.105.

Then I used the openwrt git branch 19.07 to build a squashfs img and try it again.

root@GL-MV1000:/tmp# sysupgrade -T openwrt-mvebu-cortexa53-gl-mv1000-emmc-squash
Reading partition table from bootdisk...
Reading partition table from image...

Thank you very much!

My next steps are to use the imagebuilder, openwrt-imagebuilder-mvebu-cortexa53.Linux-x86_64.tar.xz, and create my own custom firmware with custom files for UCI with my own set of packages.

I have successfully done this in the past on the GL-AR750 with the following command.

make image PROFILE=gl-ar750 PACKAGES="-dnsmasq -ppp -ppp-mod-pppoe -odhcp6c \
  -odhcpd-ipv6only bash port-mirroring tcpdump vim nmap openvpn-openssl netcat \
  kmod-usb-net-pl kmod-usb-serial-pl2303 screen kmod-usb-serial-ftdi" FILES="files/"

I am not trying to go through the same process for the MV1000 profile that exists in the imagebuilder file.

profile list

rambler@imgbuilder:/tmp/openwrt-imagebuilder-mvebu-cortexa53.Linux-x86_64$ make info
Current Target: "mvebu/cortexa53"
Current Revision: "r11306-c4a6851c72"
Default Packages: base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd urandom-seed urngd uboot-envtools kmod-gpio-button-hotplug e2fsprogs ethtool mkf2fs partx-utils dnsmasq iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd-ipv6only odhcp6c kmod-ipt-offload
Available Profiles:
...[text skipped]...
gl-mv1000-emmc:
    GL.iNet GL-MV1000 EMMC
    Packages:
    hasImageMetadata: 0
    SupportedDevices: gl-mv1000-emmc

starting the imagebuilder process

rambler@imgbuilder:/tmp/openwrt-imagebuilder-mvebu-cortexa53.Linux-x86_64$ make image PROFILE="gl-mv1000-emmc" PACKAGES="-dnsmasq -ppp -ppp-mod-pppoe -odhcp6c -odhcpd-ipv6only bash port-mirroring tcpdump vim nmap openvpn-openssl netcat kmod-usb-net-pl kmod-usb-serial-pl2303 screen kmod-usb-serial-ftdi" FILES="files/"
Building images for mvebu - GL.iNet GL-MV1000 EMMC
Packages: bash port-mirroring tcpdump vim nmap openvpn-openssl netcat kmod-usb-net-pl kmod-usb-serial-pl2303 screen kmod-usb-serial-ftdi base-files busybox dropbear e2fsprogs ethtool firewall fstools ip6tables iptables kernel kmod-gpio-button-hotplug kmod-ipt-offload libc libgcc logd mkf2fs mtd netifd opkg partx-utils uboot-envtools uci uclient-fetch urandom-seed urngd

Downloading file:packages/Packages
Updated list of available packages in /tmp/openwrt-imagebuilder-mvebu-cortexa53.Linux-x86_64    /build_dir/target-aarch64_cortex-a53_musl/root-mvebu/../../../../../tmp/openwrt-imagebuilder-mvebu-cortexa53.Linux-x86_64/dl/imagebuilder
Installing packages...
Installing libc (1.1.24-2) to root...
Installing libgcc1 (7.5.0-2) to root...
Downloading file:packages/libgcc1_7.5.0-2_aarch64_cortex-a53.ipk
Configuring libgcc1.
Configuring libc.
Installing kernel (4.14.221-1-2a980f12b290becec2cd10a2ff4d879a) to root...
Configuring kernel.
Unknown package 'bash'.
Unknown package 'port-mirroring'.
Unknown package 'tcpdump'.
Unknown package 'vim'.
Unknown package 'nmap'.
Unknown package 'openvpn-openssl'.
Unknown package 'netcat'.
Unknown package 'kmod-usb-net-pl'.
Unknown package 'kmod-usb-serial-pl2303'.
Unknown package 'screen'.
Unknown package 'kmod-usb-serial-ftdi'.
Installing base-files (204.2-r11306-c4a6851c72) to root...
Downloading file:packages/base-files_204.2-r11306-c4a6851c72_aarch64_cortex-a53.ipk
.... [skipping full text] ....
Collected errors:
 * opkg_install_cmd: Cannot install package bash.
 * opkg_install_cmd: Cannot install package port-mirroring.
 * opkg_install_cmd: Cannot install package tcpdump.
 * opkg_install_cmd: Cannot install package vim.
 * opkg_install_cmd: Cannot install package nmap.
 * opkg_install_cmd: Cannot install package openvpn-openssl.
 * opkg_install_cmd: Cannot install package netcat.
 * opkg_install_cmd: Cannot install package kmod-usb-net-pl.
 * opkg_install_cmd: Cannot install package kmod-usb-serial-pl2303.
 * opkg_install_cmd: Cannot install package screen.
 * opkg_install_cmd: Cannot install package kmod-usb-serial-ftdi.
make[2]: *** [Makefile:158: package_install] Error 255
make[1]: *** [Makefile:118: _call_image] Error 2
make: *** [Makefile:208: image] Error 2
rambler@imgbuilder:/tmp/openwrt-imagebuilder-mvebu-cortexa53.Linux-x86_64$

I believe if I can get these package files incorporated into my firmware img I’ll have everything I need. We’re trying to upgrade to the MV1000s from AR-750s for our use case.

Thank you,

I just realized my repositories.conf only had

src imagebuilder file:packages

the ipk packages were not under packages/ in the imagebuilder tarball. I’ll have to see why those weren’t built into the imagebuilder from my menuconfig selections.

I have verified that the ImagetBuilder,maybe you compiled is missing these packages.
You can compile these packages separately and put them in the packages directory.