wok-tiny view x86test/receipt @ rev 183

linux: fix bundle.S
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 26 17:09:38 2023 +0000 (8 months ago)
parents 2a1ec9d88ac0
children 34a0a4406539
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
37 tune_lzma 36,mf=bt2 PB 0
38 test8086_88=$((0x$(sed '/test8086_88$/!d;s|.*text:0*||;s| .*||' patch.lst)))
39 dd if=patch.bin bs=1 skip=$test8086_88 2> /dev/null | dd conv=notrunc of=x86test bs=1 seek=$((0xA00+$test8086_88)) 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 }