I did not try to switch the boot part I was going to try that next by running the uboot tools from command line, but the partition was erased after reboot.
the second root partition shows up in openwrt as tempfs as part of automount preinit scripts. the partition was written with oem dump and i browsed around the fs but after reboot it is seemingly formatted.
it does not really matter but it would of been handy to switch between either partition.
what I'm doing is ubiformat /dev/mtd13 -y -f /tmp/mtd12.ubi and it writes onto the temp space
then I reboot and the temp space 42mb partition is empty afterwards
I can browse the contents after format but after reboot it is gone.
it sure sounds like you are uploading mtd12.ubi (source? command?) into /tmp, seeing that free space on tmp has decreased due to adding the uploaded file, using ubiformat to write from /tmp/mtd12.ubi to mtd13, rebooting without setting the tp_boot_idx, and noticing that the tmp is clear and mtd12 is the booted partition. this all sounds expected since you didn't make any attempt to set the tp_boot_idx to use the just-written mtd13, and the /tmp folder by nature is cleared every reboot.
if you want help with dualboot:
show us commands used and output when you upload the file to tmp, write to mtd13, and browse the contents of mtd13 to see its contents before reboot, and again after reboot when you determine that it is empty
and/or
show us commands used and output and boot logs when you set the tp_boot_idx to 1 to try to boot mtd13
So after playing around in the OEM image it has thermal control for the 5g modem tied in with the cpu and gpio-fan control.
the modem at command set has temperature commands to thermally throttle the device by software and sensor output for hardware.
as any device that attaches to the serial port takes over the at command interface what is my best process to integrate fan support with modem temp?
Should I ask modem manager to include such features in their software? it seems this device has it's own modems software and scripts specific to this device.
also it has a few I/O to indicate wan and status that looks like it might need further testing in a 4g and 5g area to see what is connected up to GPIO.
The modem has two audio interfaces for telephony support is that something I can get working under openwrt?
I guess it's good idea to ask on their bugtracker (since modemmanager-devel seems almost dead).
As I remember modem is exposed as USB device to OS so I wonder that maybe something like this could work? Although I not sure if it's easy to configure this on barebones Asterisk from OpenWRT repo, or you'll need chroot or Docker with FreePBX.
Ok so I had reliability issues with mounting the UBI partition from preinit because ubiattach exits before fully having the partition ready and putting sleep to delay the boot for it to word does not seem like a great idea so I have converted from smem to fixed partitions.
It now attaches when the kernel loads not later on during preinit.
It successfully captures the mac address in the factory partition and updates caldata for the ath11k firmware but the lan/ wan mac script does not seem to work.
anyone have any idea how to update the lan and wan mac properly?
This is what I'm using but it does not seem to work:
When I originally started porting OpenWrt I just populated the info with something similar but I know it is wrong as the boot options from OpenWrt wont boot to the alternate image partition on flash upgrade, but i guess I'm lucky so far it has not broken boot.
I'm trying to get the alternate partition flashing and booting working at the moment it just boots the same partition again.
There has been two new tplink targets since i started my project is it safe to assume that I
can just use their values assuming it is the same or is there a proper method?
I'm a bit hesitant to be messing in uboot but can I write something to envarg's there and then read back the partition dump or something after booting an initram based image or something.?
I have now added feature to this project', I have a new kernel driver to control the RGB led.
It basically groups individual led's and exposes it as individual virtual led's but there is more to it.
It also includes priority and logic so you can ensure what is important is displayed, and the latest driven one has priority.
This will be very handy for a lot of other devices to make use of the status led and reimplement many of the oem functions of the LED Without userspace scripting.
compatible = "gpio-leds";
pinctrl-0 = <&led_pins>;
pinctrl-names = "default";
/*note the LED's defined here are not individual they are a single combined RGB element
they will be overridden by the virtual leds if the leds group virtual color
kernel driver is loaded */
led_system_green: green {
gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>; /* green led component of rgb led */
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_INDICATOR;
};
led_system_red: red {
gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>; /* red led component of rgb led */
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_INDICATOR;
};
led_system_blue: blue {
gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>; /* blue led component of rgb */
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_INDICATOR;
};
};
define the virtual led's:
virtualcolor_leds {
compatible = "leds-group-virtualcolor";
/*note the LED's defined here are virtual
by mixing the individual colors of the monochromatic system led.
The OEM default behavior of the multifunction status led is as follows:
pulse Yellow: resetting/ rebooting.
Solid Yellow: starting up.
Pulse Blue: factory reset/ first boot ready for setup or WPS in progress.
to suit the TP-Link Deco X80-5G target */
Pulse Red: mesh failure cant find peers.
Solid Red: fault */
led_virtual_red: virtual_red {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_STATUS;
leds = <&led_system_red>;
};
led_virtual_green: virtual_green {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
leds = <&led_system_green>;
};
led_virtual_blue: virtual_blue {
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_STATUS;
leds = <&led_system_blue>;
};
led_virtual_yellow: virtual_yellow {
color = <LED_COLOR_ID_YELLOW>;
function = LED_FUNCTION_STATUS;
leds = <&led_system_green>, <&led_system_red>;
};
led_virtual_cyan: virtual_cyan {
color = <LED_COLOR_ID_CYAN>;
function = LED_FUNCTION_STATUS;
leds = <&led_system_green>, <&led_system_blue>;
};
led_virtual_violet: virtual_violet {
color = <LED_COLOR_ID_VIOLET>;
function = LED_FUNCTION_STATUS;
leds = <&led_system_red>, <&led_system_blue>;
};
led_virtual_white: virtual_white {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_STATUS;
leds = <&led_system_green>, <&led_system_red>, <&led_system_blue>;
};
};
showing usage of virtual led's for alias triggers:
I'm not too sure but for some reason my wifi is not working where it was previously working.
There is a board-2.bin file in the lib firmware ath11k directory and the header matches the calibration variant.
I'm kind of stumped.
[ 11.802932] ath11k c000000.wifi: ipq8074 hw2.0
[ 11.802966] ath11k c000000.wifi: FW memory mode: 0
[ 11.840154] remoteproc remoteproc0: powering up cd00000.q6v5_wcss
[ 11.840500] remoteproc remoteproc0: Booting fw image IPQ8074/q6_fw.mdt, size 668
[ 12.995084] remoteproc remoteproc0: remote processor cd00000.q6v5_wcss is now up
[ 13.038781] ath11k c000000.wifi: qmi fail to get qcom,m3-dump-addr, ignore m3 dump mem req
[ 13.046243] ath11k c000000.wifi: chip_id 0x0 chip_family 0x0 board_id 0xff soc_id 0xffffffff
[ 13.046280] ath11k c000000.wifi: fw_version 0x290b84a5 fw_build_timestamp 2024-09-23 11:32 fw_build_id WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1
[ 13.134952] ath11k c000000.wifi: qmi failed to load CAL data file:cal-ahb-c000000.wifi.bin
[ 13.135071] ath11k c000000.wifi: failed to load board data file: -12
[ 31.844667] l11: disabling
[ 38.794640] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 74.724671] ath11k c000000.wifi: Coldboot Calibration timed out
I feel dumb I copied the caldata field from another device so it was in alphabetical order and the partition name case was incorrect so I did not know it was case sensitive so it could not find the cal partition