-
Notifications
You must be signed in to change notification settings - Fork 25
RDKBACCL-1463: DB and other customized values are overwritten to defa… #402
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
Open
manigandanj
wants to merge
1
commit into
rdkcentral:develop
Choose a base branch
from
manigandanj:RDKBACCL-1463_nvram_mount
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| [Unit] | ||
| After=network.target | ||
| After=network.target mount-nvram.service | ||
| Wants=network.target | ||
| Requires=mount-nvram.service | ||
|
|
||
| [Service] | ||
| ExecStart=/usr/bin/gw_prov_utopia |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
meta-rdk-mtk-bpir4/recipes-kernel/linux/files/rdkb_cfg/sdmmc.cfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| CONFIG_EXT4_DEBUG=y | ||
| CONFIG_F2FS_FS=n | ||
| CONFIG_EXT4_ENCRYPTION=y | ||
| CONFIG_EXT4_FS=y | ||
| CONFIG_EXT4_FS_POSIX_ACL=y | ||
|
|
||
11 changes: 11 additions & 0 deletions
11
meta-rdk-mtk-bpir4/recipes-nonvol/persistence/files/mount-nvram.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| [Unit] | ||
| Description=Mount nvram partition | ||
| Before=gwprovapp.service | ||
|
|
||
| [Service] | ||
| ExecStart=/bin/sh /lib/rdk/mount-nvram.sh | ||
| Restart=on-failure | ||
| RestartSec=2 | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
45 changes: 45 additions & 0 deletions
45
meta-rdk-mtk-bpir4/recipes-nonvol/persistence/files/mount-nvram.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| #!/bin/bash | ||
|
|
||
| # If not stated otherwise in this file or this component's LICENSE | ||
| # file the following copyright and licenses apply: | ||
| # | ||
| #Copyright [2026] [RDK Management] | ||
| # | ||
| #Licensed under the Apache License, Version 2.0 (the "License"); | ||
| #you may not use this file except in compliance with the License. | ||
| #You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| #Unless required by applicable law or agreed to in writing, software | ||
| #distributed under the License is distributed on an "AS IS" BASIS, | ||
| #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| #See the License for the specific language governing permissions and | ||
| #limitations under the License. | ||
|
|
||
| blkid_output=$(blkid /dev/mmcblk0p9 | grep 'TYPE="ext4"') | ||
|
|
||
| echo "blkid_output:$blkid_output" >>/tmp/mount-nvram.log | ||
| if [ -z "$blkid_output" ]; then | ||
| echo "First boot after flashing SD card -- nvram partition is not formatted." >>/tmp/mount-nvram.log | ||
| echo "Formatting nvram partition." >>/tmp/mount-nvram.log | ||
| mkfs.ext4 -F /dev/mmcblk0p9 | ||
| else | ||
| echo "Nvram partition already formatted." >>/tmp/mount-nvram.log | ||
| fi | ||
|
|
||
| mkdir -p /nvram | ||
| mount /dev/mmcblk0p9 /nvram | ||
| if [ "$?" != "0" ]; then | ||
| echo "Mounting nvram partition failed." >>/tmp/mount-nvram.log | ||
| exit 1 | ||
| fi | ||
| mkdir -p /nvram/secure | ||
| # OneWifi DB stored under /opt/secure/wifi | ||
| mkdir -p /opt/secure | ||
| mount --bind /nvram /opt/secure | ||
| # MariaDB stored under /var/lib/mysql | ||
| mkdir -p /var/lib/mysql | ||
| mount --bind /nvram /var/lib/mysql | ||
|
|
||
| exit 0 |
41 changes: 41 additions & 0 deletions
41
meta-rdk-mtk-bpir4/recipes-nonvol/persistence/mount-nvram.bb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| DESCRIPTION = "Mounting nvram partition for storing customized data" | ||
|
|
||
| LICENSE = "Apache-2.0" | ||
| LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" | ||
|
|
||
| COMPATIBLE_MACHINE = "^filogic$" | ||
|
|
||
| inherit deploy | ||
|
|
||
| PROVIDES = "mount-nvram" | ||
|
|
||
| do_patch[noexec] = "1" | ||
| do_configure[noexec] = "1" | ||
| do_compile[noexec] = "1" | ||
|
|
||
| # also get rid of the default dependency added in bitbake.conf | ||
| # since there is no 'main' package generated (empty) | ||
| RDEPENDS_${PN}-dev = "" | ||
|
|
||
| RDEPENDS:${PN} = "bash" | ||
| INSANE_SKIP:${PN} = "host-user-contaminated" | ||
|
|
||
| SRC_URI = " \ | ||
| file://mount-nvram.sh \ | ||
| file://mount-nvram.service \ | ||
| " | ||
|
|
||
| do_install() { | ||
| echo "Installing service and script files." | ||
| mkdir -p ${D}${base_libdir}/rdk | ||
| install -m 0777 ${WORKDIR}/mount-nvram.sh ${D}${base_libdir}/rdk/ | ||
| mkdir -p ${D}${systemd_unitdir}/system | ||
| install -m 0644 ${WORKDIR}/mount-nvram.service ${D}${systemd_unitdir}/system/ | ||
| } | ||
|
|
||
| FILES_${PN} = " \ | ||
| ${base_libdir}/rdk/mount-nvram.sh \ | ||
| ${systemd_unitdir}/system/mount-nvram.service \ | ||
| " | ||
|
|
||
| SYSTEMD_SERVICE_${PN} = "mount-nvram.service" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.