File tree Expand file tree Collapse file tree 1 file changed +16
-15
lines changed
dev-ayufan/root/usr/local/lib/u-boot-rockchip Expand file tree Collapse file tree 1 file changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -75,21 +75,6 @@ case "$PACKAGE_NAME" in
7575 ;;
7676esac
7777
78- if ! grep -qi " $BOARD " /proc/device-tree/compatible; then
79- error " You are currently running on different board:"
80- error " $( cat /proc/device-tree/model || true) "
81- error " It may brick your device or the system unless"
82- error " you know what are you doing."
83- error " "
84- fi
85-
86- if [[ -f " $SPI_LOADER " ]]; then
87- SPI_SIZE=$( stat -c%s " $SPI_LOADER " )
88- elif [[ -n " $SPI_LOADER " ]]; then
89- error " The '$SPI_LOADER ' is missing."
90- SPI_SIZE=0
91- fi
92-
9378confirm () {
9479 while true ; do
9580 echo " Type YES to continue or Ctrl-C to abort."
@@ -157,3 +142,19 @@ find_mtd() {
157142 error " Could not find MTD device to wrote $SPI_SIZE bytes at $SPI_OFFSET ."
158143 return 1
159144}
145+
146+ if ! grep -qi " $BOARD " /proc/device-tree/compatible; then
147+ error " You are currently running on different board:"
148+ error " $( cat /proc/device-tree/model || true) "
149+ error " It may brick your device or the system unless"
150+ error " you know what are you doing."
151+ error " "
152+ confirm
153+ fi
154+
155+ if [[ -f " $SPI_LOADER " ]]; then
156+ SPI_SIZE=$( stat -c%s " $SPI_LOADER " )
157+ elif [[ -n " $SPI_LOADER " ]]; then
158+ error " The '$SPI_LOADER ' is missing."
159+ SPI_SIZE=0
160+ fi
You can’t perform that action at this time.
0 commit comments