make_rootfs.sh: Make bionic image

Add an option to generate bionic image for A64-TERES. Fix
execution locale-gen.

Suggested-by: Lazar Hristov <lhristov@gmail.com>
Signed-off-by: Leon Anavi <leon@anavi.org>
This commit is contained in:
Leon Anavi 2019-03-04 10:36:21 +02:00
parent a5de952c57
commit 3f7d25e342

@ -77,6 +77,9 @@ case $DISTRO in
xenial) xenial)
ROOTFS="http://cdimage.ubuntu.com/ubuntu-base/releases/16.04.2/release/ubuntu-base-16.04.2-base-arm64.tar.gz" ROOTFS="http://cdimage.ubuntu.com/ubuntu-base/releases/16.04.2/release/ubuntu-base-16.04.2-base-arm64.tar.gz"
;; ;;
bionic)
ROOTFS="http://cdimage.ubuntu.com/ubuntu-base/releases/18.04.2/release/ubuntu-base-18.04-base-arm64.tar.gz"
;;
sid|jessie) sid|jessie)
ROOTFS="${DISTRO}-base-arm64.tar.gz" ROOTFS="${DISTRO}-base-arm64.tar.gz"
METHOD="debootstrap" METHOD="debootstrap"
@ -282,10 +285,10 @@ EOF
rm -f "$DEST/etc/resolv.conf" rm -f "$DEST/etc/resolv.conf"
mv "$DEST/etc/resolv.conf.dist" "$DEST/etc/resolv.conf" mv "$DEST/etc/resolv.conf.dist" "$DEST/etc/resolv.conf"
;; ;;
xenial|sid|jessie) xenial|bionic|sid|jessie)
rm "$DEST/etc/resolv.conf" rm "$DEST/etc/resolv.conf"
cp /etc/resolv.conf "$DEST/etc/resolv.conf" cp /etc/resolv.conf "$DEST/etc/resolv.conf"
if [ "$DISTRO" = "xenial" ]; then if [ "$DISTRO" = "xenial" -o "$DISTRO" = "bionic" ]; then
DEB=ubuntu DEB=ubuntu
DEBUSER=olimex DEBUSER=olimex
DEBUSERPW=olimex DEBUSERPW=olimex
@ -320,12 +323,12 @@ EOF
#!/bin/sh #!/bin/sh
set -ex set -ex
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
locale-gen en_US.UTF-8
$ADDPPACMD $ADDPPACMD
apt-get -y update apt-get -y update
apt-get -y install dosfstools curl xz-utils iw rfkill wpasupplicant openssh-server alsa-utils $EXTRADEBS apt-get -y install dosfstools curl xz-utils iw rfkill wpasupplicant openssh-server alsa-utils locales $EXTRADEBS
apt-get -y remove --purge ureadahead apt-get -y remove --purge ureadahead
apt-get -y update apt-get -y update
locale-gen en_US.UTF-8
adduser --gecos $DEBUSER --disabled-login $DEBUSER --uid 1000 adduser --gecos $DEBUSER --disabled-login $DEBUSER --uid 1000
chown -R 1000:1000 /home/$DEBUSER chown -R 1000:1000 /home/$DEBUSER
dpkg -i /home/prebuilt/* dpkg -i /home/prebuilt/*