1
0
mirror of https://github.com/rancher/os.git synced 2025-07-31 22:47:16 +00:00

Merge pull request #1570 from SvenDowideit/0.8.0-rpi-fixes

0.8.0 rpi fixes
This commit is contained in:
Sven Dowideit 2017-02-03 14:39:32 +10:00 committed by GitHub
commit 99267f0cce
6 changed files with 16 additions and 9 deletions

View File

@ -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_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

View File

@ -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_OUTPUT dist
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
#COPY rootfs_arm.tar.gz /source/assets/rootfs_arm.tar.gz
# 4.4.27-hypriotos-v7+
# see https://packagecloud.io/Hypriot/rpi/?filter=debs
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
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
WORKDIR /source

View File

@ -29,6 +29,8 @@ fdisk -l build/run.img
ls -al build/run.img
# partition #1 - Type= c W95 FAT32 (LBA)
losetup
losetup -f
losetup -d /dev/loop0 || /bin/true
losetup --offset $BOOT_PARTITION_OFFSET --sizelimit $BOOT_PARTITION_BYTES /dev/loop0 build/run.img
mkfs.vfat -n RancherOS /dev/loop0

View File

@ -12,6 +12,7 @@ ARTIFACTS=$(pwd)/dist/artifacts
mkdir -p ${ARTIFACTS}
if [ ! -f ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ]; then
echo "skipping package-initrd due to ARM build? (no kernel artifact)"
exit 0
fi

View File

@ -9,8 +9,8 @@ BASEDOCKERFILE=./scripts/installer/BaseDockerfile.${ARCH}
DOCKERFILE=./scripts/installer/Dockerfile.${ARCH}
if [ ! -f $DOCKERFILE ] || [ ! -f dist/artifacts/vmlinuz-${KERNEL_VERSION} ] || [ ! -f ${INITRD} ]; then
echo "ERROR: ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} or ${INITRD} not found"
exit 1
echo "Skipping package-installer due to ARM build: ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} or ${INITRD} not found"
exit 0
fi
# TODO maybe extract the creation of the syslinux cfg files

View File

@ -14,8 +14,8 @@ mkdir -p ${CD}/boot/isolinux
mkdir -p ${CD}/rancheros
if [ ! -f ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ] || [ ! -f ${INITRD} ]; then
echo "ERROR: ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} or ${INITRD} not found"
exit 1
echo "Skipping package-iso due to ARM build: ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} or ${INITRD} not found"
exit 0
fi
cp ${INITRD} ${CD}/boot