Add tiny linux bootloader

Building tiny linux bootloader also creates the lazybox image (lazybox.img)
This commit is contained in:
aheirman 2021-02-04 16:29:09 +01:00
parent f2b55321fb
commit 18bb7ee1a9
3 changed files with 44 additions and 1 deletions

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
dd if=../tiny-linux-bootloader/disk of=lazybox.img dd if=../tiny-linux-bootloader/disk of=lazybox.img
exit
TOTAL=`stat -c %s lazybox.img` TOTAL=`stat -c %s lazybox.img`
SECTOR=$(($TOTAL / 512)) SECTOR=$(($TOTAL / 512))

View file

@ -0,0 +1,15 @@
--- build.sh
+++ build.sh
@@ -16,9 +16,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
INPUT="bsect.asm"
-OUTPUT="disk"
-KERN="./barebones"
-RD="./big.init"
+OUTPUT="/tiny-linux-bootloader/disk"
+KERN="/lazybox/isoout/vmlinuz"
+RD="/lazybox/isoout/initramfs.img"
#size of kern + ramdisk
K_SZ=`stat -c %s $KERN`

View file

@ -0,0 +1,28 @@
pkgname=tiny-linux-bootloader
pkgver=master
fetch() {
curl -L "https://github.com/owenson/tiny-linux-bootloader/archive/master.tar.gz" -o $pkgname-$pkgver.tar.xz
tar -xf $pkgname-$pkgver.tar.xz
cd $pkgname-$pkgver
patch build.sh /lazybox/patches/tiny-linux-bootloader-build
}
package() {
cd $pkgname-$pkgver
mkdir /tiny-linux-bootloader
CURR_DIR=$(pwd)
cd /lazybox
./geninitrd.sh
cd $CURR_DIR
./build.sh
cd /lazybox
./createimg.sh
}
license() {
cd $pkgname-$pkgver
cat LICENSE
}