Common Software - OpenNoah/OpenNoah.github.io GitHub Wiki

Open source base system

Package Progress Comment
u-boot WIP release
kernel WIP mainline stable
busybox Working rootfs

Reverse engineering upgrade.bin

https://github.com/OpenNoah/NoahSplit

Package Comment
upgrade.bin extraction Can extract sections, can extract ubifs images.
upgrade.bin creation Can generate upgrade.bin, has checksum support.
Customised upgrade By modifying initramfs packed in the upgrade kernel.

Extract ubifs images

  1. Use the rough unubirefimg code I reversed from ubirefimg to convert binary sections back to ubifs images

unubirefimg rootfs.bin rootfs.img

https://github.com/OpenNoah/mtd-utils/blob/master/ubi-utils/new-utils/src/unubirefimg.c

  1. Use ubidump to extract files from ubifs images

sudo python ./ubidump.py --savedir rootfs -p rootfs.img

https://github.com/nlitsme/ubidump

Cross debootstrap

https://wiki.debian.org/EmDebian/CrossDebootstrap#QEMU.2Fdebootstrap_approach

# Create rootfs image of size 1GiB
dd if=/dev/null of=rootfs_debian.img bs=4M seek=256
# Format rootfs image to ext4
mkfs.ext4 -F rootfs_debian.img
# Mount rootfs image
mkdir rootfs_debian
mount -t ext4 rootfs_debian.img rootfs_debian
# Create base system
qemu-debootstrap --arch mipsel stretch rootfs_debian http://deb.debian.org/debian/