Compare commits

..

No commits in common. "c5e2c6a4a3b2bcaba6b5738be1e5bf4e65f75c91" and "master" have entirely different histories.

2 changed files with 10 additions and 70 deletions

View File

@ -11,12 +11,11 @@ function clone_ipxe_upstream() {
#git clone git://git.ipxe.org/ipxe.git "$ipxe_src_dir" || return 1
git submodule update --init --recursive
curr="$(pwd)"
cd "$ipxe_src_dir"
# Known good commit
git checkout 56f7d44fde1d6ac196d115cc7dddd58e7ec098fa || return 1
cd "$curr"
return 0
}
@ -78,12 +77,11 @@ function make_ipxe_lkrn() {
return 1
fi
curr="$(pwd)"
cd "${ipxe_src_dir}/src/" || return 1
make bin/ipxe.lkrn EMBED="${embed_file}" CERT="${signing_cert},${ca_cert}" TRUST="${ca_cert}" || return 2
cd "$curr"
return 0
}
@ -114,12 +112,10 @@ function make_ipxe_iso() {
return 1
fi
curr="$(pwd)"
cd "${ipxe_src_dir}/src/" || return 1
make bin/ipxe.iso EMBED="${embed_file}" CERT="${signing_cert},${ca_cert}" TRUST="${ca_cert}" || return 2
cd "$curr"
return 0
}
@ -139,11 +135,10 @@ function make_ipxe_bin_shasums() {
return 1
fi
curr="$(pwd)"
cd "${ipxe_src_dir}/src/bin/" || return 1
sha256sum ipxe.lkrn ipxe.iso > SHA256SUMS || return 2
cd "$curr"
return 0
}
@ -168,12 +163,8 @@ function tag_head_and_push() {
return 1
fi
curr="$(pwd)"
cd "$git_repo_dir"
git config user.name "BuildBot"
git config user.email "buildbot@bitmessage.io"
git tag -n | grep $(git rev-parse HEAD)
if [ $? -eq 0 ]; then
>&2 echo 'HEAD tag already exists, bailing out...'
@ -181,13 +172,12 @@ function tag_head_and_push() {
fi
git tag -a "g_$(git rev-parse HEAD)" HEAD -m "BuildBot: tag commit for release $(git rev-parse HEAD)" || return 2
#git push --tags origin master
git push --tags "$remote" "$branch"
if [ $? -ne 0 ]; then
>&2 echo 'Error during attempted git push of new tag'
return 3
fi
cd "$curr"
return 0
}
@ -219,7 +209,6 @@ function create_release() {
return 1
fi
curr="$(pwd)"
cd "$git_repo_dir"
head="$(git rev-parse HEAD)"
@ -253,7 +242,6 @@ EOF
return 2
fi
cd "$curr"
return 0
}
@ -302,7 +290,6 @@ function upload_release_ipxe_lkrn() {
return 1
fi
curr="$(pwd)"
cd "$git_repo_dir"
cat release_results.txt | grep ^HTTP/ | grep 201 >/dev/null
@ -334,7 +321,6 @@ function upload_release_ipxe_lkrn() {
return 2
fi
cd "$curr"
return 0
}
@ -383,7 +369,6 @@ function upload_release_ipxe_iso() {
return 1
fi
curr="$(pwd)"
cd "$git_repo_dir"
cat release_results.txt | grep ^HTTP/ | grep 201 >/dev/null
@ -415,7 +400,6 @@ function upload_release_ipxe_iso() {
return 2
fi
cd "$curr"
return 0
}
@ -464,7 +448,6 @@ function upload_release_ipxe_shasums() {
return 1
fi
curr="$(pwd)"
cd "$git_repo_dir"
cat release_results.txt | grep ^HTTP/ | grep 201 >/dev/null
@ -496,7 +479,6 @@ function upload_release_ipxe_shasums() {
return 2
fi
cd "$curr"
return 0
}

View File

@ -34,29 +34,16 @@ isset ${net${idx}/mac} || goto loop_done
######################## SET STATIC IP INFO HERE #############################
# Just copy/paste an entire line to add more
#
echo Checking net${idx}
# node1.bitmessage.at
iseq ${net${idx}/mac} 40:a8:f0:31:cc:58 && set ip-dev-name eno1 && set ip-addr 93.189.28.82 && set ip-gateway 93.189.28.81 && set ip-netmask 255.255.255.240 && set ip-dns 1.1.1.1 && set successful t && goto loop_done ||
iseq ${net${idx}/mac} 40:a8:f0:31:cc:59 && set ip-dev-name eno2 && set ip-addr 93.189.28.82 && set ip-gateway 93.189.28.81 && set ip-netmask 255.255.255.240 && set ip-dns 1.1.1.1 && set successful t && goto loop_done ||
# node2.bitmessage.at
iseq ${net${idx}/mac} 28:80:23:a7:52:d0 && set ip-dev-name eno1 && set ip-addr 10.11.12.13 && set ip-gateway 10.11.12.1 && set ip-netmask 255.255.255.0 && set ip-dns 1.1.1.1 && set successful t && goto loop_done ||
iseq ${net${idx}/mac} 28:80:23:a7:52:d1 && set ip-dev-name eno2 && set ip-addr 10.11.12.13 && set ip-gateway 10.11.12.1 && set ip-netmask 255.255.255.0 && set ip-dns 1.1.1.1 && set successful t && goto loop_done ||
# node1.surda.cloud
iseq ${net${idx}/mac} d0:50:99:df:1d:49 && set ip-dev-name enp39s0 && set ip-addr 93.189.28.83 && set ip-gateway 93.189.28.81 && set ip-netmask 255.255.255.240 && set ip-dns 1.1.1.1 && set successful t && goto loop_done ||
iseq ${net${idx}/mac} d0:50:99:df:1d:4a && set ip-dev-name enp38s0 && set ip-addr 93.189.28.83 && set ip-gateway 93.189.28.81 && set ip-netmask 255.255.255.240 && set ip-dns 1.1.1.1 && set successful t && goto loop_done ||
# if you don't know the linux interface name, use "clear ip-dev-name", then
# it will use ALL interfaces
iseq ${net${idx}/mac:string} "00:01:02:A0:B1:C1" && set ip-dev-name eth0 && set ip-addr "192.168.1.5" && set ip-gateway "192.168.1.1" && set ip-netmask "255.255.255.0" && set ip-dns "1.1.1.1" && set successful t && goto loop_done ||
iseq ${net${idx}/mac:string} "03:04:05:D4:E5:F6" && set ip-dev-name eth0 && set ip-addr "192.168.99.2" && set ip-gateway "192.168.99.1" && set ip-netmask "255.255.255.0" && set ip-dns "1.1.1.1" && set successful t && goto loop_done ||
##############################################################################
inc idx && goto loop
:loop_done
# If we have not successfully found a MAC match, then we error, because we
# also failed DHCP. So there's nothing we can do but fail.
iseq ${successful} f && goto error_handler ||
iseq successful f && goto error_handler
# If on the other hand we're successful, then we construct the kernel ip= line
set ip-info ${ip-addr}::${ip-gateway}:${ip-netmask}::${ip-dev-name}:off:${ip-dns}
@ -92,32 +79,6 @@ goto boot_all
#################
:try_next_card
imgfree
ifclose
sleep 1
# If dhcp, it will go to the static boot, which already has ifopen
iseq ip-info dhcp || ifopen
iseq ip-info dhcp || sleep 1
iseq ip-info dhcp && clear ip-info && goto try_static_from_dhcp_fail || goto try_next_static_card
:try_static_from_dhcp_fail
iseq arch-info arm64 && goto static_ip_boot_arm64 ||
iseq arch-info amd64 && goto static_ip_boot_amd64 ||
goto error_handler
:try_next_static_card
isset ip-dev-name && clear ip-dev-name
isset ip-addr && clear ip-addr
isset ip-gateway && clear ip-gateway
isset ip-netmask && clear ip-netmask
isset ip-dns && clear ip-dns
isset successful && clear successful
set successful f
isset idx && inc idx || goto error_handler
goto loop
# In case we want to... log?? Or do something else.
:error_handler
echo "###########################################################"
@ -189,7 +150,7 @@ goto static_ip_boot_setup
# However, note that imgverify will fail if you refer to it as "/squashfs"
# instead of "squashfs".
imgfetch http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/squashfs /squashfs || goto try_next_card
imgfetch http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/squashfs /squashfs || goto error_handler
imgverify --signer images.sysdeploy.org squashfs http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/squashfs.sig || goto error_handler
# "--signer" validates against the subject common name field of the signing
@ -201,19 +162,16 @@ imgverify --signer images.sysdeploy.org squashfs http://images.sysdeploy.org/${u
# using a custom CA that you import during build.
initrd http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/boot-initrd || goto try_next_card
initrd http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/boot-initrd || goto error_handler
imgverify --signer images.sysdeploy.org boot-initrd http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/boot-initrd.sig || goto error_handler
kernel http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/boot-kernel || goto try_next_card
kernel http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/boot-kernel || goto error_handler
imgverify --signer images.sysdeploy.org boot-kernel http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/boot-kernel.sig || goto error_handler
# Get accurate time so we can set the clock in kernel boot cmdline
ntp pool.ntp.org || goto error_handler
echo ip-info ${ip-info}
sleep 1
boot boot-kernel initrd=boot-initrd rootfstype=squashfs root=/squashfs ip=${ip-info} overlayroot=tmpfs:recurse=0 systemd.clock-usec=${unixtime:int32}000000 ds=nocloud-net;s=https://cloud-init.sysdeploy.org/ || goto error_handler