Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uboot-envtools: add env settings for ubnt,unifi-6-lr-v2 #13897

Merged
merged 1 commit into from
May 6, 2024

Conversation

lowjoel
Copy link
Contributor

@lowjoel lowjoel commented Nov 7, 2023

This has been tested on two of my Unifi 6 LR v2s:

$ fw_printenv # before
Cannot parse config file '/etc/fw_env.config': No such file or directory
$ cat /etc/fw_env.config
/dev/mtd3 0x0000 0x1000 0x1000 1
$ fw_printenv
arch=arm
baudrate=115200
board=mt7622_evb
board_name=mt7622_evb
bootcmd=bootubnt
bootdelay=3
bootfile=uImage
cpu=armv7
device_model=U6-LR
ethact=mtk_eth
ethaddr=<redacted>
ethcard=AQR112C
ipaddr=<redacted>
is_default=true
loadaddr=0x5007FF28
macaddr=<redacted>
serverip=<redacted>
soc=mt7622
stderr=serial
stdin=serial
stdout=serial
vendor=mediatek
is_ble_stp=true

I had to reverse-engineer the working settings above to the UCI script. I don't know how to test that the change in the package would give the right fw_env.config, however. How should I go about testing that?

@github-actions github-actions bot added the core packages pull request/issue for core (in-tree) packages label Nov 7, 2023
@lowjoel lowjoel force-pushed the unifi-lr-v2-fw_env branch 2 times, most recently from 04db2c6 to 9755f6a Compare November 7, 2023 23:18
@lowjoel
Copy link
Contributor Author

lowjoel commented Nov 7, 2023

@dangowrt I'm not entirely sure why my U6LR v2 has different partitioning and values compared to your v1 -- am I doing something wrong here?

@dangowrt
Copy link
Member

dangowrt commented Nov 8, 2023

To be hontest I never stried to access to environment when using the stock bootloader on my v1 device (which runs OpenWrt-built U-Boot and hence -ubootmod image with different partitioning anyway). @blocktrron may know more as he originally added the build for the 6 LR v1.

@blocktrron
Copy link
Member

@dangowrt I've never checked theU-Boot Env with the stock bootloader. I can access the device if it becomes necessary to perform validation work, but this change is limited to the v2?

@dangowrt
Copy link
Member

dangowrt commented Nov 8, 2023

@blocktron If your v1 device runs stock bootloader it would be cool if you can check if the offset of U-Boot env is correct, as it is kind of surprising that it supposedly changed between v1 and v2 -- there is a good chance that the uboot-env partition offset and settings for v2 apply for v1 as well and we just never tried accessing the env partition on v1.

@blocktrron
Copy link
Member

@dangowrt sure thing - I will pick up the device friday. Ping me next week if you did not hear back from me 👍

@lowjoel
Copy link
Contributor Author

lowjoel commented Dec 3, 2023

@dangowrt @blocktrron any updates?

This has been tested on two of my Unifi 6 LR v2s:

```bash
$ fw_printenv # before
Cannot parse config file '/etc/fw_env.config': No such file or directory
$ cat /etc/fw_env.config
/dev/mtd3 0x0000 0x1000 0x1000 1
$ fw_printenv
arch=arm
baudrate=115200
board=mt7622_evb
board_name=mt7622_evb
bootcmd=bootubnt
bootdelay=3
bootfile=uImage
cpu=armv7
device_model=U6-LR
ethact=mtk_eth
ethaddr=<redacted>
ethcard=AQR112C
ipaddr=<redacted>
is_default=true
loadaddr=0x5007FF28
macaddr=<redacted>
serverip=<redacted>
soc=mt7622
stderr=serial
stdin=serial
stdout=serial
vendor=mediatek
is_ble_stp=true
```

I had to reverse-engineer the working settings above to the UCI script.

Signed-off-by: Joel Low <joel@joelsplace.sg>
Link: openwrt#13897
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
@openwrt-bot openwrt-bot merged commit 587f353 into openwrt:main May 6, 2024
3 checks passed
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this pull request May 18, 2024
This has been tested on two of my Unifi 6 LR v2s:

```bash
$ fw_printenv # before
Cannot parse config file '/etc/fw_env.config': No such file or directory
$ cat /etc/fw_env.config
/dev/mtd3 0x0000 0x1000 0x1000 1
$ fw_printenv
arch=arm
baudrate=115200
board=mt7622_evb
board_name=mt7622_evb
bootcmd=bootubnt
bootdelay=3
bootfile=uImage
cpu=armv7
device_model=U6-LR
ethact=mtk_eth
ethaddr=<redacted>
ethcard=AQR112C
ipaddr=<redacted>
is_default=true
loadaddr=0x5007FF28
macaddr=<redacted>
serverip=<redacted>
soc=mt7622
stderr=serial
stdin=serial
stdout=serial
vendor=mediatek
is_ble_stp=true
```

I had to reverse-engineer the working settings above to the UCI script.

Signed-off-by: Joel Low <joel@joelsplace.sg>
Link: openwrt#13897
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core packages pull request/issue for core (in-tree) packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants