Commit d0349a93 authored by Heather Ellsworth's avatar Heather Ellsworth Committed by Guido Günther

Allow to build qemu image for x86_64

parent 10132e7a
...@@ -11,7 +11,7 @@ set -u ...@@ -11,7 +11,7 @@ set -u
usage() { usage() {
echo "Usage : $1 " echo "Usage : $1 "
echo " -h Display this help message." echo " -h Display this help message."
echo " -b [imx6|imx8|qemu] select the board type." echo " -b [imx6|imx8|qemu-x86_64] select the board type."
echo " -d <distro> optional select the puros distro" echo " -d <distro> optional select the puros distro"
} }
...@@ -81,13 +81,10 @@ sudo pureos_board="${pureos_board}" \ ...@@ -81,13 +81,10 @@ sudo pureos_board="${pureos_board}" \
http_proxy="${http_apt_proxy:-${http_proxy:-}}" \ http_proxy="${http_apt_proxy:-${http_proxy:-}}" \
https_proxy="${https_apt_proxy:-${https_proxy:-}}" \ https_proxy="${https_apt_proxy:-${https_proxy:-}}" \
qemu="${qemu}" \ qemu="${qemu}" \
arch="${arch}" \
vmdebootstrap \ vmdebootstrap \
--enable-dhcp \ --enable-dhcp \
--verbose --image "${bootimg}" --log "tmp/${bootimg}.log" --size 3900M \ --verbose --image "${bootimg}" --log "tmp/${bootimg}.log" --size 3900M \
--no-extlinux \
--mirror "${mirror}" \ --mirror "${mirror}" \
--arch=${arch} \
--configure-apt \ --configure-apt \
--distribution "$distro" \ --distribution "$distro" \
--serial-console-command "/sbin/getty -L ttymxc0 115200 vt100" \ --serial-console-command "/sbin/getty -L ttymxc0 115200 vt100" \
......
...@@ -22,6 +22,8 @@ case ${pureos_board} in ...@@ -22,6 +22,8 @@ case ${pureos_board} in
--custom-package "files/${kernel_deb}" --custom-package "files/${kernel_deb}"
--no-kernel --no-kernel
--no-update-initramfs --no-update-initramfs
--arch="${arch}"
--no-extlinux
) )
;; ;;
imx8) imx8)
...@@ -36,6 +38,23 @@ case ${pureos_board} in ...@@ -36,6 +38,23 @@ case ${pureos_board} in
--grub --grub
) )
;; ;;
qemu-x86_64)
board_type=x86
if [ -f ./bin/qemu-system-x86_64 ]; then
qemu=./bin/qemu-system-x86_64
else
qemu=/usr/bin/qemu-system-x86_64
fi
kernel_deb=linux-image-amd64_4.14+89_amd64.deb
vmdebootstrap_opts=(--bootsize 200M
--boottype ext2
--bootoffset 1M
--custom-package "files/${kernel_deb}"
--no-kernel
--no-update-initramfs
--grub
)
;;
*) *)
echo "unrecognized board type ${pureos_board}" echo "unrecognized board type ${pureos_board}"
exit 1 exit 1
......
...@@ -12,7 +12,6 @@ image_name="$2" ...@@ -12,7 +12,6 @@ image_name="$2"
target_qemu="${basedir}/${qemu}" target_qemu="${basedir}/${qemu}"
stamp="${basedir}/var/log/gitrev.log" stamp="${basedir}/var/log/gitrev.log"
for env_var in distro pureos_board packages; do for env_var in distro pureos_board packages; do
if [ -z "${!env_var}" ]; then if [ -z "${!env_var}" ]; then
echo "Must pass in \$${env_var} via the environment" 1>&2 echo "Must pass in \$${env_var} via the environment" 1>&2
...@@ -36,9 +35,7 @@ case ${pureos_board} in ...@@ -36,9 +35,7 @@ case ${pureos_board} in
imx8) imx8)
echo "board type ${pureos_board} not configured yet" echo "board type ${pureos_board} not configured yet"
;; ;;
qemu) qemu-x86_64)
echo "board type ${pureos_board} not configured yet"
exit 1
;; ;;
*) *)
echo "unrecognized board type ${pureos_board}" echo "unrecognized board type ${pureos_board}"
...@@ -264,7 +261,7 @@ setup_journal ...@@ -264,7 +261,7 @@ setup_journal
setup_sshd setup_sshd
setup_touchscreen setup_touchscreen
# Skip setup until we have hardware, not needed for qemu # Skip setup until we have hardware, not needed for qemu
if [ "${pureos_board}" != "imx8" ]; then if [ "${pureos_board}" == "imx6" ]; then
setup_kernel setup_kernel
setup_uboot setup_uboot
fi fi
......
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