Installation starting system and installation starting method of switch network operating system
By introducing mode setting devices and mode switching switches into the switch, compatible installation and switching between NOS and SONIC systems are achieved, solving the problem of complex operation in existing technologies and improving user experience and efficiency.
Patent Information
- Application Number
- CN202511710149.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-02-17
AI Technical Summary
When switching to different types of network operating systems, existing switch devices require manual updates and flashing of Uboot firmware, which is difficult to operate, time-consuming, and incompatible with different types of Uboot.
By employing a combination of mode setting device, mode switching switch, CPU, first flash memory, second flash memory, and memory, the NOS system and SONIC system can be compatiblely installed and switched through mode switching switch and Uboot control mode switching, simplifying the operation process.
It enables compatible installation and switching between NOS and SONIC systems, making operation convenient and quick, and reducing the user's operating difficulty and time cost.
Smart Images

Figure CN121547423A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of switch network operating system technology, and in particular to an installation and startup system and method for a switch network operating system. Background Technology
[0002] In high-speed communication equipment, switches typically use either a manufacturer-developed NOS system or a system based on SONIC (an open-source network operating system). Switches generally only support one system. For ARM CPU-based switches, the normal NOS system installation process is: power-on -> U-boot boot -> NOS system installation; the boot process after installation is: power-on -> U-boot boot -> NOS system boot. The SONIC system installation process is: power-on -> U-boot boot -> ONIE installation -> SONIC system installation; the boot process after installation is: power-on -> U-boot boot -> SONIC system boot. Furthermore, the U-boot systems used by these two systems are different and cannot be used interchangeably.
[0003] Switching to a different type of network operating system requires manual updates, flashing the U-boot firmware, and installing ONIE and SONIC systems. This is inconvenient for users, difficult to operate, and time-consuming. Summary of the Invention
[0004] This application provides an installation and startup system and method for a switch network operating system, which can solve at least one of the technical problems mentioned in the background art.
[0005] To achieve the above objectives, this application provides an installation and boot system for a switch network operating system, comprising: a mode setting device, a mode switching switch, a CPU, a first flash memory, a second flash memory, and a memory. The mode setting device is electrically connected to the mode switching switch and is used to set the control mode of the mode switching switch. The CPU is electrically connected to the mode switching switch. The first flash memory and the second flash memory are respectively electrically connected to the CPU. The first flash memory is configured to burn a first Uboot as a boot loader for the NOS system. The second flash memory is configured to burn a second Uboot as a boot loader for the SONIC system and to install the NOS system. The memory is configured to install the ONIE and SONIC systems. The CPU selects to boot from the first Uboot or the second Uboot based on the received control mode of the mode switching switch. Both the first Uboot and the second Uboot can control the CPU to modify the control mode of the mode switching switch.
[0006] Optionally, the mode setting device is a CPLD, the mode switching switch has a mode selection pin, and the mode setting device outputs a high level or a low level to the mode selection pin of the mode switching switch through a GPIO interface to switch the control mode of the mode switching switch.
[0007] Optionally, the mode switching switch is a digital DIP switch that supports the I2C communication protocol, and the CPU can access the mode switching switch and modify the level state of the mode selection pin based on the I2C communication protocol.
[0008] Optionally, the first flash memory is a Nor flash memory, and the second flash memory is a Nand flash memory.
[0009] Optionally, the memory is an EMMC or an SSD.
[0010] To achieve the above objectives, this application also provides a method for installing and starting a network operating system for a switch, characterized in that it is implemented based on the installation and startup system described above, and the method includes: When the switch is powered on, the mode setting device puts the mode switching switch into a default control mode; Based on the default control mode, the CPU selects the first of the first Uboot and the second Uboot to boot. After the first of the first Uboot and the second Uboot boots is booted, it installs the corresponding network operating system to the first of the second flash memory and the memory, and modifies its environment variables accordingly. When it is necessary to install and use another network operating system, the firmware of the second of the first Uboot and the second Uboot is burned to the second of the first flash memory and the second flash memory using the first of the first Uboot and the second Uboot, and the control mode of the mode switching switch is switched so that after the switch restarts, the CPU selects the second of the first Uboot and the second Uboot to start. After the second of the first and second Uboots is started, it installs another network operating system in the second flash memory and the second memory, and modifies its environment variables accordingly.
[0011] Optionally, the first of the first Uboot and the second Uboot is the first Uboot, and the corresponding network operating system is the NOS system; the first of the second flash memory and the memory is the second flash memory; and the second of the first flash memory and the second flash memory is the second flash memory.
[0012] Optionally, installing another network operating system in the second of the second flash memory and the second memory includes: The ONIE is installed to the memory via the second Uboot; The SONIC system is installed into the memory via the ONIE.
[0013] Optionally, during use after both the NOS system and the SONIC system have been installed, either the first UBOOT or the second UBOOT can control the CPU to modify the control mode of the mode switching switch.
[0014] In this embodiment, when the switch is powered on, a mode setting device can be used to assign a default control mode to the mode switching switch, causing the CPU to select the already programmed U-boot for booting. This allows for the programming of another U-boot and the installation of two network operating systems based on that U-boot. After programming and installation, during use, the user can change the output control mode via the first U-boot control mode switching switch when the first U-boot starts. After the switch restarts, the CPU will control the second U-boot to start, thus enabling the startup of the SONIC system. Similarly, when the second U-boot starts, the user can change the output control mode via the second U-boot control mode switching switch. After the switch restarts, the CPU will control the first U-boot to start, thus enabling the startup of the NOS system. Therefore, this embodiment is compatible with both the NOS and SONIC systems, and users can easily switch between them, making the operation convenient, fast, and efficient. Attached Figure Description
[0015] Figure 1 This is a schematic block diagram of the hardware design for the installation and startup system of the network operating system of the switch in an embodiment of this application.
[0016] Figure 2 This is a schematic block diagram of the software design for the installation and startup system of the network operating system of the switch in an embodiment of this application. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0018] Please see Figure 1 and Figure 2This application discloses an installation and boot system for a switch network operating system, comprising: a mode setting device 1, a mode switching switch 2, a CPU 3, a first flash memory 4, a second flash memory 5, and a memory 6. The mode setting device 1 is electrically connected to the mode switching switch 2 and is used to set the control mode of the mode switching switch 2. The CPU 3 is electrically connected to the mode switching switch 2. The first flash memory 4 and the second flash memory 5 are respectively electrically connected to the CPU 3. The first flash memory 4 is configured to burn a first Uboot as the boot loader for the NOS system. The second flash memory 5 is configured to burn a second Uboot as the boot loader for the SONIC system and to install the NOS system. The memory 6 is configured to install ONIE (Open Networking Environment) and the SONIC system. The CPU 3 selects to boot from the first Uboot or the second Uboot based on the received control mode of the mode switching switch 2. Both the first Uboot and the second Uboot can control the CPU 3 to modify the control mode of the mode switching switch 2.
[0019] Typically, the first and second U-boot are based on the ARM CPU architecture.
[0020] CPU 3 selects either the first U-boot boot or the second U-boot boot based on the control mode received from the mode switching switch 2. This can be understood as follows: the control mode includes the first control mode and the second control mode. When the mode switching switch 2 outputs the first control mode to CPU 3, CPU 3 selects the first U-boot boot. When the mode switching switch outputs the second control mode to CPU 3, CPU 3 selects the second U-boot boot.
[0021] In this embodiment, there are a first flash memory 4 for programming the first Uboot, a second flash memory 5 for programming the second Uboot and installing the NOS system, a memory 6 for installing the ONIE and SONIC systems, a mode switching switch 2 for outputting different control modes, and a mode setting device 1 for setting the control mode of the mode switching switch 2. Both the first Uboot and the second Uboot can control the CPU 3 to modify the control mode of the mode switching switch 2. During normal production, only one of the first and second U-boot systems is programmed into the switch. When the switch is powered on, the mode setting device 1 assigns a default control mode to the mode switching switch 2, causing the CPU 3 to select the programmed U-boot for booting. This allows for the programming of the other U-boot and the installation of two network operating systems. After programming and installation, during use, when the first U-boot boots, the user can change the output control mode using the first U-boot control mode switching switch 2. After the switch restarts, the CPU 3 will control the second U-boot to boot, thus enabling the SONIC system. Similarly, when the second U-boot boots, the user can change the output control mode using the second U-boot control mode switching switch 2. After the switch restarts, the CPU 3 will control the first U-boot to boot, thus enabling the NOS system. Therefore, this embodiment is compatible with both NOS and SONIC systems, and users can easily switch between them, making the operation convenient, fast, and efficient.
[0022] In some embodiments, the mode setting device 1 is a CPLD, and the mode switching switch 2 has a mode selection pin. The mode setting device 1 outputs a high or low level to the mode selection pin of the mode switching switch 2 through a GPIO interface to switch the control mode of the mode switching switch 2. That is, when the mode setting device 1 outputs a high level, the mode switching switch 2 outputs one control mode to the CPU 3, and when the mode setting device 1 outputs a low level, the mode switching switch 2 outputs another control mode to the CPU 3.
[0023] Specifically, mode switching switch 2 is a digital DIP switch that supports the I2C communication protocol. A PCA9560 model switch can be selected. Depending on the number of pins required, two PCA9560 model switches can be used simultaneously.
[0024] More specifically, CPU 3 can access mode switching switch 2 and modify the level state of mode selection pin based on the I2C communication protocol. That is, when the first Uboot or the second Uboot gives control instructions to CPU 3, CPU 3 can access mode switching switch 2 and modify the level state of mode selection pin based on the I2C communication protocol under the control of the control instructions, thereby changing the control mode output by mode switching switch 2.
[0025] In some embodiments, the first flash memory 4 is a Nor flash memory and the second flash memory 5 is a Nand flash memory. Of course, this is not a limitation; for example, the first flash memory 4 could also be a Nand flash memory and the second flash memory 5 could also be a Nor flash memory.
[0026] In some embodiments, the memory 6 is an eMMC or an SSD.
[0027] Please combine Figure 1 and Figure 2 This application discloses an installation and startup method for a switch network operating system, which is based on the installation and startup system described above.
[0028] The method includes: When the switch is powered on, mode setting device 1 sets mode switching switch 2 to a default control mode. This default control mode corresponds to the already flashed U-boot (the other U-boot has not yet been flashed). In other words, based on this default control mode, the flashed U-boot will be started. It is important to emphasize that "powering on the switch" in this step refers to powering on the switch when only one U-boot has been flashed, the other U-boot has not been flashed, and neither network operating system is installed.
[0029] Based on the default control mode, CPU 3 selects the first of the first and second U-boots (the one already burned into the first flash memory 4 and the second flash memory 5) to boot from. After the first U-boot boots from the first and second U-boots boot, it installs the corresponding network operating system into the first one stored in the second flash memory 5 and the memory 6, and modifies its environment variables accordingly. Because the environment variables are modified accordingly, the next time the first U-boot boots from the first and second U-boots boot, the corresponding network operating system can be booted.
[0030] When it is necessary to install and use another network operating system, the firmware of the second of the first U-boot and the second U-boot is burned to the second of the first flash memory 4 and the second flash memory 5 using the first of the first U-boot and the second U-boot, and the control mode of the mode switching switch 2 is switched so that after the switch restarts, the CPU 3 selects the second of the first U-boot and the second U-boot to start.
[0031] After the second of the first and second U-boot systems boots, it installs another network operating system in the second of the second flash memory 5 and memory 6, and modifies its environment variables accordingly. Because of this modification of environment variables, the next time the second of the first and second U-boot systems boots, the corresponding network operating system can be started.
[0032] Typically, the first U-boot is the U-boot that has already been burned. Therefore, the first of the first U-boot and the second U-boot is the first U-boot, and its corresponding network operating system is the NOS system. The first of the second flash memory 5 and the memory 6 is the second flash memory 5, and the first of the first flash memory 4 and the second flash memory 5 is the first flash memory 4.
[0033] Based on the default control mode, CPU 3 selects the first U-boot to boot. The first U-boot installs the NOS system into the second flash memory 5 and modifies the environment variables accordingly. Due to the modified environment variables, the first U-boot can boot the NOS system on the next boot. When it is necessary to install and use the SONIC system, the first U-boot is used to burn the firmware of the second U-boot into the second flash memory 5, and the control mode of the mode switch 2 is switched, so that after the switch restarts, CPU 3 selects the second U-boot to boot. After the second U-boot boots, it installs the SONIC system into the memory 6 and modifies its environment variables accordingly. Due to the modified environment variables, the second U-boot can boot the SONIC system on the next boot.
[0034] Specifically, installing another network operating system in the second flash memory 5 and memory 6 includes: Install ONIE to memory 6 via the second Uboot; Install the SONIC system into memory 6 via ONIE.
[0035] Specifically, during use after both the NOS and SONIC systems are installed, either the first U-boot or the second U-boot can control the CPU 3 mode switching switch 2. That is, when the first U-boot starts, it can control the CPU 3 mode switching switch 2. This way, upon the next reboot, the second U-boot can start and then boot the SONIC system. Conversely, when the second U-boot starts, it can control the CPU 3 mode switching switch 2. This allows for easy switching between the NOS and SONIC systems.
[0036] In this embodiment, when the switch is powered on, the mode setting device 1 can be used to assign a default control mode to the mode switching switch 2, causing the CPU 3 to select the already programmed U-boot for booting. This allows for the programming of another U-boot and the installation of two network operating systems based on this U-boot. After programming and installation, during use, when the first U-boot boots, the user can change the output control mode using the first U-boot control mode switching switch 2. After the switch restarts, the CPU 3 will control the second U-boot to boot, thus enabling the startup of the SONIC system. Similarly, when the second U-boot boots, the user can change the output control mode using the second U-boot control mode switching switch 2. After the switch restarts, the CPU 3 will control the first U-boot to boot, thus enabling the startup of the NOS system. Therefore, this embodiment is compatible with both the NOS and SONIC systems, and users can easily switch between them, making the operation convenient, fast, and efficient.
[0037] The above-disclosed examples are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall fall within the scope of this application.
Claims
1. An installation and startup system for a switch network operating system, characterized in that, include: The system includes a mode setting device, a mode switching switch, a CPU, a first flash memory, a second flash memory, and a memory. The mode setting device is electrically connected to the mode switching switch and is used to set the control mode of the mode switching switch. The CPU is electrically connected to the mode switching switch. The first flash memory and the second flash memory are respectively electrically connected to the CPU. The first flash memory is configured to burn a first Uboot as the boot loader for the NOS system. The second flash memory is configured to burn a second Uboot as the boot loader for the SONIC system and to install the NOS system. The memory is configured to install the ONIE and SONIC systems. The CPU selects to boot from the first Uboot or the second Uboot based on the received control mode of the mode switching switch. Both the first Uboot and the second Uboot can control the CPU to modify the control mode of the mode switching switch.
2. The installation and startup system for a switch network operating system according to claim 1, characterized in that, The mode setting device is a CPLD, the mode switching switch has a mode selection pin, and the mode setting device outputs a high level or a low level to the mode selection pin of the mode switching switch through a GPIO interface to switch the control mode of the mode switching switch.
3. The installation and startup system for the switch network operating system according to claim 2, characterized in that, The mode switching switch is a digital DIP switch that supports the I2C communication protocol. The CPU can access the mode switching switch and modify the level state of the mode selection pin based on the I2C communication protocol.
4. The installation and startup system for a switch network operating system according to claim 1, characterized in that, The first flash memory is a Nor flash memory, and the second flash memory is a Nand flash memory.
5. The installation and startup system for a switch network operating system according to claim 1, characterized in that, The memory is either an eMMC or an SSD.
6. A method for installing and starting a network operating system for a switch, characterized in that, Based on the installation and startup system as described in any one of claims 1 to 5, the method includes: When the switch is powered on, the mode setting device puts the mode switching switch into a default control mode; Based on the default control mode, the CPU selects the first of the first Uboot and the second Uboot to boot. After the first of the first Uboot and the second Uboot boots is booted, it installs the corresponding network operating system to the first of the second flash memory and the memory, and modifies its environment variables accordingly. When it is necessary to install and use another network operating system, the firmware of the second of the first Uboot and the second Uboot is burned to the second of the first flash memory and the second flash memory using the first of the first Uboot and the second Uboot, and the control mode of the mode switching switch is switched so that after the switch restarts, the CPU selects the second of the first Uboot and the second Uboot to start. After the second of the first and second Uboots is started, it installs another network operating system in the second flash memory and the second memory, and modifies its environment variables accordingly.
7. The method for installing and starting a network operating system for a switch according to claim 6, characterized in that, The first of the first Uboot and the second Uboot is the first Uboot, and the corresponding network operating system is the NOS system. The first of the second flash memory and the memory is the second flash memory, and the second of the first flash memory and the second flash memory is the second flash memory.
8. The method for installing and starting a network operating system for a switch according to claim 7, characterized in that, The second of the two network operating systems, installed in the second flash memory and the second memory, includes: The ONIE is installed to the memory via the second Uboot; The SONIC system is installed into the memory via the ONIE.
9. The method for installing and starting a network operating system for a switch according to claim 7, characterized in that, During use after both the NOS system and the SONIC system have been installed, either the first UBOOT or the second UBOOT can control the CPU to modify the control mode of the mode switching switch.