wok-next view memtest/receipt @ rev 20467
Up cookutils (1034), TiMidity++, alpine, caps, alsaequal
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Mar 08 01:13:43 2018 +0200 (2018-03-08) |
parents | 59b28731c360 |
children | d6378d455338 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="memtest"
4 VERSION="5.01"
5 CATEGORY="base-system"
6 SHORT_DESC="Memory failures detection tool"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://www.memtest.org/"
11 SOURCE="memtest86+"
12 TARBALL="$SOURCE-$VERSION.tar.gz"
13 WGET_URL="${WEB_SITE}download/$VERSION/$TARBALL"
15 BUILD_DEPENDS="xz gcc3"
16 SPLIT="memtest-serial"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 sed -i -e '/scp memtest.bin/d' -e 's/gcc/gcc-3/' \
22 -e 's/-fno-stack-protector//' Makefile
23 sed -i 's/0b10/2/' init.c
24 patch -p1 < $stuff/$SOURCE-$VERSION-array-size.patch
25 make
26 cp $stuff/*.S $stuff/pack .
27 for i in bootloader unpack ; do
28 cc -o $i.o -Wa,-a=$i.lst -c $i.S
29 objcopy -O binary $i.o $i.bin
30 done
31 sed -i "s/VERSION/$VERSION/" pack
32 ./pack --build bootloader.bin unpack.bin
33 ./pack memtest.bin memtest.packed
34 mv memtest.bin memtest.bin.console
35 sed -i -e 's/SERIAL_CONSOLE_DEFAULT 0/SERIAL_CONSOLE_DEFAULT 1/' \
36 -e 's/SERIAL_BAUD_RATE 9600/SERIAL_BAUD_RATE 115200/' config.h
37 make clean
38 make
39 ./pack memtest.bin memtest.packed-115200
40 mv memtest.bin memtest.bin.serial
41 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 case $PACKAGE in
48 memtest)
49 mkdir -p $fs/boot
50 cp $src/memtest.packed $fs/boot/memtest
51 ;;
52 memtest-serial)
53 CAT="base-system|using serial port"
54 mkdir -p $fs/boot
55 cp $src/memtest.packed-115200 $fs/boot/memtest
56 ;;
57 esac
58 }
60 # Pre and post install commands for Tazpkg.
61 post_install_memtest_serial()
62 {
63 cat <<EOT
64 Output to vga and serial port. Default kernel cmdline: console=ttyS0,115200e8
65 EOT
66 }