Commit 3188b1f7 authored by Angus Ainslie's avatar Angus Ainslie
Browse files

Merge branch 'almost-plain-builds' into 'master'

Almost plain builds

See merge request Librem5/image-builder!150
parents 9c6df7a5 b6239cd5
#!/bin/bash
#
# Copyright (C) 2017 Purism SPC
# Copyright (C) 2017-2019 Purism SPC
#
# SPDX-License-Identifier: GPL-3.0+
#
......@@ -14,7 +14,7 @@ usage() {
echo " -b [imx6|imx8|devkit|librem5|qemu-x86_64] select the board type."
echo " -d <distro> distro to use. [ amber-phone, amber-phone+ci, buster+ci ]"
# TODO: add stable and drop ci
echo " -T kernel/uboot build type (legacy/current/next)"
echo " -T kernel/uboot build type (legacy/current/next/plain)"
echo " -B build rootfs tarball as well"
}
......@@ -211,7 +211,6 @@ echo > "${meta_yml}"
if [ -n "${kernel_url}" ]; then
fetch_kernel
fetch_uboot "${uboot_type}"
for deb in files/linux-image-*-*_arm64.deb; do
! [[ "${deb}" =~ dbg ]] || continue
if [ -n "${kernel_deb}" ]; then
......@@ -224,7 +223,12 @@ if [ -n "${kernel_url}" ]; then
custom_package_opt=(--custom-package "${kernel_deb}")
fi
echo "Using kernel ${kernel_deb}"
if [ -n "${uboot_url}" ]; then
fetch_uboot "${uboot_type}"
echo "Using unpackaged uboot from ${uboot_url}"
fi
[ -z "${kernel_deb}" ] || echo "Using kernel ${kernel_deb}"
# Preserve newlines as '|'
# shellcheck disable=SC2001
......@@ -264,10 +268,6 @@ set +x
if [ "${arch}" == "arm64" ]; then
if [ ! -f "files/uboot-${uboot_type}/m4.bin" ]; then
wget -Pfiles/uboot-${uboot_type}/ "${kernel_url}/uboot-${uboot_type}/m4.bin"
fi
if [ "${want_boot_image}" == 1 ]; then
# Copy the boot image as a separate file
bootimg="${pureos_board}-boot.img"
......
......@@ -83,6 +83,11 @@ case ${pureos_board} in
kernel_url="${kernel_base}/kernel_linux-next_imx8-current-librem5/${archive_path}"
uboot_url="${uboot_base}/uboot_devkit_build/${archive_path}"
;;
plain)
board_packages=linux-image-librem5
# uboot should be a deb too:
uboot_url="${uboot_base}/uboot_devkit_build/${archive_path}"
;;
*)
echo "unknown kernel type for devkit build ${build_type}"
exit 1
......@@ -100,6 +105,7 @@ case ${pureos_board} in
--arch="${arch}"
)
board_packages="
${board_packages}
librem5-devkit-base
librem5-dev-tools
librem5-gnome-dev
......@@ -121,6 +127,11 @@ case ${pureos_board} in
kernel_url="${kernel_base}/kernel_linux-next_imx8-current-librem5/${archive_path}"
uboot_url="${uboot_base}/uboot_librem5_build/${archive_path}"
;;
plain)
board_packages=linux-image-librem5
# uboot should be a deb too:
uboot_url="${uboot_base}/uboot_librem5_build/${archive_path}"
;;
*)
echo "unknown kernel type for librem5 build ${build_type}"
exit 1
......@@ -138,6 +149,7 @@ case ${pureos_board} in
--arch="${arch}"
)
board_packages="
${board_packages}
librem5-devkit-base
"
image_size=3000
......
#!/bin/bash
#
# Copyright (C) 2017 Purism SPC
# Copyright (C) 2017-2019 Purism SPC
#
# SPDX-License-Identifier: GPL-3.0+
#
......
Supports Markdown
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