Skip to content

Commit 04cfe09

Browse files
Merge branch 'main' into kernel_version_pin
2 parents a00d348 + bd0a174 commit 04cfe09

2 files changed

Lines changed: 365 additions & 2 deletions

File tree

Lines changed: 360 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,360 @@
1+
# AI-searchable metadata for template discovery
2+
metadata:
3+
description: "Ubuntu 24.04 minimal PTL PV desktop image in raw format for Intel PTL development and validation"
4+
use_cases:
5+
- "PTL platform validation"
6+
- "Intel GPU and NPU enablement"
7+
- "desktop development"
8+
- "raw image deployment"
9+
keywords:
10+
- ptl
11+
- pv
12+
- ubuntu
13+
- raw
14+
- desktop
15+
- intel
16+
- gpu
17+
- npu
18+
19+
image:
20+
name: minimal-desktop-ubuntu-ptl-pv
21+
version: "24.04"
22+
23+
target:
24+
os: ubuntu
25+
dist: ubuntu24
26+
arch: x86_64
27+
imageType: raw
28+
29+
# Disk layout and output artifact definition
30+
disk:
31+
# Human friendly name logged by builders
32+
name: minimal-desktop-ubuntu-ptl-pv
33+
artifacts:
34+
# Request conversion to raw
35+
- type: raw
36+
compression: gz
37+
size: 16GiB
38+
# GPT partition table per installer spec
39+
partitionTableType: gpt
40+
partitions:
41+
# EFI system partition for bootloaders
42+
- id: EFI
43+
name: EFI
44+
type: esp
45+
# GPT type GUID for EFI system partition
46+
typeUUID: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
47+
fsType: vfat
48+
# Builder expects explicit MiB offsets
49+
start: 1MiB
50+
end: 1025MiB
51+
mountPoint: /boot/efi
52+
mountOptions: defaults
53+
flags:
54+
- boot
55+
- esp
56+
# Root filesystem
57+
- id: ROOT
58+
name: ROOT
59+
type: linux-root-amd64
60+
# Standard Linux root filesystem GUID for x86_64
61+
typeUUID: 4f68bce3-e8cd-4db1-96e7-fbcaf984b709
62+
fsType: ext4
63+
start: 1025MiB
64+
end: "0"
65+
mountPoint: /
66+
mountOptions: defaults
67+
flags: []
68+
69+
# Additional package repositories for this image
70+
packageRepositories:
71+
# Intel overlay repository (aligned with installer script)
72+
- codename: "noble"
73+
url: "https://download.01.org/intel-linux-overlay/ubuntu"
74+
pkey: "https://download.01.org/intel-linux-overlay/ubuntu/E6FA98203588250569758E97D176E3162086EE4C.gpg"
75+
component: "multimedia main non-free"
76+
priority: 2000
77+
78+
79+
systemConfig:
80+
name: minimal
81+
description: Minimal desktop ubuntu image for PTL
82+
83+
bootloader:
84+
bootType: efi
85+
provider: grub
86+
87+
immutability:
88+
enabled: false # default is true
89+
90+
packages:
91+
- bsdutils
92+
- cloud-utils
93+
- debianutils
94+
- diffutils
95+
- findutils
96+
- grep
97+
- grub-efi-amd64-signed
98+
- gzip
99+
- ibus-table-cangjie-big
100+
- ibus-table-cangjie3
101+
- ibus-table-cangjie5
102+
- init
103+
- language-pack-en
104+
- language-pack-en-base
105+
- language-pack-gnome-en
106+
- language-pack-gnome-en-base
107+
- libattr1
108+
- libchewing3
109+
- libchewing3-data
110+
- libm17n-0
111+
- libmarisa0
112+
- libopencc-data
113+
- libopencc1.1
114+
- libotf1
115+
- libpinyin-data
116+
- libpinyin15
117+
- linux-base
118+
- m17n-db
119+
- mawk
120+
- ncurses-base
121+
- ncurses-bin
122+
- python3-netifaces
123+
- shim-signed
124+
- ubuntu-desktop-minimal
125+
- ubuntu-minimal
126+
- ubuntu-standard
127+
- ubuntu-wallpapers
128+
- wbritish
129+
- gdm3
130+
- systemd
131+
- openssh-server
132+
- systemd-resolved
133+
- util-linux
134+
- udev
135+
- initramfs-tools
136+
- grub2-common
137+
- grub-pc-bin
138+
- grub-efi-amd64
139+
- grub-efi-amd64-bin
140+
- efibootmgr
141+
# PTL network stack
142+
- libbpf1
143+
- curl
144+
- wget
145+
- cron
146+
- ethtool
147+
- iproute2
148+
- libtbb12
149+
# PTL packages
150+
- libigfxcmrt-dev
151+
- libigfxcmrt7
152+
- vim
153+
- nano
154+
- ocl-icd-libopencl1
155+
- net-tools
156+
- gir1.2-gst-plugins-bad-1.0
157+
- gir1.2-gst-plugins-base-1.0
158+
- gir1.2-gstreamer-1.0
159+
- gir1.2-gst-rtsp-server-1.0
160+
- gstreamer1.0-alsa
161+
- gstreamer1.0-gl
162+
- gstreamer1.0-gtk3
163+
- gstreamer1.0-opencv
164+
- gstreamer1.0-plugins-bad
165+
- gstreamer1.0-plugins-bad-apps
166+
- gstreamer1.0-plugins-base
167+
- gstreamer1.0-plugins-base-apps
168+
- gstreamer1.0-plugins-good
169+
- gstreamer1.0-plugins-ugly
170+
- gstreamer1.0-pulseaudio
171+
- gstreamer1.0-qt5
172+
- gstreamer1.0-rtsp
173+
- gstreamer1.0-tools
174+
- gstreamer1.0-x
175+
- intel-media-va-driver-non-free
176+
- libdrm-amdgpu1
177+
- libdrm-common
178+
- libdrm-dev
179+
- libdrm-intel1
180+
- libdrm-nouveau2
181+
- libdrm-radeon1
182+
- libdrm-tests
183+
- libdrm2
184+
- libgstrtspserver-1.0-dev
185+
- libgstrtspserver-1.0-0
186+
- libgstreamer-gl1.0-0
187+
- libgstreamer-opencv1.0-0
188+
- libgstreamer-plugins-bad1.0-0
189+
- libgstreamer-plugins-bad1.0-dev
190+
- libgstreamer-plugins-base1.0-0
191+
- libgstreamer-plugins-base1.0-dev
192+
- libgstreamer-plugins-good1.0-0
193+
- libgstreamer-plugins-good1.0-dev
194+
- libgstreamer1.0-0
195+
- libgstreamer1.0-dev
196+
- libigdgmm-dev
197+
- libigdgmm12
198+
- libmfx-gen1.2
199+
- libtpms-dev
200+
- libtpms0
201+
- libva-dev
202+
- libva-drm2
203+
- libva-glx2
204+
- libva-wayland2
205+
- libva-x11-2
206+
- libva2
207+
- libwayland-bin
208+
- libwayland-client0
209+
- libwayland-cursor0
210+
- libwayland-dev
211+
- libwayland-doc
212+
- libwayland-egl-backend-dev
213+
- libwayland-egl1
214+
- libwayland-server0
215+
- libxatracker2
216+
- linux-firmware
217+
- mesa-utils
218+
- mesa-va-drivers
219+
- mesa-vdpau-drivers
220+
- mesa-vulkan-drivers
221+
- libvpl-dev
222+
- libvpl-tools
223+
- libmfx-gen-dev
224+
- onevpl-tools
225+
- ovmf
226+
- ovmf-ia32
227+
- qemu-block-extra
228+
- qemu-guest-agent
229+
- qemu-system
230+
- qemu-system-arm
231+
- qemu-system-common
232+
- qemu-system-data
233+
- qemu-system-gui
234+
- qemu-system-mips
235+
- qemu-system-misc
236+
- qemu-system-ppc
237+
- qemu-system-s390x
238+
- qemu-system-sparc
239+
- qemu-system-x86
240+
- qemu-user
241+
- qemu-user-binfmt
242+
- qemu-utils
243+
- va-driver-all
244+
- vainfo
245+
- weston
246+
- xserver-xorg-core
247+
- libvirt0
248+
- libvirt-clients
249+
- libvirt-daemon
250+
- libvirt-daemon-config-network
251+
- libvirt-daemon-config-nwfilter
252+
- libvirt-daemon-driver-lxc
253+
- libvirt-daemon-driver-qemu
254+
- libvirt-daemon-driver-storage-gluster
255+
- libvirt-daemon-driver-storage-iscsi-direct
256+
- libvirt-daemon-driver-storage-rbd
257+
- libvirt-daemon-driver-storage-zfs
258+
- libvirt-daemon-driver-vbox
259+
- libvirt-daemon-driver-xen
260+
- libvirt-daemon-system
261+
- libvirt-daemon-system-systemd
262+
- libvirt-dev
263+
- libvirt-doc
264+
- libvirt-login-shell
265+
- libvirt-sanlock
266+
- libvirt-wireshark
267+
- libnss-libvirt
268+
- swtpm
269+
- swtpm-tools
270+
- bmap-tools
271+
- adb
272+
- autoconf
273+
- automake
274+
- libtool
275+
- cmake
276+
- g++
277+
- gcc
278+
- git
279+
- intel-gpu-tools
280+
- libssl3
281+
- libssl-dev
282+
- make
283+
- mosquitto
284+
- mosquitto-clients
285+
- build-essential
286+
- apt-transport-https
287+
- default-jre
288+
- docker-compose
289+
- ffmpeg
290+
- git-lfs
291+
- gnuplot
292+
- lbzip2
293+
- libglew-dev
294+
- libglm-dev
295+
- libsdl2-dev
296+
- mc
297+
- openssl
298+
- pciutils
299+
- python3-pandas
300+
- python3-pip
301+
- python3-seaborn
302+
- terminator
303+
- wmctrl
304+
- wayland-protocols
305+
- gdbserver
306+
- iperf3
307+
- msr-tools
308+
- powertop
309+
- linuxptp
310+
- lsscsi
311+
- tpm2-tools
312+
- tpm2-abrmd
313+
- binutils
314+
- cifs-utils
315+
- i2c-tools
316+
- xdotool
317+
- gnupg
318+
- lsb-release
319+
- qemu-system-modules-opengl
320+
- socat
321+
- virt-viewer
322+
- spice-client-gtk
323+
- rpm
324+
# additional packages
325+
- tcpdump
326+
- usb-modeswitch
327+
- fwupd
328+
- clinfo
329+
330+
additionalFiles:
331+
- local: ../additionalfiles/ptl/01-network-manager-all.yaml
332+
final: /etc/netplan/01-network-manager-all.yaml
333+
- local: ../additionalfiles/ptl/50-cloud-init.yaml
334+
final: /etc/netplan/50-cloud-init.yaml
335+
336+
kernel:
337+
version: "6.17"
338+
cmdline: "xe.max_vfs=7 xe.force_probe=* modprobe.blacklist=i915 udmabuf.list_limit=8192 console=tty0 console=ttyS0,115200n8"
339+
enableExtraModules: "intel_vpu uas"
340+
packages:
341+
- linux-image-generic-hwe-24.04
342+
- linux-headers-generic-hwe-24.04
343+
344+
configurations:
345+
# Install Intel Graphics Compiler and compute runtime packages for PTL
346+
- cmd: "mkdir -p /tmp/gpu-packages"
347+
- cmd: "wget https://github.com/intel/intel-graphics-compiler/releases/download/v2.20.3/intel-igc-core-2_2.20.3+19972_amd64.deb -O /tmp/gpu-packages/intel-igc-core-2_2.20.3+19972_amd64.deb --no-check-certificate 2>&1 || echo 'Warning: intel-igc-core-2 download failed'"
348+
- cmd: "wget https://github.com/intel/intel-graphics-compiler/releases/download/v2.20.3/intel-igc-opencl-2_2.20.3+19972_amd64.deb -O /tmp/gpu-packages/intel-igc-opencl-2_2.20.3+19972_amd64.deb --no-check-certificate 2>&1 || echo 'Warning: intel-igc-opencl-2 download failed'"
349+
- cmd: "wget https://github.com/intel/compute-runtime/releases/download/25.40.35563.4/intel-ocloc_25.40.35563.4-0_amd64.deb -O /tmp/gpu-packages/intel-ocloc_25.40.35563.4-0_amd64.deb --no-check-certificate 2>&1 || echo 'Warning: intel-ocloc download failed'"
350+
- cmd: "wget https://github.com/intel/compute-runtime/releases/download/25.40.35563.4/intel-opencl-icd_25.40.35563.4-0_amd64.deb -O /tmp/gpu-packages/intel-opencl-icd_25.40.35563.4-0_amd64.deb --no-check-certificate 2>&1 || echo 'Warning: intel-opencl-icd download failed'"
351+
- cmd: "wget https://github.com/intel/compute-runtime/releases/download/25.40.35563.4/libze-intel-gpu1_25.40.35563.4-0_amd64.deb -O /tmp/gpu-packages/libze-intel-gpu1_25.40.35563.4-0_amd64.deb --no-check-certificate 2>&1 || echo 'Warning: libze-intel-gpu1 download failed'"
352+
- cmd: "wget https://github.com/oneapi-src/level-zero/releases/download/v1.22.4/level-zero_1.22.4+u24.04_amd64.deb -O /tmp/gpu-packages/level-zero_1.22.4+u24.04_amd64.deb --no-check-certificate 2>&1 || echo 'Warning: level-zero download failed'"
353+
- cmd: "wget https://github.com/oneapi-src/level-zero/releases/download/v1.22.4/level-zero-devel_1.22.4+u24.04_amd64.deb -O /tmp/gpu-packages/level-zero-devel_1.22.4+u24.04_amd64.deb --no-check-certificate 2>&1 || echo 'Warning: level-zero-devel download failed'"
354+
- cmd: "find /tmp/gpu-packages -maxdepth 1 -type f -name '*.deb' | xargs -r dpkg -i 2>&1 || echo 'GPU packages: some installs had issues, attempting apt-get --fix-broken-install'; apt-get install -y --fix-broken-install 2>&1 || true"
355+
# Install NPU driver for PTL
356+
- cmd: "dpkg --purge --force-remove-reinstreq intel-driver-compiler-npu intel-fw-npu intel-level-zero-npu intel-level-zero-npu-dbgsym 2>/dev/null || true"
357+
- cmd: "mkdir -p /tmp/npu-driver"
358+
- cmd: "cd /tmp/npu-driver && wget https://github.com/intel/linux-npu-driver/releases/download/v1.28.0/linux-npu-driver-v1.28.0.20251218-20347000698-ubuntu2404.tar.gz -O /tmp/npu-driver/linux-npu-driver-v1.28.0.20251218-20347000698-ubuntu2404.tar.gz --no-check-certificate"
359+
- cmd: "cd /tmp/npu-driver && tar -xf linux-npu-driver-v1.28.0.20251218-20347000698-ubuntu2404.tar.gz"
360+
- cmd: "find /tmp/npu-driver -name '*.deb' -print0 | xargs -0 dpkg -i"

internal/ospackage/debutils/resolver.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,16 +336,19 @@ func getRepositoryPriority(packageURL string) int {
336336
}
337337

338338
// Check global RepoCfgs for priority
339+
// Normalize trailing slashes before comparing, since user-supplied URLs may include them
340+
// but extractRepoBase always returns a URL without a trailing slash.
341+
repoBaseNorm := strings.TrimSuffix(repoBase, "/")
339342
if len(RepoCfgs) > 0 {
340343
for _, repoCfg := range RepoCfgs {
341-
if repoCfg.PkgPrefix == repoBase {
344+
if strings.TrimSuffix(repoCfg.PkgPrefix, "/") == repoBaseNorm {
342345
return repoCfg.Priority
343346
}
344347
}
345348
}
346349

347350
// Check single RepoCfg for backward compatibility
348-
if RepoCfg.PkgPrefix == repoBase {
351+
if strings.TrimSuffix(RepoCfg.PkgPrefix, "/") == repoBaseNorm {
349352
return RepoCfg.Priority
350353
}
351354

0 commit comments

Comments
 (0)