Define DebianService for host-guest communication
1. Use TCP/IP socket for now
2. IP address reporter uses that
3. Refactoring: remove timeout for shell page because systemd unit for
ip addr reporter 'requires' ttyd
4. move source files for guest(debian) to guest dir
Bug: 372666638
Test: check if shell shows
Change-Id: Ida94a05de9998a06b4b5c7efebbae97c78617bf4
diff --git a/build/debian/build.sh b/build/debian/build.sh
index 0d13019..97d9373 100755
--- a/build/debian/build.sh
+++ b/build/debian/build.sh
@@ -60,6 +60,7 @@
fai-setup-storage
fdisk
make
+ protobuf-compiler
python3
python3-libcloud
python3-marshmallow
@@ -115,7 +116,7 @@
wget "${url}" -O "${dst}/files/usr/local/bin/ttyd/AVF"
chmod 777 "${dst}/files/usr/local/bin/ttyd/AVF"
- pushd "$(dirname "$0")/forwarder_guest" > /dev/null
+ pushd "$(dirname "$0")/../../guest/forwarder_guest" > /dev/null
RUSTFLAGS="-C linker=${arch}-linux-gnu-gcc" cargo build \
--target "${arch}-unknown-linux-gnu" \
--target-dir "${workdir}/forwarder_guest"
@@ -123,6 +124,15 @@
cp "${workdir}/forwarder_guest/${arch}-unknown-linux-gnu/debug/forwarder_guest" "${dst}/files/usr/local/bin/forwarder_guest/AVF"
chmod 777 "${dst}/files/usr/local/bin/forwarder_guest/AVF"
popd > /dev/null
+
+ pushd $(dirname $0)/../../guest/ip_addr_reporter > /dev/null
+ RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" cargo build \
+ --target aarch64-unknown-linux-gnu \
+ --target-dir ${workdir}/ip_addr_reporter
+ mkdir -p ${dst}/files/usr/local/bin/ip_addr_reporter
+ cp ${workdir}/ip_addr_reporter/aarch64-unknown-linux-gnu/debug/ip_addr_reporter ${dst}/files/usr/local/bin/ip_addr_reporter/AVF
+ chmod 777 ${dst}/files/usr/local/bin/ip_addr_reporter/AVF
+ popd > /dev/null
}
run_fai() {