forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
airoha: WIP test for rootfs ubi mount
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
- Loading branch information
Showing
6 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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,22 @@ | ||
|
||
. /lib/functions.sh | ||
. /lib/functions/uci-defaults.sh | ||
. /lib/functions/system.sh | ||
|
||
mediatek_setup_interfaces() | ||
{ | ||
local board="$1" | ||
|
||
case $board in | ||
*) | ||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan | ||
;; | ||
esac | ||
} | ||
|
||
board_config_update | ||
board=$(board_name) | ||
mediatek_setup_interfaces $board | ||
board_config_flush | ||
|
||
exit 0 |
16 changes: 16 additions & 0 deletions
16
target/linux/airoha/base-files/lib/preinit/07_trigger_fip_scrubbing
This file contains 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,16 @@ | ||
#!/bin/sh | ||
|
||
trigger_fip_scrubbing() { | ||
local vol voltype volname | ||
for vol in /sys/class/ubi/ubi*_*; do | ||
[ -e "$vol" ] || continue | ||
voltype="$(cat "$vol"/type)" | ||
volname="$(cat "$vol"/name)" | ||
if [ "$voltype" = "static" ] && [ "$volname" = "fip" ]; then | ||
cat "/dev/${vol##*/}" > /dev/null | ||
break | ||
fi | ||
done | ||
} | ||
|
||
boot_hook_add preinit_main trigger_fip_scrubbing |
This file contains 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,24 @@ | ||
platform_do_upgrade() { | ||
local board=$(board_name) | ||
|
||
case "$board" in | ||
*) | ||
nand_do_upgrade "$1" | ||
;; | ||
esac | ||
} | ||
|
||
PART_NAME=tclinux | ||
|
||
platform_check_image() { | ||
local board=$(board_name) | ||
|
||
case "$board" in | ||
*) | ||
nand_do_platform_check "$board" "$1" | ||
return $? | ||
;; | ||
esac | ||
|
||
return 0 | ||
} |
This file contains 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 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 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