Add hidden option to specify board to udpate_sdcard.sh:

Save some time while doing experiment
This commit is contained in:
Xianjun Jiao 2023-02-09 16:08:33 +01:00
parent 2349a78387
commit 3d0e9e61c8

View File

@ -16,7 +16,7 @@ fi
SKIP_KERNEL_BUILD=0 SKIP_KERNEL_BUILD=0
SKIP_BOOT=0 SKIP_BOOT=0
SKIP_rootfs=0 SKIP_rootfs=0
if [ "$#" -eq 4 ]; then if [ "$#" -gt 3 ]; then
SKIP_KERNEL_BUILD=$(( ($4 >> 0) & 1 )) SKIP_KERNEL_BUILD=$(( ($4 >> 0) & 1 ))
SKIP_BOOT=$(( ($4 >> 1) & 1 )) SKIP_BOOT=$(( ($4 >> 1) & 1 ))
SKIP_rootfs=$(( ($4 >> 2) & 1 )) SKIP_rootfs=$(( ($4 >> 2) & 1 ))
@ -26,6 +26,12 @@ if [ "$#" -eq 4 ]; then
echo SKIP_rootfs $SKIP_rootfs echo SKIP_rootfs $SKIP_rootfs
fi fi
BOARD_NAME_ALL="sdrpi antsdr antsdr_e200 zc706_fmcs2 zed_fmcs2 zc702_fmcs2 adrv9361z7035 adrv9364z7020 zcu102_fmcs2 neptunesdr"
if [ "$#" -gt 4 ]; then
BOARD_NAME_ALL=$5
echo BOARD_NAME_ALL $BOARD_NAME_ALL
fi
OPENWIFI_HW_IMG_DIR=$1 OPENWIFI_HW_IMG_DIR=$1
XILINX_DIR=$2 XILINX_DIR=$2
SDCARD_DIR=$3 SDCARD_DIR=$3
@ -95,7 +101,6 @@ fi
if [ "$SKIP_BOOT" == "0" ]; then if [ "$SKIP_BOOT" == "0" ]; then
sudo rm -rf $SDCARD_DIR/BOOT/openwifi/ sudo rm -rf $SDCARD_DIR/BOOT/openwifi/
sudo mkdir -p $SDCARD_DIR/BOOT/openwifi sudo mkdir -p $SDCARD_DIR/BOOT/openwifi
BOARD_NAME_ALL="sdrpi antsdr antsdr_e200 zc706_fmcs2 zed_fmcs2 zc702_fmcs2 adrv9361z7035 adrv9364z7020 zcu102_fmcs2 neptunesdr"
for BOARD_NAME_TMP in $BOARD_NAME_ALL for BOARD_NAME_TMP in $BOARD_NAME_ALL
do do
if [ "$BOARD_NAME_TMP" == "zcu102_fmcs2" ] || [ "$BOARD_NAME_TMP" == "zcu102_9371" ]; then if [ "$BOARD_NAME_TMP" == "zcu102_fmcs2" ] || [ "$BOARD_NAME_TMP" == "zcu102_9371" ]; then