diff --git a/builds/amd64/installer/legacy/builds/Makefile b/builds/amd64/installer/legacy/builds/Makefile index c32b3bce..e5c06989 100644 --- a/builds/amd64/installer/legacy/builds/Makefile +++ b/builds/amd64/installer/legacy/builds/Makefile @@ -13,7 +13,7 @@ MKSHAR_PERMS = autoperms.sh # Hardcoded to match ONL File naming conventions. -include $(ONL)/make/version-onl.mk +include $(ONL)/make/versions/version-onl.mk INSTALLER_NAME=$(FNAME_PRODUCT_VERSION)_ONL-OS_$(FNAME_BUILD_ID)_$(UARCH)_LEGACY_INSTALLER @@ -28,7 +28,7 @@ __installer: mv ./usr/share/onl/packages/amd64/onl-swi/*.swi . rm -rf ./usr $(ONL_V_at)cp /dev/null $(MKSHAR_PERMS) - $(ONL_V_at) cp $(ONL)/make/version-onl.sh . + $(ONL_V_at) cp $(ONL)/make/versions/version-onl.sh . $(ONL_V_at)echo "#!/bin/sh" >> $(MKSHAR_PERMS) $(ONL_V_at)echo "set -e" >> $(MKSHAR_PERMS) $(ONL_V_at)echo "set -x" >> $(MKSHAR_PERMS) diff --git a/builds/any/installer/APKG.yml b/builds/any/installer/APKG.yml index 0eaa849c..78f66263 100644 --- a/builds/any/installer/APKG.yml +++ b/builds/any/installer/APKG.yml @@ -1,3 +1,5 @@ +variables: + !include $ONL/make/versions/version-onl.yml prerequisites: broken: true diff --git a/builds/any/installer/grub/builds/Makefile b/builds/any/installer/grub/builds/Makefile index 660be639..e2ba124d 100644 --- a/builds/any/installer/grub/builds/Makefile +++ b/builds/any/installer/grub/builds/Makefile @@ -14,7 +14,7 @@ MKSHAR_OPTS = --lazy --unzip-pad --fixup-perms autoperms.sh MKSHAR_PERMS = autoperms.sh # Hardcoded to match ONL File naming conventions. -include $(ONL)/make/version-onl.mk +include $(ONL)/make/versions/version-onl.mk INSTALLER_NAME=$(FNAME_PRODUCT_VERSION)_ONL-OS_$(FNAME_BUILD_ID)_$(UARCH)_$(BOOTMODE)_INSTALLER ifeq ($(ARCH), amd64) @@ -40,7 +40,7 @@ __installer: __installer_platform_files __installer_swi_files >> installer.sh $(ONL_V_at)echo "PAYLOAD_FOLLOWS" >> installer.sh $(ONL_V_at)cp /dev/null $(MKSHAR_PERMS) - $(ONL_V_at)cp $(ONL)/make/version-onl.sh . + $(ONL_V_at)cp $(ONL)/make/versions/version-onl.sh . $(ONL_V_at)echo "#!/bin/sh" >> $(MKSHAR_PERMS) $(ONL_V_at)echo "set -e" >> $(MKSHAR_PERMS) $(ONL_V_at)echo "set -x" >> $(MKSHAR_PERMS) diff --git a/builds/any/installer/legacy/APKG.yml b/builds/any/installer/legacy/APKG.yml index a53d0129..26106bd6 100644 --- a/builds/any/installer/legacy/APKG.yml +++ b/builds/any/installer/legacy/APKG.yml @@ -1,3 +1,5 @@ +variables: + !include $ONL/make/versions/version-onl.yml prerequisites: broken: true diff --git a/builds/any/installer/legacy/fit/builds/Makefile b/builds/any/installer/legacy/fit/builds/Makefile index ce7e1c65..7052ebab 100644 --- a/builds/any/installer/legacy/fit/builds/Makefile +++ b/builds/any/installer/legacy/fit/builds/Makefile @@ -5,7 +5,7 @@ endif THISDIR := $(dir $(lastword $(MAKEFILE_LIST))) # Hardcoded to match ONL File naming conventions. -include $(ONL)/make/version-onl.mk +include $(ONL)/make/versions/version-onl.mk INSTALLER_NAME=$(FNAME_PRODUCT_VERSION)_ONL-OS_$(FNAME_BUILD_ID)_$(UARCH)_LEGACY_INSTALLER FIT_IMAGE_ALL := $(shell $(ONLPM) --find-file onl-loader-fit:$(ARCH) onl-loader-fit.itb) @@ -28,7 +28,7 @@ ifndef NO_SWI endif rm -rf ./usr $(ONL_V_at)cp /dev/null $(MKSHAR_PERMS) - $(ONL_V_at) cp $(ONL)/make/version-onl.sh . + $(ONL_V_at) cp $(ONL)/make/versions/version-onl.sh . $(ONL_V_at)echo "#!/bin/sh" >> $(MKSHAR_PERMS) $(ONL_V_at)echo "set -e" >> $(MKSHAR_PERMS) $(ONL_V_at)echo "set -x" >> $(MKSHAR_PERMS) diff --git a/builds/any/installer/uboot/builds/Makefile b/builds/any/installer/uboot/builds/Makefile index e7db90ab..0ee7fc39 100644 --- a/builds/any/installer/uboot/builds/Makefile +++ b/builds/any/installer/uboot/builds/Makefile @@ -18,7 +18,7 @@ PYFIT = $(VONLDIR)/src/bin/pyfit PYFIT_ENVIRONMENT = PYTHONPATH=$(VONLDIR)/src/python # Hardcoded to match ONL File naming conventions. -include $(ONL)/make/version-onl.mk +include $(ONL)/make/versions/version-onl.mk INSTALLER_NAME=$(FNAME_PRODUCT_VERSION)_ONL-OS_$(FNAME_BUILD_ID)_$(UARCH)_$(BOOTMODE)_INSTALLER # default fit image can be used as the canonical location for the initrd @@ -29,7 +29,7 @@ INITRD_BOUNDS := $(shell $(PYFIT_ENVIRONMENT) $(PYFIT) -v offset $(FIT_IMAGE_ALL __installer: installer.sh __installer_fit_files __installer_platform_files __installer_swi_files $(ONL_V_at)rm -rf *INSTALLER* *.md5sum $(ONL_V_at)cp /dev/null $(MKSHAR_PERMS) - $(ONL_V_at)cp $(ONL)/make/version-onl.sh . + $(ONL_V_at)cp $(ONL)/make/versions/version-onl.sh . $(ONL_V_at)echo "#!/bin/sh" >> $(MKSHAR_PERMS) $(ONL_V_at)echo "set -e" >> $(MKSHAR_PERMS) $(ONL_V_at)echo "set -x" >> $(MKSHAR_PERMS) diff --git a/builds/any/rootfs/APKG.yml b/builds/any/rootfs/APKG.yml index 114d10c2..7a716da9 100644 --- a/builds/any/rootfs/APKG.yml +++ b/builds/any/rootfs/APKG.yml @@ -1,3 +1,6 @@ +variables: + !include $ONL/make/versions/version-onl.yml + prerequisites: broken: true diff --git a/builds/any/rootfs/jessie/standard/standard.yml b/builds/any/rootfs/jessie/standard/standard.yml index 7266fa7d..c3b22d8e 100644 --- a/builds/any/rootfs/jessie/standard/standard.yml +++ b/builds/any/rootfs/jessie/standard/standard.yml @@ -89,5 +89,5 @@ Configure: password: onl manifest: - version: $ONL/make/version-onl.json + version: $ONL/make/versions/version-onl.json platforms: $PLATFORM_LIST diff --git a/builds/any/rootfs/wheezy/standard/standard.yml b/builds/any/rootfs/wheezy/standard/standard.yml index f7f04c32..1ba7a3d4 100644 --- a/builds/any/rootfs/wheezy/standard/standard.yml +++ b/builds/any/rootfs/wheezy/standard/standard.yml @@ -91,5 +91,5 @@ Configure: password: onl manifest: - version: $ONL/make/version-onl.json + version: $ONL/make/versions/version-onl.json platforms: $PLATFORM_LIST diff --git a/builds/any/swi/APKG.yml b/builds/any/swi/APKG.yml index c7ca8ea1..8d87930b 100644 --- a/builds/any/swi/APKG.yml +++ b/builds/any/swi/APKG.yml @@ -1,3 +1,5 @@ +variables: + !include $ONL/make/versions/version-onl.yml prerequisites: broken: true diff --git a/docs/GettingStartedWedge.md b/docs/GettingStartedWedge.md index fb479df2..42fe39c9 100644 --- a/docs/GettingStartedWedge.md +++ b/docs/GettingStartedWedge.md @@ -66,7 +66,7 @@ ONL Manual Install 4) Wait for the install to finish and the system to reboot -5) One the onl login prompt appears login with the username root and the +5) Once the onl login prompt appears login with the username root and the password "onl" 6) Configure the ma1 interface either via dhcp (dhclient ma1) or manually diff --git a/make/.gitignore b/make/.gitignore index d6850c00..4bf19b41 100644 --- a/make/.gitignore +++ b/make/.gitignore @@ -1,3 +1,3 @@ -version-onl.* +versions/ module-manifest.mk diff --git a/make/Makefile b/make/Makefile deleted file mode 100644 index d7a2afeb..00000000 --- a/make/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -############################################################ -# -# Convenience makefile for generating -# the local version variables. -# -versions.env: - $(ONL_V_at) $(MAKE) -f versions.mk ONL_VERSION_ENV_FILE=versions.env - diff --git a/make/config.mk b/make/config.mk index 215be80c..cd957fba 100644 --- a/make/config.mk +++ b/make/config.mk @@ -29,6 +29,10 @@ 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) +# Generate versions if necessary. +$(shell $(ONL)/tools/make-versions.py --import-file=$(ONL)/tools/onlvi --class-name=OnlVersionImplementation --output-dir $(ONL)/make/versions) + + # # Default make options. # diff --git a/packages/base/all/boot.d/src/50.initdev b/packages/base/all/boot.d/src/50.initdev deleted file mode 100755 index 9fbc1152..00000000 --- a/packages/base/all/boot.d/src/50.initdev +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -. /lib/lsb/init-functions - -log_action_begin_msg "Setting up block and net devices" - -ln -snf /proc/mounts /etc/mtab - -( cd /sys/class/block; for d in *; do /sbin/initblockdev $d add; done ) -if [ -d /sys/class/ubi ]; then - ( cd /sys/class/ubi; for d in *; do /sbin/initblockdev $d add; done ) -fi -( cd /sys/class/net; for d in *; do /sbin/initnetdev $d add; done ) - -log_action_end_msg 0 - -log_action_begin_msg "Mounting filesystems" -initmounts -q -log_action_end_msg 0 diff --git a/packages/base/all/boot.d/src/50.initmounts b/packages/base/all/boot.d/src/50.initmounts new file mode 100755 index 00000000..8aa7ca5b --- /dev/null +++ b/packages/base/all/boot.d/src/50.initmounts @@ -0,0 +1,6 @@ +#!/bin/sh + +. /lib/lsb/init-functions +log_action_begin_msg "Mounting filesystems..." +initmounts -q +log_action_end_msg 0 diff --git a/packages/base/all/initrds/loader-initrd-files/PKG.yml b/packages/base/all/initrds/loader-initrd-files/PKG.yml index 79489347..989e15e0 100644 --- a/packages/base/all/initrds/loader-initrd-files/PKG.yml +++ b/packages/base/all/initrds/loader-initrd-files/PKG.yml @@ -16,10 +16,10 @@ packages: - src/lib : /lib - src/bootmodes : /bootmodes - src/python: /usr/lib/python2.7/site-packages - - $ONL/make/version-onl.sh : /etc/onl/loader/versions.sh - - $ONL/make/version-onl.json : /etc/onl/loader/versions.json - - $ONL/make/version-onl.mk : /etc/onl/loader/versions.mk - + - $ONL/make/versions/version-onl.sh : /etc/onl/loader/versions.sh + - $ONL/make/versions/version-onl.json : /etc/onl/loader/versions.json + - $ONL/make/versions/version-onl.mk : /etc/onl/loader/versions.mk + changelog: Change changes changes., diff --git a/packages/base/all/initrds/loader-initrd-files/src/bin/banner b/packages/base/all/initrds/loader-initrd-files/src/bin/banner index bcd344c0..546872ed 100755 --- a/packages/base/all/initrds/loader-initrd-files/src/bin/banner +++ b/packages/base/all/initrds/loader-initrd-files/src/bin/banner @@ -23,11 +23,10 @@ field "$ONL_PLATFORM" " Platform: $ONL_PLATFORM" field "MA1_ADDR" " ma1: $MA1_ADDR" echo "*" echo "************************************************************" -if [ -f /etc/onl/boot-config ]; then +if [ -s /etc/onl/boot-config ]; then msg_info "boot-config" cat /etc/onl/boot-config else - if [ -f /bin/boot-config.py ]; then if /bin/boot-config.py configure; then echo "The system will now reboot to apply your configuration." @@ -36,7 +35,7 @@ else echo "The boot-config script failed." >> /etc/onl/abort fi else - msg_info "No boot-config" + echo "No boot-config." >> /etc/onl/abort fi fi diff --git a/packages/base/all/initrds/loader-initrd-files/src/bin/sysinit b/packages/base/all/initrds/loader-initrd-files/src/bin/sysinit index 59c00ae0..08500c6f 100755 --- a/packages/base/all/initrds/loader-initrd-files/src/bin/sysinit +++ b/packages/base/all/initrds/loader-initrd-files/src/bin/sysinit @@ -81,7 +81,13 @@ if [ ! -f /etc/onl/abort ]; then cat /etc/issue fi - [ ! -f /mnt/onl/boot/boot-config ] || cat /mnt/onl/boot/boot-config >>/etc/onl/boot-config + if [ -f /mnt/onl/boot/boot-config ]; then + # Use local boot-config. + cp /mnt/onl/boot/boot-config /etc/onl/boot-config + elif [ -f /etc/onl/boot-config-default ]; then + # Use default boot-config. + cp /etc/onl/boot-config-default /etc/onl/boot-config + fi # # Initialize the /mnt/flash/boot area. diff --git a/packages/base/all/initrds/loader-initrd-files/src/etc/mtab.yml b/packages/base/all/initrds/loader-initrd-files/src/etc/mtab.yml index 00f64685..8026f979 100644 --- a/packages/base/all/initrds/loader-initrd-files/src/etc/mtab.yml +++ b/packages/base/all/initrds/loader-initrd-files/src/etc/mtab.yml @@ -14,6 +14,6 @@ mounts: fsck: true ONL-BOOT: - mount: r + mount: w dir: /mnt/onl/boot fsck: false diff --git a/packages/base/any/initrds/loader/builds/Makefile b/packages/base/any/initrds/loader/builds/Makefile index b117a086..a60ba9f9 100644 --- a/packages/base/any/initrds/loader/builds/Makefile +++ b/packages/base/any/initrds/loader/builds/Makefile @@ -27,7 +27,7 @@ $(TARGET): $(ONLPM) --sudo $(foreach p,$(PLATFORM_PACKAGES),--extract-dir $(p) $(ROOT)) $(MAKE) __vendor_config_data $(ONLPM) --sudo --force --extract-dir onl-vendor-config-onl:all $(ROOT) - $(ONL)/tools/sjson.py --kj version $(ONL)/make/version-onl.json --kl platforms $(PLATFORMS) --kv arch $(ARCH) --out manifest.json + $(ONL)/tools/sjson.py --kj version $(ONL)/make/versions/version-onl.json --kl platforms $(PLATFORMS) --kv arch $(ARCH) --out manifest.json sudo mkdir -p $(ROOT)/etc/onl/loader && sudo cp manifest.json $(ROOT)/etc/onl/loader sudo $(ONL)/tools/makedevs -d $(ROOT)/etc/rootperms $(abspath $(ROOT)) sudo $(ONL)/tools/cpiomod.py --cpio onl-buildroot-initrd-$(ARCH).cpio.gz --add-directory $(ROOT) --out $@ diff --git a/packages/base/any/onlp/src/onlp/module/auto/onlp.yml b/packages/base/any/onlp/src/onlp/module/auto/onlp.yml index 972d47eb..9d4255f1 100644 --- a/packages/base/any/onlp/src/onlp/module/auto/onlp.yml +++ b/packages/base/any/onlp/src/onlp/module/auto/onlp.yml @@ -179,6 +179,7 @@ led_caps: &led_caps - PURPLE : (1 << 20) - PURPLE_BLINKING : (1 << 21) - AUTO : (1 << 22) +- AUTO_BLINKING : (1 << 23) # LED status led_status: &led_status @@ -205,6 +206,7 @@ led_mode: &led_mode - 'PURPLE' : 20 - 'PURPLE_BLINKING' : 21 - 'AUTO' : 22 +- 'AUTO_BLINKING' : 23 # PSU Status psu_status: &psu_status diff --git a/packages/base/any/onlp/src/onlp/module/inc/onlp/led.h b/packages/base/any/onlp/src/onlp/module/inc/onlp/led.h index 2909b9df..1c99843e 100644 --- a/packages/base/any/onlp/src/onlp/module/inc/onlp/led.h +++ b/packages/base/any/onlp/src/onlp/module/inc/onlp/led.h @@ -46,6 +46,7 @@ typedef enum onlp_led_caps_e { ONLP_LED_CAPS_PURPLE = (1 << 20), ONLP_LED_CAPS_PURPLE_BLINKING = (1 << 21), ONLP_LED_CAPS_AUTO = (1 << 22), + ONLP_LED_CAPS_AUTO_BLINKING = (1 << 23), } onlp_led_caps_t; /** onlp_led_mode */ @@ -66,6 +67,7 @@ typedef enum onlp_led_mode_e { ONLP_LED_MODE_PURPLE = 20, ONLP_LED_MODE_PURPLE_BLINKING = 21, ONLP_LED_MODE_AUTO = 22, + ONLP_LED_MODE_AUTO_BLINKING = 23, } onlp_led_mode_t; /** onlp_led_status */ diff --git a/packages/base/any/onlp/src/onlp/module/src/onlp_enums.c b/packages/base/any/onlp/src/onlp/module/src/onlp_enums.c index f5c9a74d..78a169ae 100644 --- a/packages/base/any/onlp/src/onlp/module/src/onlp_enums.c +++ b/packages/base/any/onlp/src/onlp/module/src/onlp_enums.c @@ -296,6 +296,7 @@ aim_map_si_t onlp_led_caps_map[] = { "PURPLE", ONLP_LED_CAPS_PURPLE }, { "PURPLE_BLINKING", ONLP_LED_CAPS_PURPLE_BLINKING }, { "AUTO", ONLP_LED_CAPS_AUTO }, + { "AUTO_BLINKING", ONLP_LED_CAPS_AUTO_BLINKING }, { NULL, 0 } }; @@ -316,6 +317,7 @@ aim_map_si_t onlp_led_caps_desc_map[] = { "None", ONLP_LED_CAPS_PURPLE }, { "None", ONLP_LED_CAPS_PURPLE_BLINKING }, { "None", ONLP_LED_CAPS_AUTO }, + { "None", ONLP_LED_CAPS_AUTO_BLINKING }, { NULL, 0 } }; @@ -383,6 +385,7 @@ aim_map_si_t onlp_led_mode_map[] = { "PURPLE", ONLP_LED_MODE_PURPLE }, { "PURPLE_BLINKING", ONLP_LED_MODE_PURPLE_BLINKING }, { "AUTO", ONLP_LED_MODE_AUTO }, + { "AUTO_BLINKING", ONLP_LED_MODE_AUTO_BLINKING }, { NULL, 0 } }; @@ -404,6 +407,7 @@ aim_map_si_t onlp_led_mode_desc_map[] = { "None", ONLP_LED_MODE_PURPLE }, { "None", ONLP_LED_MODE_PURPLE_BLINKING }, { "None", ONLP_LED_MODE_AUTO }, + { "None", ONLP_LED_MODE_AUTO_BLINKING }, { NULL, 0 } }; diff --git a/packages/platforms-closed b/packages/platforms-closed index 1bea6253..5628d2f2 160000 --- a/packages/platforms-closed +++ b/packages/platforms-closed @@ -1 +1 @@ -Subproject commit 1bea6253f9814607df5c51a7cf5e1ee509331a37 +Subproject commit 5628d2f2e43a78b9faa33428575e8e322899d3c7 diff --git a/setup.env b/setup.env index ed0ae4a9..56d0ad37 100755 --- a/setup.env +++ b/setup.env @@ -15,6 +15,9 @@ export ONLPM_OPTION_PACKAGEDIRS="$ONL/packages:$ONL/builds" # The ONL repo dir is here: export ONLPM_OPTION_REPO="$ONL/REPO" +# The default RELEASE dir is here: +export ONLPM_OPTION_RELEASE_DIR="$ONL/RELEASE" + # The ONL build tools should be included in the local path: export PATH="$ONL/tools/scripts:$ONL/tools:$PATH" @@ -23,10 +26,7 @@ export PATH="$ONL/tools/scripts:$ONL/tools:$PATH" export ONL_MAKE_PARALLEL=-j16 # Version files -$ONL/tools/make-versions.py --import-file=$ONL/tools/onlvi --class-name=OnlVersionImplementation --output-dir $ONL/make - -# Make version values available in the package environment -export ONLPM_OPTION_INCLUDE_ENV_JSON="$ONL/make/version-onl.json" +$ONL/tools/make-versions.py --import-file=$ONL/tools/onlvi --class-name=OnlVersionImplementation --output-dir $ONL/make/versions # # buildroot download mirror. We suggest you setup a local repository containing these contents for faster local builds. @@ -41,6 +41,6 @@ $ONL/tools/submodules.py $ONL sm/bigcode export ONL_DEBIAN_SUITE=$(lsb_release -c -s) # Enable local post-merge githook -if [ ! -f $ONL/.git/hooks/post-merge ]; then +if [ ! -f $ONL/.git/hooks/post-merge ] && [ -d $ONL/.git ]; then cp $ONL/tools/scripts/post-merge.hook $ONL/.git/hooks/post-merge fi diff --git a/tools/autobuild/install.sh b/tools/autobuild/install.sh index e04b0289..dddc2bfa 100755 --- a/tools/autobuild/install.sh +++ b/tools/autobuild/install.sh @@ -68,7 +68,7 @@ if [ -z "$REMOTE_PASS" ]; then fi -. $ONL/make/version-onl.sh +. $ONL/make/versions/version-onl.sh REMOTE_DIR="$REMOTE_BASE_DIR/$BUILD_BRANCH/$FNAME_BUILD_ID" workdir=$(mktemp -d -t update-XXXXXX) diff --git a/tools/make-versions.py b/tools/make-versions.py index a5c0ae17..2813c44e 100755 --- a/tools/make-versions.py +++ b/tools/make-versions.py @@ -56,6 +56,12 @@ class OnlVersionsGenerator(object): with open(fname, "w") as f: json.dump(data, f, indent=2) + # YAML + fname = os.path.join(self.ops.output_dir, basename + '.yml') + if not os.path.exists(fname) or self.ops.force: + with open(fname, "w") as f: + yaml.dump(data, f, default_flow_style=False) + # mk fname = os.path.join(self.ops.output_dir, basename + '.mk') if not os.path.exists(fname) or self.ops.force: diff --git a/tools/onlpm.py b/tools/onlpm.py index d45b2e29..11b93099 100755 --- a/tools/onlpm.py +++ b/tools/onlpm.py @@ -548,8 +548,9 @@ class OnlPackageGroup(object): dict(), OnlPackageError) for f in release_list: - # Todo -- customize - dst = os.path.join(os.getenv('ONL'), 'RELEASE', g_dist_codename, f[1]) + release_dir = os.environ.get('ONLPM_OPTION_RELEASE_DIR', + os.path.join(os.environ.get('ONL', 'RELEASE'))) + dst = os.path.join(release_dir, g_dist_codename, f[1]) if not os.path.exists(dst): os.makedirs(dst) logger.info("Releasing %s -> %s" % (os.path.basename(f[0]), dst))