mirror of
https://github.com/rancher/os.git
synced 2025-09-16 15:09:27 +00:00
Add arm64 server support
This commit is contained in:
33
scripts/installer/BaseDockerfile.arm64
Normal file
33
scripts/installer/BaseDockerfile.arm64
Normal file
@@ -0,0 +1,33 @@
|
||||
FROM arm64v8/alpine
|
||||
# TODO: redo as cross platform, and without git etc :)
|
||||
|
||||
ARG VERSION
|
||||
ARG KERNEL_VERSION
|
||||
ENV VERSION=${VERSION}
|
||||
ENV KERNEL_VERSION=${KERNEL_VERSION}
|
||||
|
||||
# not installed atm udev, grub2, kexe-tools
|
||||
# parted: partprobe, e2fsprogs: mkfs.ext4, syslinux: extlinux&syslinux(arm64 not support in Alpine)
|
||||
# e2fsprogs-extra: chattr
|
||||
RUN apk --no-cache add parted e2fsprogs e2fsprogs-extra util-linux
|
||||
|
||||
COPY conf /scripts/
|
||||
COPY ./build/ros /bin/
|
||||
#RUN cd /bin && ln -s ./ros ./system-docker
|
||||
#OR softlink in the host one - this image should only be used when installing from ISO..
|
||||
# (except its useful for testing)
|
||||
# && ln -s /host/usr/bin/ros /bin/
|
||||
COPY kexec/dist/sbin/kexec /sbin/
|
||||
|
||||
RUN ln -s /bootiso/boot/ /dist
|
||||
|
||||
# need to make a /scripts/set-disk-partitions so that older releases can call the installer
|
||||
RUN echo "#!/bin/sh" > /scripts/set-disk-partitions \
|
||||
&& echo "echo 'set-disk-partitions deprecated'" >> /scripts/set-disk-partitions \
|
||||
&& chmod 755 /scripts/set-disk-partitions
|
||||
|
||||
# work around some really weird ros symptoms
|
||||
RUN rm -rf /sbin/poweroff /sbin/shutdown /sbin/reboot /sbin/halt /usr/sbin/poweroff /usr/sbin/shutdown /usr/sbin/reboot /usr/sbin/halt
|
||||
|
||||
ENTRYPOINT ["/bin/ros", "install"]
|
||||
|
@@ -1,19 +1,7 @@
|
||||
FROM aarch64/debian:jessie
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV ARCH arm
|
||||
FROM rancher/os-installer
|
||||
|
||||
RUN apt-get update && apt-get install -y parted git gcc make autoconf
|
||||
# TODO: separate out the elements below - so we can mix and match updates
|
||||
RUN rm /dist/ \
|
||||
&& mkdir -p /dist/
|
||||
|
||||
RUN mkdir -p /usr/local/src && \
|
||||
cd /usr/local/src && \
|
||||
git clone -b kdump/v0.14 https://git.linaro.org/people/takahiro.akashi/kexec-tools.git && \
|
||||
cd kexec-tools && ./bootstrap && ./configure && make && make install
|
||||
|
||||
COPY conf lay-down-os seed-data set-disk-partitions /scripts/
|
||||
COPY ./build/vmlinuz /dist/vmlinuz
|
||||
COPY ./build/initrd /dist/initrd
|
||||
|
||||
ARG VERSION
|
||||
ENV VERSION=${VERSION}
|
||||
|
||||
ENTRYPOINT ["/scripts/lay-down-os"]
|
||||
COPY ./boot/ /dist/
|
||||
|
@@ -9,15 +9,6 @@ BASEDOCKERFILE=./scripts/installer/BaseDockerfile.${ARCH}
|
||||
DOCKERFILE=./scripts/installer/Dockerfile.${ARCH}
|
||||
ARTIFACTS=./dist/artifacts
|
||||
|
||||
if \
|
||||
[[ "${ARCH}" != "amd64" ]] || \
|
||||
[ ! -f ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ] || \
|
||||
[ ! -f ${ARTIFACTS}/${INITRD} ]; \
|
||||
then
|
||||
echo "Skipping package-installer due to ARM/ARM64 build: ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} or ${ARTIFACTS}/${INITRD} not found"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# build kexec
|
||||
pushd .
|
||||
cd scripts/installer/kexec
|
||||
|
@@ -13,15 +13,6 @@ CHECKSUM=iso-checksums.txt
|
||||
mkdir -p ${CD}/boot/isolinux
|
||||
mkdir -p ${CD}/rancheros
|
||||
|
||||
if \
|
||||
[[ "${ARCH}" != "amd64" ]] || \
|
||||
[ ! -f ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ] || \
|
||||
[ ! -f ${ARTIFACTS}/${INITRD} ]; \
|
||||
then
|
||||
echo "Skipping package-iso due to ARM/ARM64 build: ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} or ${ARTIFACTS}/${INITRD} not found"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cp ${ARTIFACTS}/${INITRD} ${CD}/boot
|
||||
|
||||
# TODO: these move to os-kernel
|
||||
@@ -39,7 +30,7 @@ cp /usr/lib/syslinux/modules/bios/ldlinux.c32 ${CD}/boot/isolinux/
|
||||
cp /usr/lib/syslinux/modules/bios/*.c32 ${CD}/boot/isolinux/
|
||||
# add the installer image to the iso for non-network / dev/test
|
||||
cp ${ARTIFACTS}/installer.tar ${CD}/rancheros/
|
||||
cp ${ARTIFACTS}/Dockerfile.amd64 ${CD}/rancheros/
|
||||
cp ${ARTIFACTS}/Dockerfile.${ARCH} ${CD}/rancheros/
|
||||
gzip ${CD}/rancheros/installer.tar
|
||||
cd ${CD} && xorriso \
|
||||
-as mkisofs \
|
||||
|
Reference in New Issue
Block a user