mirror of
https://github.com/srlabs/blue-merle.git
synced 2025-02-02 01:04:55 -05:00
Makefile: detect version 4 and bail out while soft-failing for version 3
We assume that the version 3 series is compatible, but still prompt the user if they are using a version that we have not yet tested. We know that version 4 is not compatible, so we bail out directly. The double-dollar is for escaping the Makefile.
This commit is contained in:
parent
cb4d73731f
commit
0f2b358b31
24
Makefile
24
Makefile
@ -1,7 +1,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=blue-merle
|
PKG_NAME:=blue-merle
|
||||||
PKG_VERSION:=1.0.0
|
PKG_VERSION:=1.0.1
|
||||||
PKG_RELEASE:=$(AUTORELEASE)
|
PKG_RELEASE:=$(AUTORELEASE)
|
||||||
|
|
||||||
PKG_MAINTAINER:=Matthias <matthias@srlabs.de>
|
PKG_MAINTAINER:=Matthias <matthias@srlabs.de>
|
||||||
@ -96,13 +96,27 @@ define Package/blue-merle/preinst
|
|||||||
}
|
}
|
||||||
|
|
||||||
if grep -q "GL.iNet GL-E750" /proc/cpuinfo; then
|
if grep -q "GL.iNet GL-E750" /proc/cpuinfo; then
|
||||||
if grep -q -w "3.215" /etc/glversion; then
|
GL_VERSION=$$(cat /etc/glversion)
|
||||||
|
case $$GL_VERSION in
|
||||||
|
4.*)
|
||||||
|
echo Version $$GL_VERSION is not supported
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
3.125)
|
||||||
|
echo Version $$GL_VERSION is supported
|
||||||
CHECK_MCUVERSION
|
CHECK_MCUVERSION
|
||||||
echo "Device is supported, installing blue-merle."
|
|
||||||
exit 0
|
exit 0
|
||||||
else
|
;;
|
||||||
|
3.*)
|
||||||
|
echo Version $$GL_VERSION is *probably* supported
|
||||||
ABORT_GLVERSION
|
ABORT_GLVERSION
|
||||||
fi
|
;;
|
||||||
|
*)
|
||||||
|
echo Unknown version $$GL_VERSION
|
||||||
|
ABORT_GLVERSION
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
CHECK_MCUVERSION
|
||||||
else
|
else
|
||||||
ABORT_GLVERSION
|
ABORT_GLVERSION
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user