recently,OpenCloudOS community launch OpenCloudOS Kernel Stream (hereinafter referred to as OCKS) 2207.2 Kernel version, new version adds support for RISC-V 64 Architecture support. This also means,OCKSmainstreamCPUFull adaptation of the architecture.
As a new generation of open source reduced instruction set (RISC) architecture, in recent yearsRISC-VIt has attracted much attention in the semiconductor field. Thanks to its fully open, free authorization, low-cost R&D, streamlined and flexible features,RISC-VThe ecology is gradually taking off, and it is also regarded as a continuousx86,Armthird largest afterCPUArchitecture.
OpenCloudOS It is a full-link localized open source operating system jointly initiated by operating system, cloud platform, software and hardware manufacturers and developers, etc., which has accumulated the advantages of Tencent and many manufacturers in terms of technology and open source ecology. Since the establishment of the community,OpenCloudOS It has been actively building a hardware and chip support ecosystem.Among them, it is suitable for domestic“core“ofRSIC-VArchitecture, listed from the beginning as OpenCloudOS Key items in the hardware support program.
in keeping L1 While the upstream immediacy and friendliness of the (source community) project,OCKS exist 5.18 Based on the kernel version, some of the latest missing from the upstream RISC-V Platform features add adaptation and support. in,OCKS especially for StarFive VisionFive The development board has been tested and adapted to allow OpenCloudOS While providing stable and reliable enterprise-level kernels, the community can support and experience the latest industry open source hardware.
The technical implementation details are as follows:
Verify the environment
Hardware environment:VisionFive RISC-V development board
VisionFive The development board is a cost-effective, support Linux systematic RISC-V Single board computer.SoC for JH7100 chip that provides dual-core 64 bit 1.5GHz RISC-V CPU,2MB L2 cache, with deep learning processing engine and image and video processing system, for RISC-V The open source architecture ecosystem provides a higher-level development kit, allowing developers greater freedom and greater ability to innovate and design industry-leading solutions.
Software Environment:OCKS 2207,Fedora 33 RISC-VVersion runtime,GCC 12
VisionFive The official mirror is currently Fedora 33 As the foundation, the official default uses the downstream kernel 5.10 Boot as the default version.The startup process is uboot -> grub2 -> kernel.in grub2 will device-tree and initramfs loaded and passed to the kernel.
Use the official mirror as the base and use the upstream GCC 12 cross-compiled, OCKS 2207 compile and run tests.
Adaptation steps
1,OCKS 2207right RISC-V adaptation
OpcnCloudOS Kernel Stream At the beginning of the release, the optimized design of the build and release system was carried out for multi-architecture and multi-platform support.After the precipitation and accumulation of the first version, the official OpenCloudOS Stream 2207 support extends to RISC-V Architecture.thus making OCKS Three architectures are supported at the same time:x86_64,aarch64,RISC-V64.
exist 2207.2 middle,OpenCloudOS Kernel Stream On the basis of upstream software, additional RISC-V The architecture is released and built, along with the associated code for feature support.against StarFive For the development board, a lot of adaptation work has been done, board-level support has been added, and hardware drivers have been actually verified and tested. At the same time, the consistency of the code is maintained to the greatest extent, and multiple different software packages are released heterogeneously on the basis of the same source, maintaining the upstream-friendly management style, easy-to-maintain code structure, and good downstream support.
At the same time, in order to alleviate resource shortage and accelerate iteration, the build system provides complete out-of-the-box cross-compilation support, which can be used for heterogeneous release, management,kABI verify,RPM Packaging and other processes minimize development, maintenance, and learning costs.
technical details
OCKS 2207 It is now possible to control the ARCH parameters to generate corresponding RPM Bag. And when doing heterogeneous builds, it automatically switches to cross-compilation mode.
OCKS 2207 Construct RISC V The version kernel only needs to be Kernel Repo Invoke the following command:
make dist-rpm ARCH=RISC-V64
Generated RPM The package contains by default all supported devices device tree,vmlinuzdebugging information, etc., which are basically the same as ordinary compilation.
2,exist VisionFive RISC-V Use on the development board OCKS kernel
OCKS against RISC-V will publish the standard RPM pack.where the kernel will be installed to the standard path, and will Device Tree Released bundled with the kernel.
VisionFive officially provided based on Fedora system image.OCKS It is on this basis that testing and adaptation are carried out.
To experience OCKSin the official Fedora install on mirror OCKS-RPM package, and bootloader It can be configured manually.OCKS The installation paths are standard paths.
Since different development boards do not have a very uniform boot and boot mechanism, after the kernel is installed, the user needs to manually configure the boot options.
technical details
OCKS 2207 consists of two packages,kernel-core and kernel-modules. As a physical edge device, the development board needs to install two packages.OCKS 2207 After installation it will be /boot generate the corresponding kernel vmlinuz and initramfs.Like the official kernel, users need to configure manually grub.cfgadd the following boot options:
menuentry 'OCKS 2207' {
linux /vmlinuz-5.18.15-2207.2.0.ocks <original boot param>
devicetree <dtb defaults to jh7100-starfive-visionfive-v1.dtb>
initrd /initramfs-5.18.15-2207.2.0.ocks.fc33.img
}
in <> The content within the user needs to be filled in as appropriate.Newest device tree also in /usr/lib/modules/5.18.15-2207.2.0.ocks/dtbs Provided in , users can upgrade as appropriate.
3,OCKS RISC-Vrunning result
exist Starfive Dual-core 8G system,OCKS can be very good with the official Fedora The mirrors run together as follows:
release OCKS 2207.2add forRISC-Vsupport
- source code Rebase to upstream 5.18.15.
- RISC-V platform DMA Complement and fix related functions and compatibility issues.
- Extend the build system to support RISC-V Architecture.
- Increase StarFive VisionFive Native support for development boards.
- Fix some potential distro compatibility issues.
OpenCloudOS Stream 2207.2 Related Links
Source code repository:https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel-Stream
RPM Repo:Index of /opencloudos/8/kernel-ocks/2207.2/
RISC-V64Version download address:Index of /opencloudos/8/kernel-ocks/2207.2/riscv64/
Follow-up planning
Currently VisionFive A large number of drivers of related peripherals are still in the upstream discussion, temporarily used StarFive downstream version. The official will continue to track its upstream trends and synchronize relevant component codes in a timely manner.
for RISC-V The overall architectural framework and upstream maturity are not high, and many details still need upstream polishing and development.Adapted in a mode that preserves maximum compatibility VisionFive development board.After further upstream progress, the official will rebase When the existing relevant downstream code is sorted out, cleaned up, and kept consistent with the upstream.
at the same time RISC-V and other more architecture ecosystems are also continuously enriched. RISC-V Adaptation and further verification OCKS The system potential to develop, release, and build across architectures. More architectures and hardware will be supported in the future.
#mainstream #CPU #architecture #fully #adapted #OpenCloudOS #source #community #kernel #adds #RISCV #architecture #support #News Fast Delivery
The mainstream CPU architecture is fully adapted, and the OpenCloudOS source community kernel adds RISC-V architecture support – News Fast Delivery