diff --git a/builds/amd64/installer/legacy/builds/amd64-installer.sh b/builds/amd64/installer/legacy/builds/amd64-installer.sh
index c5bcc00e..dab1a445 100644
--- a/builds/amd64/installer/legacy/builds/amd64-installer.sh
+++ b/builds/amd64/installer/legacy/builds/amd64-installer.sh
@@ -357,7 +357,7 @@ do_cleanup()
cat /var/log/onie.log > /dev/console
installer_say "Install failed. See log messages above for details"
- grep "$workdir" /proc/mounts | cut -d' ' -f2 | sort -r | xargs -n 1 umount
+ grep "$workdir" /proc/mounts | cut -d' ' -f2 | sort -r | xargs -r -n 1 umount
cd /tmp
rm -fr "$workdir"
diff --git a/make/config.mk b/make/config.mk
index 0ba0cae3..215be80c 100644
--- a/make/config.mk
+++ b/make/config.mk
@@ -7,7 +7,7 @@ ifndef ONL
$(error $$ONL is not defined)
endif
-ifndef ONLPM_PY
+ifndef ONLPM
ONLPM := $(ONL)/tools/onlpm.py
endif
@@ -26,16 +26,41 @@ export ONL_DEBIAN_SUITE_$(ONL_DEBIAN_SUITE)=1
export BUILD_DIR_BASE=BUILD/$(ONL_DEBIAN_SUITE)
-
# Generate manifest if necessary
export MODULEMANIFEST := $(shell $(BUILDER)/tools/mmg.py --dirs $(ONL) $(ONLPM_OPTION_PACKAGEDIRS) --out $(ONL)/make/module-manifest.mk --only-if-missing make)
#
# Default make options.
#
-ONL_MAKE_FLAGS += --no-print-directory -s
-ONL_MAKE := $(MAKE) $(ONL_MAKE_FLAGS)
+ifeq ("$(origin V)", "command line")
+VERBOSE := $(V)
+endif
+
+ifneq ($(VERBOSE),1)
+
+# quiet settings
+ONL_V_P := false
ONL_V_at := @
+ONL_V_GEN = @set -e; echo GEN $@;
+
+else
+
+# verbose settings
+ONL_V_P := :
+
+endif
+
+ifneq ($(VERBOSE),1)
+
+ONL_MAKE_FLAGS += --no-print-directory -s
+
+else
+
+ONL_MAKE_FLAGS += V=1
+
+endif
+
+ONL_MAKE := $(MAKE) $(ONL_MAKE_FLAGS)
#
# Some build and autogen tools require these settings.
diff --git a/make/pkg.mk b/make/pkg.mk
index c43a15fb..26d9343d 100644
--- a/make/pkg.mk
+++ b/make/pkg.mk
@@ -17,41 +17,50 @@ ifndef ARCHES
ARCHES := amd64 powerpc armel all
endif
+ONLPM_ENVIRONMENT = \
+ MAKE=$(MAKE) \
+ # THIS LINE INTENTIONALLY LEFT BLANK
+
+ifneq ($(VERBOSE),1)
+else
+ONLPM_ENVIRONMENT += ONLPM_VERBOSE=1
+endif
+
pkgall:
- $(ONL_V_at) MAKE=$(MAKE) onlpm.py --build all --arches $(ARCHES)
+ $(ONL_V_GEN) $(ONLPM_ENVIRONMENT) $(ONLPM) $(ONLPM_OPTS) --build all --arches $(ARCHES)
clean:
- $(ONL_V_at) MAKE=$(MAKE) onlpm.py --clean all --arches $(ARCHES)
+ $(ONL_V_GEN) $(ONLPM_ENVIRONMENT) $(ONLPM) $(ONLPM_OPTS) --clean all --arches $(ARCHES)
rebuild:
- $(ONL_V_at) MAKE=$(MAKE) onlpm.py --rebuild-pkg-cache
+ $(ONL_V_GEN) $(ONLPM_ENVIRONMENT) $(ONLPM) $(ONLPM_OPTS) --rebuild-pkg-cache
#
# Check all package declarations.
#
check:
- $(ONL_V_at) MAKE=$(MAKE) onlpm.py --packagedirs=`pwd` --no-pkg-cache
+ $(ONL_V_GEN) $(ONLPM_ENVIRONMENT) $(ONLPM) $(ONLPM_OPTS) --packagedirs=`pwd` --no-pkg-cache
subdir:
- $(ONL_V_at) MAKE=$(MAKE) onlpm.py --packagedirs=`pwd` --build all --no-pkg-cache
+ $(ONL_V_GEN) $(ONLPM_ENVIRONMENT) $(ONLPM) $(ONLPM_OPTS) --packagedirs=`pwd` --build all --no-pkg-cache
#
# Package construction only (no build step)
#
pkg:
- $(ONL_V_at) MAKE=$(MAKE) NOBUILD=1 onlpm.py --build all --arches $(ARCHES)
+ $(ONL_V_GEN) $(ONLPM_ENVIRONMENT) NOBUILD=1 $(ONLPM) $(ONLPM_OPTS) --build all --arches $(ARCHES)
#
# Generate a rule for all available packages
#
-ALL_PACKAGES := $(shell onlpm.py --list-all)
+ALL_PACKAGES := $(shell $(ONLPM_ENVIRONMENT) $(ONLPM) $(ONLPM_OPTS) --list-all)
define package_build_template
package-$(1):
- $(ONL_V_at) onlpm.py --build $(2)
+ $(ONL_V_GEN) $(ONLPM_ENVIRONMENT) $(ONLPM) $(ONLPM_OPTS) --build $(2)
endef
$(foreach p,$(ALL_PACKAGES),$(eval $(call package_build_template,$(subst :,_,$(p)),$(p))))
diff --git a/packages/base/any/faultd/src/module/src/faultd_main.c b/packages/base/any/faultd/src/module/src/faultd_main.c
index d1b5a581..a3022969 100644
--- a/packages/base/any/faultd/src/module/src/faultd_main.c
+++ b/packages/base/any/faultd/src/module/src/faultd_main.c
@@ -1,22 +1,22 @@
/**************************************************************************//**
*
*
- *
- * Copyright 2013, 2014 BigSwitch Networks, Inc.
- *
+ *
+ * Copyright 2013, 2014 BigSwitch Networks, Inc.
+ *
* Licensed under the Eclipse Public License, Version 1.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
- *
+ *
*
*
*****************************************************************************/
@@ -150,7 +150,7 @@ faultd_main(int argc, char* argv[])
aim_daemon_config_t config;
memset(&config, 0, sizeof(config));
- aim_daemon_restart_config_init(&rconfig, 1, 1);
+ aim_daemon_restart_config_init(&rconfig, 1, 1, argv);
AIM_BITMAP_CLR(&rconfig.signal_restarts, SIGTERM);
AIM_BITMAP_CLR(&rconfig.signal_restarts, SIGKILL);
rconfig.maximum_restarts=0;
diff --git a/packages/base/any/initrds/buildroot/Makefile.any b/packages/base/any/initrds/buildroot/Makefile.any
index e4030ab2..8731167a 100644
--- a/packages/base/any/initrds/buildroot/Makefile.any
+++ b/packages/base/any/initrds/buildroot/Makefile.any
@@ -39,6 +39,7 @@ buildroot-initrd-$(ARCH).cpio.gz: $(ONL_BUILDROOT)/.setup.done
chmod +x makedevs
$(ONL_BUILDROOT)/.setup.done:
+ mkdir -p $(ONL_BUILDROOT)/buildroot-mirror/dl
$(MAKE) -C $(ONL_BUILDROOT) setup
touch $(ONL_BUILDROOT)/.setup.done
diff --git a/packages/base/any/initrds/buildroot/builds/Makefile b/packages/base/any/initrds/buildroot/builds/Makefile
index f24cc43d..f628575a 100644
--- a/packages/base/any/initrds/buildroot/builds/Makefile
+++ b/packages/base/any/initrds/buildroot/builds/Makefile
@@ -28,18 +28,53 @@ clean:
rm -rf $(BUILDROOT_ARCHDIRS)
-setup:
+setup: setup-pyroute2 setup-dnspython setup-libyaml setup-pyyaml setup-jq setup-pyparted
cp $(wildcard patches/busybox*.patch) $(BUILDROOT_SOURCE)/package/busybox/
cp $(wildcard patches/kexec*.patch) $(BUILDROOT_SOURCE)/package/kexec/
sed -i 's%^DOSFSTOOLS_SITE =.*%DOSFSTOOLS_SITE = http://downloads.openwrt.org/sources%' $(BUILDROOT_SOURCE)/package/dosfstools/dosfstools.mk
sed -i 's%^UEMACS_SITE =.*%UEMACS_SITE = http://www.kernel.org/pub/linux/kernel/uemacs%;s%^UEMACS_SOURCE =.*%UEMACS_SOURCE = em-$$(UEMACS_VERSION).tar.gz%' $(BUILDROOT_SOURCE)/package/uemacs/uemacs.mk
+ mkdir -p $(BUILDROOT_ARCHDIRS)
+ $(foreach a,$(ARCHS),cp buildroot.config-$(a) buildroot-$(a)/.config ;)
+
+setup-jq:
mkdir -p $(BUILDROOT_SOURCE)/package/jq
cp patches/jq.mk $(BUILDROOT_SOURCE)/package/jq/jq.mk
cp patches/jq.Config.in $(BUILDROOT_SOURCE)/package/jq/Config.in
sed -i '/[/]jq[/]/d' $(BUILDROOT_SOURCE)/package/Config.in
sed -i '/[/]yajl[/]/a\source "package/jq/Config.in"' $(BUILDROOT_SOURCE)/package/Config.in
- mkdir -p $(BUILDROOT_ARCHDIRS)
- $(foreach a,$(ARCHS),cp buildroot.config-$(a) buildroot-$(a)/.config ;)
+
+setup-pyroute2:
+ mkdir -p $(BUILDROOT_SOURCE)/package/python-pyroute2
+ cp patches/python-pyroute2.mk $(BUILDROOT_SOURCE)/package/python-pyroute2/python-pyroute2.mk
+ cp patches/python-pyroute2.Config.in $(BUILDROOT_SOURCE)/package/python-pyroute2/Config.in
+ sed -i '/[/]python-pyroute2[/]/d' $(BUILDROOT_SOURCE)/package/Config.in
+ sed -i '/[/]python-setuptools[/]/a\source "package/python-pyroute2/Config.in"' $(BUILDROOT_SOURCE)/package/Config.in
+
+setup-dnspython:
+ mkdir -p $(BUILDROOT_SOURCE)/package/python-dnspython
+ cp patches/python-dnspython.mk $(BUILDROOT_SOURCE)/package/python-dnspython/python-dnspython.mk
+ cp patches/python-dnspython.Config.in $(BUILDROOT_SOURCE)/package/python-dnspython/Config.in
+ sed -i '/[/]python-dnspython[/]/d' $(BUILDROOT_SOURCE)/package/Config.in
+ sed -i '/[/]python-setuptools[/]/a\source "package/python-dnspython/Config.in"' $(BUILDROOT_SOURCE)/package/Config.in
+
+setup-pyyaml:
+ mkdir -p $(BUILDROOT_SOURCE)/package/python-yaml
+ cp patches/python-yaml.mk $(BUILDROOT_SOURCE)/package/python-yaml/python-yaml.mk
+ cp patches/python-yaml.Config.in $(BUILDROOT_SOURCE)/package/python-yaml/Config.in
+ sed -i '/[/]python-yaml[/]/d' $(BUILDROOT_SOURCE)/package/Config.in
+ sed -i '/[/]python-setuptools[/]/a\source "package/python-yaml/Config.in"' $(BUILDROOT_SOURCE)/package/Config.in
+
+setup-libyaml:
+ sed -i.bak -e '/LIBYAML_INSTALL_TARGET/d' $(BUILDROOT_SOURCE)/package/libyaml/libyaml.mk
+ sed -i.bak -e '/LIBYAML_VERSION/a\LIBYAML_INSTALL_TARGET = YES' $(BUILDROOT_SOURCE)/package/libyaml/libyaml.mk
+
+setup-pyparted:
+ mkdir -p $(BUILDROOT_SOURCE)/package/python-pyparted
+ cp patches/python-pyparted.mk $(BUILDROOT_SOURCE)/package/python-pyparted/python-pyparted.mk
+ cp patches/python-pyparted.Config.in $(BUILDROOT_SOURCE)/package/python-pyparted/Config.in
+ cp patches/pyparted*.tar.bz2 $(BUILDROOT_SOURCE)/dl/.
+ sed -i '/[/]python-pyparted[/]/d' $(BUILDROOT_SOURCE)/package/Config.in
+ sed -i '/[/]python-setuptools[/]/a\source "package/python-pyparted/Config.in"' $(BUILDROOT_SOURCE)/package/Config.in
define buildroot_arch
diff --git a/packages/base/any/initrds/buildroot/builds/buildroot.config-arm b/packages/base/any/initrds/buildroot/builds/buildroot.config-arm
index 33f00b86..02f39514 100644
--- a/packages/base/any/initrds/buildroot/builds/buildroot.config-arm
+++ b/packages/base/any/initrds/buildroot/builds/buildroot.config-arm
@@ -608,7 +608,7 @@ BR2_PACKAGE_PYTHON_BZIP2=y
# BR2_PACKAGE_PYTHON_CURSES is not set
# BR2_PACKAGE_PYTHON_PYEXPAT is not set
BR2_PACKAGE_PYTHON_READLINE=y
-# BR2_PACKAGE_PYTHON_SSL is not set
+BR2_PACKAGE_PYTHON_SSL=y
# BR2_PACKAGE_PYTHON_UNICODEDATA is not set
# BR2_PACKAGE_PYTHON_SQLITE is not set
BR2_PACKAGE_PYTHON_ZLIB=y
@@ -629,6 +629,10 @@ BR2_PACKAGE_PYTHON_ZLIB=y
# BR2_PACKAGE_PYTHON_PYPARSING is not set
# BR2_PACKAGE_PYTHON_SERIAL is not set
# BR2_PACKAGE_PYTHON_SETUPTOOLS is not set
+BR2_PACKAGE_PYTHON_DNSPYTHON=y
+BR2_PACKAGE_PYTHON_PYROUTE2=y
+BR2_PACKAGE_PYTHON_YAML=y
+BR2_PACKAGE_PYTHON_PYPARTED=y
# BR2_PACKAGE_RUBY is not set
# BR2_PACKAGE_TCL is not set
@@ -979,7 +983,7 @@ BR2_PACKAGE_READLINE=y
# BR2_PACKAGE_LIBROXML is not set
# BR2_PACKAGE_LIBXML2 is not set
# BR2_PACKAGE_LIBXSLT is not set
-# BR2_PACKAGE_LIBYAML is not set
+BR2_PACKAGE_LIBYAML=y
# BR2_PACKAGE_MXML is not set
#
diff --git a/packages/base/any/initrds/buildroot/builds/buildroot.config-powerpc b/packages/base/any/initrds/buildroot/builds/buildroot.config-powerpc
index 3d6f2bd3..84d06b85 100644
--- a/packages/base/any/initrds/buildroot/builds/buildroot.config-powerpc
+++ b/packages/base/any/initrds/buildroot/builds/buildroot.config-powerpc
@@ -611,7 +611,7 @@ BR2_PACKAGE_PYTHON_BZIP2=y
# BR2_PACKAGE_PYTHON_CURSES is not set
# BR2_PACKAGE_PYTHON_PYEXPAT is not set
BR2_PACKAGE_PYTHON_READLINE=y
-# BR2_PACKAGE_PYTHON_SSL is not set
+BR2_PACKAGE_PYTHON_SSL=y
# BR2_PACKAGE_PYTHON_UNICODEDATA is not set
# BR2_PACKAGE_PYTHON_SQLITE is not set
BR2_PACKAGE_PYTHON_ZLIB=y
@@ -632,6 +632,10 @@ BR2_PACKAGE_PYTHON_ZLIB=y
# BR2_PACKAGE_PYTHON_PYPARSING is not set
# BR2_PACKAGE_PYTHON_SERIAL is not set
# BR2_PACKAGE_PYTHON_SETUPTOOLS is not set
+BR2_PACKAGE_PYTHON_DNSPYTHON=y
+BR2_PACKAGE_PYTHON_PYROUTE2=y
+BR2_PACKAGE_PYTHON_YAML=y
+BR2_PACKAGE_PYTHON_PYPARTED=y
# BR2_PACKAGE_RUBY is not set
# BR2_PACKAGE_TCL is not set
@@ -971,7 +975,7 @@ BR2_PACKAGE_READLINE=y
# BR2_PACKAGE_LIBROXML is not set
# BR2_PACKAGE_LIBXML2 is not set
# BR2_PACKAGE_LIBXSLT is not set
-# BR2_PACKAGE_LIBYAML is not set
+BR2_PACKAGE_LIBYAML=y
# BR2_PACKAGE_MXML is not set
#
diff --git a/packages/base/any/initrds/buildroot/builds/buildroot.config-x86_64 b/packages/base/any/initrds/buildroot/builds/buildroot.config-x86_64
index 4cd85df1..0ae7448b 100644
--- a/packages/base/any/initrds/buildroot/builds/buildroot.config-x86_64
+++ b/packages/base/any/initrds/buildroot/builds/buildroot.config-x86_64
@@ -586,7 +586,7 @@ BR2_PACKAGE_PYTHON_BZIP2=y
# BR2_PACKAGE_PYTHON_CURSES is not set
# BR2_PACKAGE_PYTHON_PYEXPAT is not set
BR2_PACKAGE_PYTHON_READLINE=y
-# BR2_PACKAGE_PYTHON_SSL is not set
+BR2_PACKAGE_PYTHON_SSL=y
# BR2_PACKAGE_PYTHON_UNICODEDATA is not set
# BR2_PACKAGE_PYTHON_SQLITE is not set
BR2_PACKAGE_PYTHON_ZLIB=y
@@ -607,6 +607,10 @@ BR2_PACKAGE_PYTHON_ZLIB=y
# BR2_PACKAGE_PYTHON_PYPARSING is not set
# BR2_PACKAGE_PYTHON_SERIAL is not set
# BR2_PACKAGE_PYTHON_SETUPTOOLS is not set
+BR2_PACKAGE_PYTHON_DNSPYTHON=y
+BR2_PACKAGE_PYTHON_PYROUTE2=y
+BR2_PACKAGE_PYTHON_YAML=y
+BR2_PACKAGE_PYTHON_PYPARTED=y
# BR2_PACKAGE_RUBY is not set
# BR2_PACKAGE_TCL is not set
@@ -947,7 +951,7 @@ BR2_PACKAGE_READLINE=y
# BR2_PACKAGE_LIBROXML is not set
# BR2_PACKAGE_LIBXML2 is not set
# BR2_PACKAGE_LIBXSLT is not set
-# BR2_PACKAGE_LIBYAML is not set
+BR2_PACKAGE_LIBYAML=y
# BR2_PACKAGE_MXML is not set
#
diff --git a/packages/base/any/initrds/buildroot/builds/patches/pyblkid-0.0.1.tar.bz2 b/packages/base/any/initrds/buildroot/builds/patches/pyblkid-0.0.1.tar.bz2
new file mode 100644
index 00000000..5d281858
Binary files /dev/null and b/packages/base/any/initrds/buildroot/builds/patches/pyblkid-0.0.1.tar.bz2 differ
diff --git a/packages/base/any/initrds/buildroot/builds/patches/pyparted-3.10.7.tar.bz2 b/packages/base/any/initrds/buildroot/builds/patches/pyparted-3.10.7.tar.bz2
new file mode 100644
index 00000000..8c9fe36c
Binary files /dev/null and b/packages/base/any/initrds/buildroot/builds/patches/pyparted-3.10.7.tar.bz2 differ
diff --git a/packages/base/any/initrds/buildroot/builds/patches/python-dnspython.Config.in b/packages/base/any/initrds/buildroot/builds/patches/python-dnspython.Config.in
new file mode 100644
index 00000000..417d7643
--- /dev/null
+++ b/packages/base/any/initrds/buildroot/builds/patches/python-dnspython.Config.in
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_PYTHON_DNSPYTHON
+ bool "python-dnspython"
+ depends on BR2_PACKAGE_PYTHON
+ help
+ Include the 'dnspython' Python library
diff --git a/packages/base/any/initrds/buildroot/builds/patches/python-dnspython.mk b/packages/base/any/initrds/buildroot/builds/patches/python-dnspython.mk
new file mode 100644
index 00000000..58f4a95b
--- /dev/null
+++ b/packages/base/any/initrds/buildroot/builds/patches/python-dnspython.mk
@@ -0,0 +1,25 @@
+######################################################################
+##
+## dnspython.mk
+##
+######################################################################
+
+PYTHON_DNSPYTHON_VERSION = 1.12.0
+PYTHON_DNSPYTHON_SOURCE = dnspython-$(PYTHON_DNSPYTHON_VERSION).tar.gz
+PYTHON_DNSPYTHON_SITE = http://www.dnspython.org/kits/1.12.0/
+PYTHON_DNSPYTHON_INSTALL_STAGING = NO
+PYTHON_DNSPYTHON_INSTALL_TARGET = YES
+PYTHON_DNSPYTHON_LICENSE = BSD-style
+PYTHON_DNSPYTHON_LICENSE_FILES = LICENSE
+
+PYTHON_DNSPYTHON_DEPENDENCIES = python
+
+define PYTHON_DNSPYTHON_BUILD_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build)
+endef
+
+define PYTHON_DNSPYTHON_INSTALL_TARGET_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(generic-package))
diff --git a/packages/base/any/initrds/buildroot/builds/patches/python-pyblkid.Config.in b/packages/base/any/initrds/buildroot/builds/patches/python-pyblkid.Config.in
new file mode 100644
index 00000000..6207230a
--- /dev/null
+++ b/packages/base/any/initrds/buildroot/builds/patches/python-pyblkid.Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PYTHON_PYBLKID
+ bool "python-pyblkid"
+ depends on BR2_PACKAGE_PYTHON
+ depends on BR2_PACKAGE_UTIL_LINUX
+ help
+ Include the 'pyblkid' Python library
diff --git a/packages/base/any/initrds/buildroot/builds/patches/python-pyblkid.mk b/packages/base/any/initrds/buildroot/builds/patches/python-pyblkid.mk
new file mode 100644
index 00000000..8299426b
--- /dev/null
+++ b/packages/base/any/initrds/buildroot/builds/patches/python-pyblkid.mk
@@ -0,0 +1,41 @@
+######################################################################
+##
+## python-pyblkid.mk
+##
+######################################################################
+
+PYTHON_PYBLKID_VERSION = 0.0.1
+PYTHON_PYBLKID_SOURCE = pyblkid-$(PYTHON_PYBLKID_VERSION).tar.bz2
+PYTHON_PYBLKID_INSTALL_STAGING = NO
+PYTHON_PYBLKID_INSTALL_TARGET = YES
+PYTHON_PYBLKID_LICENSE = GPL
+PYTHON_PYBLKID_LICENSE_FILES = COPYING
+
+PYTHON_PYBLKID_DEPENDENCIES = python util-linux
+
+PYTHON_PYBLKID_INCLUDES = \
+ --include-dirs $(STAGING_DIR)/usr/include:$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \
+ # THIS LINE INTENTIONALLY LEFT BLANK
+
+PYTHON_PYBLKID_LIBDIRS = \
+ --library-dirs $(STAGING_DIR)/usr/lib \
+ # THIS LINE INTENTIONALLY LEFT BLANK
+
+# see python-mad.mk
+PYTHON_PYBLKID_ENVIRONMENT = \
+ CC="$(TARGET_CC)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDSHARED="$(TARGET_CC) -shared" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ # THIS LINE INTENTIONALLY LEFT BLANK
+
+define PYTHON_PYBLKID_BUILD_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build_py)
+ (cd $(@D); $(PYTHON_PYBLKID_ENVIRONMENT) $(HOST_DIR)/usr/bin/python setup.py build_ext $(PYTHON_PYBLKID_INCLUDES) $(PYTHON_PYBLKID_LIBDIRS))
+endef
+
+define PYTHON_PYBLKID_INSTALL_TARGET_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr --install-scripts=$(TARGET_DIR)/usr/bin)
+endef
+
+$(eval $(generic-package))
diff --git a/packages/base/any/initrds/buildroot/builds/patches/python-pyparted.Config.in b/packages/base/any/initrds/buildroot/builds/patches/python-pyparted.Config.in
new file mode 100644
index 00000000..158d4ba8
--- /dev/null
+++ b/packages/base/any/initrds/buildroot/builds/patches/python-pyparted.Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PYTHON_PYPARTED
+ bool "python-pyparted"
+ depends on BR2_PACKAGE_PYTHON
+ depends on BR2_PACKAGE_PARTED
+ help
+ Include the 'pyparted' Python library
diff --git a/packages/base/any/initrds/buildroot/builds/patches/python-pyparted.mk b/packages/base/any/initrds/buildroot/builds/patches/python-pyparted.mk
new file mode 100644
index 00000000..35f92546
--- /dev/null
+++ b/packages/base/any/initrds/buildroot/builds/patches/python-pyparted.mk
@@ -0,0 +1,42 @@
+######################################################################
+##
+## python-pyparted.mk
+##
+######################################################################
+
+PYTHON_PYPARTED_VERSION = 3.10.7
+PYTHON_PYPARTED_SOURCE = pyparted-$(PYTHON_PYPARTED_VERSION).tar.bz2
+##PYTHON_PYPARTED_SITE = http://pyyaml.org/download/pyyaml/
+PYTHON_PYPARTED_INSTALL_STAGING = NO
+PYTHON_PYPARTED_INSTALL_TARGET = YES
+PYTHON_PYPARTED_LICENSE = GPL
+PYTHON_PYPARTED_LICENSE_FILES = COPYING
+
+PYTHON_PYPARTED_DEPENDENCIES = python parted
+
+PYTHON_PYPARTED_INCLUDES = \
+ --include-dirs $(STAGING_DIR)/usr/include:$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \
+ # THIS LINE INTENTIONALLY LEFT BLANK
+
+PYTHON_PYPARTED_LIBDIRS = \
+ --library-dirs $(STAGING_DIR)/usr/lib \
+ # THIS LINE INTENTIONALLY LEFT BLANK
+
+# see python-mad.mk
+PYTHON_PYPARTED_ENVIRONMENT = \
+ CC="$(TARGET_CC)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDSHARED="$(TARGET_CC) -shared" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ # THIS LINE INTENTIONALLY LEFT BLANK
+
+define PYTHON_PYPARTED_BUILD_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build_py)
+ (cd $(@D); $(PYTHON_PYPARTED_ENVIRONMENT) $(HOST_DIR)/usr/bin/python setup.py build_ext $(PYTHON_PYPARTED_INCLUDES) $(PYTHON_PYPARTED_LIBDIRS))
+endef
+
+define PYTHON_PYPARTED_INSTALL_TARGET_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(generic-package))
diff --git a/packages/base/any/initrds/buildroot/builds/patches/python-pyroute2.Config.in b/packages/base/any/initrds/buildroot/builds/patches/python-pyroute2.Config.in
new file mode 100644
index 00000000..87c15329
--- /dev/null
+++ b/packages/base/any/initrds/buildroot/builds/patches/python-pyroute2.Config.in
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_PYTHON_PYROUTE2
+ bool "python-pyroute2"
+ depends on BR2_PACKAGE_PYTHON
+ help
+ Include the 'pyroute2' Python library
diff --git a/packages/base/any/initrds/buildroot/builds/patches/python-pyroute2.mk b/packages/base/any/initrds/buildroot/builds/patches/python-pyroute2.mk
new file mode 100644
index 00000000..bd0eb04a
--- /dev/null
+++ b/packages/base/any/initrds/buildroot/builds/patches/python-pyroute2.mk
@@ -0,0 +1,29 @@
+######################################################################
+##
+## pyroute2.mk
+##
+######################################################################
+
+PYTHON_PYROUTE2_VERSION = 0.3.14
+PYTHON_PYROUTE2_SOURCE = pyroute2-$(PYTHON_PYROUTE2_VERSION).tar.gz
+PYTHON_PYROUTE2_SITE = https://pypi.python.org/packages/source/p/pyroute2/
+PYTHON_PYROUTE2_LICENSE = GPLv2+ and Apache v2
+PYTHON_PYROUTE2_LICENSE_FILES = \
+ READEME.licence.md \
+ LICENSE.GPL.v2 \
+ LICENSE.Apache.v2 \
+ # THIS LINE INTENTIONALLY LEFT BLANK
+PYTHON_PYROUTE2_INSTALL_STAGING = NO
+PYTHON_PYROUTE2_INSTALL_TARGET = YES
+
+PYTHON_PYROUTE2_DEPENDENCIES = python
+
+define PYTHON_PYROUTE2_BUILD_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build)
+endef
+
+define PYTHON_PYROUTE2_INSTALL_TARGET_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(generic-package))
diff --git a/packages/base/any/initrds/buildroot/builds/patches/python-yaml.Config.in b/packages/base/any/initrds/buildroot/builds/patches/python-yaml.Config.in
new file mode 100644
index 00000000..30506189
--- /dev/null
+++ b/packages/base/any/initrds/buildroot/builds/patches/python-yaml.Config.in
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_PYTHON_YAML
+ bool "python-yaml"
+ depends on BR2_PACKAGE_PYTHON
+ help
+ Include the 'PyYAML' Python library
diff --git a/packages/base/any/initrds/buildroot/builds/patches/python-yaml.mk b/packages/base/any/initrds/buildroot/builds/patches/python-yaml.mk
new file mode 100644
index 00000000..49589cd8
--- /dev/null
+++ b/packages/base/any/initrds/buildroot/builds/patches/python-yaml.mk
@@ -0,0 +1,42 @@
+######################################################################
+##
+## python-yaml.mk
+##
+######################################################################
+
+PYTHON_YAML_VERSION = 3.11
+PYTHON_YAML_SOURCE = PyYAML-$(PYTHON_YAML_VERSION).tar.gz
+PYTHON_YAML_SITE = http://pyyaml.org/download/pyyaml/
+PYTHON_YAML_INSTALL_STAGING = NO
+PYTHON_YAML_INSTALL_TARGET = YES
+PYTHON_YAML_LICENSE = MIT
+PYTHON_YAML_LICENSE_FILES = LICENSE
+
+PYTHON_YAML_DEPENDENCIES = python libyaml
+
+PYTHON_YAML_INCLUDES = \
+ --include-dirs $(STAGING_DIR)/usr/include:$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \
+ # THIS LINE INTENTIONALLY LEFT BLANK
+
+PYTHON_YAML_LIBDIRS = \
+ --library-dirs $(STAGING_DIR)/usr/lib \
+ # THIS LINE INTENTIONALLY LEFT BLANK
+
+# see python-mad.mk
+PYTHON_YAML_ENVIRONMENT = \
+ CC="$(TARGET_CC)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDSHARED="$(TARGET_CC) -shared" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ # THIS LINE INTENTIONALLY LEFT BLANK
+
+define PYTHON_YAML_BUILD_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build_py)
+ (cd $(@D); $(PYTHON_YAML_ENVIRONMENT) $(HOST_DIR)/usr/bin/python setup.py build_ext $(PYTHON_YAML_INCLUDES) $(PYTHON_YAML_LIBDIRS))
+endef
+
+define PYTHON_YAML_INSTALL_TARGET_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(generic-package))
diff --git a/packages/base/any/onlp/src/onlp/module/src/onlp_main.c b/packages/base/any/onlp/src/onlp/module/src/onlp_main.c
index 276e3bc6..f20b1f0b 100644
--- a/packages/base/any/onlp/src/onlp/module/src/onlp_main.c
+++ b/packages/base/any/onlp/src/onlp/module/src/onlp_main.c
@@ -31,7 +31,7 @@
#include
#include
-static void platform_manager_daemon__(const char* pidfile);
+static void platform_manager_daemon__(const char* pidfile, char** argv);
/**
* Human-readable SFP inventory.
@@ -246,7 +246,7 @@ onlpdump_main(int argc, char* argv[])
onlp_init();
if(M) {
- platform_manager_daemon__(pidfile);
+ platform_manager_daemon__(pidfile, argv);
exit(0);
}
@@ -361,14 +361,14 @@ sighandler__(int signal)
}
static void
-platform_manager_daemon__(const char* pidfile)
+platform_manager_daemon__(const char* pidfile, char** argv)
{
aim_pvs_t* aim_pvs_syslog = NULL;
aim_daemon_restart_config_t rconfig;
aim_daemon_config_t config;
memset(&config, 0, sizeof(config));
- aim_daemon_restart_config_init(&rconfig, 1, 1);
+ aim_daemon_restart_config_init(&rconfig, 1, 1, argv);
AIM_BITMAP_CLR(&rconfig.signal_restarts, SIGTERM);
AIM_BITMAP_CLR(&rconfig.exit_restarts, 0);
rconfig.maximum_restarts=50;
@@ -412,9 +412,9 @@ platform_manager_daemon__(const char* pidfile)
#else
static void
-platform_manager_daemon__(const char* pidfile)
+platform_manager_daemon__(const char* pidfile, char** argv)
{
- fprintf(stderr, "Daemon mode not supported in this build.");
+ fprintf(stderr, "Daemon mode not supported in this build.\n");
exit(1);
}
#endif
diff --git a/packages/base/any/onlp/src/onlplib/module/src/file.c b/packages/base/any/onlp/src/onlplib/module/src/file.c
index 4d1ef1f7..d0adce8e 100644
--- a/packages/base/any/onlp/src/onlplib/module/src/file.c
+++ b/packages/base/any/onlp/src/onlplib/module/src/file.c
@@ -30,18 +30,80 @@
#include "onlplib_log.h"
#include
#include
+#include
+#include
+#include
+
+/**
+ * @brief Connects to a unix domain socket.
+ * @param path The socket path.
+ */
+static int
+ds_connect__(const char* path)
+{
+ int fd;
+ struct sockaddr_un addr;
+
+ if( (fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
+ AIM_LOG_ERROR("socket: %{errno}", errno);
+ return -1;
+ }
+
+ memset(&addr, 0, sizeof(addr));
+ addr.sun_family = AF_UNIX;
+ strncpy(addr.sun_path, path, sizeof(addr.sun_path)-1);
+
+ if(connect(fd, (struct sockaddr*)&addr, sizeof(addr)) == 0) {
+ return fd;
+ }
+ else {
+ return ONLP_STATUS_E_MISSING;
+ }
+}
+
+/**
+ * @brief Open a file or domain socket.
+ * @param dst Receives the full filename (for logging purposes).
+ * @param flags The open flags.
+ * @param fmt Format specifier.
+ * @param vargs Format specifier arguments.
+ */
+static int
+vopen__(char** dst, int flags, const char* fmt, va_list vargs)
+{
+ int fd;
+ struct stat sb;
+ char fname[PATH_MAX];
+
+ ONLPLIB_VSNPRINTF(fname, sizeof(fname)-1, fmt, vargs);
+ if(dst) {
+ *dst = aim_strdup(fname);
+ }
+
+ if(stat(fname, &sb) == -1) {
+ return ONLP_STATUS_E_MISSING;
+ }
+
+ if(S_ISSOCK(sb.st_mode)) {
+ fd = ds_connect__(fname);
+ }
+ else {
+ fd = open(fname, flags);
+ }
+
+ return (fd > 0) ? fd : ONLP_STATUS_E_MISSING;
+}
+
int
onlp_file_vread(uint8_t* data, int max, int* len, const char* fmt, va_list vargs)
{
int fd;
- char fname[PATH_MAX];
+ char* fname = NULL;
int rv;
- ONLPLIB_VSNPRINTF(fname, sizeof(fname)-1, fmt, vargs);
-
- if ((fd = open(fname, O_RDONLY)) == -1) {
- rv = ONLP_STATUS_E_MISSING;
+ if ((fd = vopen__(&fname, O_RDONLY, fmt, vargs)) < 0) {
+ rv = fd;
}
else {
if ((*len = read(fd, data, max)) <= 0) {
@@ -53,6 +115,7 @@ onlp_file_vread(uint8_t* data, int max, int* len, const char* fmt, va_list vargs
}
close(fd);
}
+ aim_free(fname);
return rv;
}
@@ -124,14 +187,12 @@ int
onlp_file_vwrite(uint8_t* data, int len, const char* fmt, va_list vargs)
{
int fd;
- char fname[PATH_MAX];
+ char* fname = NULL;
int rv;
int wlen;
- ONLPLIB_VSNPRINTF(fname, sizeof(fname)-1, fmt, vargs);
-
- if ((fd = open(fname, O_WRONLY)) == -1) {
- rv = ONLP_STATUS_E_MISSING;
+ if ((fd = vopen__(&fname, O_WRONLY, fmt, vargs)) < 0) {
+ rv = fd;
}
else {
if ((wlen = write(fd, data, len)) != len) {
@@ -143,6 +204,7 @@ onlp_file_vwrite(uint8_t* data, int len, const char* fmt, va_list vargs)
}
close(fd);
}
+ aim_free(fname);
return rv;
}
@@ -211,11 +273,12 @@ int
onlp_file_vopen(int flags, int log, const char* fmt, va_list vargs)
{
int rv;
- char fname[PATH_MAX];
- ONLPLIB_VSNPRINTF(fname, sizeof(fname)-1, fmt, vargs);
- rv = open(fname, flags);
+ char* fname;
+
+ rv = vopen__(&fname, flags, fmt, vargs);
if(rv < 0 && log) {
AIM_LOG_ERROR("failed to open file %s (0x%x): %{errno}", fname, flags, errno);
}
+ aim_free(fname);
return rv;
}
diff --git a/packages/platforms/accton/powerpc/powerpc-accton-as5610-52x/onlp/builds/src/module/src/sysi.c b/packages/platforms/accton/powerpc/powerpc-accton-as5610-52x/onlp/builds/src/module/src/sysi.c
index 76cc32b0..566af639 100644
--- a/packages/platforms/accton/powerpc/powerpc-accton-as5610-52x/onlp/builds/src/module/src/sysi.c
+++ b/packages/platforms/accton/powerpc/powerpc-accton-as5610-52x/onlp/builds/src/module/src/sysi.c
@@ -74,7 +74,7 @@ onlp_sysi_oids_get(onlp_oid_t* table, int max)
/* 1 Fan */
*e++ = ONLP_FAN_ID_CREATE(1);
- /* 8 Thermal sensors */
+ /* 9 Thermal sensors */
*e++ = ONLP_THERMAL_ID_CREATE(1);
*e++ = ONLP_THERMAL_ID_CREATE(2);
*e++ = ONLP_THERMAL_ID_CREATE(3);
@@ -83,6 +83,7 @@ onlp_sysi_oids_get(onlp_oid_t* table, int max)
*e++ = ONLP_THERMAL_ID_CREATE(6);
*e++ = ONLP_THERMAL_ID_CREATE(7);
*e++ = ONLP_THERMAL_ID_CREATE(8);
+ *e++ = ONLP_THERMAL_ID_CREATE(11);
/* 5 LEDs */
*e++ = ONLP_LED_ID_CREATE(1);
diff --git a/packages/platforms/accton/powerpc/powerpc-accton-as5610-52x/onlp/builds/src/module/src/thermali.c b/packages/platforms/accton/powerpc/powerpc-accton-as5610-52x/onlp/builds/src/module/src/thermali.c
index 79591110..3b788fb4 100644
--- a/packages/platforms/accton/powerpc/powerpc-accton-as5610-52x/onlp/builds/src/module/src/thermali.c
+++ b/packages/platforms/accton/powerpc/powerpc-accton-as5610-52x/onlp/builds/src/module/src/thermali.c
@@ -28,6 +28,7 @@
#include
#include
#include "platform_lib.h"
+#include
/* i2c device info */
#define I2C_PSU_BUS_ID 0
@@ -222,7 +223,10 @@ static onlp_thermal_info_t tinfo[] = {
},
{ { ONLP_THERMAL_ID_CREATE(10), "PSU-2 Thermal Sensor 1", ONLP_PSU_ID_CREATE(2)}, 0x1,
ONLP_THERMAL_CAPS_ALL, 0, ONLP_THERMAL_THRESHOLD_INIT_DEFAULTS
-}
+},
+{ { ONLP_THERMAL_ID_CREATE(11), "Switch Thermal Sensor", 0}, 0x1,
+ ONLP_THERMAL_CAPS_ALL, 0, ONLP_THERMAL_THRESHOLD_INIT_DEFAULTS
+},
};
/*
@@ -275,6 +279,26 @@ onlp_thermali_info_get(onlp_oid_t id, onlp_thermal_info_t* info)
}
}
+ if (ONLP_OID_ID_GET(id) == 11) {
+ /* Switch Thermal Sensor */
+ char* fname = "/var/run/broadcom/temp0";
+ int rv = onlp_file_read_int(&info->mcelsius, fname);
+ if(rv >= 0) {
+ /** Present and running */
+ info->status |= 1;
+ ret = 0;
+ }
+ else if(rv == ONLP_STATUS_E_MISSING) {
+ /** No switch management process running. */
+ info->status = 0;
+ ret = 0;
+ }
+ else {
+ /** Other error. */
+ ret = ONLP_STATUS_E_INTERNAL;
+ }
+ }
+
/* Close PSU channel
*/
as5610_52x_i2c0_pca9548_channel_set(0);
diff --git a/packages/platforms/accton/x86-64/x86-64-accton-as5812-54t/platform-config/r0/src/python/x86_64_accton_as5812_54t_r0/__init__.py b/packages/platforms/accton/x86-64/x86-64-accton-as5812-54t/platform-config/r0/src/python/x86_64_accton_as5812_54t_r0/__init__.py
index 0ee29fdc..bd554c23 100644
--- a/packages/platforms/accton/x86-64/x86-64-accton-as5812-54t/platform-config/r0/src/python/x86_64_accton_as5812_54t_r0/__init__.py
+++ b/packages/platforms/accton/x86-64/x86-64-accton-as5812-54t/platform-config/r0/src/python/x86_64_accton_as5812_54t_r0/__init__.py
@@ -51,6 +51,9 @@ class OnlPlatform_x86_64_accton_as5812_54t_r0(OnlPlatformAccton):
('lm75', 0x48, 15),
('lm75', 0x49, 16),
('lm75', 0x4a, 17),
+
+ # System EEPROM
+ ('24c02', 0x57, 1),
]
)
return True
diff --git a/packages/platforms/accton/x86-64/x86-64-accton-as5812-54x/platform-config/r0/src/python/x86_64_accton_as5812_54x_r0/__init__.py b/packages/platforms/accton/x86-64/x86-64-accton-as5812-54x/platform-config/r0/src/python/x86_64_accton_as5812_54x_r0/__init__.py
index ab33d31d..9b3750e9 100644
--- a/packages/platforms/accton/x86-64/x86-64-accton-as5812-54x/platform-config/r0/src/python/x86_64_accton_as5812_54x_r0/__init__.py
+++ b/packages/platforms/accton/x86-64/x86-64-accton-as5812-54x/platform-config/r0/src/python/x86_64_accton_as5812_54x_r0/__init__.py
@@ -58,6 +58,9 @@ class OnlPlatform_x86_64_accton_as5812_54x_r0(OnlPlatformAccton):
('lm75', 0x48, 61),
('lm75', 0x49, 62),
('lm75', 0x4a, 63),
+
+ # System EEPROM
+ ('24c02', 0x57, 1),
]
)
return True
diff --git a/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/onlp/builds/src/x86_64_kvm_x86_64/Makefile b/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/onlp/builds/src/x86_64_kvm_x86_64/Makefile
index 6f5fd5b1..eb8b0b7b 100644
--- a/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/onlp/builds/src/x86_64_kvm_x86_64/Makefile
+++ b/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/onlp/builds/src/x86_64_kvm_x86_64/Makefile
@@ -1,29 +1,10 @@
############################################################
-#
-#
-# Copyright 2014, 2015 Big Switch Networks, Inc.
-#
-# Licensed under the Eclipse Public License, Version 1.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-# either express or implied. See the License for the specific
-# language governing permissions and limitations under the
-# License.
-#
-#
-############################################################
#
#
#
############################################################
+include $(ONL)/make/config.mk
-include ../../init.mk
MODULE := x86_64_kvm_x86_64
AUTOMODULE := x86_64_kvm_x86_64
include $(BUILDER)/definemodule.mk
diff --git a/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/platform-config/r0/src/lib/boot/grub.cfg b/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/platform-config/r0/src/lib/boot/grub.cfg
index 567eaa25..e0526b6d 100644
--- a/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/platform-config/r0/src/lib/boot/grub.cfg
+++ b/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/platform-config/r0/src/lib/boot/grub.cfg
@@ -8,7 +8,7 @@ menuentry OpenNetworkLinux {
echo 'Loading Open Network Linux ...'
insmod gzio
insmod part_msdos
- linux /kernel-3.2-deb7-x86_64-all nopat console=ttyS0,115200n8 onl_platform=x86-64-kvm-x86-64-r0
+ linux /kernel-3.9.6-x86-64-all nopat console=ttyS0,115200n8 onl_platform=x86-64-kvm-x86-64-r0
initrd /initrd-amd64
}
diff --git a/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/platform-config/r0/src/lib/install/x86-64-kvm-x86-64-r0.sh b/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/platform-config/r0/src/lib/install/x86-64-kvm-x86-64-r0.sh
index e62ede0a..1fe58183 100644
--- a/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/platform-config/r0/src/lib/install/x86-64-kvm-x86-64-r0.sh
+++ b/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/platform-config/r0/src/lib/install/x86-64-kvm-x86-64-r0.sh
@@ -11,5 +11,5 @@
platform_installer() {
# Standard isntallation to an available GPT partition
- installer_standard_gpt_install /dev/sda
+ installer_standard_gpt_install /dev/vda
}
diff --git a/setup.env b/setup.env
index 57c6aa21..6418a522 100755
--- a/setup.env
+++ b/setup.env
@@ -39,3 +39,8 @@ $ONL/tools/submodules.py $ONL sm/bigcode
# Export the current debian suite
export ONL_DEBIAN_SUITE=$(lsb_release -c -s)
+
+# Enable local post-merge githook
+if [ ! -f $ONL/.git/hooks/post-merge ]; then
+ cp $ONL/tools/scripts/post-merge.hook $ONL/.git/hooks/post-merge
+fi
diff --git a/sm/bigcode b/sm/bigcode
index a5f93e6d..334f99fa 160000
--- a/sm/bigcode
+++ b/sm/bigcode
@@ -1 +1 @@
-Subproject commit a5f93e6dc620035dbb4a19102e06dbb4f4927ce6
+Subproject commit 334f99fa416195624ea49cdc94b84e9e33902f0c
diff --git a/sm/infra b/sm/infra
index 08f52f16..a7a62f56 160000
--- a/sm/infra
+++ b/sm/infra
@@ -1 +1 @@
-Subproject commit 08f52f16b115c46192637583fe8deab524c278b7
+Subproject commit a7a62f563a992eeefdb53c4f2b9fb634304fe860
diff --git a/tools/newmodule.py b/tools/newmodule.py
new file mode 100755
index 00000000..0ac2d599
--- /dev/null
+++ b/tools/newmodule.py
@@ -0,0 +1,68 @@
+#!/usr/bin/env python
+################################################################
+#
+# Copyright 2013, Big Switch Networks, Inc.
+#
+# Licensed under the Eclipse Public License, Version 1.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+# either express or implied. See the License for the specific
+# language governing permissions and limitations under the
+# License.
+#
+################################################################
+#
+# This script generates a new code module and unit test build
+# for this repository.
+#
+################################################################
+
+import sys
+import os
+
+# The root of the repository
+ROOT = os.path.realpath("%s/.." % (os.path.dirname(__file__)))
+
+# Import infra
+sys.path.append("%s/sm/infra/builder/unix/tools" % ROOT)
+
+# Import bigcode
+sys.path.append("%s/sm/bigcode/tools" % ROOT)
+
+from modulegen import *
+
+#
+# Import uCli support
+#
+from uclimod import *
+
+
+if __name__ == "__main__":
+
+ # Generate the module in the current directory.
+ ModuleGenerator.modulesBaseDir = "."
+
+ # Use ONL config.mk in generated makefiles
+ GModuleMake.INIT_MK="$(ONL)/make/config.mk"
+ ModuleUnitTestTargetMake.INIT_MK="$(ONL)/make/config.mk"
+
+ #
+ # Make it happen.
+ #
+ ModuleGenerator.main(globals().copy())
+
+ # Make sure the manifest gets regenerated.
+ os.system("rm -rf %s/make/module-manifest.mk" % ROOT)
+
+
+
+
+
+
+
diff --git a/tools/onlpm.py b/tools/onlpm.py
index c27dacb7..62aff9c8 100755
--- a/tools/onlpm.py
+++ b/tools/onlpm.py
@@ -201,7 +201,7 @@ class OnlPackage(object):
if type(self.pkg[key]) != type_:
raise OnlPackageError("key '%s' is the wrong type (%s should be %s)" % (
- key, type(pkg[key]), type_))
+ key, type(self.pkg[key]), type_))
return True
@@ -373,6 +373,9 @@ class OnlPackage(object):
raise OnlPackageError("Post-install script '%s' does not exist." % self.pkg['post-install'])
command = command + "--after-install %s" % self.pkg['post-install']
+ if logger.level < logging.INFO:
+ command = command + "--verbose "
+
onlu.execute(command)
# Grab the package from the workdir. There can be only one.
@@ -506,7 +509,8 @@ class OnlPackageGroup(object):
for bp in buildpaths:
if os.path.exists(bp):
MAKE = os.environ.get('MAKE', "make")
- cmd = MAKE + ' -C ' + bp + " " + os.environ.get('ONLPM_MAKE_OPTIONS', "") + " " + os.environ.get('ONL_MAKE_PARALLEL', "") + " " + target
+ V = " V=1 " if logger.level < logging.INFO else ""
+ cmd = MAKE + V + ' -C ' + bp + " " + os.environ.get('ONLPM_MAKE_OPTIONS', "") + " " + os.environ.get('ONL_MAKE_PARALLEL', "") + " " + target
onlu.execute(cmd,
ex=OnlPackageError('%s failed.' % operation))
@@ -1051,6 +1055,10 @@ if __name__ == '__main__':
for j in ops.include_env_json.split(':'):
data = json.load(open(j))
for (k, v) in data.iteritems():
+ try:
+ v = v.encode('ascii')
+ except UnicodeEncodeError:
+ pass
os.environ[k] = v
#
diff --git a/tools/scripts/post-merge.hook b/tools/scripts/post-merge.hook
new file mode 100755
index 00000000..e4bad577
--- /dev/null
+++ b/tools/scripts/post-merge.hook
@@ -0,0 +1,15 @@
+#!/bin/bash
+############################################################
+#
+# Every time a merge is performed we should invalidate
+# the module manifest.
+#
+############################################################
+mm="$GIT_DIR/../make/module-manifest.mk"
+
+if [ -f "$mm" ]; then
+ echo "Removing module manifest after merge..."
+ rm "$mm"
+fi
+
+