Commit 14c0a5fc authored by Josua Mayer's avatar Josua Mayer

runme: allow debian version choice

parent ec5d3494
...@@ -20,11 +20,15 @@ BUILDROOT_VERSION=2020.02.1 ...@@ -20,11 +20,15 @@ BUILDROOT_VERSION=2020.02.1
: ${SHALLOW:=false} : ${SHALLOW:=false}
: ${SECURE:=false} : ${SECURE:=false}
: ${ATF_DEBUG:=false} : ${ATF_DEBUG:=false}
# Distribution for rootfs
# - ubuntu
# - debian
: ${DISTRO:=ubuntu} : ${DISTRO:=ubuntu}
# Ubuntu Version # Ubuntu Version
# - focal (20.04) # - focal (20.04)
# - jammy (22.04) # - jammy (22.04)
: ${UBUNTU_VERSION:=focal} : ${UBUNTU_VERSION:=focal}
: ${DEBIAN_VERSION:=bullseye}
: ${BR2_PRIMARY_SITE:=} # custom buildroot mirror : ${BR2_PRIMARY_SITE:=} # custom buildroot mirror
if [ "x$SHALLOW" == "xtrue" ]; then if [ "x$SHALLOW" == "xtrue" ]; then
...@@ -329,6 +333,12 @@ EOF ...@@ -329,6 +333,12 @@ EOF
fi fi
if [[ ! -f $ROOTDIR/build/debian-bullseye.ext4 ]] && [ "x$DISTRO" == "xdebian" ]; then if [[ ! -f $ROOTDIR/build/debian-bullseye.ext4 ]] && [ "x$DISTRO" == "xdebian" ]; then
if [[ $DEBIAN_VERSION == bullseye ]]; then
:
else
echo "Error: Unsupported Debian Version \"\${DEBIAN_VERSION}\"! To proceed please add support to runme.sh."
exit 1
fi
cd $ROOTDIR/build cd $ROOTDIR/build
mkdir -p debian mkdir -p debian
cd debian cd debian
...@@ -368,8 +378,8 @@ case "\$1" in ...@@ -368,8 +378,8 @@ case "\$1" in
mkdir -p /mnt/var/cache/apt mkdir -p /mnt/var/cache/apt
mount -t tmpfs tmpfs /mnt/var/lib/apt/ mount -t tmpfs tmpfs /mnt/var/lib/apt/
mount -t tmpfs tmpfs /mnt/var/cache/apt/ mount -t tmpfs tmpfs /mnt/var/cache/apt/
debootstrap --no-check-certificate --verbose --arch arm64 --cache-dir=/tmp/cache --include=fdisk,e2fsprogs,isc-dhcp-client,ntpdate,sudo bullseye /mnt debootstrap --no-check-certificate --verbose --arch arm64 --cache-dir=/tmp/cache --include=fdisk,e2fsprogs,isc-dhcp-client,ntpdate,sudo "${DEBIAN_VERSION}" /mnt
#debootstrap --no-check-certificate --verbose --arch arm64 --cache-dir=/tmp/cache --include=locales,less,wget,procps,openssh-server,ifupdown,net-tools,isc-dhcp-client,ntpdate,lm-sensors,i2c-tools,psmisc,sudo,htop,iproute2,iputils-ping,kmod,network-manager,iptables,rng-tools,apt-utils bullseye /mnt #debootstrap --no-check-certificate --verbose --arch arm64 --cache-dir=/tmp/cache --include=locales,less,wget,procps,openssh-server,ifupdown,net-tools,isc-dhcp-client,ntpdate,lm-sensors,i2c-tools,psmisc,sudo,htop,iproute2,iputils-ping,kmod,network-manager,iptables,rng-tools,apt-utils "${DEBIAN_VERSION}" /mnt
cat /proc/net/pnp > /mnt/etc/resolv.conf cat /proc/net/pnp > /mnt/etc/resolv.conf
echo "localhost" > /mnt/etc/hostname echo "localhost" > /mnt/etc/hostname
echo "127.0.0.1 localhost" > /mnt/etc/hosts echo "127.0.0.1 localhost" > /mnt/etc/hosts
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment