wok view BootProg/receipt @ rev 25706

BootProg/boot32.asm: add int 21h services 02h, 09h, 25h, 35h
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jun 26 17:36:15 2024 +0000 (4 months ago)
parents 82a123e54615
children
line source
1 # SliTaz package receipt.
3 PACKAGE="BootProg"
4 VERSION="slitaz"
5 CATEGORY="base-system"
6 SHORT_DESC="FAT12/16/32 and exFAT Bootsector for .COMs/.EXEs"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="MIT"
9 WEB_SITE="https://wiki.osdev.org/BootProg"
11 BUILD_DEPENDS="nasm xz advancecomp"
13 bootprog_data()
14 {
15 sed "1,2d;s|FAT32SZ|$(stat -c %s boot32.bin)|" bootprog.sh
16 cat ${1// /.bin }.bin
17 }
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 mkdir -p $src && cd $src
23 bs="boot12 boot16 bootex boot32"
24 cp $stuff/boot??.asm .
25 cp boot16.asm boot12.asm
26 sed -i 's|^FAT12.*|FAT12 equ 0|' boot16.asm
27 sed -i 's|^FAT16.*|FAT16 equ 0|' boot12.asm
28 for i in $bs ; do
29 nasm $i.asm -f bin -o $i.bin -l $i.lst || return 1
30 done
31 fna=$((0x$(awk '/times Name/{print $2}' bootex.lst)))
32 sed "s|499 count=11;;|$fna count=$((510-$fna));;|" $stuff/bootprog.sh > bootprog.sh
33 sed '1,2!d' bootprog.sh > bootprog.lzma
34 bootprog_data "$bs" | xz -z --format=lzma --lzma1=lc=0,pb=0,nice=60,dict=4k >> bootprog.lzma
35 bootprog_data "$bs" | gzip -9 > bootprog.gz
36 advdef -z4 -i 1200 bootprog.gz
37 sed '1,2!d;s|unlzma|zcat|' bootprog.sh | cat - bootprog.gz > bootprog.gzip
38 rm bootprog.gz
39 chmod +x bootprog.lzma bootprog.gzip
40 }
42 # Rules to gen a SliTaz package suitable for Tazpkg.
43 genpkg_rules()
44 {
45 mkdir -p $fs/usr/bin
46 cp -a $src/bootprog.gzip $fs/usr/bin/bootprog
47 }