Remove redundant boot-* and nokia-argon-sxmo.img image artifacts
This commit is contained in:
@@ -12,9 +12,8 @@ This manual covers flashing, operating, and customizing **Bananarchy Linux** (Sx
|
||||
|
||||
## 1. System overview & workspace contents
|
||||
|
||||
### 1.1 System images (`images/`)
|
||||
### 1.1 System image (`images/`)
|
||||
- `images/bananarchy-nokia-argon.img` — partitioned image (`256 MiB` `ext2` `pmOS_boot` + `ext4` `pmOS_root`) ready for EDL flashing to `userdata`, `fastboot flash userdata`, or raw `dd` to a microSD card.
|
||||
- `images/boot-bananarchy-nokia-argon.img` — standalone Android `boot.img` with Linux `6.12.1-msm8916`, initramfs, and appended DTB.
|
||||
- Additional device images (`bananarchy-nokia-beatles.img`, `bananarchy-nokia-tough.img`, `bananarchy-nokia-sparkler.img`) can be generated at any time via `./rebuild-image.sh <device> --mkinitfs`.
|
||||
|
||||
### 1.2 Bootloader & EDL programmer (`bootloader/`)
|
||||
|
||||
@@ -129,9 +129,8 @@ All components are pre-compiled in `prebuilt/` and `overlay/rootfs/`, and can be
|
||||
./rebuild-image.sh nokia-tough --mkinitfs
|
||||
./rebuild-image.sh nokia-sparkler --mkinitfs
|
||||
```
|
||||
Output images are written to `images/`:
|
||||
- `images/bananarchy-<device>.img` (partitioned MBR image for EDL `userdata`, `fastboot flash userdata`, or microSD card)
|
||||
- `images/boot-bananarchy-<device>.img` (kernel + initramfs + DTB boot image)
|
||||
Output image is written to `images/`:
|
||||
- `images/bananarchy-<device>.img` (partitioned MBR image with `pmOS_boot` + `pmOS_root` for EDL `userdata`, `fastboot flash userdata`, or microSD card)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+1
-8
@@ -182,14 +182,7 @@ def resolve_default_bootloader():
|
||||
|
||||
|
||||
def resolve_default_image(device):
|
||||
candidates = [
|
||||
os.path.join(BASE_DIR, "images", f"bananarchy-{device}.img"),
|
||||
os.path.join(BASE_DIR, "images", "nokia-argon-sxmo.img"),
|
||||
]
|
||||
for cand in candidates:
|
||||
if os.path.isfile(cand):
|
||||
return cand
|
||||
return candidates[0]
|
||||
return os.path.join(BASE_DIR, "images", f"bananarchy-{device}.img")
|
||||
|
||||
|
||||
def parse_args():
|
||||
|
||||
+10
-14
@@ -170,7 +170,7 @@ EOF
|
||||
|
||||
depmod -b "$ROOTFS" 6.12.1-msm8916
|
||||
|
||||
if [ "$RUN_MKINITFS" = "--mkinitfs" ] || [ ! -f "$ROOTFS/boot/boot.img" ]; then
|
||||
if [ "$RUN_MKINITFS" = "--mkinitfs" ] || [ ! -f "$ROOTFS/boot/initramfs" ]; then
|
||||
echo "[2/5] Running depmod and mkinitfs inside $ROOTFS..."
|
||||
rm -rf "$ROOTFS/tmp/hostbin"
|
||||
mkdir -p "$ROOTFS/tmp/hostbin"
|
||||
@@ -211,12 +211,7 @@ EOF
|
||||
ln -sf /bin/busybox "$ROOTFS/bin/sh"
|
||||
rm -rf "$ROOTFS/tmp/hostbin" "$ROOTFS/lib/ld-musl-x86_64.so.1" "$ROOTFS/proc/1"
|
||||
else
|
||||
echo "[2/5] Using existing $ROOTFS/boot/boot.img (pass --mkinitfs to regenerate)..."
|
||||
fi
|
||||
|
||||
cp "$ROOTFS/boot/boot.img" "/images/boot-bananarchy-$TARGET_DEVICE.img"
|
||||
if [ "$TARGET_DEVICE" = "nokia-argon" ]; then
|
||||
cp "$ROOTFS/boot/boot.img" "/images/boot-nokia-argon-sxmo.img"
|
||||
echo "[2/5] Using existing $ROOTFS/boot/initramfs (pass --mkinitfs to regenerate)..."
|
||||
fi
|
||||
|
||||
echo "[3/5] Creating ext2 boot (256 MiB) and ext4 root filesystems..."
|
||||
@@ -247,7 +242,12 @@ EOF
|
||||
echo "[4/5] Assembling partitioned MBR raw image..."
|
||||
RAW_IMG="/images/bananarchy-$TARGET_DEVICE.img"
|
||||
TOTAL_MB=$(( 1 + BOOT_MB + ROOT_MB ))
|
||||
rm -f "$RAW_IMG" "/images/bananarchy-$TARGET_DEVICE.sparse.img" "/images/nokia-argon-sxmo.sparse.img"
|
||||
rm -f "$RAW_IMG" \
|
||||
"/images/bananarchy-$TARGET_DEVICE.sparse.img" \
|
||||
"/images/nokia-argon-sxmo.sparse.img" \
|
||||
"/images/nokia-argon-sxmo.img" \
|
||||
"/images/boot-bananarchy-$TARGET_DEVICE.img" \
|
||||
"/images/boot-nokia-argon-sxmo.img"
|
||||
truncate -s "${TOTAL_MB}M" "$RAW_IMG"
|
||||
|
||||
BOOT_SECTORS=$(( BOOT_MB * 2048 ))
|
||||
@@ -265,14 +265,10 @@ SFEOF
|
||||
dd if="$ROOT_IMG" of="$RAW_IMG" bs=1M seek=$(( 1 + BOOT_MB )) conv=notrunc,sparse status=none
|
||||
rm -f "$BOOT_IMG" "$ROOT_IMG"
|
||||
|
||||
if [ "$TARGET_DEVICE" = "nokia-argon" ]; then
|
||||
ln -f "$RAW_IMG" "/images/nokia-argon-sxmo.img"
|
||||
fi
|
||||
|
||||
echo "[5/5] Restoring host user ownership on $ROOTFS for easy host editing..."
|
||||
chown -R "$HOST_UID:$HOST_GID" "$ROOTFS" "/images"
|
||||
chmod -R u+rwX "$ROOTFS"
|
||||
|
||||
echo "Built Bananarchy images for $TARGET_DEVICE:"
|
||||
ls -lh "/images/boot-bananarchy-$TARGET_DEVICE.img" "$RAW_IMG"
|
||||
echo "Built Bananarchy image for $TARGET_DEVICE:"
|
||||
ls -lh "$RAW_IMG"
|
||||
'
|
||||
|
||||
Reference in New Issue
Block a user