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

ramips: Add support command fw_setsys for Xiaomi routers #4936

Closed
wants to merge 1 commit into from

Conversation

remittor
Copy link
Contributor

@remittor remittor commented Jan 8, 2022

The system parameters are contained in the Bdata partition.
To use the fw_setsys command, you need to create a file fw_sys.config. This file is created after calling the functions ubootenv_add_uci_sys_config and ubootenv_add_app_config.

@hauke hauke added the target/ramips pull request/issue for ramips target label Jan 8, 2022
@@ -73,6 +76,6 @@ zyxel,nr7101)
esac

config_load ubootenv
config_foreach ubootenv_add_app_config ubootenv
config_foreach ubootenv_add_app_config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config_foreach with one argument looks wrong?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adschm
Copy link
Member

adschm commented Jan 14, 2022

This has formal issues. Please use your real name for Signed-off-by and wrap you commit message so it has 74 chars. max per line.

@remittor
Copy link
Contributor Author

This has formal issues.

Fixed

xiaomi,redmi-router-ac2100)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe secsize for nand devices needs to be set to 0x20000 (128KiB) ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@remittor why from

ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"

to

ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I don't want to break something on device xiaomi,mi-router-4a-gigabit (64 KiB sector)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok lets think the opposite... Doesn't this cause problem for the other device that had 128KiB sectors?

Can't we just extend the switch and apply the correct sector based on the device to be extra safe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just extend the switch and apply the correct sector based on the device to be extra safe?

OK. Let's do that. Now I'll try to fix it.

@Ansuel
Copy link
Member

Ansuel commented Jul 6, 2022

Also don't know if Oleg S is acceptable. Is it really a problem here?

@Ansuel Ansuel self-assigned this Jul 6, 2022
@Ansuel
Copy link
Member

Ansuel commented Jul 15, 2022

@remittor Still interested in this?

@Neustradamus
Copy link

@remittor: Can you look?
Thanks in advance.

@remittor
Copy link
Contributor Author

@remittor Still interested in this?

Yes

The system parameters are contained in the Bdata partition.
To use the fw_setsys command, you need to create a file fw_sys.config. This file is created after calling the functions ubootenv_add_uci_sys_config and ubootenv_add_app_config.

Signed-off-by: Oleg S <remittor@gmail.com>
@Ansuel
Copy link
Member

Ansuel commented Jul 19, 2022

Thanks, merged in master with minor changes to commit description 6c7e337

@Ansuel Ansuel closed this Jul 19, 2022
looi added a commit to looi/openwrt that referenced this pull request Aug 1, 2022
This change was included in the original pull request but later omitted
for some reason:

openwrt#4936

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
jow- pushed a commit to lede-project/source that referenced this pull request Aug 5, 2022
This change was included in the original pull request but later omitted
for some reason:

openwrt/openwrt#4936

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this pull request Aug 10, 2022
This change was included in the original pull request but later omitted
for some reason:

openwrt#4936

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
Quang-vip pushed a commit to Quang-vip/openwrt-841hp-v5 that referenced this pull request Aug 14, 2022
This change was included in the original pull request but later omitted
for some reason:

openwrt#4936

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
devendranaga pushed a commit to devendra-naga-labs/bsp_build that referenced this pull request Sep 8, 2022
This change was included in the original pull request but later omitted
for some reason:

openwrt#4936

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
openwrt-bot pushed a commit that referenced this pull request Sep 24, 2022
This change was included in the original pull request but later omitted
for some reason:

#4936

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
(cherry picked from commit 4cccea0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs changes target/ramips pull request/issue for ramips target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants