mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-24 15:56:40 +00:00
Add build info for multi-arch (i386, armel, armv6, armv7hf)
This commit is contained in:
parent
40d9a47a2e
commit
679691711d
@ -35,4 +35,4 @@ ENV SOURCE_DIR /source
|
|||||||
ENV DEST_DIR /dest
|
ENV DEST_DIR /dest
|
||||||
|
|
||||||
COPY build.sh /
|
COPY build.sh /
|
||||||
CMD ./build.sh
|
CMD bash -ex build.sh
|
||||||
|
@ -5,21 +5,43 @@ set -o pipefail
|
|||||||
|
|
||||||
date=$(date +'%Y%m%d' -u)
|
date=$(date +'%Y%m%d' -u)
|
||||||
REPO='resin/amd64-supervisor-base'
|
REPO='resin/amd64-supervisor-base'
|
||||||
|
# MACHINE_LIST: generic-x86-64 generic-x86 generic-armv6 generic-armv7hf generic-armv5
|
||||||
|
# MACHINE_LIST should be set in jenkins config
|
||||||
|
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
rm -rf dest
|
rm -rf dest
|
||||||
mkdir dest
|
mkdir dest
|
||||||
|
|
||||||
docker build -t supervisor-base-builder .
|
docker build -t supervisor-base-builder .
|
||||||
docker run --rm \
|
for machine in $MACHINE_LIST; do
|
||||||
-v `pwd`:/source \
|
case "$device" in
|
||||||
-v `pwd`/dest:/dest \
|
'generic-x86-64')
|
||||||
supervisor-base-builder
|
REPO='resin/amd64-supervisor-base'
|
||||||
if [ -f dest/rootfs.tar.gz ]; then
|
;;
|
||||||
docker import dest/rootfs.tar.gz $REPO:$date
|
'generic-x86')
|
||||||
docker tag -f $REPO:$date $REPO:latest
|
REPO='resin/i386-supervisor-base'
|
||||||
docker push $REPO
|
;;
|
||||||
else
|
'generic-armv6')
|
||||||
echo "rootfs is missing!"
|
REPO='resin/armv6-supervisor-base'
|
||||||
exit 1
|
;;
|
||||||
fi
|
'generic-armv7hf')
|
||||||
|
REPO='resin/armv7hf-supervisor-base'
|
||||||
|
;;
|
||||||
|
'generic-armv5')
|
||||||
|
REPO='resin/armel-supervisor-base'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
docker run --rm \
|
||||||
|
-e TARGET_MACHINE=$machine \
|
||||||
|
-v `pwd`:/source \
|
||||||
|
-v `pwd`/dest:/dest \
|
||||||
|
supervisor-base-builder
|
||||||
|
if [ -f dest/rootfs.tar.gz ]; then
|
||||||
|
docker import dest/rootfs.tar.gz $REPO:$date
|
||||||
|
docker tag -f $REPO:$date $REPO:latest
|
||||||
|
docker push $REPO
|
||||||
|
else
|
||||||
|
echo "rootfs is missing!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
@ -8,6 +8,5 @@ mkdir -p $BUILD_DIR
|
|||||||
cp -r $SOURCE_DIR/* $BUILD_DIR/
|
cp -r $SOURCE_DIR/* $BUILD_DIR/
|
||||||
cd $BUILD_DIR
|
cd $BUILD_DIR
|
||||||
source oe-core/oe-init-build-env build bitbake
|
source oe-core/oe-init-build-env build bitbake
|
||||||
bitbake core-image-minimal
|
MACHINE=$TARGET_MACHINE bitbake core-image-minimal
|
||||||
qemu=$(cat conf/local.conf | grep '^MACHINE ??= ' | grep -o '"[^"]\+"' | tr -d '"')
|
cp --dereference tmp-glibc/deploy/images/$TARGET_MACHINE/core-image-minimal-$TARGET_MACHINE.tar.gz $DEST_DIR/rootfs.tar.gz
|
||||||
cp --dereference tmp/deploy/images/$qemu/core-image-minimal-$qemu.tar.gz $DEST_DIR/rootfs.tar.gz
|
|
||||||
|
@ -29,7 +29,7 @@ PREFERRED_PROVIDER_virtual/kernel="linux-dummy"
|
|||||||
#MACHINE ?= "qemux86-64"
|
#MACHINE ?= "qemux86-64"
|
||||||
#
|
#
|
||||||
# This sets the default machine to be qemux86 if no other machine is selected:
|
# This sets the default machine to be qemux86 if no other machine is selected:
|
||||||
MACHINE ??= "qemux86"
|
# MACHINE ??= ""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Where to place downloads
|
# Where to place downloads
|
||||||
@ -220,5 +220,6 @@ PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
|
|||||||
CONF_VERSION = "1"
|
CONF_VERSION = "1"
|
||||||
|
|
||||||
IMAGE_INSTALL_append += " ca-certificates nodejs btrfs-tools rsync"
|
IMAGE_INSTALL_append += " ca-certificates nodejs btrfs-tools rsync"
|
||||||
VIRTUAL-RUNTIME_init_manager = "busybox"
|
VIRTUAL-RUNTIME_init_manager="busybox"
|
||||||
VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
|
VIRTUAL-RUNTIME_dev_manager="busybox-mdev"
|
||||||
|
PREFERRED_VERSION_nodejs = "6.2.2"
|
||||||
|
5
base-image/build/conf/machine/generic-armv5.conf
Normal file
5
base-image/build/conf/machine/generic-armv5.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#@TYPE: Machine
|
||||||
|
#@NAME: Generic armv5te machine
|
||||||
|
#@DESCRIPTION: Machine configuration for armv5te based boards
|
||||||
|
|
||||||
|
require conf/machine/include/arm/arch-armv5.inc
|
5
base-image/build/conf/machine/generic-armv6.conf
Normal file
5
base-image/build/conf/machine/generic-armv6.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#@TYPE: Machine
|
||||||
|
#@NAME: Generic armv6 machine
|
||||||
|
#@DESCRIPTION: Machine configuration for armv6 based boards
|
||||||
|
|
||||||
|
require conf/machine/include/arm/arch-armv6.inc
|
5
base-image/build/conf/machine/generic-armv7hf.conf
Normal file
5
base-image/build/conf/machine/generic-armv7hf.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#@TYPE: Machine
|
||||||
|
#@NAME: Generic armv7a hard float machine
|
||||||
|
#@DESCRIPTION: Machine configuration for armv7a based boards
|
||||||
|
|
||||||
|
require conf/machine/include/arm/arch-armv7a.inc
|
6
base-image/build/conf/machine/generic-x86-64.conf
Normal file
6
base-image/build/conf/machine/generic-x86-64.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#@TYPE: Machine
|
||||||
|
#@NAME: common_pc
|
||||||
|
#@DESCRIPTION: Machine configuration for running a common x86
|
||||||
|
|
||||||
|
DEFAULTTUNE ?= "core2-64"
|
||||||
|
require conf/machine/include/tune-core2.inc
|
5
base-image/build/conf/machine/generic-x86.conf
Normal file
5
base-image/build/conf/machine/generic-x86.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#@TYPE: Machine
|
||||||
|
#@NAME: common_pc
|
||||||
|
#@DESCRIPTION: Machine configuration for running a common x86
|
||||||
|
|
||||||
|
require conf/machine/include/tune-i586.inc
|
Loading…
Reference in New Issue
Block a user