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