53f5b7de802301e15d3cbdbe1e04fb6c6d1f99f6
[pti/rtp.git] /
1 From c9949f83c08bc6a686068a9a90883cda3fa4bc1c Mon Sep 17 00:00:00 2001
2 From: Jackie Huang <jackie.huang@windriver.com>
3 Date: Tue, 1 Aug 2023 13:49:38 +0800
4 Subject: [PATCH 1/9] Add image yaml files for arm64
5
6 Add base-bullseye_arm64.yaml from base-bullseye.yaml,
7 and base-initramfs-bullseye_arm64.yaml from
8 base-initramfs-bullseye.yaml and made the following
9 ajustment for arm64:
10 * amd64 -> arm64
11 * x64 -> aa64
12 * x86_64 -> aarch64
13 * bzImage -> vmlinux
14 * intel-x86-64 -> qemuarm64
15 * ttyS0 -> ttyAMA0
16 * remove package grub2 since only grub-efi
17   is needed for arm64
18 * disable secure boot
19
20 Test Plan:
21 PASS: downloader -s -b on x86-64 host
22 PASS: downloader -s -b on arm64 host
23 PASS: build-pkgs on x86-64 host
24 PASS: build-image on x86-64 host
25 PASS: build-pkgs on arm64 host
26 PASS: build-image on arm64 host
27 PASS: Deploy AIO-SX on x86-64 target
28 PASS: Deploy AIO-SX on arm64 target
29 PASS: Deploy AIO-DX on x86-64 target
30 PASS: Deploy AIO-DX on arm64 target
31
32 Story: 2010739
33 Task: 48002
34
35 Depends-On: https://review.opendev.org/c/starlingx/root/+/889682
36
37 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
38 Change-Id: I7be98f75405eb61ece65f9202e73ad8d1a51ee1d
39 ---
40  .../debian/common/base-bullseye_arm64.yaml    | 421 ++++++++++++++++++
41  .../common/base-initramfs-bullseye_arm64.yaml | 132 ++++++
42  2 files changed, 553 insertions(+)
43  create mode 100644 debian-mirror-tools/config/debian/common/base-bullseye_arm64.yaml
44  create mode 100644 debian-mirror-tools/config/debian/common/base-initramfs-bullseye_arm64.yaml
45
46 diff --git a/debian-mirror-tools/config/debian/common/base-bullseye_arm64.yaml b/debian-mirror-tools/config/debian/common/base-bullseye_arm64.yaml
47 new file mode 100644
48 index 0000000..c41ac96
49 --- /dev/null
50 +++ b/debian-mirror-tools/config/debian/common/base-bullseye_arm64.yaml
51 @@ -0,0 +1,421 @@
52 +---
53 +name: starlingx
54 +machine: qemuarm64
55 +image_type:
56 +- iso
57 +- ostree-repo
58 +debootstrap-mirror: deb-merge-all
59 +package_feeds: []
60 +package_type: external-debian
61 +wic:
62 +  OSTREE_WKS_BOOT_SIZE: ''
63 +  OSTREE_WKS_EFI_SIZE: --size=32M
64 +  OSTREE_WKS_ROOT_SIZE: ''
65 +  OSTREE_WKS_FLUX_SIZE: ''
66 +  OSTREE_FLUX_PART: fluxdata
67 +gpg:
68 +  gpg_path: /tmp/.lat_gnupg_root
69 +  ostree:
70 +    gpgid: Wind-River-Linux-Sample
71 +    gpgkey: $OECORE_NATIVE_SYSROOT/usr/share/genimage/rpm_keys/RPM-GPG-PRIVKEY-Wind-River-Linux-Sample
72 +    gpg_password: windriver
73 +  grub:
74 +    BOOT_GPG_NAME: SecureBootCore
75 +    BOOT_GPG_PASSPHRASE: SecureCore
76 +    BOOT_KEYS_DIR: $OECORE_NATIVE_SYSROOT/usr/share/bootfs/boot_keys
77 +    BOOT_GPG_KEY: $OECORE_NATIVE_SYSROOT/usr/share/bootfs/boot_keys/BOOT-GPG-PRIVKEY-SecureBootCore
78 +    BOOT_SINGED_SHIM: $IMAGE_ROOTFS/usr/lib/shim/bootaa64.efi
79 +    BOOT_SINGED_SHIMTOOL: $IMAGE_ROOTFS/usr/lib/shim/mmaa64.efi
80 +    BOOT_SINGED_GRUB: $IMAGE_ROOTFS/boot/efi/EFI/BOOT/grubaa64.efi
81 +    BOOT_EFITOOL: $IMAGE_ROOTFS/usr/lib/efitools/aarch64-linux-gnu/LockDown.efi
82 +    BOOT_GRUB_CFG: $OECORE_TARGET_SYSROOT/boot/efi/EFI/BOOT/grub.cfg
83 +    BOOT_NOSIG_GRUB: $OECORE_TARGET_SYSROOT/boot/efi/EFI/BOOT/bootaa64-nosig.efi
84 +    EFI_SECURE_BOOT: disable
85 +packages: []
86 +external-packages: []
87 +include-default-packages: '0'
88 +rootfs-pre-scripts:
89 +- |
90 +  # The StarlingX customize pacakges includes:
91 +  # - ostree 2019.1
92 +  export PATH=/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
93 +  chroot $IMAGE_ROOTFS bash << SCRIPT_ENDOF
94 +  set -e
95 +  # Speed up apt/dpkg used for running build-image
96 +  echo force-unsafe-io > /etc/dpkg/dpkg.cfg.d/unsafe-io
97 +  apt update
98 +  apt install -y --no-install-recommends linux-image-stx-arm64 linux-rt-image-stx-arm64 grub-common
99 +  apt install -y --allow-downgrades --allow-unauthenticated --no-install-recommends ostree ostree-boot libostree-1-1 ostree-upgrade-mgr
100 +  apt install --no-install-recommends -y ifupdown
101 +  apt install -y bc vim uuid-runtime iputils-ping
102 +  # Move dpkg database to /usr so it's accessible after the OS /var is
103 +  # mounted, but make a symlink so it works without modifications to
104 +  # dpkg or apt
105 +  mv /var/lib/dpkg /usr/share/dpkg/database
106 +  ln -sr /usr/share/dpkg/database /var/lib/dpkg
107 +  SCRIPT_ENDOF
108 +rootfs-post-scripts:
109 +- |-
110 +  # Set bash as default shell
111 +  ln -snf --relative $IMAGE_ROOTFS/bin/bash $IMAGE_ROOTFS/bin/sh
112 +- |-
113 +  # Allow root ssh login
114 +  export PATH=/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
115 +  chroot $IMAGE_ROOTFS sed -i 's/^[#[:space:]]*PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
116 +- |-
117 +  # FIXME: OSTree will not set up a link to scratch automagically. Need to
118 +  # relocate scratch to a more ostree friendly locale
119 +  mkdir $IMAGE_ROOTFS/var/rootdirs/scratch
120 +  ln -snf --relative $IMAGE_ROOTFS/var/rootdirs/scratch $IMAGE_ROOTFS/scratch
121 +- |-
122 +  # Make /opt/branding to writable (To make end-user enable to place their branding archive)
123 +  mkdir $IMAGE_ROOTFS/var/branding
124 +  mkdir -p $IMAGE_ROOTFS/var/rootdirs/opt
125 +  ln -snf --relative $IMAGE_ROOTFS/var/branding $IMAGE_ROOTFS/var/rootdirs/opt/branding
126 +- |-
127 +  cat /dev/null > $IMAGE_ROOTFS/etc/resolv.conf
128 +- |-
129 +  cat /dev/null > $IMAGE_ROOTFS/etc/apt/sources.list
130 +- |-
131 +  # Only used for running build-image
132 +  rm -f etc/dpkg/dpkg.cfg.d/unsafe-io
133 +- |-
134 +  # There is ${IMAGE_ROOTFS}/var/pxeboot/grubaa64.efi from parent linux installed
135 +  # For secure boot feature, it should be replaced with the right one
136 +  if [ "$EFI_SECURE_BOOT" = enable ]; then
137 +    install -m 0644 ${IMAGE_ROOTFS}/boot/efi/EFI/BOOT/grubaa64.efi ${IMAGE_ROOTFS}/var/pxeboot/grubaa64.efi
138 +  fi
139 +environments:
140 +- NO_RECOMMENDATIONS="1"
141 +- DEBIAN_FRONTEND=noninteractive
142 +- KERNEL_PARAMS=crashkernel=2048M apparmor=0 security=apparmor
143 +ostree:
144 +  ostree_use_ab: '0'
145 +  ostree_osname: debian
146 +  ostree_skip_boot_diff: '2'
147 +  ostree_remote_url: ''
148 +  ostree_install_device: '/dev/sda'
149 +  OSTREE_GRUB_USER: root
150 +  OSTREE_GRUB_PW_FILE: $OECORE_NATIVE_SYSROOT/usr/share/bootfs/boot_keys/ostree_grub_pw
151 +  OSTREE_FDISK_BLM: 2506
152 +  OSTREE_FDISK_BSZ: 512
153 +  OSTREE_FDISK_RSZ: 20480
154 +  OSTREE_FDISK_VSZ: 20480
155 +  OSTREE_FDISK_FSZ: 32
156 +  OSTREE_CONSOLE: console=ttyAMA0,115200
157 +debootstrap-key: ''
158 +apt-keys:
159 +- /opt/LAT/pubkey.rsa
160 +iso-grub-entry: |
161 +  submenu 'UEFI Debian Controller Install' --unrestricted --id=standard {
162 +    menuentry 'Serial Console' --unrestricted --id=serial {
163 +      set fallback=1
164 +      efi-watchdog enable 0 180
165 +      linux /vmlinux-std %BOOT_PARAMS% traits=controller defaultkernel=vmlinuz-*[!t]-arm64
166 +      initrd @INITRD@
167 +    }
168 +    menuentry 'Graphical Console' --unrestricted --id=graphical {
169 +      set fallback=1
170 +      efi-watchdog enable 0 180
171 +      linux /vmlinux-std %BOOT_PARAMS% traits=controller defaultkernel=vmlinuz-*[!t]-arm64 console=tty1
172 +      initrd @INITRD@
173 +    }
174 +  }
175 +
176 +  submenu 'UEFI Debian All-in-one Install' --unrestricted --id=aio {
177 +    menuentry 'Serial Console' --unrestricted --id=serial {
178 +      set fallback=1
179 +      efi-watchdog enable 0 180
180 +      linux /vmlinux-std %BOOT_PARAMS% traits=controller,worker defaultkernel=vmlinuz-*[!t]-arm64
181 +      initrd @INITRD@
182 +    }
183 +    menuentry 'Graphical Console' --unrestricted --id=graphical {
184 +      set fallback=1
185 +      efi-watchdog enable 0 180
186 +      linux /vmlinux-std %BOOT_PARAMS% traits=controller,worker defaultkernel=vmlinuz-*[!t]-arm64 console=tty1
187 +      initrd @INITRD@
188 +    }
189 +  }
190 +
191 +  submenu 'UEFI Debian All-in-one (lowlatency) Install' --unrestricted --id=aio-lowlat {
192 +    menuentry 'Serial Console' --unrestricted --id=serial {
193 +      set fallback=1
194 +      efi-watchdog enable 0 180
195 +      linux /vmlinux-rt %BOOT_PARAMS% traits=controller,worker,lowlatency defaultkernel=vmlinuz-*-rt-arm64 efi=runtime
196 +      initrd @INITRD@
197 +    }
198 +    menuentry 'Graphical Console' --unrestricted --id=graphical {
199 +      set fallback=1
200 +      efi-watchdog enable 0 180
201 +      linux /vmlinux-rt %BOOT_PARAMS% traits=controller,worker,lowlatency defaultkernel=vmlinuz-*-rt-arm64 efi=runtime console=tty1
202 +      initrd @INITRD@
203 +    }
204 +  }
205 +
206 +iso-syslinux-entry: |
207 +  menu start
208 +  ontimeout 1
209 +
210 +  menu begin
211 +    menu title Debian Controller Install
212 +    menu default
213 +
214 +    label 1
215 +      menu label Serial Console
216 +      kernel /vmlinux-std
217 +      ipappend 2
218 +      append initrd=@INITRD@ %BOOT_PARAMS% traits=controller defaultkernel=vmlinuz-*[!t]-arm64
219 +
220 +    label 2
221 +      menu label Graphical Console
222 +      kernel /vmlinux-std
223 +      ipappend 2
224 +      append initrd=@INITRD@ %BOOT_PARAMS% traits=controller defaultkernel=vmlinuz-*[!t]-arm64 console=tty1
225 +  menu end
226 +
227 +  menu begin
228 +    menu title Debian All-in-one Install
229 +
230 +    label 3
231 +      menu label Serial Console
232 +      kernel /vmlinux-std
233 +      ipappend 2
234 +      append initrd=@INITRD@ %BOOT_PARAMS% traits=controller,worker defaultkernel=vmlinuz-*[!t]-arm64
235 +
236 +    label 4
237 +      menu label Graphical Console
238 +      kernel /vmlinux-std
239 +      ipappend 2
240 +      append initrd=@INITRD@ %BOOT_PARAMS% traits=controller,worker defaultkernel=vmlinuz-*[!t]-arm64 console=tty1
241 +  menu end
242 +
243 +  menu begin
244 +    menu title Debian All-in-one (lowlatency) Install
245 +
246 +    label 5
247 +      menu label Serial Console
248 +      kernel /vmlinux-rt
249 +      ipappend 2
250 +      append initrd=@INITRD@ %BOOT_PARAMS% traits=controller,worker,lowlatency defaultkernel=vmlinuz-*-rt-arm64
251 +
252 +    label 6
253 +      menu label Graphical Console
254 +      kernel /vmlinux-rt
255 +      ipappend 2
256 +      append initrd=@INITRD@ %BOOT_PARAMS% traits=controller,worker,lowlatency defaultkernel=vmlinuz-*-rt-arm64 console=tty1
257 +  menu end
258 +
259 +iso-post-script: |
260 +  cd ${ISO_DIR}
261 +
262 +  # 0. Prepare
263 +  # According to `multiple-kernels' in lat yaml, install std
264 +  # or rt kernel to ISO
265 +  for k in ${OSTREE_MULTIPLE_KERNELS}; do
266 +    if [ "${k%%-rt-arm64}" != "${k}" ]; then
267 +      cp ${DEPLOY_DIR_IMAGE}/${k} vmlinux-rt
268 +      if [ -e ${DEPLOY_DIR_IMAGE}/${k}.sig ]; then
269 +        cp ${DEPLOY_DIR_IMAGE}/${k}.sig vmlinux-rt.sig
270 +      fi
271 +    else
272 +      cp ${DEPLOY_DIR_IMAGE}/${k} vmlinux-std
273 +      if [ -e ${DEPLOY_DIR_IMAGE}/${k}.sig ]; then
274 +        cp ${DEPLOY_DIR_IMAGE}/${k}.sig vmlinux-std.sig
275 +      fi
276 +    fi
277 +  done
278 +
279 +  # 1. Kickstart
280 +  mkdir -p kickstart
281 +  # 1.1 Kickstart example for PXE
282 +  cat << ENDOF > kickstart/pxe-ks.cfg
283 +  lat-disk --install-device=/dev/disk/by-path/pci-0000:af:00.0-scsi-0:2:0:0
284 +  ENDOF
285 +
286 +  # 1.2 Kickstart example for ISO
287 +  cat << ENDOF > kickstart/iso-ks.cfg
288 +  lat-disk --install-device=/dev/sda
289 +  ENDOF
290 +
291 +  # 1.3 Kickstart from image rootfs (provided by package platform-kickstarts)
292 +  if [ -e $IMAGE_ROOTFS/var/www/pages/feed/rel-*/kickstart/kickstart.cfg ]; then
293 +    cp $IMAGE_ROOTFS/var/www/pages/feed/rel-*/kickstart/kickstart.cfg kickstart/
294 +  fi
295 +
296 +  if [ -e $IMAGE_ROOTFS/var/www/pages/feed/rel-*/kickstart/miniboot.cfg ]; then
297 +    cp $IMAGE_ROOTFS/var/www/pages/feed/rel-*/kickstart/miniboot.cfg kickstart/
298 +  fi
299 +
300 +  if [ -d $IMAGE_ROOTFS/var/www/pages/feed/rel-*/kickstart/centos ]; then
301 +    cp -r $IMAGE_ROOTFS/var/www/pages/feed/rel-*/kickstart/centos kickstart/
302 +  fi
303 +
304 +  # 2. PXE
305 +  mkdir -p pxeboot/pxelinux.cfg
306 +
307 +  # 2.1 Kernel and initramfs
308 +  install -m 644 vmlinux* pxeboot
309 +  install -m 644 initrd* pxeboot
310 +
311 +  # 2.2 Bootloader
312 +  # 2.2.1 Legacy BIOS PXE
313 +  cp $OECORE_TARGET_SYSROOT/usr/share/syslinux/pxelinux.0 pxeboot/
314 +  cp isolinux/isolinux.cfg pxeboot/pxelinux.cfg/default
315 +  for f in libcom32.c32 ldlinux.c32 libutil.c32 vesamenu.c32; do
316 +    cp isolinux/$f pxeboot/
317 +  done
318 +
319 +  # 2.2.2 EFI PXE
320 +  cp -a EFI pxeboot
321 +  if [ -e ${IMAGE_ROOTFS}/boot/efi/EFI/BOOT/bootaa64-nosig.efi ]; then
322 +    cp ${IMAGE_ROOTFS}/boot/efi/EFI/BOOT/bootaa64-nosig.efi pxeboot/EFI/BOOT/
323 +  fi
324 +
325 +  # 2.3 Edit grub.cfg and pxelinux.cfg/default
326 +  # 2.3.1 Drop to install from local ostree repo
327 +  sed -i "s#instl=/ostree_repo#@BOOTPARAMS@#g" \
328 +    pxeboot/EFI/BOOT/grub.cfg \
329 +    pxeboot/pxelinux.cfg/default
330 +
331 +  # 2.3.2 Install from remote ostree repo
332 +  sed -i "s#insturl=file://NOT_SET#insturl=http://pxecontroller:8080/feed/debian/ostree_repo#g" \
333 +    pxeboot/EFI/BOOT/grub.cfg \
334 +    pxeboot/pxelinux.cfg/default
335 +
336 +  # 2.3.3 Configure kickstart url
337 +  BOOT_PARAMS="ks=http://pxecontroller:8080/feed/debian/kickstart/pxe-ks.cfg"
338 +
339 +  # 2.3.4 Verbose installation
340 +  #BOOT_PARAMS="${BOOT_PARAMS} instsh=2"
341 +
342 +  # 2.3.5 Update boot params
343 +  sed -i "s#@BOOTPARAMS@#${BOOT_PARAMS}#g" \
344 +    pxeboot/EFI/BOOT/grub.cfg \
345 +    pxeboot/pxelinux.cfg/default
346 +
347 +  # 2.3.6 Add `Boot from hard drive' entry to grub.cfg
348 +  cat <<ENDOF>> pxeboot/EFI/BOOT/grub.cfg
349 +
350 +  export skip_check_cfg
351 +  menuentry 'UEFI Boot from hard drive' {
352 +      search --set=root --label otaefi
353 +      configfile /efi/boot/grub.cfg
354 +  }
355 +  ENDOF
356 +
357 +  # 2.4 Tweak PXE if EFI secure boot enabled
358 +  if [ "$EFI_SECURE_BOOT" = enable ]; then
359 +    # On some host, PXE make bootaa64.efi search grubaa64.efi
360 +    # from tftp/ dir other than tftp/EFI/BOOT/
361 +    install -m 0644 EFI/BOOT/grubaa64.efi pxeboot/
362 +
363 +    # Resign grub.cfg
364 +    rm pxeboot/EFI/BOOT/grub.cfg.sig
365 +    echo 'SecureCore' | gpg  --pinentry-mode loopback \
366 +                             --batch \
367 +                             --homedir /tmp/.lat_gnupg_root \
368 +                             -u SecureBootCore \
369 +                             --detach-sign \
370 +                             --passphrase-fd 0 \
371 +                             pxeboot/EFI/BOOT/grub.cfg
372 +  fi
373 +
374 +  # 2.5 copy pxeboot config template files to pxeboot/pxelinux.cfg
375 +  mkdir -p pxeboot/pxelinux.cfg.files
376 +  cp ${IMAGE_ROOTFS}/var/pxeboot/pxelinux.cfg.files/efi-pxe-* pxeboot/pxelinux.cfg.files/
377 +  cp ${IMAGE_ROOTFS}/var/pxeboot/pxelinux.cfg.files/pxe-* pxeboot/pxelinux.cfg.files/
378 +
379 +  # 2.6 upgrades directory and upgrade meta files
380 +  RELEASE_VER=$(cat ${IMAGE_ROOTFS}/etc/build.info | grep SW_VERSION | cut -f2 -d'=' | tr -d '"')
381 +  mkdir -p upgrades
382 +  cp ${IMAGE_ROOTFS}/etc/pxeboot-update-${RELEASE_VER}.sh upgrades/
383 +  cp ${IMAGE_ROOTFS}/usr/sbin/deploy-precheck upgrades/
384 +  cp ${IMAGE_ROOTFS}/usr/sbin/upgrade_utils.py upgrades/
385 +  cp ${IMAGE_ROOTFS}/opt/upgrades/import.sh upgrades/
386 +  cp ${IMAGE_ROOTFS}/opt/upgrades/metadata.xml upgrades/
387 +  cp ${IMAGE_ROOTFS}/usr/sbin/usm_load_import upgrades/
388 +  sed -i "s/xxxSW_VERSIONxxx/${RELEASE_VER}/g" upgrades/metadata.xml
389 +  mkdir -p patches
390 +  cp ${IMAGE_ROOTFS}/etc/software/*-metadata.xml upgrades/
391 +  cp ${IMAGE_ROOTFS}/etc/software/*-metadata.xml patches/
392 +  echo -n "VERSION=${RELEASE_VER}" > upgrades/version
393 +  mkdir -p upgrades/software-deploy
394 +  # Copy all software-deploy scripts to upgrades/software-deploy in ISO
395 +  cp ${IMAGE_ROOTFS}/usr/sbin/software-deploy/* upgrades/software-deploy/
396 +
397 +  # 3. ISO
398 +  # 3.1 Edit grub.cfg and isolinux.cfg
399 +  # 3.1.1 Configure local kickstart url and LVM root and fluxdata device
400 +  BOOT_PARAMS="ks=file:///kickstart/kickstart.cfg"
401 +  BOOT_PARAMS="${BOOT_PARAMS} inst_ostree_root=/dev/mapper/cgts--vg-root--lv"
402 +  BOOT_PARAMS="${BOOT_PARAMS} inst_ostree_var=/dev/mapper/cgts--vg-var--lv"
403 +
404 +  # 3.1.2 Verbose installation
405 +  #BOOT_PARAMS="${BOOT_PARAMS} instsh=2"
406 +
407 +  # 3.1.3 Update boot params
408 +  sed -i "s#instl=/ostree_repo#& ${BOOT_PARAMS}#g" \
409 +    EFI/BOOT/grub.cfg \
410 +    isolinux/isolinux.cfg
411 +
412 +  # According to `default-kernel' in lat yaml, set which
413 +  # bootloader menu entry to boot
414 +  sed -i "s/^DEFAULT .*//g" \
415 +    isolinux/isolinux.cfg
416 +
417 +  if [ "${OSTREE_DEFAULT_KERNEL%%-rt-arm64}" != "${OSTREE_DEFAULT_KERNEL}" ]; then
418 +    # Boot rt kernel by default
419 +    sed -i "s/ set default=.*/ set default=2/g" \
420 +      EFI/BOOT/grub.cfg
421 +  else
422 +    # Boot std kernel by default
423 +    sed -i "s/ set default=.*/ set default=0/g" \
424 +      EFI/BOOT/grub.cfg
425 +  fi
426 +
427 +  # 3.2 Resign grub.cfg if EFI secure boot enabled
428 +  if [ "$EFI_SECURE_BOOT" = enable ]; then
429 +    rm EFI/BOOT/grub.cfg.sig
430 +    echo 'SecureCore' | gpg  --pinentry-mode loopback \
431 +                             --batch \
432 +                             --homedir /tmp/.lat_gnupg_root \
433 +                             -u SecureBootCore \
434 +                             --detach-sign \
435 +                             --passphrase-fd 0 \
436 +                             EFI/BOOT/grub.cfg
437 +  fi
438 +
439 +  # Update the grub.cfg in efi.img according to above setting.
440 +  # Don't update grub.cfg.sig because the grub.cfg signature checking
441 +  # has been omitted.
442 +  mdel -i efi.img ::/EFI/BOOT/grub.cfg
443 +  mcopy -i efi.img EFI/BOOT/grub.cfg ::/EFI/BOOT/
444 +
445 +  # Put the controller-0 pxeboot install grub menu samples and
446 +  # setup script into a new the ISO's pxeboot/samples directory.
447 +  install -v -d -m 0755 pxeboot/samples
448 +  install -m 0555 ${IMAGE_ROOTFS}/usr/sbin/pxeboot_setup.sh pxeboot/samples
449 +  echo "See pxeboot_setup.sh --help for usage details" > pxeboot/samples/README
450 +  install -m 0664 ${IMAGE_ROOTFS}/var/pxeboot/pxelinux.cfg.files/pxeboot.cfg.debian pxeboot/samples
451 +  install -m 0664 ${IMAGE_ROOTFS}/var/pxeboot/pxelinux.cfg.files/efi-pxeboot.cfg.debian pxeboot/samples
452 +
453 +  # Added CERTS into efi.img
454 +  if [ "$EFI_SECURE_BOOT" = enable ]; then
455 +      mmd -i efi.img ::/CERTS
456 +      mcopy -i efi.img -s /localdisk/CERTS/* ::/CERTS/
457 +      mkdir images
458 +      ln -snf ../efi.img images/efiboot.img
459 +  fi
460 +
461 +  # Generate package list file in the iso root
462 +  echo "Verifying package list for ${IMAGE_NAME}"
463 +  if [ -f "/localdisk/workdir/${IMAGE_NAME}/packages.yaml" ]; then
464 +      echo "Copying ISO package list"
465 +      cp /localdisk/workdir/${IMAGE_NAME}/packages.yaml sw_package_list.yaml
466 +  fi
467 +
468 +multiple-kernels: vmlinuz-*[!t]-arm64 vmlinuz-*-rt-arm64
469 +default-kernel: vmlinuz-*[!t]-arm64
470 +system:
471 +- contains:
472 +  - /localdisk/deploy/lat-initramfs.yaml
473 diff --git a/debian-mirror-tools/config/debian/common/base-initramfs-bullseye_arm64.yaml b/debian-mirror-tools/config/debian/common/base-initramfs-bullseye_arm64.yaml
474 new file mode 100644
475 index 0000000..590f5f4
476 --- /dev/null
477 +++ b/debian-mirror-tools/config/debian/common/base-initramfs-bullseye_arm64.yaml
478 @@ -0,0 +1,132 @@
479 +---
480 +name: starlingx-initramfs-ostree-image
481 +machine: qemuarm64
482 +image_type:
483 +- initramfs
484 +debootstrap-mirror: deb-merge-all
485 +package_feeds: []
486 +package_type: external-debian
487 +gpg:
488 +  gpg_path: /tmp/.lat_gnupg_root
489 +  ostree:
490 +    gpgid: Wind-River-Linux-Sample
491 +    gpgkey: $OECORE_NATIVE_SYSROOT/usr/share/genimage/rpm_keys/RPM-GPG-PRIVKEY-Wind-River-Linux-Sample
492 +    gpg_password: windriver
493 +  grub:
494 +    BOOT_GPG_NAME: SecureBootCore
495 +    BOOT_GPG_PASSPHRASE: SecureCore
496 +    BOOT_KEYS_DIR: $OECORE_NATIVE_SYSROOT/usr/share/bootfs/boot_keys
497 +    BOOT_GPG_KEY: $OECORE_NATIVE_SYSROOT/usr/share/bootfs/boot_keys/BOOT-GPG-PRIVKEY-SecureBootCore
498 +packages:
499 +- apt-utils
500 +- base-passwd
501 +- bash
502 +- bc
503 +- bind9-dnsutils
504 +- bnxt-en
505 +- bnxt-en-rt
506 +- busybox
507 +- bzip2
508 +- ca-certificates
509 +- curl
510 +- dosfstools
511 +- e2fsprogs
512 +- efibootmgr
513 +- eject
514 +- fdisk
515 +- findutils
516 +- firmware-qlogic
517 +- gawk
518 +- glib-networking
519 +- gnupg
520 +- grep
521 +- gzip
522 +- iavf
523 +- iavf-rt
524 +- iavf-cvl-2.54
525 +- iavf-cvl-2.54-rt
526 +- iavf-cvl-4.10
527 +- iavf-cvl-4.10-rt
528 +- ice
529 +- ice-rt
530 +- ice-cvl-2.54
531 +- ice-cvl-2.54-rt
532 +- ice-cvl-4.10
533 +- ice-cvl-4.10-rt
534 +- i40e
535 +- i40e-rt
536 +- i40e-cvl-2.54
537 +- i40e-cvl-2.54-rt
538 +- i40e-cvl-4.10
539 +- i40e-cvl-4.10-rt
540 +- ifupdown
541 +- initramfs-ostree
542 +- iproute2
543 +- isc-dhcp-client
544 +- isc-dhcp-common
545 +- kbd
546 +- kmod
547 +- libostree-1-1
548 +- linux-image-stx-arm64
549 +- linux-rt-image-stx-arm64
550 +- mdadm
551 +- mlnx-ofed-kernel-modules
552 +- mlnx-ofed-kernel-modules-rt
553 +- mount
554 +- mttyexec
555 +- multipath-config
556 +- multipath-tools
557 +- multipath-tools-boot
558 +- open-iscsi
559 +- ostree-boot
560 +- ostree
561 +- parted
562 +- procps
563 +- psmisc
564 +- pv
565 +- iputils-ping
566 +- rng-tools
567 +- rpm2cpio
568 +- rsync
569 +- sed
570 +- tar
571 +- udev
572 +- udhcpc
573 +- util-linux
574 +- uuid-runtime
575 +- vim
576 +- watchdog
577 +- wget
578 +external-packages: []
579 +include-default-packages: '0'
580 +rootfs-pre-scripts:
581 +- echo "run script before do_rootfs in $IMAGE_ROOTFS"
582 +rootfs-post-scripts:
583 +- |-
584 +  # Reduce rootfs size AMAP
585 +  export PATH=/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
586 +  chroot $IMAGE_ROOTFS bash << SCRIPT_ENDOF
587 +  # Each time modify this file, change the version number below.
588 +  echo "Initramfs bullseye yaml file V-1.0.0" > /var/log/rootfs_install.log
589 +  dpkg-query -l >> /var/log/rootfs_install.log
590 +  set -x
591 +  rm -rf /boot/*
592 +  rm -rf /var/lib/* /var/cache/*
593 +  rm -rf /usr/share/man /usr/share/doc /usr/share/zoneinfo /usr/share/vim
594 +  SCRIPT_ENDOF
595 +- |-
596 +  # Set bash as default shell
597 +  ln -snf --relative $IMAGE_ROOTFS/bin/bash $IMAGE_ROOTFS/bin/sh
598 +- |-
599 +  # Update the installer script with partition size parameters
600 +  # so they don't have to be specified on the grub command line
601 +  sed -i "s/^FSZ=.*/FSZ=32/g" ${IMAGE_ROOTFS}/install
602 +  sed -i "s/^BSZ=.*/BSZ=512/g" ${IMAGE_ROOTFS}/install
603 +  sed -i "s/^RSZ=.*/RSZ=20480/g" ${IMAGE_ROOTFS}/install
604 +  sed -i "s/^VSZ=.*/VSZ=20480/g" ${IMAGE_ROOTFS}/install
605 +environments:
606 +- NO_RECOMMENDATIONS="1"
607 +- DEBIAN_FRONTEND=noninteractive
608 +debootstrap-key: ''
609 +apt-keys:
610 +- /opt/LAT/pubkey.rsa
611 -- 
612 2.30.2
613