wok-tiny view x86test/receipt @ rev 186

Add bootlife
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 04 18:02:38 2024 +0000 (3 months ago)
parents 1e55ea7da8de
children
line source
1 # SliTaz package receipt.
3 PACKAGE="x86test"
4 VERSION="0.10a"
5 CATEGORY="base-system"
6 SHORT_DESC="CPU failures detection tool."
7 GROUP="misc"
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="https://web.archive.org/web/20090327202227/http://www.vortex.prodigynet.co.uk/x86test/"
11 #TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 #WGET_URL="https://web.archive.org/web/20080509064221/http://www.vortex.prodigynet.co.uk/x86test/$TARBALL"
13 TARGET="i486"
15 BUILD_DEPENDS="xz"
17 tune_lzma()
18 {
19 cp $stuff/*.S $stuff/pack .
20 sed "s/VERSION/$VERSION/;s|lzma1=|&nice=$1,|" -i pack
21 sed -i '/#define ONLY8086/d' unpack.S
22 while [ -n "$2" ]; do
23 sed "s|^#define PROP_$2 .*|#define PROP_$2 $3|" -i unlzma.S
24 shift 2
25 done
26 for i in bootloader unpack patch ; do
27 cc -o $i.o -Wa,-a=$i.lst -c $i.S
28 objcopy -O binary $i.o $i.bin
29 done
30 ./pack --build bootloader.bin unpack.bin
31 }
33 # Rules to configure and make the package.
34 compile_rules()
35 {
36 mkdir -p $src && cd $src && cp $stuff/x86test .
37 tune_lzma 35,mf=bt2,lc=3,lp=0,pb=0 LC 3 LP 0 PB 0
38 patch=$((0x$(sed '/patch$/!d;s|.*text:0*||;s| .*||' patch.lst)))
39 dd if=patch.bin bs=1 skip=$patch 2> /dev/null | dd conv=notrunc of=x86test bs=1 seek=$((0xA00+$patch)) 2> /dev/null
40 ./pack x86test x86test.packed
41 dd if=bootloader.bin of=x86test conv=notrunc 2> /dev/null
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 mkdir -p $fs/boot
48 cp $src/x86test.packed $fs/boot/$PACKAGE
49 }
51 # Post install/remove commands for Tazpkg.
52 post_install()
53 {
54 grep -qs ^x86test $1/boot/bootmenu ||
55 echo "x86test X86test,cpu,x86 Check X86 CPU (may run under DOS if renamed to x86test.exe)" >> $1/boot/bootmenu
56 }