snakeware

Python-based Linux distro for x86-64 and RPi
git clone git://squid-tech.com/snakeware.git
Log | Files | Refs | README

commit 3ca15be1f3602538038688bc4a0da1f5bf45d768
parent 9db15f5607bd96f3c77e51861a33ff0d7a144f14
Author: Josh Moore <jxm5210@g.rit.edu>
Date:   Wed, 10 Jun 2020 21:54:33 -0400

Merge pull request #108 from joshiemoore/cleanup-scripts

Cleanup documentation/unneeded scripts
Diffstat:
Msnakeware/README.md | 22+++-------------------
Dsnakeware/img_final.sh | 35-----------------------------------
2 files changed, 3 insertions(+), 54 deletions(-)

diff --git a/snakeware/README.md b/snakeware/README.md @@ -13,23 +13,10 @@ Currently supported platforms: `<platform>` should be one of the supported platforms from the above list. This script is the longest part of the process, as it makes a clone of buildroot, which then downloads -and makes all the necessary sources. The end of the script requires root because it uses kpartx to -create a virtual block device for the new image. +and makes all the necessary sources. -Once the script has successfully completed, use `lsblk` to make note of the drive number of the virtual -block device the script created for the new image. For example, if the script created `loop0p1`, you will -enter `0` as the argument for the next script. - -### 2. Run `sudo ./img_final.sh <num>` -This script must be run as root. - -`<num>` should be the drive number of the virtual block device from the previous step. - -This script formats the root partition of the image, mounts it, and copies over all the built files generated -by buildroot. It should take a relatively short amount of time. - -### 3. Done! -If both scripts are successful, a `snakeware.img` file will be generated and placed in this directory. +### 2. Done! +If the build is successful, a `snakeware.iso` file will be generated and placed in this directory. You can run this image in QEMU, or dd it to a flash drive to try running it on real hardware. @@ -49,7 +36,4 @@ a task for inexperienced Linux users. I do not guarantee that cross-building wil tried it, and you shouldn't try it unless you're pretty knowledgeable about the Linux kernel and about buildroot. -I expect that the installation of Python pip packages might not work correctly when cross-building because -that is currently happening independently of buildroot. - I would be interested to hear your results if you try this, and please send a PR if you get some working configs. diff --git a/snakeware/img_final.sh b/snakeware/img_final.sh @@ -1,35 +0,0 @@ -# copy generated rootfs to the virtual block device created by build.sh -# the first argument should be the number of the loop device, so you would -# enter 1 if the device was loop1 -# -# this script must be run as root - -SNAKEWARE=$PWD -IMG=snakeware.img -MNT=/mnt - -MAP=/dev/mapper - -if [ $# != 1 ]; then - echo "Incorrect number of parameters." - exit -fi - -mkfs.ext4 $MAP/loop$1p1 - -mount $MAP/loop$1p1 $MNT - -# extract generated image to root partition -tar -xf $SNAKEWARE/buildroot/output/images/rootfs.tar -C $MNT - -mkdir -p $MNT/boot/grub - -cp $SNAKEWARE/buildroot/output/images/rootfs.cpio $MNT/boot/initrd.img - -grub-install --root-directory=$MNT /dev/loop$1 - -# unmount everything -umount $MNT -kpartx -d $SNAKEWARE/$IMG - -chmod a+rwX $SNAKEWARE/$IMG