File tree Expand file tree Collapse file tree
recipes-devtools/init-filogic
recipes-extended/persistence
recipes-kernel/linux/files/rdkb_cfg Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[Unit]
2- After=network.target
2+ After=network.target mount-nvram.service
33Wants=network.target
4+ Requires=mount-nvram.service
45
56[Service]
67ExecStart=/usr/bin/gw_prov_utopia
Original file line number Diff line number Diff line change @@ -96,6 +96,8 @@ sed -i 's/^\(\$mgmt_wan_httpaccess=\)1/\10/' ${D}${sysconfdir}/utopia/system_def
9696sed -i 's/^\(\$mgmt_wan_httpsport=\)443/\18181/' ${D}${sysconfdir} /utopia /system_defaults
9797sed -i '/mgmt_wan_httpaccess/i \$mgmt_wan_httpaccess_ert=1' ${D}${sysconfdir} /utopia /system_defaults
9898
99+ # Mounting nvram
100+ sed -i '/Before=CcspPandMSsp.service/a Requires=mount-nvram.service' ${D} /lib /systemd /system /ApplySystemDefaults . service
99101}
100102
101103FILES_${PN} += " \
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ do_install_append(){
66 sed -i '/brctl addif brlan0 lan0/d' ${D}${sbindir} /init -bridge . sh
77 fi
88sed -i '/model/a \
9+ while [ `mount | grep nvram | wc -l` -eq 0 ]; do usleep 500000 ; done; \
910if [ ! -d /nvram/secure ]; then \
1011 mkdir -p /nvram/secure \
1112fi \
@@ -22,6 +23,10 @@ if [ $? -eq 0 ];then \
2223 BRLAN_MAC=`cat /nvram/mac_addresses.txt | grep -a brlan0 | cut -d " " -f 2` \
2324 ifconfig brlan0 hw ether $BRLAN_MAC \
2425fi' ${D}${sbindir} /init -bridge . sh
26+
27+ # Mounting nvram
28+ sed -i '/Before=CcspPandMSsp.service/a Requires=mount-nvram.service' ${D} /lib /systemd /system /init -Lanbridge . service
29+ sed -i 's/utopia.service/mount-nvram.service &/' ${D} /lib /systemd /system /init -Lanbridge . service
2530}
2631
2732# ESDK support - Avoid conflict file is installed by both systemd and init-filogic in kirkstone
Original file line number Diff line number Diff line change 1+ [Unit]
2+ Description =Mount nvram partition
3+ Before =gwprovapp.service
4+
5+ [Service]
6+ ExecStart =/bin/sh /lib/rdk/mount-nvram.sh
7+ Restart =on-failure
8+ RestartSec =2
9+
10+ [Install]
11+ WantedBy =multi-user.target
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ blkid_output=$( blkid /dev/mmcblk0p9 | grep ' TYPE="ext4"' )
4+
5+ echo " blkid_output:$blkid_output " >> /tmp/mount-nvram.log
6+ if [ -z " $blkid_output " ]; then
7+ echo " First boot after flashing SD card -- nvram partition is not formatted." >> /tmp/mount-nvram.log
8+ echo " Formatting nvram partition." >> /tmp/mount-nvram.log
9+ mkfs.ext4 -F /dev/mmcblk0p9
10+ else
11+ echo " Nvram partition already formatted." >> /tmp/mount-nvram.log
12+ fi
13+
14+ mkdir -p /nvram
15+ mount /dev/mmcblk0p9 /nvram
16+ if [ " $? " != " 0" ]; then
17+ echo " Mounting nvram partition failed." >> /tmp/mount-nvram.log
18+ exit 1
19+ fi
20+ mkdir -p /nvram/secure
21+ # OneWifi DB stored in /opt/secure/wifi
22+ mkdir -p /opt/secure
23+ mount --bind /nvram /opt/secure
24+
25+ exit 0
Original file line number Diff line number Diff line change 1+ DESCRIPTION = "Mounting nvram partition for storing customized data"
2+
3+ LICENSE = "CLOSED"
4+
5+ COMPATIBLE_MACHINE = "^filogic$"
6+
7+ inherit deploy
8+
9+ PROVIDES = "mount-nvram"
10+
11+ do_patch [noexec ] = "1"
12+ do_configure [noexec ] = "1"
13+ do_compile [noexec ] = "1"
14+
15+ # also get rid of the default dependency added in bitbake.conf
16+ # since there is no 'main' package generated (empty)
17+ RDEPENDS_${PN} -dev = ""
18+
19+ RDEPENDS :${PN} = "bash"
20+ INSANE_SKIP :${PN} = "host-user-contaminated"
21+
22+ SRC_URI = " \
23+ file://mount-nvram.sh \
24+ file://mount-nvram.service \
25+ "
26+
27+ do_install () {
28+ echo "Installing service and script files."
29+ mkdir -p ${D}${base_libdir} /rdk
30+ install -m 0777 ${WORKDIR} /mount -nvram . sh ${D}${base_libdir} /rdk /
31+ mkdir -p ${D}${systemd_unitdir} /system
32+ install -m 0644 ${WORKDIR} /mount -nvram . service ${D}${systemd_unitdir} /system /
33+ }
34+
35+ FILES_${PN} = " \
36+ ${base_libdir} /rdk/mount-nvram.sh \
37+ ${systemd_unitdir} /system/mount-nvram.service \
38+ "
39+
40+ SYSTEMD_SERVICE_${PN} = "mount-nvram.service"
Original file line number Diff line number Diff line change 1- CONFIG_EXT4_DEBUG =y
1+ CONFIG_F2FS_FS =n
22CONFIG_EXT4_ENCRYPTION =y
33CONFIG_EXT4_FS =y
44CONFIG_EXT4_FS_POSIX_ACL =y
You can’t perform that action at this time.
0 commit comments