diff options
author | Alistair Delva <adelva@google.com> | 2022-03-03 10:19:33 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-03-03 10:19:33 +0000 |
commit | 5caa7419a2e1aa54aaa2343c923590ff829b22a3 (patch) | |
tree | b12c8c69720eeade15ace2cd98b56d9a55dcdefd | |
parent | 9f6bacd6a54d153314b49e17726790ab4a614c40 (diff) | |
parent | 2faa4962809589812172628c522183d8936fb843 (diff) | |
download | tests-5caa7419a2e1aa54aaa2343c923590ff829b22a3.tar.gz |
build_rootfs.sh: Avoid out of space issues in stage2 am: 82627b72bb am: 2faa496280
Original change: https://android-review.googlesource.com/c/kernel/tests/+/2004903
Change-Id: Id3cc6fe98065a3665e8b6e304e1d9c8d5917bbb3
-rw-r--r-- | net/test/rootfs/bullseye-common.sh | 16 | ||||
-rwxr-xr-x | net/test/rootfs/bullseye-cuttlefish.sh | 7 | ||||
-rwxr-xr-x | net/test/rootfs/bullseye-rockpi.sh | 8 |
3 files changed, 16 insertions, 15 deletions
diff --git a/net/test/rootfs/bullseye-common.sh b/net/test/rootfs/bullseye-common.sh index 3bf0b1c..39f31d9 100644 --- a/net/test/rootfs/bullseye-common.sh +++ b/net/test/rootfs/bullseye-common.sh @@ -22,6 +22,8 @@ debian_iptables=1.8.7-1 cuttlefish=android-cuttlefish setup_and_build_iptables() { + get_installed_packages >/root/originally-installed + # Install everything needed from bullseye to build iptables apt-get install -y \ build-essential \ @@ -68,6 +70,10 @@ setup_and_build_iptables() { # Build debian packages from the integrated iptables source dpkg-buildpackage -F -d -us -uc cd - + + get_installed_packages >/root/installed + remove_installed_packages /root/originally-installed /root/installed + apt-get clean } install_and_cleanup_iptables() { @@ -91,6 +97,8 @@ install_and_cleanup_iptables() { } setup_and_build_cuttlefish() { + get_installed_packages >/root/originally-installed + # Install everything needed from bullseye to build cuttlefish-common apt-get install -y \ cdbs \ @@ -100,11 +108,19 @@ setup_and_build_cuttlefish() { git \ golang + if [ "$(uname -m)" = "arm64" ]; then + apt-get install -y libc6-dev:amd64 + fi + # Fetch cuttlefish and build it for cuttlefish-common git clone https://github.com/google/android-cuttlefish.git /usr/src/$cuttlefish cd /usr/src/$cuttlefish dpkg-buildpackage -d -uc -us cd - + + get_installed_packages >/root/installed + remove_installed_packages /root/originally-installed /root/installed + apt-get clean } install_and_cleanup_cuttlefish() { diff --git a/net/test/rootfs/bullseye-cuttlefish.sh b/net/test/rootfs/bullseye-cuttlefish.sh index 0771ac1..4ac5248 100755 --- a/net/test/rootfs/bullseye-cuttlefish.sh +++ b/net/test/rootfs/bullseye-cuttlefish.sh @@ -28,18 +28,11 @@ update_apt_sources bullseye setup_cuttlefish_user -get_installed_packages >/root/originally-installed - setup_and_build_cuttlefish setup_and_build_iptables -get_installed_packages >/root/installed - -remove_installed_packages /root/originally-installed /root/installed - install_and_cleanup_cuttlefish sed -i "s,^#\(bridge_interface=\),\1br0," /etc/default/cuttlefish-common - install_and_cleanup_iptables create_systemd_getty_symlinks ttyS0 hvc1 diff --git a/net/test/rootfs/bullseye-rockpi.sh b/net/test/rootfs/bullseye-rockpi.sh index e8188c3..6974099 100755 --- a/net/test/rootfs/bullseye-rockpi.sh +++ b/net/test/rootfs/bullseye-rockpi.sh @@ -370,17 +370,9 @@ update_apt_sources bullseye setup_cuttlefish_user -get_installed_packages >/root/originally-installed - -apt-get install -y libc6-dev:amd64 - setup_and_build_cuttlefish setup_and_build_iptables -get_installed_packages >/root/installed - -remove_installed_packages /root/originally-installed /root/installed - install_and_cleanup_cuttlefish install_and_cleanup_iptables |