mirror of
https://github.com/sipeed/NanoKVM.git
synced 2026-11-09 17:44:43 -06:00
Serialize service operations and finish migration before starting services. Install the startup script atomically, remove recursive restarts, and keep the migration marker until required changes succeed. Claim video ownership before clearing orphan VENC/VPSS resources, always finish recovery SYS cleanup, and retain resource state on teardown failures. Rebuild the bundled libkvm_mmf.so with these fixes. Validated cross-builds, ABI and recovery failure paths, plus a 2.4.3 to 2.5.3 upgrade on hardware with 1080p browser WebRTC and MJPEG playback.
NanoKVM Support Instructions
Environment Preparation
NanoKVM-Lite/Full/PCIe uses the SG2002. The system daemon and libkvm.so wrapper
build with MaixCDK; libkvm_mmf.so builds
separately with CMake using the Sophgo sources in that checkout. Configure and
activate the MaixCDK environment
and add the RISC-V musl toolchain to PATH. Run the commands below from
support/sg2002/. Alternatively, make vision at the repository root builds
the video libraries in Docker. make app builds the server using the prebuilt
libraries in server/dl_lib/.
kvm_system Compilation Instructions
The
kvm_systemis responsible for monitoring the NanoKVM system status, system updates, screen key drivers, and a few system functions, compiled with MaixCDK.
- Before compiling, please ensure that the above-mentioned
MaixCDKenvironment is correctly configured. - Modify the paths of
MAIXCDK_PATHandNanoKVM_PATHin./build. - Execute
./build kvm_systemto compilekvm_system. - Use
scp ./kvm_system/dist/kvm_system_release/kvm_system root@192.168.x.x:/kvmapp/kvm_systemto copy it to NanoKVM for testing. - Use
./build kvm_system add_to_kvmappto stage the executable in the repository'skvmapp/directory. - Use
./build kvm_system cleanto clean the compilation ofkvm_system.
kvm_vision Compilation Instructions
kvm_visionbuildslibkvm_mmf.so, then the MaixCDK wrapperlibkvm.soand thekvm_vision_testexample.
- Before compiling, please ensure that the above-mentioned
MaixCDKenvironment is correctly configured. - Modify the paths of
MAIXCDK_PATHandNanoKVM_PATHin./build. - Execute
./build kvm_visionto build both libraries and the example. The library build and install directories arekvm_vision_test/build/kvm_mmf-build/andkvm_vision_test/build/kvm_mmf-install/. - The resulting libraries are in
kvm_vision_test/dist/kvm_vision_test_release/dl_lib/. - Run
./build kvm_vision add_to_kvmappto stage them in the repository'skvmapp/server/dl_lib/. - After changing the video library interfaces, update both prebuilt files
server/dl_lib/libkvm.soandserver/dl_lib/libkvm_mmf.sofrom the same build. Server compilation uses these files directly; see the server build instructions. - Use
./build kvm_vision cleanto remove the build outputs, including both library build and install directories.