You will have to work out those LEDs to get officially supported OpenWRT.
But first step would be stable boot.
Sure.
How about original U-Boot + environment and AX53U kernel + original DTB?
All it needs to make an installable binary from them.
I think, this would be stable and it gives network access helping to develop it further.
Now there isn't a possibility to make changes and then boot it to see the result.
Back it up, like the rest, but don't touch it.
I took DD copy from all of them. I also took a copy of the fdt file I mentioned before.
What should be done next?
You need to set up a build system (see wiki -> develop -> ...) then add your dts work and boot initramfs style image again, check if hardware exposed is correct. If you find zero filled flash block you can try to erase it and write back zeroes, check ip link
that MAC addresses are from label, then iw reg set GB; iw list | less
and check that radio calibration is correct.
Get boot messages from successful boot and checks, and let it sit for 24-48h if somebody finds any anomaly there.
EDIT: LEDs, last LAN port, mobile modem can be worked on once viable OpenWRT boots.
NAND partitions seem to be different for AX53U than AX56.
I have to make them again.
Are kernel and DTB concatenated to a single file or how do they load at boot?
OK. Seems to be a FIT image.
Now I have cloned the OpenWRT git and made changes.
The rest is something I have not done in ages. I have it in WSL. Kernel seems to be a bit old 5.15.153.
Can you tell me how to install proper cross compiler, how to prepare compiling and how to compile, please.
https://openwrt.org/docs/guide-developer/start
You need to build using master, so 6.6 kernel.
I installed Imagebuilder it runs just fine if I call it:
"make image PROFILE="asus_rt-ax53u"
but
make image PROFILE="asus_4g-ax56"
ends up here:
"make[3]: *** No rule to make target '/openwrt/openwrt-imagebuilder-ramips-mt7621.Linux-x86_64/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/asus_4g-ax56-kernel.bin', needed by '/openwrt/openwrt-imagebuilder-ramips-mt7621.Linux-x86_64/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-asus_4g-ax56-squashfs-sysupgrade.bin'."
I just don't know which Makefile should be edited?
It does not make DTB file. Should I do it first by hand?
You have to compile complete system. Imagebuilder uses prebuilt kernels.
Seems to be too complicated.
Actually I needed only compiling the DTS, but it did not happend either.
I made changes like this:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "asus,4g-ax56", "mediatek,mt7621-soc";
model = "ASUS 4G-AX56";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,115200";
bootargs-override = "console=ttyS0,115200";
};
leds {
compatible = "gpio-leds";
led_power: led-0 {
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_POWER;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
key-restart {
label = "reset";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
key-wps {
label = "wps";
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
};
&nand {
status = "okay";
mediatek,nmbm;
mediatek,bmt-remap-range =
<0x000000 0x7e0000>,
<0x35e0000 0x7800000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "Bootloader";
reg = <0x0 0xe0000>;
read-only;
};
/*
* u-boot gets split here while keeping u-boot read-only,
* which allows safe usage of fw_setenv
* this device has u-boot abd u-boot env in this same partition
*/
partition@e0000 {
label = "nvram";
reg = <0xe0000 0x100000>;
};
/*
* partition@e0000 {
* label = "nvram";
* reg = <0xe0000 0x100000>;
* read-only;
/* };
partition@1e0000 {
label = "Factory";
reg = <0x1e0000 0x100000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0xe00>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
precal_factory_e10: precal@e10 {
reg = <0xe10 0x19c10>;
};
};
};
partition@2e0000 {
label = "Factory2";
reg = <0x2e0000 0x100000>;
read-only;
};
partition@3e0000 {
label = "Kernel";
reg = <0x3e0000 0x3200000>;
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "linux";
reg = <0x0 0x3c0000>;
};
partition@3c0000 {
label = "rootfs";
reg = <0x3c0000 0x2e40000>;
};
};
partition@35e0000 {
label = "Kernel2";
reg = <0x35e0000 0x3200000>;
};
partition@67e0000 {
label = "jffs2";
reg = <0x67e0000 0x1020000>;
};
/* Last 8M are reserved for NMBM management (bad blocks) */
};
};
&pcie {
status = "okay";
};
&pcie1 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
};
};
&gmac0 {
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
};
port@1 {
status = "okay";
label = "lan1";
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan3";
};
port@4 {
status = "okay";
label = "lan4";
};
};
};
&state_default {
gpio {
groups = "i2c", "uart2", "uart3", "jtag", "wdt";
function = "gpio";
};
};
but it wines about references. They seem to be missing.
I got the basics going. I just had found a wrong git to clone.
Now it's going. NAND OK, network up, correct mac address.
Opkg source settings seem to be a bit limited.
Original FW has those LEDs driven like this:
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio0/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio3/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio4/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio5/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio7/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio8/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio9/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio10/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio11/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio12/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio13/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio14/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio15/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio16/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio17/value
./devices/platform/1e000000.palmbus/1e000600.gpio/gpio/gpio18/value
How is it set, which partition OpenWRT uses to store afterwords installed extra modules?
Hello again,
Lots of try and error. Now the modem is found, it responds picocom AT-commands from /dev/ttyUSB0 and it detects sim.
I suppose, I have network settings OK, bus I don't know how to connect it to the internet.
This Fibocom seems to be same as Microtik LTE6 modem.
What commands should I try to make the connection? APN is set, but I suppose it needs #99 to be used as dialed number to make the connection. How is this done? Some 30 years ago it was something like ATDT#99, but how is it with this Fibocom device?
How universal are these:
https://www.maritex.com.pl/product/attachment/40451/15b4db6d1a10eada42700f7293353776
http://www.mcuzone.com/datasheet/FIBOCOM_NL668_AT_Commands_User_Manual_V3.5.14.pdf
I have read that more than once or twice. I just don't know what to try next.
This Fibocom version seems to be same as Mikrotik LTE6 version and it is supported.
Using socat I get this output from /dev/ttyUSB0:
AT+CGMI
Fibocom Wireless Inc.
OK
AT+CGMI
Fibocom Wireless Inc.
OK
AT+CGMI
Fibocom Wireless Inc.
OK
AT+CGMI
Fibocom Wireless Inc.
OK
: Inserted
+SIM Ready
+SPNWNAME: 244,05,"vodafone",""
AT+CGMI
Fibocom Wireless Inc.
OK
AT+CGMI
Fibocom Wireless Inc.
It seems to recognice SIM card, but is the response to AT+CGMI wrong?
Should there be some other response?
read, or read and followed ?
I followed it. Installed even more for other configurations too.
It's just a bit hard to find out what's going on and what to do next.
This message comes using this very device.
Thanks everybody.