Skip to content

Commit 261e5e9

Browse files
committed
Making RCD compatible with ARM support
Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com>
1 parent 6674bd9 commit 261e5e9

5 files changed

Lines changed: 132 additions & 3 deletions

File tree

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
image:
2+
name: rcd10-default-x86_64
3+
version: "1.0.0"
4+
5+
target:
6+
os: redhat-compatible-distro # Target OS name
7+
dist: rcd10 # Target OS distribution
8+
arch: x86_64 # Target OS architecture
9+
imageType: raw # Image type, valid value: [raw, iso].
10+
11+
disk:
12+
name: Default_Raw # 1:1 mapping to the systemConfigs name
13+
artifacts:
14+
-
15+
type: raw # image file format
16+
compression: gz # image compression format (optional)
17+
size: 4GiB # 4G, 4GB, 4096 MiB also valid. (Required for raw)
18+
partitionTableType: gpt # Partition table type, valid value: [gpt, mbr]
19+
partitions: # Required for raw, optional for ISO, not needed for rootfs.
20+
- id: boot
21+
type: esp
22+
flags:
23+
- esp
24+
- boot
25+
start: 1MiB
26+
end: 513MiB
27+
fsType: fat32
28+
mountPoint: /boot/efi
29+
mountOptions: umask=0077
30+
31+
- id: rootfs
32+
type: linux-root-amd64
33+
start: 513MiB
34+
end: 2561MiB # 513MiB + 2GiB (2048MiB) = 2561MiB
35+
fsType: ext4
36+
mountPoint: /
37+
mountOptions: defaults, ro
38+
39+
- id: roothashmap
40+
type: linux
41+
start: 2561MiB
42+
end: 3061MiB # 2561MiB + 500MiB = 3061MiB
43+
fsType: ext4
44+
mountPoint: none
45+
46+
- id: userdata
47+
type: linux
48+
start: 3061MiB
49+
end: "0" # 2561MiB + 2GiB (2048MiB) = 4609MiB
50+
fsType: ext4
51+
mountPoint: /opt
52+
53+
systemConfig:
54+
name: Default_Raw
55+
description: Default yml configuration for raw image
56+
57+
bootloader:
58+
bootType: efi # (efi or legacy)
59+
provider: systemd-boot # (grub for efi and legacy mode, or systemd-boot for efi mode)
60+
61+
immutability:
62+
enabled: true # default is true
63+
64+
packages:
65+
- filesystem
66+
- kernel
67+
- azurelinux-release
68+
# hyperv packages
69+
- dracut-hyperv
70+
- hyperv-daemons
71+
# core image packages
72+
- shim
73+
- systemd-boot
74+
- systemd-ukify
75+
- ca-certificates
76+
- cronie-anacron
77+
- logrotate
78+
- core-packages-base-image
79+
- dracut-hostonly
80+
- dracut-vrf
81+
- initramfs
82+
- shadow-utils
83+
# ssh-server
84+
- openssh-server
85+
# cloud-init packages
86+
- cloud-init
87+
- cloud-utils-growpart
88+
# virt guest packages
89+
- dracut-virtio
90+
- dracut-xen
91+
- veritysetup
92+
93+
additionalFiles:
94+
- local: ../additionalfiles/99-dhcp-en.network
95+
final: /etc/systemd/network/99-dhcp-en.network
96+
97+
kernel:
98+
name: kernel
99+
cmdline: "console=ttyS0,115200 console=tty0 loglevel=7"
100+
enableExtraModules: "usbcore usb-common"
101+
packages:
102+
- kernel
103+
uki: true
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# RCD 10.0 Repository Configuration
2+
name: "RCD 10.0 Repository"
3+
type: "rpm" # Repository type: rpm or deb
4+
baseURL: "https://mirror.stream.centos.org/10-stream/BaseOS/{arch}/os"
5+
component: "rcd-10.0-base" # Repository component/section identifier
6+
gpgCheck: true # Re-enabled with correct GPG key
7+
repoGPGCheck: true # Re-enabled with correct GPG key
8+
enabled: true
9+
gpgKey: "repodata/repomd.xml.key" # Relative path from resolved repository URL
10+
# For RPM-based repositories, we use the baseURL pattern
11+
# The actual repository URL is constructed as: {baseURL}/{arch}/
12+
# Repodata is accessed at: {baseURL}/{arch}/repodata/repomd.xml
13+
buildPath: "./builds/rcd10" # Will be replaced with temp_dir/builds/rcd10 at runtime

config/osv/redhat-compatible-distro/rcd10/providerconfigs/repo.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# RCD 10.0 Repository Configuration
22
name: "RCD 10.0 Repository"
33
type: "rpm" # Repository type: rpm or deb
4-
baseURL: "https://packages.microsoft.com/azurelinux/3.0/prod/base/{arch}"
5-
component: "azl3.0-base" # Repository component/section identifier
4+
baseURL: "https://mirror.stream.centos.org/10-stream/BaseOS/{arch}/os"
5+
component: "rcd-10.0-base" # Repository component/section identifier
66
gpgCheck: true # Re-enabled with correct GPG key
77
repoGPGCheck: true # Re-enabled with correct GPG key
88
enabled: true
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# RCD 10.0 Repository Configuration
2+
name: "RCD 10.0 Repository"
3+
type: "rpm" # Repository type: rpm or deb
4+
baseURL: "https://mirror.stream.centos.org/10-stream/BaseOS/{arch}/os"
5+
component: "rcd-10.0-base" # Repository component/section identifier
6+
gpgCheck: true # Re-enabled with correct GPG key
7+
repoGPGCheck: true # Re-enabled with correct GPG key
8+
enabled: true
9+
gpgKey: "repodata/repomd.xml.key" # Relative path from resolved repository URL
10+
# For RPM-based repositories, we use the baseURL pattern
11+
# The actual repository URL is constructed as: {baseURL}/{arch}/
12+
# Repodata is accessed at: {baseURL}/{arch}/repodata/repomd.xml
13+
buildPath: "./builds/rcd10" # Will be replaced with temp_dir/builds/rcd10 at runtime

internal/provider/rcd/rcd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ func (p *RCD) downloadImagePkgs(template *config.ImageTemplate) error {
272272
// loadRepoConfigFromYAML loads repository configuration from centralized YAML config
273273
func loadRepoConfigFromYAML(dist, arch string) (rpmutils.RepoConfig, error) {
274274
// Load the centralized provider config
275-
providerConfigs, err := config.LoadProviderRepoConfig(OsName, dist)
275+
providerConfigs, err := config.LoadProviderRepoConfig(OsName, dist, arch)
276276
if err != nil {
277277
return rpmutils.RepoConfig{}, fmt.Errorf("failed to load provider repo config: %w", err)
278278
}

0 commit comments

Comments
 (0)