aboutsummaryrefslogtreecommitdiff
path: root/fedora-iot
diff options
context:
space:
mode:
authorMaxim Uvarov <maxim.uvarov@linaro.org>2019-07-30 19:36:13 +0300
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2019-07-30 20:03:24 +0000
commitf4a7ccd5cdd1e64dd01f7568de36eb38ae3d866f (patch)
treeddd36f987744297dfdfcb69773d047e01d79cd0e /fedora-iot
parent5e9a7562ec9bcbba4317e223e85f737ceeb38853 (diff)
fedora-iot: add aarch64 build
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Change-Id: Ibe07e85978202aee719a63278870ae6b66b9a8de
Diffstat (limited to 'fedora-iot')
-rwxr-xr-xfedora-iot/build_fiot.sh6
-rwxr-xr-xfedora-iot/builders.sh2
-rwxr-xr-xfedora-iot/guestfish_aarch64.sh29
-rwxr-xr-xfedora-iot/guestfish_x86.sh4
4 files changed, 35 insertions, 6 deletions
diff --git a/fedora-iot/build_fiot.sh b/fedora-iot/build_fiot.sh
index 7f6387a6..e94ccb0a 100755
--- a/fedora-iot/build_fiot.sh
+++ b/fedora-iot/build_fiot.sh
@@ -2,12 +2,12 @@
set -e
-IMG="Fedora-IoT-30-20190515.1.x86_64.raw.xz"
-URL="https://dl.fedoraproject.org/pub/alt/iot/30/IoT/x86_64/images"
wget -c ${URL}/${IMG}
+
xz -d ${IMG}
+IMG=${IMG%.xz}
-sudo ./guestfish_x86.sh
+sudo ./guestfish_${MACHINE}.sh ${IMG}
echo "build complete"
diff --git a/fedora-iot/builders.sh b/fedora-iot/builders.sh
index 646059db..a5b3a7b7 100755
--- a/fedora-iot/builders.sh
+++ b/fedora-iot/builders.sh
@@ -46,7 +46,7 @@ ls
sudo ./build_fiot.sh
DEPLOY_DIR_IMAGE=`pwd`/deploy
-
+sudo chmod 777 ${DEPLOY_DIR_IMAGE}
# Note: the main job script allows to override the default value for
# BASE_URL and PUB_DEST, typically used for OE RPB builds
cat << EOF > ${WORKSPACE}/post_build_lava_parameters
diff --git a/fedora-iot/guestfish_aarch64.sh b/fedora-iot/guestfish_aarch64.sh
new file mode 100755
index 00000000..d10e74a9
--- /dev/null
+++ b/fedora-iot/guestfish_aarch64.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# requirements:
+# apt install libguestfs-tools
+
+sudo guestfish --rw -a $1 << 'EOF'
+ run
+ list-filesystems
+
+ !mkdir -p deploy
+
+ mount /dev/sda1 /
+ tar-out / - | gzip > deploy/boot_efi.tar.gz
+ umount /
+
+ mount /dev/sda2 /
+ tar-out / - | gzip > deploy/boot.tar.gz
+ umount /
+
+ mount /dev/sda3 /
+ tar-out / - | gzip > deploy/rootfs.tar.gz
+ umount /
+
+EOF
+
+cd deploy
+tar -xzf boot.tar.gz --strip-components=3 --wildcards --no-anchored 'vmlinuz*'
+tar -xzf boot.tar.gz --strip-components=3 --wildcards --no-anchored 'initramfs*'
+cd -
diff --git a/fedora-iot/guestfish_x86.sh b/fedora-iot/guestfish_x86.sh
index e271bd8a..668266b6 100755
--- a/fedora-iot/guestfish_x86.sh
+++ b/fedora-iot/guestfish_x86.sh
@@ -3,11 +3,11 @@
# requirements:
# apt install libguestfs-tools
-sudo guestfish --rw -a Fedora-IoT-30-20190515.1.x86_64.raw << 'EOF'
+sudo guestfish --rw -a $1 << 'EOF'
run
list-filesystems
mount /dev/sda1 /
- cat /loader.0/entries/ostree-1-fedora-iot.conf | sed 's/options/options gconsole=ttyS0,115200/' > /tmp/ostree-1-fedora-iot.conf
+ cat /loader.0/entries/ostree-1-fedora-iot.conf | sed 's/options/options console=ttyS0,115200/' > /tmp/ostree-1-fedora-iot.conf
copy-in /tmp/ostree-1-fedora-iot.conf /loader.0/entries/
cat /loader.0/entries/ostree-1-fedora-iot.conf