wok-next rev 11685
runcom: cleanup
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Feb 18 16:12:24 2012 +0100 (2012-02-18) |
parents | 19c22cc9d6cc |
children | 5dfd3ce5f96b |
files | runcom/description.txt runcom/receipt runcom/stuff/Makefile |
line diff
1.1 --- a/runcom/description.txt Sat Feb 18 08:42:44 2012 -0500 1.2 +++ b/runcom/description.txt Sat Feb 18 16:12:24 2012 +0100 1.3 @@ -11,13 +11,13 @@ 1.4 1.5 A boot sector image is a 512 bytes file ending with the 0xAA and 0x55 bytes 1.6 with the .bin extension. 1.7 -Bios disk (int 13H) are amulated (CHS or LBA) with image file : 1.8 +Bios disk (int 13H) are emulated (CHS or LBA) with an image file : 1.9 - hard disk are image ./hd0, ./hd1, ... for disk 0x80, 0x81... 1.10 - floppy disk are image ./fd0, ./fd1 ... or /dev/fd0, /dev/fd1 if not found. 1.11 You can test it with the file /usr/bin/debug.bin, with the command line : 1.12 $ debug.bin 1.13 1.14 -3- The boot sector debugger /usr/bin/debug.bin 1.15 +3- The 512 bytes boot sector debugger /usr/bin/debug.bin 1.16 1.17 Usage: 1.18 1.19 @@ -31,7 +31,7 @@ 1.20 1.21 seqment and offset are hexadecimal values in 0..FFFF range 1.22 address is linear hexadecimal value in 0..FFFFF range or seqment:offset 1.23 -words are bytes in 00..FF range or words in 0000..FFFF range or double words 1.24 +words are bytes in 0..FF range or words in 000..FFFF range or double words 1.25 CX and DX are used by INT13H/AL=01 BIOS interrupt. 1.26 1.27 Example:
2.1 --- a/runcom/receipt Sat Feb 18 08:42:44 2012 -0500 2.2 +++ b/runcom/receipt Sat Feb 18 16:12:24 2012 +0100 2.3 @@ -37,16 +37,15 @@ 2.4 proc="/proc/sys/fs/binfmt_misc" 2.5 bin=":BOOTBIN:E::bin::/usr/bin/runcom:" 2.6 com=":DOSCOM:E::com::/usr/bin/runcom:" 2.7 - rc="$1/etc/init.d/local.sh" 2.8 - grep -q "$com" $rc || cat >> $rc <<EOT 2.9 + cat > /tmp/runcom$$ <<EOT 2.10 [ ! -e $proc/register ] && modprobe $fmt && mount -t $fmt $fmt $proc 2.11 echo "$bin" >$proc/register 2.12 echo "$com" >$proc/register 2.13 EOT 2.14 - [ -n "$1" ] && return 2.15 - [ ! -e $proc/register ] && modprobe $fmt && mount -t $fmt $fmt $proc 2.16 - echo "$bin" >$proc/register 2.17 - echo "$com" >$proc/register 2.18 + rc="$1/etc/init.d/local.sh" 2.19 + grep -q "$com" $rc || cat /tmp/runcom$$ >> $rc 2.20 + [ -n "$1" ] || . /tmp/runcom$$ 2.21 + rm -f /tmp/runcom$$ 2.22 } 2.23 2.24 # Pre remove command for Tazpkg.
3.1 --- a/runcom/stuff/Makefile Sat Feb 18 08:42:44 2012 -0500 3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 3.3 @@ -1,20 +0,0 @@ 3.4 -CC=gcc -m32 3.5 -CFLAGS= -O2 -Wall -fno-builtin -fno-stack-protector #-march=i386 3.6 -HOST_CFLAGS=-O2 -Wall 3.7 -# modify to set the kernel path 3.8 -KERNEL_PATH=../linux-2.6.20 3.9 - 3.10 -all: debug.bin debug8086.bin dbg8086.bin new.bin dbg.bin runcom 3.11 - 3.12 -%.bin: %.o 3.13 - objcopy -O binary $< $@ 3.14 - chmod +x $@ 3.15 - 3.16 -%.o: %.c 3.17 - $(CC) $(CFLAGS) -c -o $@ $< 3.18 - 3.19 -%.o: %.S 3.20 - $(CC) -D__ASSEMBLY__ -Wa,-acghlnm=$*.lst -c -o $@ $< 3.21 - 3.22 -clean: 3.23 - rm -f *.bin runcom *.o *~