1
0
mirror of https://github.com/rancher/os.git synced 2025-09-03 15:54:24 +00:00

Add 4glte build script

This commit is contained in:
Jason-ZW
2018-12-07 14:54:49 +08:00
parent 99118f5fad
commit ef792df107
5 changed files with 53 additions and 12 deletions

View File

@@ -60,6 +60,11 @@ hyperv: .dapper
APPEND_SYSTEM_IMAGES="rancher/os-hypervvmtools:v4.14.85-rancher-1" \
./.dapper hyperv-release 2>&1 | tee dist/release.log
4glte: .dapper
mkdir -p dist
APPEND_SYSTEM_IMAGES="rancher/os-modemmanager:v1.6.4-1" \
./.dapper release-4glte 2>&1 | tee dist/release.log
help:
@./scripts/help

View File

@@ -89,7 +89,7 @@ var schema = `{
"https_proxy": {"type": "string"},
"no_proxy": {"type": "string"},
"wifi_networks": {"type": "object"},
"modem_networks": {"type": "array"}
"modem_networks": {"type": "object"}
}
},

View File

@@ -1,16 +1,16 @@
package netconf
type NetworkConfig struct {
PreCmds []string `yaml:"pre_cmds,omitempty"`
DHCPTimeout int `yaml:"dhcp_timeout,omitempty"`
DNS DNSConfig `yaml:"dns,omitempty"`
Interfaces map[string]InterfaceConfig `yaml:"interfaces,omitempty"`
PostCmds []string `yaml:"post_cmds,omitempty"`
HTTPProxy string `yaml:"http_proxy,omitempty"`
HTTPSProxy string `yaml:"https_proxy,omitempty"`
NoProxy string `yaml:"no_proxy,omitempty"`
WifiNetworks map[string]WifiNetworkConfig `yaml:"wifi_networks,omitempty"`
ModemNetworks []ModemNetworkConfig `yaml:"modem_networks,omitempty"`
PreCmds []string `yaml:"pre_cmds,omitempty"`
DHCPTimeout int `yaml:"dhcp_timeout,omitempty"`
DNS DNSConfig `yaml:"dns,omitempty"`
Interfaces map[string]InterfaceConfig `yaml:"interfaces,omitempty"`
PostCmds []string `yaml:"post_cmds,omitempty"`
HTTPProxy string `yaml:"http_proxy,omitempty"`
HTTPSProxy string `yaml:"https_proxy,omitempty"`
NoProxy string `yaml:"no_proxy,omitempty"`
WifiNetworks map[string]WifiNetworkConfig `yaml:"wifi_networks,omitempty"`
ModemNetworks map[string]ModemNetworkConfig `yaml:"modem_networks,omitempty"`
}
type InterfaceConfig struct {
@@ -61,6 +61,5 @@ type WifiNetworkConfig struct {
type ModemNetworkConfig struct {
Apn string `yaml:"apn"`
Interface string `yaml:"interface"`
ExtraArgs string `yaml:"extra_args,omitempty"`
}

View File

@@ -43,6 +43,18 @@ if [ -e ".make-vmware" ]; then
wget -O ${INITRD_DIR}/usr/share/ros/services-cache/${SERVICE_OPEN_VMTOOLS_URL_MD5} ${SERVICE_OPEN_VMTOOLS_URL}
fi
if [ -e ".make-4glte" ]; then
SERVICE_URL=${OS_SERVICES_REPO}/${REPO_VERSION}
SERVICE_INDEX_URL="${SERVICE_URL}/index.yml"
SERVICE_MODEM_MANAGER_URL="${SERVICE_URL}/m/modem-manager.yml"
SERVICE_INDEX_URL_MD5=$(echo -n ${SERVICE_INDEX_URL}|md5sum|cut -d ' ' -f1)
SERVICE_MODEM_MANAGER_URL_MD5=$(echo -n ${SERVICE_MODEM_MANAGER_URL}|md5sum|cut -d ' ' -f1)
mkdir -p ${INITRD_DIR}/usr/share/ros/services-cache/
wget -O ${INITRD_DIR}/usr/share/ros/services-cache/${SERVICE_INDEX_URL_MD5} ${SERVICE_INDEX_URL}
wget -O ${INITRD_DIR}/usr/share/ros/services-cache/${SERVICE_MODEM_MANAGER_URL_MD5} ${SERVICE_MODEM_MANAGER_URL}
fi
# TODO: usr/lib dir is overwritten by the kernel modules and firmware
ln -s ${INITRD_DIR}/usr/share/ros/os-release ${INITRD_DIR}/usr/lib/
ln -s ${INITRD_DIR}/usr/share/ros/os-release ${INITRD_DIR}/usr/etc/

25
scripts/release-4glte Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
set -ex
cd $(dirname $0)/..
touch .make-4glte
source ./scripts/version
./scripts/release-build
touch dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
chmod 755 dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
for file in $(ls dist/artifacts/); do
case $file in
"initrd-"*)
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/latest/4glte/initrd" >> ./dist/publish_gss_latest.sh
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/${VERSION}/4glte/initrd" >> ./dist/publish_gss_${VERSION}.sh
;;
"rancheros.iso" | "rootfs.tar.gz")
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/latest/4glte/${file}" >> ./dist/publish_gss_latest.sh
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/${VERSION}/4glte/${file}" >> ./dist/publish_gss_${VERSION}.sh
;;
esac
done