Merge https://github.com/postmarketOS/pmbootstrap into device/maguro
This commit is contained in:
commit
e54866bb88
|
@ -255,6 +255,7 @@ build() {
|
|||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71989
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64 --disable-bootstrap";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
armv6-*-*-*eabihf) _arch_configure="--with-arch=armv6zk --with-tune=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-abi=aapcs-linux";;
|
||||
armv7-*-*-*eabihf) _arch_configure="--with-arch=armv7-a --with-tune=generic-armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-abi=aapcs-linux --with-mode=thumb";;
|
||||
mipsel-*-*-*) _arch_configure="--with-arch-32=mips2 --with-tune-32=mips32 --with-fp-32=32 --with-mips-plt --with-float=hard --with-abi=32";;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
pkgname=musl-armhf
|
||||
pkgver=1.1.16
|
||||
pkgrel=9
|
||||
pkgrel=10
|
||||
subpackages="musl-dev-armhf:package_dev"
|
||||
|
||||
_arch="armhf"
|
||||
|
@ -46,5 +46,5 @@ package_dev() {
|
|||
done
|
||||
}
|
||||
|
||||
sha512sums="865478e9ed9b97e8cedbe18cecb72611fd777c0fa45eebc67eae818084d0a3a5a85c6f37be5a874f48a8dcbb8c51ed4ceef6b33257215358e30ecddbb415c4b8 musl-1.1.16-r9-armhf.apk
|
||||
b6db9a9697b7bca35052cf5a247f2250d4e134f259584d98a48157c996c319e1e3d682b0cd68b90a86f5ea04eff4c2134f79be7aaff3d1b077934d4e45164e1d musl-dev-1.1.16-r9-armhf.apk"
|
||||
sha512sums="31d68ab89f90da5315bae6302a768e687763601ae01cdf2258d85490dad18018872f316ee0e17e748779f64d1582dbc76f4c0b9b2370bdca8cfb1ff44df8539b musl-1.1.16-r10-armhf.apk
|
||||
2bebf6dfabb37d564a7fa9f0b2d0cc0d11c25880ee15aa8a0b63b03782d076047282752c37a88ca035bb3f2c3d9cd48f359e67cd11957f305fb8f59a641f3319 musl-dev-1.1.16-r10-armhf.apk"
|
|
@ -76,7 +76,12 @@ def create_and_mount_image(args):
|
|||
raise RuntimeError("Aborted.")
|
||||
|
||||
pmb.chroot.user(args, ["mkdir", "-p", "/home/user/rootfs"])
|
||||
pmb.chroot.root(args, ["fallocate", "-l", size, img_path])
|
||||
pmb.chroot.root(args, ["fallocate", "-l", size, img_path], check=False)
|
||||
if not os.path.exists(img_path_outside):
|
||||
logging.debug("WARNING: fallocate failed, falling back to truncate."
|
||||
" More info: https://github.com/postmarketOS/pmbootstrap/issues/28")
|
||||
pmb.chroot.apk.install(args, ["coreutils"])
|
||||
pmb.chroot.root(args, ["truncate", "-s", size, img_path])
|
||||
|
||||
# Mount to /dev/install
|
||||
logging.info("(native) mount /dev/install (" + args.device + ".img)")
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
"""
|
||||
Copyright 2017 Oliver Smith
|
||||
|
||||
This file is part of pmbootstrap.
|
||||
|
||||
pmbootstrap is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
pmbootstrap is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with pmbootstrap. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
|
||||
def test_chroot_interactive_shell():
|
||||
"""
|
||||
Open a shell with 'pmbootstrap chroot' and pass 'echo hello_world\n' as stdin.
|
||||
"""
|
||||
pmb_src = os.path.abspath(os.path.join(os.path.dirname(__file__) + "/.."))
|
||||
os.chdir(pmb_src)
|
||||
ret = subprocess.check_output(["./pmbootstrap.py", "-q", "chroot"], timeout=300,
|
||||
input="echo hello_world\n", universal_newlines=True,
|
||||
stderr=subprocess.STDOUT)
|
||||
assert ret == "hello_world\n"
|
Loading…
Reference in New Issue