mirror of
https://github.com/rancher/os.git
synced 2025-08-31 14:23:11 +00:00
dind-less, make-based build system
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
cd $(dirname $0)/..
|
||||
|
||||
source scripts/build-common
|
||||
|
||||
cp bin/rancheros ${BUILD}/initrd/init
|
||||
cp ./os-config.yml ${BUILD}/initrd/
|
||||
|
||||
cd ${BUILD}/initrd
|
||||
|
||||
if [ "--dev" = "$1" ]; then
|
||||
find | cpio -H newc -o > ${DIST}/artifacts/initrd
|
||||
cp ${DIST}/artifacts/initrd ${DIST}/artifacts/initrd.none
|
||||
else
|
||||
find | cpio -H newc -o | lzma -c > ${DIST}/artifacts/initrd
|
||||
fi
|
||||
|
||||
CD=${BUILD}/cd
|
||||
|
||||
mkdir -p ${CD}/boot/isolinux
|
||||
cp ${DIST}/artifacts/vmlinuz ${CD}/boot
|
||||
cp ${DIST}/artifacts/initrd ${CD}/boot
|
||||
cp /usr/lib/syslinux/isolinux.bin ${CD}/boot/isolinux
|
||||
cp /usr/lib/syslinux/linux.c32 ${CD}/boot/isolinux/ldlinux.c32
|
||||
|
||||
cat > ${CD}/boot/isolinux/isolinux.cfg << EOF
|
||||
default rancheros
|
||||
label rancheros
|
||||
kernel /boot/vmlinuz
|
||||
initrd /boot/initrd
|
||||
append quiet rancher.password=rancher rancher.state.autoformat=[/dev/sda,/dev/vda]
|
||||
EOF
|
||||
|
||||
cd ${CD}
|
||||
# Copied from boot2docker, thanks.
|
||||
xorriso \
|
||||
-publisher "Rancher Labs, Inc." \
|
||||
-as mkisofs \
|
||||
-l -J -R -V "RancherOS" \
|
||||
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||
-b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \
|
||||
-isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \
|
||||
-o ${DIST}/artifacts/rancheros.iso $(pwd)
|
||||
|
||||
|
||||
if [ -e ${DIST}/artficats/iso-checksums.txt ]; then
|
||||
rm ${DIST}/artficats/iso-checksums.txt
|
||||
fi
|
||||
|
||||
for algorithm in 'sha256' 'md5'; do
|
||||
for i in ${DIST}/artifacts/*iso; do
|
||||
echo "${algorithm}: $(${algorithm}sum ${i})" >> ${DIST}/artifacts/iso-checksums.txt
|
||||
done
|
||||
done
|
Reference in New Issue
Block a user