diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2023-11-08 19:21:25 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-11-08 19:21:25 +0000 |
commit | b19964dc763eaed08d916929133b601f8cb0457c (patch) | |
tree | f2f3a25437d72ae3aeb35734feb646cacd07c2b6 | |
parent | 7e9d201f93931ac4b83433689fc6d83c6f9ef0e4 (diff) | |
parent | 8051b5153c85c78bacc71cb38c2c8409efd2952a (diff) | |
download | tests-b19964dc763eaed08d916929133b601f8cb0457c.tar.gz |
Merge "net-test: add options to install extra Debian packages" into main am: 71319b49af am: 8051b5153c
Original change: https://android-review.googlesource.com/c/kernel/tests/+/2771204
Change-Id: I4db379cf9fd6d3515db3cd26f5a07c08f9a79449
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rwxr-xr-x | net/test/build_rootfs.sh | 12 | ||||
-rwxr-xr-x | net/test/rootfs/bullseye-server.sh | 8 |
2 files changed, 19 insertions, 1 deletions
diff --git a/net/test/build_rootfs.sh b/net/test/build_rootfs.sh index 967ba92..5382a68 100755 --- a/net/test/build_rootfs.sh +++ b/net/test/build_rootfs.sh @@ -41,7 +41,7 @@ ramdisk= disk= dtb= -while getopts ":hs:a:m:n:r:k:i:d:eg" opt; do +while getopts ":hs:a:m:n:r:k:O:i:d:eg" opt; do case "${opt}" in h) usage @@ -68,6 +68,9 @@ while getopts ":hs:a:m:n:r:k:i:d:eg" opt; do k) kernel="${OPTARG}" ;; + O) + extradeb="${OPTARG}" + ;; i) initramfs="${OPTARG}" ;; @@ -459,6 +462,10 @@ if [[ ${rootfs_partition} = "raw" ]]; then sudo chown root:root "${mount}/boot/vmlinuz-${kernel_version}" fi sudo cp -a "${SCRIPT_DIR}"/rootfs/cron-run-installer-script "${mount}/etc/cron.d/cron-run-installer-script" + if [ -e "${extradeb}" ]; then + sudo cp -a "${extradeb}" "${mount}/root/extradeb.tar.gz" + sudo chown root:root "${mount}/root/extradeb.tar.gz" + fi else if [[ "${embed_kernel_initrd_dtb}" = "1" ]]; then if [ -n "${dtb}" ]; then @@ -468,6 +475,9 @@ else e2cp -G 0 -O 0 "${kernel}" "${rootfs_partition_tempfile}":"/boot/vmlinuz-${kernel_version}" fi e2cp -G 0 -O 0 "${SCRIPT_DIR}"/rootfs/cron-run-installer-script "${rootfs_partition_tempfile}":"/etc/cron.d/cron-run-installer-script" + if [ -e "${extradeb}" ]; then + e2cp -G 0 -O 0 "${extradeb}" "${rootfs_partition_tempfile}":"/root/extradeb.tar.gz" + fi fi # Unmount the initial ramdisk diff --git a/net/test/rootfs/bullseye-server.sh b/net/test/rootfs/bullseye-server.sh index c5343de..61c046d 100755 --- a/net/test/rootfs/bullseye-server.sh +++ b/net/test/rootfs/bullseye-server.sh @@ -55,6 +55,14 @@ for package in linux-image-${arch} qemu-system-arm qemu-system-x86; do apt-get install -y -t bullseye-backports ${package} done +# Install AOSP customized kernel package and extra Debian packages +if [ -e /root/extradeb.tar.gz ]; then + tar --one-top-level=/root/extra_deb -zxvf /root/extradeb.tar.gz + apt -o APT::Color=0 -o DPkgPM::Progress-Fancy=0 install /root/extra_deb/*.deb + rm -rf /root/extra_deb + rm -f /root/extradeb.tar.gz +fi + # Install firmware package for AMD graphics apt-get install -y firmware-amd-graphics |