Navigation

Project: wok

Clone project: hg clone http://hg.slitaz.org/wok

  • Download tarball:
  • bz2
  • gz

Search

wok changeset 15189:20fd4e3d8970

Add memtest-serial (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Aug 25 18:12:50 2013 +0000 (11 months ago ago)
parents b0e9e83532e2
children eeaff356cbef
files memtest/stuff/pack
line diff
     1.1 --- a/memtest/stuff/pack	Sun Aug 25 18:09:21 2013 +0000
     1.2 +++ b/memtest/stuff/pack	Sun Aug 25 18:12:50 2013 +0000
     1.3 @@ -5,8 +5,10 @@
     1.4  $(dd if=$1 bs=512 count=1 conv=sync | cat - $2 | gzip -9 | uuencode -m -)
     1.5  EOT
     1.6  EOM
     1.7 -	getip=$(grep -s getip ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/')
     1.8 -	sed -i "s/XXX/$((515+0x${getip:-5}))/" $0
     1.9 +	x=$(grep -s packed_syssize ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/')
    1.10 +	[ -n "$x" ] && sed -i "s/XXXP/$((513+0x$x))/" $0 || sed -i s="/XXXP$/d" $0
    1.11 +	x=$(grep -s original_syssize ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/')
    1.12 +	[ -n "$x" ] && sed -i "s/XXXO/$((513+0x$x))/" $0 || sed -i s="/XXXO$/d" $0
    1.13  	helpmsg=$(sed '/helpmsg:/!d{n;s/ [0-9]* \([^ ]*\).*/\1/}' ${1/.bin/.lst} | sed '$!d')
    1.14  	sed -i "s/YYY/$((0x$helpmsg))/" $0
    1.15  	sed -i "s/ZZZ/$((496-0x$helpmsg))/" $0
    1.16 @@ -37,8 +39,9 @@
    1.17  	dd if=$1 bs=512 count=$setup skip=1 | compress >>$2
    1.18  	dd if=$1 bs=16 count=$syssize skip=$((32*(1+$setup))) | compress >>$2
    1.19  	size=$(stat -c %s $2)
    1.20 -	store $((($size-512)/16)) $2 XXX
    1.21 -	store $((($size-2560)/16)) $2 500
    1.22 +	store $((($size-2560+15)/16)) $2 XXXP
    1.23 +	store $syssize $2 XXXO
    1.24 +	store $((($size-2560+15)/16)) $2 500
    1.25  	store 4 $2 497 1
    1.26  	store $((($size+511)/512)) $2 4
    1.27  	store $((($size+15)/16)) $2 14