gentoo-asahi-releng/tools-musl/run-armv7a.sh

62 lines
1.6 KiB
Bash
Raw Normal View History

2014-06-08 16:27:52 +00:00
#!/bin/bash
source common.sh
2014-06-08 16:27:52 +00:00
prepare_confs() {
local flavor=$1
local arch="armv7a_hardfp"
local tarch="armv7a"
local profile="default/linux/arm/17.0/musl/armv7a"
[[ "${flavor}" == "hardened" ]] && profile="${profile}/hardened"
2014-06-08 16:27:52 +00:00
for s in 1 2 3; do
local cstage=stage${s}
local p=$(( s - 1 ))
[[ $p == 0 ]] && p=3
local pstage=stage${p}
2018-06-24 02:08:27 +00:00
cat stage.conf.template | \
2014-06-08 16:27:52 +00:00
sed -e "s:\(^version_stamp.*$\):\1-${mydate}:" \
-e "s:CSTAGE:${cstage}:g" \
-e "s:PSTAGE:${pstage}:g" \
-e "s:SARCH:${arch}:g" \
-e "s:TARCH:${tarch}:g" \
-e "s:FLAVOR:${flavor}:g" \
-e "s:gentoo-linux-musl:hardfloat-linux-musleabi:" \
-e "s:^profile\:.*:profile\: ${profile}:" \
2014-06-08 16:27:52 +00:00
-e "s:MYCATALYST:$(pwd):g" \
> stage${s}-${arch}-musl-${flavor}.conf
sed -i "/^portage_confdir/s:_hardfp::" \
stage${s}-${arch}-musl-${flavor}.conf
echo "cflags: -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard" >> \
stage${s}-${arch}-musl-${flavor}.conf
portage_confdir=$(grep portage_confdir stage${s}-${arch}-musl-${flavor}.conf \
2015-06-14 21:34:32 +00:00
| sed -e 's/^.*:[ \t]*//')
[[ ! -e ${portage_confdir} ]] && sed -i -e '/^portage_confdir/d' \
stage${s}-${arch}-musl-${flavor}.conf
2014-06-08 16:27:52 +00:00
done
sed -i "/^chost/d" stage3-${arch}-musl-${flavor}.conf
}
main() {
>zzz.log
catalyst -s current | tee -a zzz.log >snapshot.log 2>snapshot.err
for flavor in hardened vanilla; do
prepare_confs ${flavor}
2014-06-08 16:27:52 +00:00
done
for flavor in hardened vanilla; do
do_stages "armv7a_hardfp" ${flavor}
[[ $? == 1 ]] && echo "FAILURE at ${arch} ${flavor} " | tee zzz.log
2014-06-08 16:27:52 +00:00
done
}
main $1 &