Fixed arm arch image maker to support arm versions other than 7
Signed-off-by: Dillon Dixon <dillondixon@gmail.com>
This commit is contained in:
parent
4ebe4e83ee
commit
84d285d28f
2 changed files with 13 additions and 5 deletions
|
@ -48,7 +48,8 @@ IFS=','
|
||||||
PKGIGNORE="${PKGIGNORE[*]}"
|
PKGIGNORE="${PKGIGNORE[*]}"
|
||||||
unset IFS
|
unset IFS
|
||||||
|
|
||||||
case "$(uname -m)" in
|
arch="$(uname -m)"
|
||||||
|
case "$arch" in
|
||||||
armv*)
|
armv*)
|
||||||
if pacman -Q archlinuxarm-keyring >/dev/null 2>&1; then
|
if pacman -Q archlinuxarm-keyring >/dev/null 2>&1; then
|
||||||
pacman-key --init
|
pacman-key --init
|
||||||
|
@ -57,12 +58,18 @@ case "$(uname -m)" in
|
||||||
echo "Could not find archlinuxarm-keyring. Please, install it and run pacman-key --populate archlinuxarm"
|
echo "Could not find archlinuxarm-keyring. Please, install it and run pacman-key --populate archlinuxarm"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
PACMAN_CONF='./mkimage-archarm-pacman.conf'
|
PACMAN_CONF=$(mktemp ${TMPDIR:-/var/tmp}/pacman-conf-archlinux-XXXXXXXXX)
|
||||||
|
version="$(echo $arch | cut -c 5)"
|
||||||
|
sed "s/Architecture = armv/Architecture = armv${version}h/g" './mkimage-archarm-pacman.conf' > "${PACMAN_CONF}"
|
||||||
PACMAN_MIRRORLIST='Server = http://mirror.archlinuxarm.org/$arch/$repo'
|
PACMAN_MIRRORLIST='Server = http://mirror.archlinuxarm.org/$arch/$repo'
|
||||||
PACMAN_EXTRA_PKGS='archlinuxarm-keyring'
|
PACMAN_EXTRA_PKGS='archlinuxarm-keyring'
|
||||||
EXPECT_TIMEOUT=120
|
if [ "$version" -lt 7 ]; then
|
||||||
|
EXPECT_TIMEOUT=1800 # Some armv6 based devices can be very slow (e.g. RPiv1)
|
||||||
|
else
|
||||||
|
EXPECT_TIMEOUT=120
|
||||||
|
fi
|
||||||
ARCH_KEYRING=archlinuxarm
|
ARCH_KEYRING=archlinuxarm
|
||||||
DOCKER_IMAGE_NAME=archlinuxarm
|
DOCKER_IMAGE_NAME="armv${version}h/archlinux"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
PACMAN_CONF='./mkimage-arch-pacman.conf'
|
PACMAN_CONF='./mkimage-arch-pacman.conf'
|
||||||
|
@ -89,6 +96,7 @@ expect <<EOF
|
||||||
-exact "anyway? \[Y/n\] " { send -- "n\r"; exp_continue }
|
-exact "anyway? \[Y/n\] " { send -- "n\r"; exp_continue }
|
||||||
-exact "(default=all): " { send -- "\r"; exp_continue }
|
-exact "(default=all): " { send -- "\r"; exp_continue }
|
||||||
-exact "installation? \[Y/n\]" { send -- "y\r"; exp_continue }
|
-exact "installation? \[Y/n\]" { send -- "y\r"; exp_continue }
|
||||||
|
-exact "delete it? \[Y/n\]" { send -- "y\r"; exp_continue }
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ HoldPkg = pacman glibc
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
#CleanMethod = KeepInstalled
|
#CleanMethod = KeepInstalled
|
||||||
#UseDelta = 0.7
|
#UseDelta = 0.7
|
||||||
Architecture = armv7h
|
Architecture = armv
|
||||||
|
|
||||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||||
#IgnorePkg =
|
#IgnorePkg =
|
||||||
|
|
Loading…
Reference in a new issue