diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2005-04-25 17:41:35 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2005-04-25 17:41:35 +0000 |
commit | e2bc0fb2eaa7ca654f3a97a44b0dda6fb5764048 (patch) | |
tree | aecc9c13dba57268c99f5dac3b79e92b4bef34ad /sys/boot | |
parent | 83b71dcb904ccda91423fa72c0db290d75623168 (diff) | |
download | src-e2bc0fb2eaa7ca654f3a97a44b0dda6fb5764048.tar.gz src-e2bc0fb2eaa7ca654f3a97a44b0dda6fb5764048.zip |
Allow BOOT_BOOT0_COMCONSOLE_SPEED to be derived from BOOT_COMCONSOLE_SPEED
at compile time.
Notes
Notes:
svn path=/head/; revision=145515
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/i386/boot0/Makefile | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/sys/boot/i386/boot0/Makefile b/sys/boot/i386/boot0/Makefile index 979ad2f379f6..e02b10286206 100644 --- a/sys/boot/i386/boot0/Makefile +++ b/sys/boot/i386/boot0/Makefile @@ -21,11 +21,34 @@ BOOT_BOOT0_TICKS?= 0xb6 # unless you are glutton for punishment. BOOT_BOOT0_ORG?= 0x600 -# Comm settings for boot0sio. 0xE3 => 9600 8-N-1 -# XXX: We should create a build-tool or something to convert BOOT_CONSOLE_SPEED -# and BOOT_COMCONSOLE_PORT into the correct values to define on the build -# command line -BOOT_BOOT0_COMCONSOLE_SPEED?= 0xE3 +# Comm settings for boot0sio. +# Bit(s) Description +# 7-5 data rate (110,150,300,600,1200,2400,4800,9600 bps) +# 4-3 parity (00 or 10 = none, 01 = odd, 11 = even) +# 2 stop bits (set = 2, clear = 1) +# 1-0 data bits (00 = 5, 01 = 6, 10 = 7, 11 = 8) +.if !defined(BOOT_BOOT0_COMCONSOLE_SPEED) +BOOT_COMCONSOLE_SPEED?= 9600 +.if ${BOOT_COMCONSOLE_SPEED} == 9600 +BOOT_BOOT0_COMCONSOLE_SPEED= "7 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} == 4800 +BOOT_BOOT0_COMCONSOLE_SPEED= "6 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} == 2400 +BOOT_BOOT0_COMCONSOLE_SPEED= "5 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} == 1200 +BOOT_BOOT0_COMCONSOLE_SPEED= "4 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} == 600 +BOOT_BOOT0_COMCONSOLE_SPEED= "3 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} == 300 +BOOT_BOOT0_COMCONSOLE_SPEED= "2 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} == 150 +BOOT_BOOT0_COMCONSOLE_SPEED= "1 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} == 110 +BOOT_BOOT0_COMCONSOLE_SPEED= "0 << 5 + 3" +.else +BOOT_BOOT0_COMCONSOLE_SPEED= "7 << 5 + 3" +.endif +.endif CFLAGS+=-DFLAGS=${BOOT_BOOT0_FLAGS} \ -DTICKS=${BOOT_BOOT0_TICKS} \ |