Add support for Luckfox PicoKVM

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
This commit is contained in:
luckfox-eng29
2025-08-07 14:26:01 +08:00
parent 3e7d8fb0f5
commit 8fbd6bcf0d
114 changed files with 4676 additions and 3270 deletions

View File

@@ -3,8 +3,10 @@ package kvm
import (
"fmt"
"github.com/jetkvm/kvm/internal/network"
"github.com/jetkvm/kvm/internal/udhcpc"
"kvm/internal/network"
"kvm/internal/udhcpc"
"github.com/guregu/null/v6"
)
const (
@@ -79,7 +81,10 @@ func rpcGetNetworkState() network.RpcNetworkState {
}
func rpcGetNetworkSettings() network.RpcNetworkSettings {
return networkState.RpcGetNetworkSettings()
rpcSettings := networkState.RpcGetNetworkSettings()
hostname := GetHostname()
rpcSettings.Hostname = null.NewString(hostname, hostname != "")
return rpcSettings
}
func rpcSetNetworkSettings(settings network.RpcNetworkSettings) (*network.RpcNetworkSettings, error) {