mirror of
https://github.com/rancher/os.git
synced 2025-08-01 15:08:47 +00:00
Merge pull request #1570 from SvenDowideit/0.8.0-rpi-fixes
0.8.0 rpi fixes
This commit is contained in:
commit
99267f0cce
@ -76,7 +76,7 @@ ARG DFS_IMAGE=${OS_REPO}/docker:v${DOCKER_VERSION}-2
|
|||||||
|
|
||||||
ARG OS_BASE_URL_amd64=https://github.com/rancher/os-base/releases/download/v2016.08.1-2/os-base_amd64.tar.xz
|
ARG OS_BASE_URL_amd64=https://github.com/rancher/os-base/releases/download/v2016.08.1-2/os-base_amd64.tar.xz
|
||||||
ARG OS_BASE_URL_arm64=https://github.com/rancher/os-base/releases/download/v2016.08.1-2/os-base_arm64.tar.xz
|
ARG OS_BASE_URL_arm64=https://github.com/rancher/os-base/releases/download/v2016.08.1-2/os-base_arm64.tar.xz
|
||||||
ARG OS_BASE_URL_arm=https://github.com/rancher/os-base/releases/download/v2016.08.1-2/os-base_arm.tar.xz
|
ARG OS_BASE_URL_arm=https://github.com/rancher/os-base/releases/download/v2016.08.1-3/os-base_arm.tar.xz
|
||||||
######################################################
|
######################################################
|
||||||
|
|
||||||
# Set up environment and export all ARGS as ENV
|
# Set up environment and export all ARGS as ENV
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
FROM debian:jessie
|
FROM rancher/os-debianconsole-base
|
||||||
|
# FROM amd64=debian:jessie arm64=aarch64/debian:jessie arm=armhf/debian:jessie
|
||||||
|
|
||||||
ENV DAPPER_RUN_ARGS --privileged
|
ENV DAPPER_RUN_ARGS --privileged
|
||||||
ENV DAPPER_OUTPUT dist
|
ENV DAPPER_OUTPUT dist
|
||||||
RUN apt-get update -y
|
RUN apt-get update -y
|
||||||
@ -10,12 +12,14 @@ RUN mkdir -p /source/assets
|
|||||||
RUN curl -fL https://releases.rancher.com/os/latest/rootfs_arm.tar.gz > /source/assets/rootfs_arm.tar.gz
|
RUN curl -fL https://releases.rancher.com/os/latest/rootfs_arm.tar.gz > /source/assets/rootfs_arm.tar.gz
|
||||||
#COPY rootfs_arm.tar.gz /source/assets/rootfs_arm.tar.gz
|
#COPY rootfs_arm.tar.gz /source/assets/rootfs_arm.tar.gz
|
||||||
|
|
||||||
# 4.4.27-hypriotos-v7+
|
|
||||||
# see https://packagecloud.io/Hypriot/rpi/?filter=debs
|
# see https://packagecloud.io/Hypriot/rpi/?filter=debs
|
||||||
ENV URL=https://packagecloud.io/Hypriot/rpi/packages/debian/jessie/
|
ENV URL=https://packagecloud.io/Hypriot/rpi/packages/debian/jessie/
|
||||||
RUN curl -fL $URL/raspberrypi-kernel_20161028-083330_armhf.deb/download \
|
# 4.4.27-hypriotos-v7+
|
||||||
|
ENV VER=20170119-202035
|
||||||
|
|
||||||
|
RUN curl -fL ${URL}/raspberrypi-kernel_${VER}_armhf.deb/download \
|
||||||
> /source/assets/kernel.deb
|
> /source/assets/kernel.deb
|
||||||
RUN curl -fL $URL/raspberrypi-bootloader_20161028-083330_armhf.deb/download \
|
RUN curl -fL ${URL}/raspberrypi-bootloader_${VER}_armhf.deb/download \
|
||||||
> /source/assets/bootloader.deb
|
> /source/assets/bootloader.deb
|
||||||
|
|
||||||
WORKDIR /source
|
WORKDIR /source
|
||||||
|
@ -29,6 +29,8 @@ fdisk -l build/run.img
|
|||||||
ls -al build/run.img
|
ls -al build/run.img
|
||||||
|
|
||||||
# partition #1 - Type= c W95 FAT32 (LBA)
|
# partition #1 - Type= c W95 FAT32 (LBA)
|
||||||
|
losetup
|
||||||
|
losetup -f
|
||||||
losetup -d /dev/loop0 || /bin/true
|
losetup -d /dev/loop0 || /bin/true
|
||||||
losetup --offset $BOOT_PARTITION_OFFSET --sizelimit $BOOT_PARTITION_BYTES /dev/loop0 build/run.img
|
losetup --offset $BOOT_PARTITION_OFFSET --sizelimit $BOOT_PARTITION_BYTES /dev/loop0 build/run.img
|
||||||
mkfs.vfat -n RancherOS /dev/loop0
|
mkfs.vfat -n RancherOS /dev/loop0
|
||||||
|
@ -12,6 +12,7 @@ ARTIFACTS=$(pwd)/dist/artifacts
|
|||||||
mkdir -p ${ARTIFACTS}
|
mkdir -p ${ARTIFACTS}
|
||||||
|
|
||||||
if [ ! -f ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ]; then
|
if [ ! -f ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ]; then
|
||||||
|
echo "skipping package-initrd due to ARM build? (no kernel artifact)"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ BASEDOCKERFILE=./scripts/installer/BaseDockerfile.${ARCH}
|
|||||||
DOCKERFILE=./scripts/installer/Dockerfile.${ARCH}
|
DOCKERFILE=./scripts/installer/Dockerfile.${ARCH}
|
||||||
|
|
||||||
if [ ! -f $DOCKERFILE ] || [ ! -f dist/artifacts/vmlinuz-${KERNEL_VERSION} ] || [ ! -f ${INITRD} ]; then
|
if [ ! -f $DOCKERFILE ] || [ ! -f dist/artifacts/vmlinuz-${KERNEL_VERSION} ] || [ ! -f ${INITRD} ]; then
|
||||||
echo "ERROR: ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} or ${INITRD} not found"
|
echo "Skipping package-installer due to ARM build: ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} or ${INITRD} not found"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO maybe extract the creation of the syslinux cfg files
|
# TODO maybe extract the creation of the syslinux cfg files
|
||||||
|
@ -14,8 +14,8 @@ mkdir -p ${CD}/boot/isolinux
|
|||||||
mkdir -p ${CD}/rancheros
|
mkdir -p ${CD}/rancheros
|
||||||
|
|
||||||
if [ ! -f ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ] || [ ! -f ${INITRD} ]; then
|
if [ ! -f ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ] || [ ! -f ${INITRD} ]; then
|
||||||
echo "ERROR: ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} or ${INITRD} not found"
|
echo "Skipping package-iso due to ARM build: ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} or ${INITRD} not found"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp ${INITRD} ${CD}/boot
|
cp ${INITRD} ${CD}/boot
|
||||||
|
Loading…
Reference in New Issue
Block a user