Commit 76629628 authored by Guido Gunther's avatar Guido Gunther

Work toward arm64 image

vmdebootstrap wants UEFI for arm64 and we can use the Debian kernel when we
only run in qemu.
parent ff0f603b
......@@ -70,31 +70,33 @@ echo "Installing extra packages ${packages}"
mkdir -p tmp/ files/
echo -n > files/meta.yml
kernel_deb=linux-image-${kernel_version}_${kernel_arch}.deb
[ -f "files/${kernel_deb}" ] || wget -Pfiles/ "${kernel_url}/${kernel_deb}"
if [ -n "${kernel_deb}" -a ! -f "files/${kernel_deb}" ]; then
wget -Pfiles/ "${kernel_url}/${kernel_deb}"
fi
[ "${board_type}" != "nitrogen6" ] || fetch_nitrogen_uboot_upgrade ${pureos_board} ${kernel_url} files/
sudo pureos_board=${pureos_board} distro=${distro} packages="${packages}" \
http_proxy=${http_apt_proxy:-${http_proxy:-}} \
https_proxy=${https_apt_proxy:-${https_proxy:-}} vmdebootstrap \
--enable-dhcp --no-kernel \
--verbose --image $bootimg --log tmp/$bootimg.log --size 3G \
--bootoffset 1M \
sudo pureos_board=${pureos_board} \
distro=${distro} \
packages="${packages}" \
http_proxy=${http_apt_proxy:-${http_proxy:-}} \
https_proxy=${https_apt_proxy:-${https_proxy:-}} \
qemu=${qemu} \
arch=${arch} \
vmdebootstrap \
--enable-dhcp \
--verbose --image $bootimg --log tmp/$bootimg.log --size 10G \
--no-extlinux \
--mirror "${mirror}" \
--arch=${arch} \
--foreign=/usr/bin/qemu-arm-static \
--configure-apt \
--no-extlinux \
--distribution "$distro" \
--serial-console-command "/sbin/getty -L ttymxc0 115200 vt100" \
--root-password='root' --hostname='pureos' --user=purism/purism --sudo \
--customize $cwd/root.sh \
--no-update-initramfs \
--custom-package "files/${kernel_deb}" \
--owner $(whoami) \
--bootsize 200M \
--boottype ext2 \
${vmdebootstrap_opts} \
${NULL}
echo "gitrev: $(git log --format=format:%H -1)" >> files/meta.yml
......
......@@ -6,13 +6,28 @@ case ${pureos_board} in
kernel_version=4.15.0-rc7-gffa1c3483_4.15.0-rc7-gffa1c3483-1
kernel_arch=armhf
board_type=nitrogen6
qemu=/usr/bin/qemu-arm-static
kernel_deb=linux-image-${kernel_version}_${kernel_arch}.deb
vmdebootstrap_opts="--foreign=${qemu}
--bootsize 200M
--boottype ext2
--bootoffset 1M
--custom-package "files/${kernel_deb}"
--no-kernel
--no-update-initramfs
"
;;
imx8)
arch=arm64
kernel_arch=arm64
kernel_version=4.9.51-07585-g2dc840a_4.9.51-07585-g2dc840a-2
image_options="--use-uefi"
board_type=unknown
qemu=/usr/bin/qemu-aarch64-static
kernel_deb=
vmdebootstrap_opts="--foreign=${qemu}
--use-uefi
--grub
"
;;
*)
echo "unrecognized board type ${pureos_board}"
......
......@@ -10,8 +10,8 @@
basedir=$1
image_name=$2
cwd=`pwd`
qemu="${basedir}/usr/bin/qemu-arm-static"
stamp=$basedir/var/log/gitrev.log
target_qemu="${basedir}/${qemu}"
stamp="${basedir}/var/log/gitrev.log"
for env_var in distro pureos_board packages; do
......@@ -50,7 +50,7 @@ esac
# bindmount qemu into the rootfs so we can chroot into it if needed
function setup_qemu()
{
[ -f ${qemu} ] || cp /usr/bin/qemu-arm-static "${qemu}"
[ -f ${target_qemu} ] || cp "${qemu}" "${target_qemu}"
}
......@@ -250,11 +250,14 @@ prepare_chroot
setup_qemu
setup_apt
install_pkgs
setup_kernel
setup_uboot
setup_gui
setup_journal
setup_sshd
# Skip setup until we have hardware, not needed for qemu
if [ "${pureos_board}" != "imx8" ]; then
setup_kernel
setup_uboot
fi
create_stamp
if [ -x files/local.sh ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment