فهرست منبع

Support for web-app if choosen in defconfig

The swupdate-www package will be filled with the new web application
or with the legacy Website if the Mongoose server is set to compatibility.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Stefano Babic 7 سال پیش
والد
کامیت
545c1bb60c
1فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 7 1
      recipes-support/swupdate/swupdate.inc

+ 7 - 1
recipes-support/swupdate/swupdate.inc

@@ -91,6 +91,8 @@ python () {
     if 'CONFIG_UBIVOL=y\n' in features:
         depends = d.getVar('DEPENDS', False)
         d.setVar('DEPENDS', depends + ' mtd-utils')
+    if 'CONFIG_MONGOOSE_WEB_API_V2=y\n' in features:
+        d.setVar('SWUPDATE_WWW', 'webapp')
 }
 
 do_configure () {
@@ -112,7 +114,11 @@ do_install () {
   install -m 0755 swupdate ${D}${bindir}/
 
   install -m 0755 -d ${D}/www
-  install -m 0755 ${S}www/* ${D}/www
+  if [ x${SWUPDATE_WWW} == "xwebapp" ];then
+	cp -R --no-dereference --preserve=mode,links -v ${S}examples/www/V2/* ${D}/www
+  else
+	install -m 0755 ${S}www/* ${D}/www
+  fi
 
   install -d ${D}${libdir}/
   install -d ${D}${includedir}/