Skip to content

Commit 4492b04

Browse files
author
Curt Brune
committed
Add switch silicon vendor string to the image discovery default paths
During image discovery, ONIE looks for installer names in the following order: 1. onie-installer-<cpu_arch>-<hw_vendor>_<machine>-r<machine_revision> 2. onie-installer-<cpu_arch>-<hw_vendor>_<machine> 3. onie-installer-<hw_vendor>_<machine> 4. onie-installer-<cpu_arch> 5. onie-installer With the advent of ONIE enabled systems supporting multiple switch silicon vendors, step 4 has become ambiguous. This patch adds an additional step to the ONIE waterfall that includes the switch silicon vendor. In the above waterfall this new step would be between steps 3 and 4. The new step looks like: onie-installer-<cpu_arch>-<switch_silicon_vendor> Before the change the kvm_x86_64 machine waterfall discovery looks like this: <cpu_arch> = x86_64 <hw_vendor>_<machine> = kvm_x86_64 Info: Fetching http://10.0.2.2/onie-installer-x86_64-kvm_x86_64-r0 ... Info: Fetching http://10.0.2.2/onie-installer-x86_64-kvm_x86_64 ... Info: Fetching http://10.0.2.2/onie-installer-kvm_x86_64 ... Info: Fetching http://10.0.2.2/onie-installer-x86_64 ... Info: Fetching http://10.0.2.2/onie-installer ... After the changing, using a completely fictitious silicon vendor, the waterfall looks like: <switch_silicon_vendor> = qemu Info: Fetching http://10.0.2.2/onie-installer-x86_64-kvm_x86_64-r0 ... Info: Fetching http://10.0.2.2/onie-installer-x86_64-kvm_x86_64 ... Info: Fetching http://10.0.2.2/onie-installer-kvm_x86_64 ... Info: Fetching http://10.0.2.2/onie-installer-x86_64-qemu ... Info: Fetching http://10.0.2.2/onie-installer-x86_64 ... Info: Fetching http://10.0.2.2/onie-installer ... Technically the same information is contained in step #3 "onie-installer-<hw_vendor>_<machine>", however the new file name is more generic and will be easier for customers to maintain when using multiple platforms. Imagine the case of a customer who has multiple x86 hardware platforms, from different hardware vendors, using different switch silicon. Also imagine NOS installers that target a specific switch silicon. The customer could maintain NOS installers named as in step #2 and be OK, however, that is a lot of files to manage. Using the new step "<cpu_arch>-<switch_silicon_vendor>" the end customer could target all of the x86 platforms from a particular silicon vendor with a single NOS image. Signed-off-by: Curt Brune <[email protected]>
1 parent 6e7366a commit 4492b04

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

build-config/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ ifneq ($(filter-out gpt msdos, $(PARTITION_TYPE)),)
181181
$(error Supported partition types: gpt, msdos)
182182
endif
183183

184+
# Switch ASIC vendor, should be set in machine.make
185+
SWITCH_ASIC_VENDOR ?= unknown
186+
184187
TREE_STAMP = $(STAMPDIR)/tree
185188
tree-stamp: $(TREE_STAMP)
186189
$(TREE_STAMP): $(PROJECT_STAMP)

build-config/make/images.make

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ $(SYSROOT_COMPLETE_STAMP): $(SYSROOT_CHECK_STAMP)
252252
$(Q) echo "onie_partition_type=$(PARTITION_TYPE)" >> $(MACHINE_CONF)
253253
$(Q) echo "onie_kernel_version=$(LINUX_RELEASE)" >> $(MACHINE_CONF)
254254
$(Q) echo "onie_firmware=$(FIRMWARE_TYPE)" >> $(MACHINE_CONF)
255+
$(Q) echo "onie_switch_asic=$(SWITCH_ASIC_VENDOR)" >> $(MACHINE_CONF)
255256
$(Q) cp $(LSB_RELEASE_FILE) $(SYSROOTDIR)/etc/lsb-release
256257
$(Q) cp $(OS_RELEASE_FILE) $(SYSROOTDIR)/etc/os-release
257258
$(Q) cp $(MACHINE_CONF) $(SYSROOTDIR)/etc/machine.conf

machine/kvm_x86_64/machine.make

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ else
1818
$(error Unknown VENDOR_REV)
1919
endif
2020

21+
# The SWITCH_ASIC_VENDOR is used to further differentiate the platform
22+
# in the ONIE waterfall. This string should be the stock ticker
23+
# symbol of the ASIC vendor, in lower case. The value in this example
24+
# here is completely fictitious.
25+
SWITCH_ASIC_VENDOR = qemu
26+
2127
# The VENDOR_VERSION string is appended to the overal ONIE version
2228
# string. HW vendors can use this to appended their own versioning
2329
# information to the base ONIE version string.

rootconf/default/lib/onie/functions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ onie_default_filenames="\
3131
$onie_default_filename
3232
${filename_prefix}-${onie_arch}-${onie_machine}
3333
${filename_prefix}-${onie_machine}
34+
${filename_prefix}-${onie_arch}-${onie_switch_asic}
3435
${filename_prefix}-${onie_arch}
3536
${filename_prefix}
3637
"

0 commit comments

Comments
 (0)