[ARM/Linux] Fix build ARM - Xenial (#4587)
Correct creating of rootfs for Linux distributives besides trusty. Proper URLs for repositories. Structure taken from CoreCLR.
This commit is contained in:
Родитель
2394767ed3
Коммит
6c2be3bd09
|
@ -0,0 +1,3 @@
|
|||
# Debian (sid) # UNSTABLE
|
||||
deb http://ftp.debian.org/debian/ sid main contrib non-free
|
||||
deb-src http://ftp.debian.org/debian/ sid main contrib non-free
|
|
@ -0,0 +1,11 @@
|
|||
deb http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse
|
|
@ -0,0 +1,11 @@
|
|||
deb http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse
|
|
@ -0,0 +1,11 @@
|
|||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
|
|
@ -2,12 +2,13 @@
|
|||
|
||||
usage()
|
||||
{
|
||||
echo "Usage: $0 [BuildArch]"
|
||||
echo "BuildArch can be: arm, arm64"
|
||||
|
||||
echo "Usage: $0 [BuildArch] [LinuxCodeName]"
|
||||
echo "BuildArch can be: arm(default), armel, arm64"
|
||||
echo "LinuxCodeName - optional, Code name for Linux, can be: trusty(default), vivid, wily, jessie, xenial. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
|
||||
exit 1
|
||||
}
|
||||
|
||||
__LinuxCodeName=trusty
|
||||
__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
__InitialDir=$PWD
|
||||
__BuildArch=arm
|
||||
|
@ -30,14 +31,10 @@ for i in "$@"
|
|||
arm)
|
||||
__BuildArch=arm
|
||||
__UbuntuArch=armhf
|
||||
__UbuntuRepo="http://ports.ubuntu.com/"
|
||||
__UbuntuPackages="build-essential lldb-3.6-dev libunwind8-dev gettext symlinks liblttng-ust-dev libicu-dev"
|
||||
__MachineTriple=arm-linux-gnueabihf
|
||||
;;
|
||||
arm64)
|
||||
__BuildArch=arm64
|
||||
__UbuntuArch=arm64
|
||||
__UbuntuRepo="http://ports.ubuntu.com/"
|
||||
__UbuntuPackages="build-essential libunwind8-dev gettext symlinks liblttng-ust-dev libicu-dev"
|
||||
__MachineTriple=aarch64-linux-gnu
|
||||
;;
|
||||
|
@ -95,7 +92,7 @@ if [ "$__BuildArch" == "armel" ]; then
|
|||
fi
|
||||
|
||||
__RootfsDir="$__CrossDir/rootfs/$__BuildArch"
|
||||
__UbuntuPackages="$__UbuntuPackagesBase $__LLDB_Package"
|
||||
__UbuntuPackages+=" ${__LLDB_Package:-}"
|
||||
|
||||
|
||||
if [[ -n "$ROOTFS_DIR" ]]; then
|
||||
|
@ -109,16 +106,22 @@ if [ -d "$__RootfsDir" ]; then
|
|||
rm -rf $__RootfsDir
|
||||
fi
|
||||
|
||||
if [ "$__Tizen" == "tizen" ]; then
|
||||
ROOTFS_DIR=$__RootfsDir $__CrossDir/$__BuildArch/tizen-build-rootfs.sh
|
||||
else
|
||||
qemu-debootstrap --arch $__UbuntuArch trusty $__RootfsDir $__UbuntuRepo
|
||||
cp $__CrossDir/$__BuildArch/sources.list $__RootfsDir/etc/apt/sources.list
|
||||
|
||||
if [[ -n $__LinuxCodeName ]]; then
|
||||
qemu-debootstrap --arch $__UbuntuArch $__LinuxCodeName $__RootfsDir $__UbuntuRepo
|
||||
cp $__CrossDir/$__BuildArch/sources.list.$__LinuxCodeName $__RootfsDir/etc/apt/sources.list
|
||||
chroot $__RootfsDir apt-get update
|
||||
chroot $__RootfsDir apt-get -f -y install
|
||||
chroot $__RootfsDir apt-get -y install $__UbuntuPackages
|
||||
chroot $__RootfsDir symlinks -cr /usr
|
||||
|
||||
if [ $__SkipUnmount == 0 ]; then
|
||||
umount $__RootfsDir/*
|
||||
fi
|
||||
elif [ "$__Tizen" == "tizen" ]; then
|
||||
ROOTFS_DIR=$__RootfsDir $__CrossDir/$__BuildArch/tizen-build-rootfs.sh
|
||||
else
|
||||
echo "Unsupported target platform."
|
||||
usage;
|
||||
exit 1
|
||||
fi
|
||||
|
|
Загрузка…
Ссылка в новой задаче