summaryrefslogtreecommitdiff
path: root/rootconf
AgeCommit message (Collapse)Author
2023-06-13修改CI编译条件 & 更新 onie-netcfg-set 脚本HEADv2.0.7-20230613dev-23.06luwenpeng
* 增加注释信息 * 避免grubenv原始数据没有换行符造成onie_network_option配置无法识别
2022-03-25禁用onie-netcfg-set的bond配置功能v2.0.5-20220325rel-21.07dev-21.07luwenpeng
2022-03-25onie-netcfg-set支持透传bond参数v2.0.4-20220325luwenpeng
2022-03-23TSG-9977 ONIE适配TSG-X设备支持配置主备模式的LAGv2.0.3-20220323luwenpeng
2022-03-14修改onie-netcfg-net的提示信息v2.0.2-20220314luwenpeng
2022-03-11TSG-9879 ONIE适配TSG-X设备HOST的网络配置luwenpeng
2020-04-30Marvell a7020-comexp - add support for common CPU moduleGil Tabibian
Signed-off-by: Gil Tabibian <[email protected]> Signed-off-by: Alex Doyle <[email protected]>
2020-03-18Dhcp - fixes formatting of RFC3004 user class dataPatrick Elsen
Inserts a length byte in dhcp option 77 to comply with RFC3004 and adds str2lenhex routine to do so. The RFC mandates that individual user class data items are prefixed with their length. https://tools.ietf.org/html/rfc3004 Signed-off-by: Alex Doyle <[email protected]> Signed-off-by: Patrick Elsen <[email protected]>
2020-03-18Add client ID (option 61) to udhcp parameters.Patrick Elsen
Sends the serial number of the device in the DHCP packet as option 61, formatted as a hex converted ASCII string (Client ID). Closes: #697 Signed-off-by: Alex Doyle <[email protected]> Signed-off-by: Patrick Elsen <[email protected]>
2019-12-06UBIFS Support for Local FilesystemsScott Emery
This patch adds support for installing an OS from a locally attached UBIFS file system, closing an issue which has been open since 2014. An additional discovery function, called sd_localubifs(), has been added which is similar to the sd_localfs() function. It uses the /sys/class/ubi/ubi?/ubi?_? path to search for UBIFS file system partitions, instead of the output from blkid, and then looks on those file systems for the default image filenames. In a similar manner to sd_localfs(), skip_parts_arch() can be used to skip partitions on an architecture by architecture basis. Testing has been done on a Dell n3048ep platform by copying over the 3 modified files and starting ONIE discovery. Signed-off-by: Scott Emery <[email protected]> Closes: #82 Signed-off-by: adoyle <[email protected]>
2019-03-28Use available interface for arping instead of default eth0Mark Pearson
Signed-off-by: adoyle <[email protected]>
2019-02-13onie-sysinfo: add '-l' for showing boot loader typedavid_yang
The loader type would be one of bios, uefi or u-boot. The patch has been tested on Accton AS5712_54X and AS5710_54X. Signed-off-by: Alex Doyle <[email protected]>
2018-11-24put back in -e 's/\/\//g' that was incorrectly removedMark Pearson
Signed-off-by: Alex Doyle <[email protected]>
2018-11-24Fix so sed discards chars on end of efi lineMark Pearson
Signed-off-by: Alex Doyle <[email protected]>
2018-08-02grub-arch: show BIOS mode during booting updavid_yang
Showing a message to indicate that ONIE is booted up via which BIOS mode (either legacy or UEFI). The message would look like: Info: Mounting kernel filesystems... done. Info: Mounting ONIE-BOOT on /mnt/onie-boot ... Info: BIOS mode: legacy or: Info: Mounting kernel filesystems... done. Info: Mounting ONIE-BOOT on /mnt/onie-boot ... Info: Mounting EFI System on /boot/efi ... Info: BIOS mode: UEFI The patch has been tested on Accton AS7716_32X. Signed-off-by: Curt Brune <[email protected]>
2018-04-18onie-nos-mode: make callable from onie tools directoryCurt Brune
The onie-nos-mode utility is included in the persistent ONIE tools directory, /mnt/onie-boot/onie/tools/bin, so that a NOS can directly access it. The initial implementation did not account for the fact that onie-nos-mode also calls out to the 'onie-boot-mode' command. When called from the NOS, onie-boot-mode is not in the $PATH variable. This patch uses the assumption that onie-boot-mode and onie-nos-mode both resided in the same directory to call onie-boot-mode directly. Fixes: cf6e91cda5c5 ("NOS mode: a persistent NOS mode boot option") Signed-off-by: Curt Brune <[email protected]>
2018-04-13discover: enclose IPv6 address URLs in square bracketsCurt Brune
From RFC-3986, IPv6 address in URLs must be enclosed in square brackets: https://tools.ietf.org/html/rfc3986#section-3.2.2 The discover URLs now look like: http://[fe80::ae1f:6bff:fe0a:134a%eth0]/onie-installer-x86_64-bcm http://[fe80::ae1f:6bff:fe0a:134a%eth0]/onie-installer-x86_64-bcm.bin http://[fe80::ae1f:6bff:fe0a:134a%eth0]/onie-installer-x86_64 http://[fe80::ae1f:6bff:fe0a:134a%eth0]/onie-installer-x86_64.bin http://[fe80::ae1f:6bff:fe0a:134a%eth0]/onie-installer http://[fe80::ae1f:6bff:fe0a:134a%eth0]/onie-installer.bin ... Closes: #733 Signed-off-by: Curt Brune <[email protected]>
2018-03-26gen-config: remove comments from machine.confOren Tirosh
Some NOSes do not accept '#' comments in config files. This causes the installer to fail with a runtime error when parsing /etc/machine.conf The original machine.conf did not contain comments. The patch changes it back to the original format. Signed-off-by: Curt Brune <[email protected]>
2018-03-20Add empty dir for mounting USB devicePhil Huang
The directory can avoid user mount over issue. It would be more clear when user want to mount USB. Signed-off-by: Phil Huang <[email protected]> Signed-off-by: Curt Brune <[email protected]>
2018-03-15Rename onie-discovery-[start|stop] to onie-[start|stop]Curt Brune
These command names are unnecessarily long, so rename them. Keep the old command names, but mark them as deprecated and will be removed in 2019.02. Closes: #684 Signed-off-by: Curt Brune <[email protected]>
2018-03-15Mark several commands as deprecatedCurt Brune
A number of old commands (from 2013) have been renamed, while the old names were kept for backward compatibility. The time has come to put a formal "deprecated" message into these commands and give notice they will be removed in the future. Closes: #709 Signed-off-by: Curt Brune <[email protected]>
2018-03-14trivial: cleanup typos and white spacesCurt Brune
Clean up a typo and some white space problems introduced by commit cf6e91cda5c5a. Fixes: cf6e91cda5c5 ("NOS mode: a persistent NOS mode boot option") Signed-off-by: Curt Brune <[email protected]>
2018-03-13u-boot: manage NOS mode on successful installCurt Brune
This patch implements the NOS mode behavior for U-Boot based architectures. After a successful NOS install the onie_nos_mode variable is set to 'yes'. When onie_nos_mode is 'yes', manually entering install mode is no longer a one-way trap door. Closes: #690 Signed-off-by: Curt Brune <[email protected]>
2018-03-13NOS mode: a persistent NOS mode boot optionCurt Brune
This patch adds the notion of "NOS installed" mode. This persistent state is set to true after a successful NOS install. This patch changes the following behavior for all CPU architectures: 1. Upon a successful NOS install, the system sets a persistent environment variable, onie_nos_mode, to "yes". 2. When onie_nos_mode is 'yes', entering install mode is no longer sticky. I.e. entering install mode is no longer a one-way trap door. Furthermore, for GRUB architectures, the default GRUB menu item now defaults to "rescue" mode, instead of "install" mode. For GRUB architectures, this patch adds an "-n" option to the "onie-boot-mode" command to set the persistent NOS installed boot mode. The NOS mode is consulted when no default boot mode is set. The default GRUB boot entry is now controlled by two persistent grub environment variables, "onie_mode" and "onie_nos_mode". Previously, only the onie_mode variable existed. Its usage is unchanged by this commit. If onie_mode is set, it controls which GRUB menu to load by default. If onie_mode is clear, then the new variable, 'onie_nos_mode', is consulted. If onie_nos_mode is "yes", then the GRUB menu will default to "rescue" mode. If both onie_mode and onie_nos_mode are clear then the default GRUB menu is "install mode". The idea here is make the default GRUB menu item and the "install" mode more forgiving when a NOS is installed. Closes: #690 Signed-off-by: Curt Brune <[email protected]>
2018-02-27Mount securityfs if file system type is availableCurt Brune
If a machine's kernel configuration enables CONFIG_SECURITYFS then the securityfs file system is available. This patch mounts securityfs on /sys/kernel/security if the file system type is found in /proc/filesystems. According to the kernel documentation, /sys/kernel/security is the standard mount point for securityfs. Signed-off-by: Curt Brune <[email protected]>
2018-01-07gen-config: remove double quotes from onie_platformdavid_yang
Some old version of NOSes does not take double quotes into consideration so that onie_platform extracted from recent machine.conf will have double quotes that would be taken as an unsupported platform. The original onie_platform was not surrounded by double quotes. The patch changes it back to the original format. Signed-off-by: Curt Brune <[email protected]>
2017-12-22machine.conf: generated automatically during ONIE bootingdavid_yang
In commit 3cbcb9e, it introduced a new machanism to identify machines with common CPU module. The machine.conf was changed to source other configuration files to calculate the real `onie_machine` and `onie_platform` at ONIE runtime. Some NOSes such as SONiC would copy machine.conf to its partition and use it at its runtime. The new machine.conf needs other files and has to be put in /etc directory or it cannot be sourced correctly. Besides SONiC other NOSes also have similar issues. The patch intends to expand all variables from machine-build.conf and machine-live.conf to machine.conf directly. That would be like the previous one: ONIE:/ # cat /etc/machine.conf # /etc/machine.conf for onie # Copyright (C) 2017 Curt Brune <[email protected]> # Copyright (C) 2017 david_yang <[email protected]> # # SPDX-License-Identifier: GPL-2.0 onie_version=2017.12.12.20-dirty onie_vendor_id=259 onie_build_machine=accton_as7712_32x onie_machine_rev=0 onie_arch=x86_64 onie_build_platform=x86_64-accton_as7712_32x-r0 onie_config_version=1 onie_build_date="2017-12-20T13:43+0800" onie_partition_type=gpt onie_kernel_version=4.1.38 onie_firmware=auto onie_switch_asic=bcm onie_skip_ethmgmt_macs=no onie_grub_image_name=grubx64.efi onie_machine=accton_as7712_32x onie_platform="x86_64-accton_as7712_32x-r0" ONIE:/ # This patch has been tested on Accton AS7712_32X with SONiC environment. Signed-off-by: Curt Brune <[email protected]>
2017-12-14grub-arch:onie-sysinfo use DMI information if no syseepromCurt Brune
On GRUB based architectures (x86_64 and arm64) if the onie-syseeprom program is unavailable, fallback to using information from DMI/SMBIOS. Generic x86_64 servers do not have system EEPROMs, but typically have DMI/SMBIOS information. This patch uses 'dmidecode' to retrieve the "serial number" and "product name" from table 1 (the system table) of the DMI/SMBIOS data. This information is shown by the onie-sysinfo tool. Signed-off-by: Curt Brune <[email protected]>
2017-12-06image-discovery: update TFTP server search orderCurt Brune
ONIE commit b760ede inadvertently changed the TFTP server search order: commit b760eded3b54c9104f5c80c1bed01794546a7a9d Author: Curt Brune <[email protected]> Date: Mon Apr 24 13:55:59 2017 -0700 Add $onie_disco_serverid and $onie_server_name to TFTP waterfall In the list of servers to try, that commit inserted "DHCP Server IP" (DHCP option 54) before TFTP server name (DHCP option 66). Since option 54 is pretty much universally set by the DHCP server, we will always hit that before we get to TFTP server name (DHCP option 66). The fix here is to put "DHCP Server IP" (DHCP option 54) *last* in the search order. Compared to "TFTP server name" and "TFTP server IP", the IP address of the DHCP server is the least specified. Closes: #648 Signed-off-by: Curt Brune <[email protected]>
2017-08-31Identifying machines with common CPU modulesCurt Brune
This patch adds support for machines that use a common CPU module. These modules provide a common CPU, memory and storage system for switching platforms. The CPU module can be plugged into a variety of base boards where the switching elements reside. The idea is to have a single ONIE "machine" for the CPU module and detect at run time what the baseboard is. The platform identification originates from /etc/machine.conf, a portion of which is now derived at run time. Along with this a new configuration variable, "onie_build_machine" is introduced. /etc/machine.conf ================= Previously this file was completely built at compile time. This file is now a small wrapper script that sources two new files, /etc/machine-build.conf and /etc/machine-live.conf. /etc/machine-build.conf -- this file is completely built at compile time and only contains information known at build time. This file introduces a new configuration variable, "onie_build_machine", which is the ONIE machine specified at compile time. For example this would be the ONIE machine name of the common CPU module. /etc/machine-live.conf -- this file is built at run time. A boot time init script sources a platform specific file if it exists, executes the gen_live_config() function and stores the output in /etc/machine-live.conf. By default this function outputs nothing, but a platform can override it produce a runtime ONIE machine name. Using this mechanism, a machine can redefine 'onie_machine' and 'onie_switch_asic' at run time. To do this, a machine defines a small script in the source tree at machine/<vendor>/rootconf/sysroot-lib-onie/gen-config-platform, which include a definition of the gen_live_config() function. If a machine does not define gen-config-platform, i.e. /etc/machine-live.conf is empty, then the contents of 'onie_build_machine' is used to set 'onie_machine'. This is backwardly compatible with how ONIE worked previously. Updating ONIE ============= When ONIE updates itself, it will now check that the running 'onie_build_machine' matches the 'onie_build_machine' of the proposed update image. Previously it checked that 'onie_machine' matched between runtime and the image. Closes: #570 Signed-off-by: Curt Brune <[email protected]>
2017-08-31uefi_boot_first: correct error message of updating BootOrderdavid_yang
Signed-off-by: Curt Brune <[email protected]>
2017-08-31uefi_boot_first: check boot_num before updating BootOrderdavid_yang
Signed-off-by: Curt Brune <[email protected]>
2017-08-22Add more file presence checks to installer.Vitaliy Ivanov
Signed-off-by: Vitaliy Ivanov <[email protected]> Signed-off-by: Curt Brune <[email protected]>
2017-08-21Rename /etc/rcS.d scripts - increase spacingCurt Brune
This patch renames the rcS.d scripts, retaining the same order, but increasing the spacing between stages. This does not change any behavior. This allows for inserting new stages in between some of the original stages. Signed-off-by: Curt Brune <[email protected]>
2017-08-03Add ".bin" extension to default waterfall file namesCurt Brune
In the field a number of user errors have been reported where the setting of the default ONIE waterfall image is incorrect. In most cases the user has mistakenly appended ".bin" to the simple base name "onie-installer". The error is so trivially simple that most will miss it, which prevents ONIE from finding installers. This is especially common when performing USB-based installations. When the file extension is not detected, the USB stick then has to be mounted manually and manually installed. This process can make Open Networking look harder than it is. This patch adds infrastructure for appending any number of suffixes to the waterfall image names. This infrastructure is then used to append ".bin" to the default names. Closes: #567 Signed-off-by: Curt Brune <[email protected]>
2017-07-18Add an init hook for starting network ASIC driversCurt Brune
This patch adds a boot time init script hook, /etc/rcS.d/S05network-driver.sh, that can be used to initialize a network ASIC. The intention is that this is used to enable the switch front panel ports for the ONIE image discovery mechanisms. This patch only adds infrastructure for enabling the front panel ports. To be useful a platform needs to provide additional init scripts, specific to the switching silicon ASIC and any associated SDK. The ASIC/SDK initialization is separated into 3 steps: 1. platform specific pre ASIC/SDK initialization 2. core ASIC/SDK initialization 3. platform specific post ASIC/SDK initialization The reasoning for the split is that the core initialization could be common across a family of silicon, used by several different ONIE machines. The platform specific pre/post initialization covers machine specifics, like serdes port/lane to front panel port mappings. To use the hook, a machine first defines the core ASIC/SDK initialization in <machine>/rootconf/sysroot-lib-onie/network-driver-${SWITCH_ASIC_VENDOR}. This file is a shell script that defines an initialization function, invoked by the main hook: # Use this function to initialize the networking ASIC and SDK. network_driver_init() This initialization could be shared across several machines that use the same ASIC/SDK. For machine specific ASIC/SDK initialization a machine defines <machine>/rootconf/sysroot-lib-onie/network-driver-platform. This shell script defines two functions, invoked by the main hook: # Use this function to perform any initialization that is required # to happen *before* the primary network ASIC initialization. network_driver_platform_pre_init() # Use this function to perform any initialization that is required # to happen *after* the primary network ASIC initialization. network_driver_platform_post_init() Signed-off-by: Curt Brune <[email protected]>
2017-07-17sysroot: use devtmpfs instead of static /dev nodeCurt Brune
For the longest time ONIE used static /dev nodes, which were created at image build time. Initially this worked well enough, but over time as more devices and storage systems came into wide spread use the static /dev nodes became painful. This problem was worked around for a few specific /dev nodes, like /dev/vda* and /dev/btrfs-control, but ultimately that solution is too painful. This patch removes all the static /dev node creation and instead uses the kernel CONFIG_DEVTMPFS feature. Quoting the kernel documentation on this feature: This creates a tmpfs/ramfs filesystem instance early at bootup. In this filesystem, the kernel driver core maintains device nodes with their default names and permissions for all registered devices with an assigned major/minor number. Userspace can modify the filesystem content as needed, add symlinks, and apply needed permissions. It provides a fully functional /dev directory, where usually udev runs on top, managing permissions and adding meaningful symlinks. In very limited environments, it may provide a sufficient functional /dev without any further help. It also allows simple rescue systems, and reliably handles dynamic major/minor numbers. Very early during system boot up, the devtmpfs file system is mounted on /dev and off we go. To enable this feature across all platforms, the base kernel configuration files are modified to enable CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT. Closes: #539 Signed-off-by: Curt Brune <[email protected]>
2017-07-05file system: Add support for NVMe SSDaudi
This patch adds support for NVMe device with updater support, and demo installer support for x86_64 system. Signed-off-by: Curt Brune <[email protected]>
2017-06-26klogd: add and enable daemonCurt Brune
Start the klogd daemon at boot time, which logs the kernel dmesg output to /var/log/messages via syslog. This ensures the dmesg information is logged into /var/log/messages. Signed-off-by: Curt Brune <[email protected]>
2017-06-26networking: reduce the verbosity of udhcpcCurt Brune
The current udhcpc client from busybox logs informational messages to stderr as well as syslog. The stderr logging is annoying as it clutters the console. This patch redirects the udhcpc stderr to /dev/null. The message are still logged via syslog to /var/log/messages, so no information is lost. Signed-off-by: Curt Brune <[email protected]>
2017-06-26console: reduce printk() default verbosityCurt Brune
Set the default printk() console log level to WARNING instead of NOTICE. Some daemons use NOTICE for informational messages. As before, the printk messages are captured in dmesg, so no information is lost. Signed-off-by: Curt Brune <[email protected]>
2017-06-01dropbear enable ECDSA keysNikolay Shopik
Signed-off-by: Curt Brune <[email protected]>
2017-04-24Add $onie_disco_serverid and $onie_server_name to TFTP waterfallCurt Brune
The ONIE TFTP waterfall (partial image discovery) is missing a few server identifiers that had been added to the HTTP waterfall a while back. Specifically, these are missing: - well known onie-server name. This feature was added in commit 55b0b13ac7f3a5eb3d5fdcbfe9ad28acff175edd for HTTP: commit 55b0b13ac7f3a5eb3d5fdcbfe9ad28acff175edd Author: Curt Brune <[email protected]> Date: Tue Jun 30 17:01:29 2015 -0700 image discovery waterfall: add well known server name - DHCP server IP address, also known as dhcp-server-identifier. This patch adds those server identifiers to the list of potential TFTP servers. Also this patch tunes up the comments a bit, highlighting the DHCP option numbers. Closes: #506 Signed-off-by: Curt Brune <[email protected]> Acked-by: Carlos Cardenas <[email protected]>
2017-04-19networking: bring up link on the loopback interfaceCurt Brune
The boot time networking script never brought the link up for the loopback interface (lo). This is a historical oversight that never caused any problems with the ONIE services. While not fatal, it is confusing that the loopback address, 127.0.0.1, and the host name "localhost" do not function properly. This patch brings up the "lo" interface as part of the system networking initialization. Closes: #498 Signed-off-by: Curt Brune <[email protected]>
2017-04-19Log local file image discovery pathsCurt Brune
The http and tftp image discovery mechanisms log helpful information about the attempted URL paths. The local file (typically USB) discovery mechanism, however, does not. This is a historical oversight. This patch adds some logging to the local file discovery mechanism. The discovery mechanism now logs the disk partition and file name for each discovery attempt. As an example, the kvm_x86 machine log for local file discovery now logs this: Info: Attempting file://dev/vda3/onie-installer-x86_64-kvm_x86_64-r0 ... Info: Attempting file://dev/vda3/onie-installer-x86_64-kvm_x86_64 ... Info: Attempting file://dev/vda3/onie-installer-kvm_x86_64 ... Info: Attempting file://dev/vda3/onie-installer-x86_64-qemu ... Info: Attempting file://dev/vda3/onie-installer-x86_64 ... Info: Attempting file://dev/vda3/onie-installer ... Closes: #467 Closes: #214 Signed-off-by: Curt Brune <[email protected]>
2017-03-03Add DHCP option 66 to HTTP waterfalldavid_yang
This patch enhances HTTP waterfall feature mentioned in Issue #476. The patch has been tested in Accton AS7716_32X. Closes: #476 Signed-off-by: Curt Brune <[email protected]>
2017-03-03discovery: refine code of http and tftp waterfalldavid_yang
If DHCP server specifies the same server IP, server name, or boot file in different options, ONIE will use them to build many duplicate URLs for auto discovery. The patch makes the list of HTTP servers, TFTP servers, and TFTP boot files unique. The patch has been tested in Accton AS7716_32X. Signed-off-by: Curt Brune <[email protected]>
2017-02-09Remove surplus syntax and change tar_dir default namePhil Huang
Output: ONIE:/tmp # sh onie-support /tmp Success: Support tarball created: /tmp/onie-support-accton_as7712_32x.tar.bz2 ONIE:/tmp # ls onie-support onie-support-accton_as7712_32x.tar.bz2 ONIE:/tmp # tar xvf onie-support-accton_as7712_32x.tar.bz2 onie-support-accton_as7712_32x/log/ ... Signed-off-by: Phil Huang <[email protected]> Signed-off-by: Curt Brune <[email protected]>
2017-02-07Change onie-support default filenamePhil Huang
Add more describe with machine type in filename Example: ONIE:/ # onie-support /tmp Success: Support tarball created: /tmp/onie-support-accton_as4610_54.tar.bz2 Signed-off-by: Phil Huang <[email protected]> Signed-off-by: Curt Brune <[email protected]>
2017-02-07Add additional ONIE information into onie-supportPhil Huang
The additional support information include - onie-syseeprom - onie-sysinfo - lsb-release - blkid - fdisk Both support x86 and U-boot arch These informations will help switch hardware vendor to debug and fix. Signed-off-by: Phil Huang <[email protected]> Signed-off-by: Curt Brune <[email protected]>