From 6c4ca10e7463c0a3107564dfa222f84faa1ca83d Mon Sep 17 00:00:00 2001 From: wingate5678 Date: Fri, 11 Jul 2025 15:24:43 +0000 Subject: [PATCH] certificates: change Sonicfi RAP7 series certicate type from squashfs to ext4 Fixes: WIFI-14834 Signed-off-by: wingate5678 --- .../certificates/files/usr/bin/mount_certs | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/feeds/tip/certificates/files/usr/bin/mount_certs b/feeds/tip/certificates/files/usr/bin/mount_certs index 596df19ec..5472d19bc 100755 --- a/feeds/tip/certificates/files/usr/bin/mount_certs +++ b/feeds/tip/certificates/files/usr/bin/mount_certs @@ -26,16 +26,20 @@ cig,wf672) mmc_dev=$(echo $(find_mmc_part "cert") | sed 's/^.\{5\}//') [ -n "$mmc_dev" ] && mount -t ext4 /dev/$mmc_dev /certificates ;; -sonicfi,rap7110c-341x) - mmc_dev=$(echo $(find_mmc_part "certificates") | sed 's/^.\{5\}//') - [ -n "$mmc_dev" ] && mount -t squashfs /dev/$mmc_dev /mnt - bootconfig=$(bootconfig_lookup) - if [ -n "$bootconfig" ]; then - mmc_dev=$(echo $(find_mmc_part "$bootconfig") | sed 's/^.\{5\}//') - [ -n "$mmc_dev" ] && tar xf /dev/$mmc_dev -C /certificates +sonicfi,rap7*) + if [ "$(board_name)" = "sonicfi,rap7110c-341x" ]; then + mmc_dev=$(echo $(find_mmc_part "certificates") | sed 's/^.\{5\}//') + [ -n "$mmc_dev" ] && mount -t ext4 /dev/$mmc_dev /certificates else - cp /mnt/* /certificates/ - umount /mnt + mtd=$(find_mtd_index certificates) + [ -n "$mtd" ] && mount -t ext4 /dev/mtdblock$mtd /certificates + fi + if [ ! -f /certificates/cert.pem ] || [ ! -f /certificates/key.pem ]; then + bootconfig=$(bootconfig_lookup) + if [ -n "$bootconfig" ]; then + mmc_dev=$(echo $(find_mmc_part "$bootconfig") | sed 's/^.\{5\}//') + [ -n "$mmc_dev" ] && tar xf /dev/$mmc_dev -C /certificates + fi fi ;; *)