From a968a43d4f661154f2baadb6798451e565840aa0 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 20 Jun 2007 17:43:55 -0700 Subject: [PATCH] Move most messages into the appropriate .inc files --- abort.inc | 4 ++++ bcopy32.inc | 5 +++++ comboot.inc | 3 +++ conio.inc | 7 +++++++ cpuinit.inc | 12 ++++++++++++ extlinux.asm | 32 -------------------------------- isolinux.asm | 34 ---------------------------------- ldlinux.asm | 32 -------------------------------- parsecmd.inc | 4 ++++ pxelinux.asm | 33 --------------------------------- runkernel.inc | 10 ++++++++++ ui.inc | 5 +++++ 12 files changed, 50 insertions(+), 131 deletions(-) diff --git a/abort.inc b/abort.inc index fd13652..abd160c 100644 --- a/abort.inc +++ b/abort.inc @@ -63,3 +63,7 @@ error_or_command: and cx,cx jnz on_error jmp enter_command + + section .data +aborted_msg db ' aborted.', CR, LF + diff --git a/bcopy32.inc b/bcopy32.inc index a7b6d6b..4eef874 100644 --- a/bcopy32.inc +++ b/bcopy32.inc @@ -308,6 +308,11 @@ a20_fast: mov si, err_a20 jmp abort_load + + section .data +err_a20 db CR, LF, 'A20 gate not responding!', CR, LF, 0 + section .bcopy32 + ; ; A20 unmasked, proceed... ; diff --git a/comboot.inc b/comboot.inc index 034f924..3c9df5f 100644 --- a/comboot.inc +++ b/comboot.inc @@ -963,5 +963,8 @@ feature_flags: %endif feature_flags_len equ ($-feature_flags) +err_notdos db ': attempted DOS system call', CR, LF, 0 +err_comlarge db 'COMBOOT image too large.', CR, LF, 0 + section .latebss ConfigName resb FILENAME_MAX diff --git a/conio.inc b/conio.inc index 0867af7..c023bac 100644 --- a/conio.inc +++ b/conio.inc @@ -384,6 +384,13 @@ debug_tracer: pushad ret %endif ; DEBUG_TRACERS + section .data +%if IS_ISOLINUX == 0 ; Defined elsewhere for ISOLINUX +crlf_msg db CR, LF +null_msg db 0 +%endif +crff_msg db CR, FF, 0 + section .config ; This is a word to pc_setint16 can set it DisplayCon dw 01h ; Console display enabled diff --git a/cpuinit.inc b/cpuinit.inc index a173ea7..3e96fde 100644 --- a/cpuinit.inc +++ b/cpuinit.inc @@ -72,3 +72,15 @@ skip_checks: mov byte [try_wbinvd],0c3h ; Near RET is_486: %endif ; DO_WBINVD + + section .data +err_noram db 'It appears your computer has less than ' + asciidec dosram_k + db 'K of low ("DOS")' + db CR, LF + db 'RAM. Linux needs at least this amount to boot. If you get' + db CR, LF + db 'this message in error, hold down the Ctrl key while' + db CR, LF + db 'booting, and I will take your word for it.', CR, LF, 0 + section .text diff --git a/extlinux.asm b/extlinux.asm index c43a051..18e9a48 100644 --- a/extlinux.asm +++ b/extlinux.asm @@ -1534,40 +1534,8 @@ getfssec: section .data copyright_str db ' Copyright (C) 1994-', year, ' H. Peter Anvin' db CR, LF, 0 -boot_prompt db 'boot: ', 0 -wipe_char db BS, ' ', BS, 0 -err_notfound db 'Could not find kernel image: ',0 -err_notkernel db CR, LF, 'Invalid or corrupt kernel image.', CR, LF, 0 -err_noram db 'It appears your computer has less than ' - asciidec dosram_k - db 'K of low ("DOS")' - db CR, LF - db 'RAM. Linux needs at least this amount to boot. If you get' - db CR, LF - db 'this message in error, hold down the Ctrl key while' - db CR, LF - db 'booting, and I will take your word for it.', CR, LF, 0 -err_badcfg db 'Unknown keyword in extlinux.conf.', CR, LF, 0 -err_noparm db 'Missing parameter in extlinux.conf.', CR, LF, 0 -err_noinitrd db CR, LF, 'Could not find ramdisk image: ', 0 -err_nohighmem db 'Not enough memory to load specified kernel.', CR, LF, 0 -err_highload db CR, LF, 'Kernel transfer failure.', CR, LF, 0 -err_oldkernel db 'Cannot load a ramdisk with an old kernel image.' - db CR, LF, 0 -err_notdos db ': attempted DOS system call', CR, LF, 0 -err_comlarge db 'COMBOOT image too large.', CR, LF, 0 -err_a20 db CR, LF, 'A20 gate not responding!', CR, LF, 0 err_bootfailed db CR, LF, 'Boot failed: please change disks and press ' db 'a key to continue.', CR, LF, 0 -ready_msg db 'Ready.', CR, LF, 0 -crlfloading_msg db CR, LF -loading_msg db 'Loading ', 0 -dotdot_msg db '.' -dot_msg db '.', 0 -aborted_msg db ' aborted.' ; Fall through to crlf_msg! -crlf_msg db CR, LF -null_msg db 0 -crff_msg db CR, FF, 0 config_name db 'extlinux.conf',0 ; Unmangled form ; diff --git a/isolinux.asm b/isolinux.asm index 68aea24..c8cc647 100644 --- a/isolinux.asm +++ b/isolinux.asm @@ -1479,41 +1479,7 @@ getfssec: section .data -boot_prompt db 'boot: ', 0 -wipe_char db BS, ' ', BS, 0 -err_notfound db 'Could not find kernel image: ',0 -err_notkernel db CR, LF, 'Invalid or corrupt kernel image.', CR, LF, 0 -err_noram db 'It appears your computer has less than ' - asciidec dosram_k - db 'K of low ("DOS")' - db CR, LF - db 'RAM. Linux needs at least this amount to boot. If you get' - db CR, LF - db 'this message in error, hold down the Ctrl key while' - db CR, LF - db 'booting, and I will take your word for it.', CR, LF, 0 -err_badcfg db 'Unknown keyword in config file.', CR, LF, 0 -err_noparm db 'Missing parameter in config file.', CR, LF, 0 -err_noinitrd db CR, LF, 'Could not find ramdisk image: ', 0 -err_nohighmem db 'Not enough memory to load specified kernel.', CR, LF, 0 -err_highload db CR, LF, 'Kernel transfer failure.', CR, LF, 0 -err_oldkernel db 'Cannot load a ramdisk with an old kernel image.' - db CR, LF, 0 -err_notdos db ': attempted DOS system call', CR, LF, 0 -err_comlarge db 'COMBOOT image too large.', CR, LF, 0 -err_a20 db CR, LF, 'A20 gate not responding!', CR, LF, 0 -notfound_msg db 'not found', CR, LF, 0 localboot_msg db 'Booting from local disk...', CR, LF, 0 -cmdline_msg db 'Command line: ', CR, LF, 0 -ready_msg db 'Ready.', CR, LF, 0 -trying_msg db 'Trying to load: ', 0 -crlfloading_msg db CR, LF ; Fall through -loading_msg db 'Loading ', 0 -dotdot_msg db '.' -dot_msg db '.', 0 -fourbs_msg db BS, BS, BS, BS, 0 -aborted_msg db ' aborted.', CR, LF, 0 -crff_msg db CR, FF, 0 default_str db 'default', 0 default_len equ ($-default_str) boot_dir db '/boot' ; /boot/isolinux diff --git a/ldlinux.asm b/ldlinux.asm index 8fbf0a3..b882d73 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -1555,40 +1555,8 @@ getfatsector: section .data copyright_str db ' Copyright (C) 1994-', year, ' H. Peter Anvin' db CR, LF, 0 -boot_prompt db 'boot: ', 0 -wipe_char db BS, ' ', BS, 0 -err_notfound db 'Could not find kernel image: ',0 -err_notkernel db CR, LF, 'Invalid or corrupt kernel image.', CR, LF, 0 -err_noram db 'It appears your computer has less than ' - asciidec dosram_k - db 'K of low ("DOS")' - db CR, LF - db 'RAM. Linux needs at least this amount to boot. If you get' - db CR, LF - db 'this message in error, hold down the Ctrl key while' - db CR, LF - db 'booting, and I will take your word for it.', CR, LF, 0 -err_badcfg db 'Unknown keyword in syslinux.cfg.', CR, LF, 0 -err_noparm db 'Missing parameter in syslinux.cfg.', CR, LF, 0 -err_noinitrd db CR, LF, 'Could not find ramdisk image: ', 0 -err_nohighmem db 'Not enough memory to load specified kernel.', CR, LF, 0 -err_highload db CR, LF, 'Kernel transfer failure.', CR, LF, 0 -err_oldkernel db 'Cannot load a ramdisk with an old kernel image.' - db CR, LF, 0 -err_notdos db ': attempted DOS system call', CR, LF, 0 -err_comlarge db 'COMBOOT image too large.', CR, LF, 0 -err_a20 db CR, LF, 'A20 gate not responding!', CR, LF, 0 err_bootfailed db CR, LF, 'Boot failed: please change disks and press ' db 'a key to continue.', CR, LF, 0 -ready_msg db 'Ready.', CR, LF, 0 -crlfloading_msg db CR, LF -loading_msg db 'Loading ', 0 -dotdot_msg db '.' -dot_msg db '.', 0 -aborted_msg db ' aborted.' ; Fall through to crlf_msg! -crlf_msg db CR, LF -null_msg db 0 -crff_msg db CR, FF, 0 syslinux_cfg1 db '/boot' ; /boot/syslinux/syslinux.cfg syslinux_cfg2 db '/syslinux' ; /syslinux/syslinux.cfg syslinux_cfg3 db '/' ; /syslinux.cfg diff --git a/parsecmd.inc b/parsecmd.inc index e3e3734..a87da4b 100644 --- a/parsecmd.inc +++ b/parsecmd.inc @@ -92,6 +92,10 @@ getcommand: jc .eof jmp short .skipline + section .data +err_badcfg db 'Unknown keyword in syslinux.cfg.', CR, LF, 0 +err_noparm db 'Missing parameter in syslinux.cfg.', CR, LF, 0 + section .latebss alignb 4 vk_size equ (vk_end + 3) & ~3 diff --git a/pxelinux.asm b/pxelinux.asm index 3bcb372..b90a48b 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -2432,29 +2432,6 @@ writestr equ cwritestr copyright_str db ' Copyright (C) 1994-', year, ' H. Peter Anvin' db CR, LF, 0 -boot_prompt db 'boot: ', 0 -wipe_char db BS, ' ', BS, 0 -err_notfound db 'Could not find kernel image: ',0 -err_notkernel db CR, LF, 'Invalid or corrupt kernel image.', CR, LF, 0 -err_noram db 'It appears your computer has less than ' - asciidec dosram_k - db 'K of low ("DOS")' - db CR, LF - db 'RAM. Linux needs at least this amount to boot. If you get' - db CR, LF - db 'this message in error, hold down the Ctrl key while' - db CR, LF - db 'booting, and I will take your word for it.', CR, LF, 0 -err_badcfg db 'Unknown keyword in config file.', CR, LF, 0 -err_noparm db 'Missing parameter in config file.', CR, LF, 0 -err_noinitrd db CR, LF, 'Could not find ramdisk image: ', 0 -err_nohighmem db 'Not enough memory to load specified kernel.', CR, LF, 0 -err_highload db CR, LF, 'Kernel transfer failure.', CR, LF, 0 -err_oldkernel db 'Cannot load a ramdisk with an old kernel image.' - db CR, LF, 0 -err_notdos db ': attempted DOS system call', CR, LF, 0 -err_comlarge db 'COMBOOT image too large.', CR, LF, 0 -err_a20 db CR, LF, 'A20 gate not responding!', CR, LF, 0 err_bootfailed db CR, LF, 'Boot failed: press a key to retry, or wait for reset...', CR, LF, 0 bailmsg equ err_bootfailed err_nopxe db "No !PXE or PXENV+ API found; we're dead...", CR, LF, 0 @@ -2478,18 +2455,8 @@ notfound_msg db 'not found', CR, LF, 0 myipaddr_msg db 'My IP address seems to be ',0 tftpprefix_msg db 'TFTP prefix: ', 0 localboot_msg db 'Booting from local disk...', CR, LF, 0 -cmdline_msg db 'Command line: ', CR, LF, 0 -ready_msg db 'Ready.', CR, LF, 0 trying_msg db 'Trying to load: ', 0 -crlfloading_msg db CR, LF ; Fall through -loading_msg db 'Loading ', 0 -dotdot_msg db '.' -dot_msg db '.', 0 fourbs_msg db BS, BS, BS, BS, 0 -aborted_msg db ' aborted.' ; Fall through to crlf_msg! -crlf_msg db CR, LF -null_msg db 0 -crff_msg db CR, FF, 0 default_str db 'default', 0 syslinux_banner db CR, LF, 'PXELINUX ', version_str, ' ', date, ' ', 0 cfgprefix db 'pxelinux.cfg/' ; No final null! diff --git a/runkernel.inc b/runkernel.inc index a88b820..91dc563 100644 --- a/runkernel.inc +++ b/runkernel.inc @@ -649,6 +649,16 @@ no_high_mem: ; Error routine ret section .data +crlfloading_msg db CR, LF +loading_msg db 'Loading ', 0 +dotdot_msg db '.' +dot_msg db '.', 0 +ready_msg db 'ready.', CR, LF, 0 +err_oldkernel db 'Cannot load a ramdisk with an old kernel image.' + db CR, LF, 0 +err_noinitrd db CR, LF, 'Could not find ramdisk image: ', 0 +err_nohighmem db 'Not enough memory to load specified kernel.', CR, LF, 0 + boot_image db 'BOOT_IMAGE=' boot_image_len equ $-boot_image diff --git a/ui.inc b/ui.inc index 25822ad..dbf6352 100644 --- a/ui.inc +++ b/ui.inc @@ -600,7 +600,12 @@ is_disk_image equ is_bad_image %endif section .data +boot_prompt db 'boot: ', 0 +wipe_char db BS, ' ', BS, 0 err_badimage db 'Invalid image type for this media type!', CR, LF, 0 +err_notfound db 'Could not find kernel image: ',0 +err_notkernel db CR, LF, 'Invalid or corrupt kernel image.', CR, LF, 0 + align 2, db 0 kerneltype_table: -- 2.7.4