Use target hostnames and restore lk2nd bootloader reboot
This commit is contained in:
1 parent
1c011b360a
commit
3b96b8f242
22 files changed
+203
-70
No files matched your search
+17
-7
@@ -7,31 +7,41 @@ BA_REBUILD="${BA_REBUILD:-0}"
|
||||
BA_VER="$(./scripts/version.sh --print)"
|
||||
BA_CODENAME="$(./scripts/version.sh --print-codename)"
|
||||
RELDIR="bananarchy-${BA_TARGET}-${BA_VER}-${BA_CODENAME}"
|
||||
DISPLAY_IMAGE="images/boot-lk2nd-nokia-beatles-display.img"
|
||||
|
||||
display_lk2nd_is_current() {
|
||||
python3 scripts/check-lk2nd-beatles.py \
|
||||
--image "$DISPLAY_IMAGE" \
|
||||
--patch bootloader/lk2nd/nokia-beatles.patch \
|
||||
--expect-fastboot 0 --expect-display 1 >/dev/null 2>&1
|
||||
}
|
||||
|
||||
NEED_REBUILD=0
|
||||
if [ ! -f "images/bananarchy-${BA_TARGET}.img" ]; then
|
||||
NEED_REBUILD=1
|
||||
fi
|
||||
if [ "$BA_TARGET" = "nokia-beatles" ]; then
|
||||
for f in images/boot-bananarchy-nokia-beatles.img \
|
||||
images/boot-lk2nd-nokia-beatles-display.img; do
|
||||
for f in images/boot-bananarchy-nokia-beatles.img "$DISPLAY_IMAGE"; do
|
||||
[ -f "$f" ] || NEED_REBUILD=1
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$BA_REBUILD" = "1" ] || [ "$NEED_REBUILD" = "1" ]; then
|
||||
./rebuild-image.sh "$BA_TARGET" --mkinitfs
|
||||
if [ "$BA_TARGET" = "nokia-beatles" ] && \
|
||||
[ ! -f images/boot-lk2nd-nokia-beatles-display.img ]; then
|
||||
./scripts/build-lk2nd-beatles.sh --only display
|
||||
fi
|
||||
fi
|
||||
|
||||
# The default 2720 lk2nd image must contain the low-bit reboot cookie, or
|
||||
# "Reboot to bootloader" cannot return to the visible Fastboot menu.
|
||||
if [ "$BA_TARGET" = "nokia-beatles" ] && \
|
||||
{ [ "$BA_REBUILD" = "1" ] || ! display_lk2nd_is_current; }; then
|
||||
./scripts/build-lk2nd-beatles.sh
|
||||
fi
|
||||
|
||||
mkdir -p "$RELDIR"
|
||||
cp "images/bananarchy-${BA_TARGET}.img" "$RELDIR/"
|
||||
if [ "$BA_TARGET" = "nokia-beatles" ]; then
|
||||
cp images/boot-bananarchy-nokia-beatles.img "$RELDIR/"
|
||||
cp images/boot-lk2nd-nokia-beatles-display.img "$RELDIR/"
|
||||
cp "$DISPLAY_IMAGE" "$RELDIR/"
|
||||
else
|
||||
cp bootloader/lk2nd-msm8909.img "$RELDIR/"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user