Commit 1d8408e5 authored by Angus Ainslie's avatar Angus Ainslie

build-image : add a build type so that ci and unstable images can be built

parent e8b30290
# SPDX-License-Identifier: GPL-3.0+
BOARD=imx6
TYPE=unstable
IMAGE=$(BOARD).img
TARBALL=$(BOARD).tar.xz
COMPRESSED=$(IMAGE).xz
......@@ -16,7 +17,7 @@ DEPS=\
all: $(CHECKSUM)
tmp/$(IMAGE).stamp $(IMAGE) $(TARBALL): $(DEPS)
./build-image -b $(BOARD)
./build-image -b $(BOARD) -T $(TYPE)
touch tmp/$(IMAGE).stamp
%.img.xz: %.img tmp/%.img.stamp
......@@ -36,6 +37,6 @@ check:
publish: $(CHECKSUM)
bin/sign-checksum
bin/publish
bin/publish -T ${TYPE}
.PHONY: all publish
......@@ -9,8 +9,35 @@ set -e
DATE=$(date --iso)
REMOTE=librem5@storage.puri.sm
TARGET="librem5/binaries/unstable/$DATE"
BUILD_TYPE="unstable"
usage() {
echo "Usage : $1 "
echo " -T build type [ci|unstable]"
}
while getopts ":hb:t:o:" opt; do
case ${opt} in
T)
BUILD_TYPE=$OPTARG
echo "Build type : ${BUILD_TYPE}"
;;
\?)
echo "Invalid Option: -$OPTARG" 1>&2
usage "$0"
exit 0
;;
h )
usage "$0"
exit 0
;;
esac
done
TARGET="librem5/binaries/${BUILD_TYPE}/${DATE}"
shift "$((OPTIND-1))"
echo "Uploading to ${REMOTE}:${TARGET}"
ssh -p 3376 ${REMOTE} "mkdir -p ${TARGET}/files"
......
......@@ -22,7 +22,7 @@ usage() {
echo " -T build type [ci|unstable]"
}
while getopts ":hb:t:o:" opt; do
while getopts ":hb:t:o:T:" opt; do
case ${opt} in
b)
BUILD_NUMBER=$OPTARG
......
......@@ -13,6 +13,7 @@ usage() {
echo " -h Display this help message."
echo " -b [imx6|imx8|qemu-x86_64] select the board type."
echo " -d <distro> optional select the puros distro"
echo " -T [ci|unstable] use the artifacts from this build for the image"
}
......@@ -49,11 +50,11 @@ cwd=$(pwd)
distro=${DIST:-buster}
mirror=${MIRROR:-"http://deb.debian.org/debian"}
pureos_board=imx6
kernel_url=https://storage.puri.sm/librem5/binaries/unstable/latest/files/
build_type=unstable
NULL=
uboot_bin=
while getopts ":hb:d:" opt; do
while getopts ":hb:d:T:" opt; do
case ${opt} in
b)
pureos_board=$OPTARG
......@@ -61,6 +62,9 @@ while getopts ":hb:d:" opt; do
d)
distro=$OPTARG
;;
T)
build_type=$OPTARG
;;
\?)
echo "Invalid Option: -$OPTARG" 1>&2
usage "$0"
......@@ -73,12 +77,13 @@ while getopts ":hb:d:" opt; do
esac
done
kernel_url=https://storage.puri.sm/librem5/binaries/${build_type}/latest/files/
bootimg="${pureos_board}.img"
. conf/board
. conf/packages
echo "Building ${bootimg} (board_type: ${board_type}, arch: ${arch})"
echo "Building ${bootimg} (board_type: ${board_type}, arch: ${arch}, build_type: ${build_type})"
echo "Installing extra packages ${packages}"
mkdir -p tmp/ files/
......
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