Merge branch 'master' of github.com:opencomputeproject/OpenNetworkLinux

Conflicts:
	builds/amd64/installer/legacy/builds/Makefile
	builds/any/installer/grub/builds/Makefile
	builds/any/installer/legacy/fit/builds/Makefile
	builds/any/installer/uboot/builds/Makefile
	packages/base/all/initrds/loader-initrd-files/PKG.yml
	packages/platforms-closed
This commit is contained in:
Carl D. Roth
2016-05-26 14:42:37 -07:00
29 changed files with 70 additions and 58 deletions

View File

@@ -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)

View File

@@ -1,3 +1,5 @@
variables:
!include $ONL/make/versions/version-onl.yml
prerequisites:
broken: true

View File

@@ -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)

View File

@@ -1,3 +1,5 @@
variables:
!include $ONL/make/versions/version-onl.yml
prerequisites:
broken: true

View File

@@ -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)

View File

@@ -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)

View File

@@ -1,3 +1,6 @@
variables:
!include $ONL/make/versions/version-onl.yml
prerequisites:
broken: true

View File

@@ -89,5 +89,5 @@ Configure:
password: onl
manifest:
version: $ONL/make/version-onl.json
version: $ONL/make/versions/version-onl.json
platforms: $PLATFORM_LIST

View File

@@ -91,5 +91,5 @@ Configure:
password: onl
manifest:
version: $ONL/make/version-onl.json
version: $ONL/make/versions/version-onl.json
platforms: $PLATFORM_LIST

View File

@@ -1,3 +1,5 @@
variables:
!include $ONL/make/versions/version-onl.yml
prerequisites:
broken: true

View File

@@ -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

2
make/.gitignore vendored
View File

@@ -1,3 +1,3 @@
version-onl.*
versions/
module-manifest.mk

View File

@@ -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

View File

@@ -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.
#

View File

@@ -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

View File

@@ -0,0 +1,6 @@
#!/bin/sh
. /lib/lsb/init-functions
log_action_begin_msg "Mounting filesystems..."
initmounts -q
log_action_end_msg 0

View File

@@ -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.,

View File

@@ -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

View File

@@ -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.

View File

@@ -14,6 +14,6 @@ mounts:
fsck: true
ONL-BOOT:
mount: r
mount: w
dir: /mnt/onl/boot
fsck: false

View File

@@ -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 $@

View File

@@ -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

View File

@@ -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 */

View File

@@ -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 }
};

View File

@@ -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

View File

@@ -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)

View File

@@ -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:

View File

@@ -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))