narga_64
09/28/2024, 9:36 PMAnswer Overflow
09/28/2024, 9:36 PMgmpinder
09/29/2024, 12:06 AMgmpinder
09/29/2024, 12:07 AMgmpinder
09/29/2024, 12:07 AMnarga_64
09/29/2024, 5:13 PMpodman build --arch am64 first, on an x86 machine using qemu. Let's see if that can produce anything and then I'll need to go from there.
One of the main culprits for ARM is the bootloader currently since usually ARM SBCs like Raspberry Pi and others don't support UEFI.gmpinder
09/29/2024, 5:14 PMnarga_64
09/29/2024, 5:32 PMgmpinder
09/29/2024, 5:33 PMgmpinder
09/29/2024, 5:33 PMnarga_64
09/29/2024, 5:34 PMgmpinder
09/29/2024, 8:11 PMgmpinder
09/29/2024, 8:11 PMgmpinder
09/29/2024, 8:12 PMnarga_64
09/30/2024, 3:22 PMlinux/arm64 versus just arm64) Is this considered best practice?
If so, I'll try to use --platform in my test builds as wellaprilbellz
09/30/2024, 4:01 PM❯ podman build --help | grep arch
--arch string set the ARCH of the image to the provided value instead of the architecture of the host (default "amd64")
--dns-search strings set custom DNS search domains
--platform OS/ARCH[/VARIANT] set the OS/ARCH[/VARIANT] of the image to the provided value instead of the current operating system and architecture of the host (for example "linux/arm") (default [linux/amd64])aprilbellz
09/30/2024, 4:02 PMaprilbellz
09/30/2024, 4:02 PMaprilbellz
09/30/2024, 4:03 PM❯ podman run --platform linux/aarch64 --rm hello-world
exec /usr/local/bin/podman_hello_world: exec format error
❯ podman run --arch aarch64 --rm hello-world
exec /usr/local/bin/podman_hello_world: exec format errornarga_64
09/30/2024, 5:47 PM--platform linux/aarch64 is the same as --arch aarch64 if your host is Linux 😄narga_64
09/30/2024, 6:00 PMaprilbellz
09/30/2024, 6:09 PM--platform linux/* could be the best thing to use due to it being technically portable between OSesaprilbellz
09/30/2024, 6:09 PMaprilbellz
09/30/2024, 6:09 PMaprilbellz
09/30/2024, 6:11 PMpodman run --name $CONTAINER localhost:$BUILT_IMAGE /bin/false then podman save $CONTAINER > test.tar and push it into github artifactsaprilbellz
09/30/2024, 6:12 PMaprilbellz
09/30/2024, 6:12 PMaprilbellz
09/30/2024, 6:13 PMaprilbellz
09/30/2024, 6:13 PMARCH to aarch64?narga_64
09/30/2024, 6:18 PMnarga_64
09/30/2024, 6:19 PMbuild-container-installer 😅aprilbellz
09/30/2024, 6:26 PMaprilbellz
09/30/2024, 6:29 PMaprilbellz
09/30/2024, 6:29 PMaprilbellz
09/30/2024, 6:29 PMnarga_64
09/30/2024, 6:30 PMnarga_64
09/30/2024, 6:31 PMnarga_64
09/30/2024, 6:33 PMaprilbellz
09/30/2024, 6:33 PMaprilbellz
09/30/2024, 6:33 PMaprilbellz
09/30/2024, 6:33 PMnarga_64
09/30/2024, 6:34 PMaprilbellz
09/30/2024, 6:35 PMgrub2-efi-aa64-cdboot package in its reposaprilbellz
09/30/2024, 6:36 PMaprilbellz
09/30/2024, 6:36 PMnarga_64
09/30/2024, 6:37 PMaprilbellz
09/30/2024, 6:38 PMaprilbellz
09/30/2024, 6:38 PMaprilbellz
09/30/2024, 6:38 PMaprilbellz
09/30/2024, 6:39 PMimg approachnarga_64
09/30/2024, 6:40 PMnarga_64
09/30/2024, 6:40 PMaprilbellz
09/30/2024, 6:40 PMaprilbellz
09/30/2024, 6:42 PMnarga_64
09/30/2024, 6:44 PMaprilbellz
09/30/2024, 6:45 PMsystemd tag in dracut.confaprilbellz
09/30/2024, 6:45 PMaprilbellz
09/30/2024, 6:45 PMaprilbellz
09/30/2024, 6:45 PMaprilbellz
09/30/2024, 6:45 PMaprilbellz
09/30/2024, 6:45 PMaprilbellz
09/30/2024, 6:46 PMadd_dracutmodules += " systemd "aprilbellz
09/30/2024, 6:46 PMnarga_64
09/30/2024, 6:46 PMnarga_64
09/30/2024, 6:48 PMaprilbellz
09/30/2024, 6:48 PMnarga_64
09/30/2024, 6:50 PMaprilbellz
09/30/2024, 7:10 PMsh
# include the systemd-repart, dracut configuration, uboot-tools and devicetree in the base image (also generate the initramfs from there)
apt install -y util-linux bubblewrap podman
IMAGE=ghcr.io/youruser/yourimage:latest
CONTAINER=tmpcontainer
DISKIMAGE=diskimage.img
podman run --name $CONTAINER $IMAGE /bin/true
podman export $CONTAINER -o export.tar
mkdir -p rootfs/boot
tar -xvf export.tar -C rootfs
qemu-img create -f raw $DISKIMAGE $(du -sh export.tar | cut -d" " -f1)
rm export.tar
sfdisk $DISKIMAGE <<EOF
label: gpt
unit: sectors
first-lba: 64
name=spl, start=64, size=16320, type=8DA63339-0007-60C0-C436-083AC8230908
name=uboot, start=16384, size=16384, type=8DA63339-0007-60C0-C436-083AC8230908
name=boot, start=32768, size=2GiB, type=BC13C2FF-59E6-4262-A352-B275FD6F7172, bootable, attrs="LegacyBIOSBootable"
name=root
EOF
losetup -fP $DISKIMAGE
mkfs.vfat -L BOOT /dev/loop(IDK YET)p(3 - for boot partition)
mkfs.btrfs /dev/loop(IDK)p(4 - for root partition)
mount /dev/loop(IDK)p4 /mnt
mount /dev/loop(IDK)p3 /mnt/boot
rsync -avhx rootfs/* /mnt
bwrap --dev-bind /dev /dev --proc /proc --bind /mnt / /bin/sh -c "update-uboot ; genfstab -t PARTLABEL / > /etc/fstab ; exit"
umount /mnt/boot
umount /mnt
losetup -d /dev/loop(IDK)
# then publish the artifacts to githubaprilbellz
09/30/2024, 7:10 PMaprilbellz
09/30/2024, 7:14 PMnarga_64
09/30/2024, 7:19 PM.spec files are actually quite intimidating for me 😂aprilbellz
09/30/2024, 7:20 PMaprilbellz
09/30/2024, 7:20 PMaprilbellz
09/30/2024, 7:21 PMaprilbellz
09/30/2024, 7:21 PMrpkg*, src/**/**/*.rpkg.spec and Containerfileaprilbellz
09/30/2024, 7:22 PMgmpinder
09/30/2024, 7:48 PMgmpinder
09/30/2024, 7:48 PMnarga_64
09/30/2024, 7:59 PMnarga_64
09/30/2024, 8:00 PMnarga_64
10/01/2024, 7:50 PMaprilbellz
10/02/2024, 2:42 AMgmpinder
10/03/2024, 5:57 PMgmpinder
10/03/2024, 5:57 PMnarga_64
10/03/2024, 10:54 PMnarga_64
10/03/2024, 11:04 PMgmpinder
10/04/2024, 12:06 AMgmpinder
10/04/2024, 12:06 AMRoyalOughtness
10/04/2024, 1:54 AMRoyalOughtness
10/04/2024, 1:54 AMRoyalOughtness
10/04/2024, 1:54 AMRoyalOughtness
10/04/2024, 1:55 AMgmpinder
10/04/2024, 3:47 AMgmpinder
10/04/2024, 3:47 AMbluebuildgmpinder
10/04/2024, 3:48 AMxyny
10/04/2024, 3:56 AMxyny
10/04/2024, 3:57 AMxyny
10/04/2024, 3:58 AMgmpinder
10/04/2024, 12:41 PMgmpinder
10/04/2024, 12:42 PMgmpinder
10/04/2024, 12:43 PMgmpinder
10/04/2024, 12:43 PMgmpinder
10/04/2024, 12:44 PMgmpinder
10/04/2024, 12:48 PMxyny
10/04/2024, 1:33 PMxyny
10/04/2024, 1:33 PMgmpinder
10/04/2024, 2:32 PMgmpinder
10/04/2024, 2:33 PMgmpinder
10/04/2024, 2:33 PMgmpinder
10/04/2024, 2:38 PMRoyalOughtness
10/04/2024, 5:52 PMgmpinder
10/04/2024, 5:53 PMRoyalOughtness
10/04/2024, 5:53 PMRoyalOughtness
10/04/2024, 5:53 PMgmpinder
10/04/2024, 5:54 PMgmpinder
10/04/2024, 5:54 PMcontainerfile module for an easier transferRoyalOughtness
10/04/2024, 5:54 PMRoyalOughtness
10/04/2024, 5:54 PMRoyalOughtness
10/04/2024, 5:55 PMgmpinder
10/04/2024, 5:56 PMRoyalOughtness
10/04/2024, 5:56 PMgmpinder
10/04/2024, 5:56 PMRoyalOughtness
10/04/2024, 5:56 PMgmpinder
10/04/2024, 5:56 PMRoyalOughtness
10/04/2024, 5:56 PMRoyalOughtness
10/04/2024, 5:57 PMfiftydinar
10/04/2024, 5:59 PMgmpinder
10/04/2024, 5:59 PMRoyalOughtness
10/04/2024, 6:00 PMRoyalOughtness
10/04/2024, 6:00 PMfiftydinar
10/04/2024, 6:00 PMRoyalOughtness
10/04/2024, 6:00 PMfiftydinar
10/04/2024, 6:00 PMRoyalOughtness
10/04/2024, 6:00 PMgmpinder
10/04/2024, 6:01 PMgmpinder
10/04/2024, 6:01 PMgmpinder
10/04/2024, 6:01 PMRoyalOughtness
10/04/2024, 6:01 PMgmpinder
10/04/2024, 6:03 PM