summaryrefslogtreecommitdiff
path: root/com32/modules
Commit message (Collapse)AuthorAgeFilesLines
* ifplop.c32: Detect if PLoP USB/CD INT13h hook is enabled/disabledGert Hulselmans2010-07-012-1/+166
| | | | | | | | | | | | | | | | New module which detects if the PLoP Boot Loader already has booted a CDROM or USB drive by checking for the presence of the PLoP INT13h hook. The following assembly code (NASM) can detect the PLoP INT13h hook: mov eax,'PoLP' ; Reverse of 'PLoP' mov ebp,'DKHC' ; Reverse of 'CHKD' int 13h cmp eax,' sey' ; Reverse of 'yes ' jz plop_INT13h_active Signed-off-by: Gert Hulselmans <gerth@zytor.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* config.c32: accept an optional new directoryH. Peter Anvin2010-06-281-3/+4
| | | | | | | Accept an optional new directory to config.c32, just as we permit for the CONFIG statement. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* chain.c32: pass partition number to stage2 of Grub LegacyGert Hulselmans2010-06-271-5/+8
| | | | | | | | | | | | Grub Legacy stage2 will read the install_partition variable from memory address 0x8208. We only need to change the value at 0x820a to the correct partition number: -1: whole drive (default) 0-3: primary partitions 4-*: logical partitions Signed-off-by: Gert Hulselmans <gerth@zytor.com>
* chain.c32: only pass partition number in DH, when grldr= is usedGert Hulselmans2010-06-271-1/+11
| | | | | | | | | | | | | | | | | | | | Add grldr= as boot parameter, so the partition number is only passed to grub4dos grldr, when grldr= is used. Currently the partition number is passed in DH unconditionally. As consequence, grldr will set its root partition on which is searches its menu.lst to (hd0), because -1 (whole drive) is passed in DH as root partition: chain.c32 file=/grldr When the conditional check, this problem is solved: chain.c32 file=/grldr Grub4dos will search all partitions for its menu.lst When you want to set the root partition, use something like the following: chain.c32 hd0,2 grldr=/grldr chain.c32 fs grldr=/grldr Signed-off-by: Gert Hulselmans <gerth@zytor.com>
* chain.c32: add keeppxe to usage output and cleanup commentsGert Hulselmans2010-06-271-21/+25
| | | | | Add keeppxe to usage output. Cleanup some comments.
* Export the 64-bit partition offset and use it in chain.cH. Peter Anvin2010-06-271-2/+3
| | | | | | | | | | | | | When used with the "fs" option to chain.c32, we need to know our own filesystem offset. That means knowing if we used the MBR vs GPT partition information, as well as if we ended up using the passed-in information or not. Resolve this by providing an explicit pointer to the current partition offset. Eventually this should be replaced by some kind of statfs() call. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* chain.c32: fix handover to a logical partitionH. Peter Anvin2010-06-261-48/+65
| | | | | | | | Make sure the handover information to a logical partition is adjusted correctly -- we can't just hand over the partition entry, but we have to adjust start_lba to match the real start LBA. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pwd.c32: add to MakefileH. Peter Anvin2010-06-261-1/+1
| | | | | | Actually *build* pwd.c32... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* chain.c32: "fs" is a singular token, only match if completeH. Peter Anvin2010-06-261-1/+1
| | | | | | | fs is a full token, not a prefix. Reported-by: Gert Hulselmans <gerth@zytor.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32 pwd moduleGene Cumm2010-06-261-0/+51
| | | | | | | | | | | | [MODULE] pwd to list present (current) working directory. If the returned string is empty, display ".". If the return value is NULL, display an error message. Unfortunately, it appears that COM32 getcwd is not working properly at this moment, it calling the COMBOOT call and getting an empty string. Signed-off-by: Gene Cumm <gene.cumm@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* chain: Support booting GPT partition by labelShao Miller2010-06-261-5/+72
| | | | | | | Use the "label:" specifier followed by the label for one of a GPT disk's partitions. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain: Support booting GPT disk/partition by GUIDShao Miller2010-06-261-22/+148
| | | | | | | Use the "guid:" specifier followed by the GUID for a GPT disk or one of its partitions. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32: correctly set the length of the GPT handover structuresyslinux-4.00-pre61H. Peter Anvin2010-06-251-50/+57
| | | | | | | We need to make sure the entire GPT handover structure is mapped correctly by the shuffler. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Merge remote branch 'sha0/chain_gpt'H. Peter Anvin2010-06-251-196/+660
|\
| * chain: Implement GPT hand-over protocol as documentedShao Miller2010-06-251-1/+50
| | | | | | | | | | | | | | When a partition was yielded by a GPT partition iterator, we follow the protocol documented in syslinux/doc/gpt.txt. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| * chain: Allow booting the Syslinux partition with "fs"Shao Miller2010-06-241-31/+44
| | | | | | | | | | | | | | | | | | | | We will now accept an "fs" option which instructs us to chain-load whatever partition we were booted from. Not useful for PXELINUX, for obvious reasons. Can be used in combination with a "file=" option, to boot something other than Syslinux. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| * chain: A sprinkling of documentationShao Miller2010-06-241-20/+29
| | | | | | | | Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| * chain: Remove type-assurance macro for declarationsShao Miller2010-06-241-7/+6
| | | | | | | | | | | | | | | | | | | | A coding pattern from WinVBlock leaked through whereby a macro is used to declare functions having the same prototype. This makes their declarations look a little less like a traditional declarations however, so that pattern has been removed. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| * chain: Support GPT disksShao Miller2010-06-241-1/+230
| | | | | | | | | | | | | | | | A GPT disk partition iterator is introduced, so we can chain-load partitions on such a disk. Tested-by: Shao Miller <shao.miller@yrdsb.edu.on.ca> Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| * chain: Change disk partition iteration strategyShao Miller2010-06-241-111/+219
| | | | | | | | | | | | | | | | | | | | In order to support more than just MBR and EBR walking, we introduce the abstraction of a partition iterator. Currently there are just the two types: MBR partition iterator and extended partition iterator. Tested-by: Shao Miller <shao.miller@yrdsb.edu.on.ca> Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| * chain: Fix allocation size in read_sectorsShao Miller2010-06-241-1/+1
| | | | | | | | | | | | Oops. We might allocate more than just one sector. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| * chain: Add DOS partition dumping routine for debuggingShao Miller2010-06-231-0/+33
| | | | | | | | Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| * chain: Use struct mbr where applicableShao Miller2010-06-231-39/+52
| | | | | | | | | | | | Instead of magic offsets. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| * chain: Use CHS typedef and macrosShao Miller2010-06-221-6/+13
| | | | | | | | | | | | | | | | A DOS partition table entry contains cylinder, head, sector tuples which can be convenient to group together and extract with convenience macros. Currently unused. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| * chain: Allow reading more than a single sectorShao Miller2010-06-221-9/+15
| | | | | | | | Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| * chain: Run Nindent on com32/modules/chain.cShao Miller2010-06-221-26/+24
| | | | | | | | Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* | Rename dir.c32 -> ls.c32syslinux-4.00-pre60H. Peter Anvin2010-06-242-2/+2
| | | | | | | | | | | | | | Use the term "ls" for directory listing, like real operating systems ;) -hpa
* | ifcpu: Adding PAE supportErwan Velu2010-06-241-4/+9
| |
* | ifcpu: printing usage if no parameterErwan Velu2010-06-241-31/+42
|/ | | | If you just call the ifcpu.32 it display the usage.
* Merge remote branch 'sha0/boot_args' into pathbasedH. Peter Anvin2010-06-172-6/+12
|\
| * ifcpuXX: Support multiple parameters with labelsShao Miller2010-06-122-6/+12
| | | | | | | | | | | | | | | | | | | | The ifcpu.c32 and ifcpu64.c32 modules take arguments including the form <true_label> -- <false_label>. It is convenient to allow these labels to be not just a single word, but to include parameters. This is useful for <TAB>-editing and modifying the command-line to include parameters you'd like to pass. Not-yet-tested: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* | chain.c32: add support for loading GRUB stage2Paul Bolle2010-06-071-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds (basic) support for GRUB stage2 image files. Loading a stage2 image will probably give you a GRUB prompt, with GRUB's "root" set at "(hd0)" (ie, entire first disk). Maybe the "root" will differ in less common setups. (One can of course select another disk and/or partition with GRUB's "root" command.) This has only been tested with version 3.2 stage2 images (as used by GRUB 0.97). I'm not familiair with differences with other versions. GRUB's loading mechanism allows to somehow provide stage2 with the selected disk and partition, BSD slice, etc. (ie, to tell stage2 what it's "root" is). I don't yet understand the notation used in that mechanism. Besides, since stage2 images will not necessarily be loaded from the disk (and partition, etc.) they were installed to, it seems best to just use the first disk. GRUB stage1_5 image files load quite similarly. However, for some reason, a short test only got those images to print an error ("Error 17"). This could be related to the partition info these images are provided with when they're loaded. I have never used stage1_5 images, and do not know how to properly use and configure those, so my test stopped there, and stage1_5 images are not supported. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge remote branch 'origin/master' into pathbasedH. Peter Anvin2010-05-201-11/+15
|\ \ | |/ | | | | | | | | | | Resolved Conflicts: com32/modules/cat.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * cat.c32: handle multiple files, use argv[0], copy 4K at a timeH. Peter Anvin2010-05-201-11/+14
| | | | | | | | | | | | | | Loop over multiple files, use argv[0] for the program name, and copy 4K at a time. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | cat.c32: remove unused variableH. Peter Anvin2010-05-121-1/+0
| | | | | | | | | | | | Remove unused variable as part of -Werror cleanup. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | vpdtest.c32: remove unused variableH. Peter Anvin2010-05-121-1/+0
| | | | | | | | | | | | Remove unused variable as part of -Werror cleanup. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | sdi.c32: remove unused variableH. Peter Anvin2010-05-121-1/+0
| | | | | | | | | | | | Remove unused variable as part of -Werror cleanup. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | pcitest.c32: mark argc/argv usedH. Peter Anvin2010-05-121-0/+3
| | | | | | | | | | | | Part of -Werror cleanup. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | disk.c32: remove unused variableH. Peter Anvin2010-05-121-3/+4
| | | | | | | | | | | | Remove unused variable as part of -Werror cleanup. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge branch 'master' into pathbasedH. Peter Anvin2010-05-123-9/+8
|\ \ | |/
| * cpuid: Typo between argv & argcErwan Velu2010-05-121-1/+1
| | | | | | | | argv isn't a number ;)
| * cmd: Adding proper include to syslinux_run_commandErwan Velu2010-05-121-0/+1
| |
| * disk: Fixing get_error() callErwan Velu2010-05-121-8/+6
| | | | | | | | get_error prototype changed since this module was written
* | Merge branch 'master' into pathbasedH. Peter Anvin2010-05-112-1/+31
|\ \ | |/ | | | | | | | | | | Resolved Conflicts: com32/modules/Makefile Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * cat.c32: move from samples to modules; remove debug codeH. Peter Anvin2010-05-112-1/+31
| | | | | | | | | | | | | | Move cat.c32 from samples to modules, and remove debugging messages. Real users may want to use this. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'master' into pathbasedH. Peter Anvin2010-05-111-1/+1
|\ \ | |/
| * Merge remote branch 'hdt-pierre/fixes-for-3.86'H. Peter Anvin2010-05-111-1/+1
| |\
| | * disk.c32: add disk geometry checkPierre-Alexandre Meyer2010-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Make sure the CHS geometry is valid before displaying disk information to avoid showing garbage. Debugging-info-by: Gert Hulselmans <gerth@zytor.com> Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | cpuid.c32: print unsigned valuessyslinux-4.00-pre41H. Peter Anvin2010-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | Print unsigned values; formatting was wrong for unsigned values anyway. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | Merge remote branch 'origin/master' into pathbasedsyslinux-4.00-pre40H. Peter Anvin2010-04-281-1/+1
|\ \ \ | |/ /