diff options
author | SaeHie Park <saehie.park@gmail.com> | 2016-04-27 08:07:18 +0900 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-04-26 16:07:18 -0700 |
commit | 3fbfb5eb51c87dbdeb0014492279deabf14411aa (patch) | |
tree | b79694c2d913492503e71fe55cbe0dec91954d4f /cross/build-rootfs.sh | |
parent | c723f9e3b99289c4bdeddf65cd10354a47dc5d19 (diff) | |
download | coreclr-3fbfb5eb51c87dbdeb0014492279deabf14411aa.tar.gz coreclr-3fbfb5eb51c87dbdeb0014492279deabf14411aa.tar.bz2 coreclr-3fbfb5eb51c87dbdeb0014492279deabf14411aa.zip |
ARM: Add Ubuntu Codename vivid, wily for arm-linux image (#4258)
ARM: Add Ubuntu Codename vivid, wily for arm-linux image
Diffstat (limited to 'cross/build-rootfs.sh')
-rwxr-xr-x | cross/build-rootfs.sh | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/cross/build-rootfs.sh b/cross/build-rootfs.sh index 6e563d27ca..25a46a08a9 100755 --- a/cross/build-rootfs.sh +++ b/cross/build-rootfs.sh @@ -2,8 +2,9 @@ usage() { - echo "Usage: $0 [BuildArch]" + echo "Usage: $0 [BuildArch] [UbuntuCodeName]" echo "BuildArch can be: arm, arm-softfp, arm64" + echo "UbuntuCodeName - optional, Code name for Ubuntu, can be: trusty(default), vivid, wily. If BuildArch is arm-softfp, UbuntuCodeName is ignored." exit 1 } @@ -15,7 +16,8 @@ __InitialDir=$PWD __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" +__UbuntuPackagesBase="build-essential libunwind8-dev gettext symlinks liblttng-ust-dev libicu-dev" +__UbuntuPackages="$__UbuntuPackagesBase" __MachineTriple=arm-linux-gnueabihf __UnprocessedBuildArgs= for i in "$@" @@ -29,27 +31,36 @@ 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" + __UbuntuPackages="$__UbuntuPackagesBase lldb-3.6-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" + __UbuntuPackages="$__UbuntuPackagesBase" __MachineTriple=aarch64-linux-gnu ;; arm-softfp) __BuildArch=arm-softfp __UbuntuArch=armel __UbuntuRepo="http://ftp.debian.org/debian/" - __UbuntuPackages="build-essential lldb-3.6-dev libunwind8-dev gettext symlinks liblttng-ust-dev libicu-dev" + __UbuntuPackages="$__UbuntuPackagesBase lldb-3.6-dev" __MachineTriple=arm-linux-gnueabi - __UbuntuCodeName=stable + __UbuntuCodeName=jessie + ;; + vivid) + if [ __UbuntuCodeName != "jessie" ]; then + __UbuntuCodeName=vivid + fi + ;; + wily) + if [ __UbuntuCodeName != "jessie" ]; then + __UbuntuCodeName=wily + fi ;; *) __UnprocessedBuildArgs="$__UnprocessedBuildArgs $i" + ;; esac done @@ -62,9 +73,9 @@ fi umount $__RootfsDir/* rm -rf $__RootfsDir qemu-debootstrap --arch $__UbuntuArch $__UbuntuCodeName $__RootfsDir $__UbuntuRepo -cp $__CrossDir/$__BuildArch/sources.list $__RootfsDir/etc/apt/sources.list +cp $__CrossDir/$__BuildArch/sources.list.$__UbuntuCodeName $__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 umount $__RootfsDir/* - |