summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2020-01-28 12:02:39 -0800
committerEric Anholt <[email protected]>2020-02-27 09:36:26 -0800
commit33f38605e9ac644de66000ec20170f7023f24243 (patch)
tree11ada109adfdb94b83e9243e535281d16af54a0d
parent20659f18947a48714fa8ce0f433304746541e110 (diff)
ci: Include db410c support in the ARM container.
I'm working on moving the db410c CI from docker to LAVA, which means we get to boot a custom kernel. To do that, we need to enable ARCH_QCOM in the kernel, save the dtb around, and include abootimg in our container so that we can generate combined kernel/dtb/ramdisk images for fastboot. LAVA's fastboot support is unable to pack the overlay into an abootimg image, just a cpio rootfs. We could flash the cpio rootfs after overlay addition, but that takes 2 minutes to do, and causes wear on the devices. Instead, we'll bring up the network at boot and use wget to fetch the overlay. We'll want network support anyway, so that we can transfer the failure xmls back to the gitlab job's artifacts at some point. Since the msm GPU and realtek network firmware increase our payload by 3MB, add in firmware compression so that it doesn't waste as much RAM on devices not using it. Reviewed-by: Tomeu Vizoso <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3928> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3928>
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--.gitlab-ci/arm.config1
-rw-r--r--.gitlab-ci/arm64.config9
-rw-r--r--.gitlab-ci/container/arm_build.sh2
-rw-r--r--.gitlab-ci/container/lava_arm.sh11
-rw-r--r--.gitlab-ci/create-rootfs.sh11
6 files changed, 29 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4cfcd312a64..e83d68bb1ef 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -165,7 +165,7 @@ arm_build:
- .debian@container-ifnot-exists@arm64v8
- .container
variables:
- DEBIAN_TAG: &arm_build "2020-02-24-4"
+ DEBIAN_TAG: &arm_build "2020-02-26"
.use-arm_build:
variables:
diff --git a/.gitlab-ci/arm.config b/.gitlab-ci/arm.config
index cbef4ae3331..669ecdb0292 100644
--- a/.gitlab-ci/arm.config
+++ b/.gitlab-ci/arm.config
@@ -44,3 +44,4 @@ CONFIG_DEBUG_LOCKDEP=n
CONFIG_SOFTLOCKUP_DETECTOR=n
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=n
+CONFIG_FW_LOADER_COMPRESS=y
diff --git a/.gitlab-ci/arm64.config b/.gitlab-ci/arm64.config
index 870eff89929..381b08a2729 100644
--- a/.gitlab-ci/arm64.config
+++ b/.gitlab-ci/arm64.config
@@ -12,6 +12,9 @@ CONFIG_DRM_ROCKCHIP=y
CONFIG_DRM_PANFROST=y
CONFIG_DRM_LIMA=y
CONFIG_DRM_PANEL_SIMPLE=y
+CONFIG_DRM_MSM=y
+CONFIG_DRM_I2C_ADV7511=y
+CONFIG_DRM_I2C_ADV7533=y
CONFIG_PWM_CROS_EC=y
CONFIG_BACKLIGHT_PWM=y
@@ -26,6 +29,9 @@ CONFIG_TYPEC_FUSB302=y
CONFIG_TYPEC=y
CONFIG_TYPEC_TCPM=y
+# db410c ethernet
+CONFIG_USB_RTL8152=y
+
CONFIG_ARCH_ALPINE=n
CONFIG_ARCH_BCM2835=n
CONFIG_ARCH_BCM_IPROC=n
@@ -38,7 +44,6 @@ CONFIG_ARCH_LG1K=n
CONFIG_ARCH_HISI=n
CONFIG_ARCH_MEDIATEK=n
CONFIG_ARCH_MVEBU=n
-CONFIG_ARCH_QCOM=n
CONFIG_ARCH_SEATTLE=n
CONFIG_ARCH_SYNQUACER=n
CONFIG_ARCH_RENESAS=n
@@ -87,3 +92,5 @@ CONFIG_SOFTLOCKUP_DETECTOR=y
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
CONFIG_DETECT_HUNG_TASK=y
+
+CONFIG_FW_LOADER_COMPRESS=y
diff --git a/.gitlab-ci/container/arm_build.sh b/.gitlab-ci/container/arm_build.sh
index b7f0b5942ae..c678ce14059 100644
--- a/.gitlab-ci/container/arm_build.sh
+++ b/.gitlab-ci/container/arm_build.sh
@@ -10,6 +10,8 @@ echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources
dpkg --add-architecture armhf
apt-get update
apt-get -y install \
+ abootimg \
+ android-sdk-ext4-utils \
bc \
bison \
ccache \
diff --git a/.gitlab-ci/container/lava_arm.sh b/.gitlab-ci/container/lava_arm.sh
index affc65f30d5..011903e739c 100644
--- a/.gitlab-ci/container/lava_arm.sh
+++ b/.gitlab-ci/container/lava_arm.sh
@@ -7,7 +7,7 @@ if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
GCC_ARCH="aarch64-linux-gnu"
KERNEL_ARCH="arm64"
DEFCONFIG="arch/arm64/configs/defconfig"
- DEVICE_TREES="arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dtb arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dtb arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dtb"
+ DEVICE_TREES="arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dtb arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dtb arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dtb arch/arm64/boot/dts/qcom/apq8016-sbc.dtb"
KERNEL_IMAGE_NAME="Image"
else
GCC_ARCH="arm-linux-gnueabihf"
@@ -54,7 +54,14 @@ rm -rf kernel
############### Create rootfs
set +e
-debootstrap --variant=minbase --arch=${DEBIAN_ARCH} testing /lava-files/rootfs-${DEBIAN_ARCH}/ http://deb.debian.org/debian
+debootstrap \
+ --variant=minbase \
+ --arch=${DEBIAN_ARCH} \
+ --components main,contrib,non-free \
+ testing \
+ /lava-files/rootfs-${DEBIAN_ARCH}/ \
+ http://deb.debian.org/debian
+
cat /lava-files/rootfs-${DEBIAN_ARCH}/debootstrap/debootstrap.log
set -e
diff --git a/.gitlab-ci/create-rootfs.sh b/.gitlab-ci/create-rootfs.sh
index b11a774c021..2baaeeb22d9 100644
--- a/.gitlab-ci/create-rootfs.sh
+++ b/.gitlab-ci/create-rootfs.sh
@@ -10,6 +10,10 @@ apt-get -y install --no-install-recommends \
libexpat1 \
libdrm2 \
libdrm-nouveau2 \
+ firmware-qcom-media \
+ firmware-realtek \
+ wget \
+ xz-utils
passwd root -d
chsh -s /bin/sh
@@ -24,6 +28,9 @@ chmod +x /init
# Strip the image to a small minimal system without removing the debian
# toolchain.
+# xz compress firmware so it doesn't waste RAM at runtime.
+find /lib/firmware -type f -print0 | xargs -0r -P4 -n4 xz -T1 -C crc32
+
# Copy timezone file and remove tzdata package
rm -rf /etc/localtime
cp /usr/share/zoneinfo/Etc/UTC /etc/localtime
@@ -91,10 +98,10 @@ UNNEEDED_PACKAGES="apt libapt-pkg5.0 "\
"init-system-helpers "\
"bash "\
"cpio "\
+"xz-utils "\
"passwd "\
"libsemanage1 libsemanage-common "\
"libsepol1 "\
-"gzip "\
"gpgv "\
"hostname "\
"adduser "\
@@ -189,5 +196,3 @@ rm usr/lib/*/libdb-5.3.so
# remove NSS support for nis, nisplus and hesiod
rm usr/lib/*/libnss_hesiod*
rm usr/lib/*/libnss_nis*
-
-rm bin/tar