Package: autopkgtest
Version: 5.15
Severity: wishlist
Tags: patch

Dear Maintainer,

There is no standard Debian kernel package for armel architecture,
as the armel hardwares are too diverse.
Maybe because of that, autopkgtest-build-qemu does not support armel.

A bootable armel QEMU testbed can be created by
1. adding armhf as the secondary architecture by dpkg --add-architecture
2. use linux-image-armmp-lpae:armhf or linux-image-armmp:armhf as the kernel.

A suggested patch to autopkgtest-build-qemu for armel support is
attached. As UEFI booting is indispensable with ARM architectures,
such changes are also included in the patch.

Best regards, Ryutaroh Matsumoto


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: arm64 (aarch64)

Kernel: Linux 5.9.0-1-arm64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_CRAP
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages autopkgtest depends on:
ii  apt-utils       2.1.11
ii  libdpkg-perl    1.20.5
ii  procps          2:3.3.16-5
ii  python3         3.8.2-3
ii  python3-debian  0.1.38

Versions of packages autopkgtest recommends:
ii  autodep8  0.24

Versions of packages autopkgtest suggests:
ii  lxc               1:4.0.4-5
pn  lxd               <none>
ii  ovmf              2020.08-1
ii  qemu-efi-aarch64  2020.08-1
ii  qemu-efi-arm      2020.08-1
pn  qemu-system       <none>
ii  qemu-utils        1:5.1+dfsg-4+b1
pn  schroot           <none>
ii  vmdb2             0.19-1

-- no debconf information
--- /usr/bin/autopkgtest-build-qemu-orig        2020-10-31 10:05:36.350588392 
+0900
+++ /usr/bin/autopkgtest-build-qemu     2020-11-03 06:35:38.005181838 +0900
@@ -209,8 +209,11 @@
     ;;
   *)
     case "$architecture" in
+      (armel)
+        kernel=linux-image-armmp-lpae:armhf
+        ;;
       (armhf)
-        kernel=linux-image-armmp
+        kernel=linux-image-armmp-lpae
         ;;
       (hppa)
         kernel=linux-image-parisc
@@ -235,6 +238,11 @@
     ;;
 esac
 
+if [ "$architecture" = armel ]; then
+    second_architecture=armhf
+else
+    second_architecture="$architecture"
+fi
 
 if [ "$architecture" = "$(dpkg --print-architecture)" ]; then
     debootstrap_cmd=debootstrap
@@ -252,12 +260,20 @@
   - mkimg: "{{ image }}"
     size: $size
 
-  - mklabel: msdos
+  - mklabel: gpt
     device: "{{ image }}"
 
   - mkpart: primary
+    fs-type: fat32
     device: "{{ image }}"
     start: 0%
+    end: 200MiB
+    tag: efipart
+
+  - mkpart: primary
+    fs-type: ext4
+    device: "{{ image }}"
+    start: 200MiB
     end: 100%
     tag: root
 
@@ -266,21 +282,33 @@
   - mkfs: ext4
     partition: root
 
+  - mkfs: vfat
+    partition: efipart
+
   - mount: root
 
   - $debootstrap_cmd: $release
     mirror: $mirror
+    components:
+    - main
+    - contrib
+    - non-free
     target: root
     $debootstrap_arch
 
+  - chroot: root
+    shell: |
+      dpkg --add-architecture $second_architecture
+
   - apt: install
     packages:
       - $kernel
       - ifupdown
     tag: root
 
-  - grub: bios
+  - grub: uefi
     tag: root
+    efi: efipart
     console: serial
 
   - chroot: root
@@ -294,7 +322,10 @@
   - shell: |
       rootdev=\$(ls -1 /dev/mapper/loop* | sort | tail -1)
       uuid=\$(blkid -c /dev/null -o value -s UUID \$rootdev)
-      echo "UUID=\$uuid / ext4 errors=remount-ro 0 1" > \$ROOT/etc/fstab
+      echo "UUID=\$uuid / ext4 
errors=remount-ro,discard,lazytime,commit=3600,nobarrier,strictatime 0 1" > 
\$ROOT/etc/fstab
+      efidev=\$(ls -1 /dev/mapper/loop* | sort | head -1)
+      uuid=\$(blkid -c /dev/null -o value -s UUID \$efidev)
+      echo "UUID=\$uuid /boot/efi vfat rw,discard,lazytime,async 0 2" >> 
\$ROOT/etc/fstab
     root-fs: root
 
   - shell: '$script \$ROOT'

Reply via email to