diff --git a/README.md b/README.md index b892dd5..0621480 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,14 @@ This is a set of scripts for patching a Chrome OS RMA shim to serve as a bootloa ## Current Development Roadmap: - ~~build the image automatically~~ - ~~boot to a shell~~ -- switch_root into an actual rootfs -- start X11 in the actual rootfs -- ui improvements in the bootloader \ No newline at end of file +- ~~switch_root into an actual rootfs~~ +- ~~start X11 in the actual rootfs~~ +- ~~ui improvements in the bootloader~~ +- load all needed drivers +- autostart X11 + +## Usage: +1. Grab a Chrome OS RMA Shim from somewhere. Most of them have already been leaked and aren't too difficult to find. +2. Download a Devuan live ISO. Run it inside a VM and install it to a disk image. Mount the disk image in the host. +3. Run `sudo DEBUG=1 ./build.sh`. The `rootfs_dir` argument should point to where you mounted the rootfs in part 2. +4. Flash the generated image to a USB drive or SD card. \ No newline at end of file diff --git a/build.sh b/build.sh index d5fd7f1..f8c699d 100755 --- a/build.sh +++ b/build.sh @@ -88,7 +88,11 @@ echo "patching initramfs" patch_initramfs $initramfs_dir echo "creating disk image" -create_image $output_path 20 1200 +rootfs_size=$(du -sm $rootfs_dir | cut -f 1) +rootfs_part_size=$(($rootfs_size * 11 / 10 + 10)) +#create a 20mb bootloader partition +#rootfs partition is 10% larger than its contents +create_image $output_path 20 $rootfs_part_size echo "creating loop device for the image" image_loop=$(create_loop ${output_path})