aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules
Commit message (Collapse)AuthorAgeFilesLines
* chain.c32: DRMK: Fix comment at top of sourceGene Cumm2010-10-141-1/+2
|
* chain.c32: DRMK: Add comment about only using a DWORD for partition offsetGene Cumm2010-10-131-0/+1
|
* chain.c32: DRMK: clean up output; clean up and correct commentsGene Cumm2010-10-131-10/+8
|
* chain.c: Progress on DRMK and notes that it's not perfect yet.Gene Cumm2010-10-131-2/+21
|
* chain.c32: make CHS calculation match core/fs/diskio.cH. Peter Anvin2010-10-121-14/+10
| | | | | | | | Use the same format for the CHS calculation as in core/fs/diskio.c; also, apply the correct limits, and propagate the fix to the write routine. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* chain.c32: fix conversion from LBA to CHSH. Peter Anvin2010-10-121-1/+1
| | | | | | | | Bits [9:8] of the cylinder goes into the top bits of the sector register, not the bottom (and the math for that was wrong, anyway.) Reported-by: Michal Soltys <soltys@ziu.info> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* chain: Extra comments; shrink the new space to minimumGene Cumm2010-08-011-5/+5
|
* chain: Just assign the value rather than using memcpy()Gene Cumm2010-08-011-4/+1
|
* chain: add drmk= to usageGene Cumm2010-08-011-0/+1
|
* chain: Fix up and clean up DRMK load code; fix filename length; Patch memory.Gene Cumm2010-08-011-11/+8
|
* chain.c32: prepare for loading DRMKGene Cumm2010-08-011-0/+31
|
* chain.c: fix public index value in mbr and gpt iteratorsMichal Soltys2010-07-301-3/+3
| | | | | | | | | mbr and gpt iterators skip empty / non-data partitions properly, but don't update publicly visible index. With this patch, such partitions are counted as well. Signed-off-by: Michal Soltys <soltys@ziu.info> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* whichsys.c32: Fix example in the comments and Usage outputGert Hulselmans2010-07-131-2/+2
| | | | | | Fix example in the comments and Usage output. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
* ifplop.c32: Fix spelling errors and other mistakes in commentsGert Hulselmans2010-07-121-7/+12
| | | | | | Fix various spelling errors and other mistakes in the comment section. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
* ifcpu.c32: Remove defines used in the old sleep function.Gert Hulselmans2010-07-061-4/+0
| | | | | | Remove useless defines which where used in the old sleep function. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
* Merge remote branch 'gerth/whichsys'H. Peter Anvin2010-07-052-1/+129
|\
| * whichsys.c32: execute specific command, based on Syslinux bootloader variantGert Hulselmans2010-07-052-1/+129
| | | | | | | | | | | | | | | | | | | | | | Detemine which command to execute, based on the Syslinux bootloader variant from which you run it. Usage: whichsys.c32 [-iso- command] [-pxe- command] [-sys- command] Examples: whichsys.c32 -iso- chain.c32 hd0 -sys- chain.c32 hd1 swap whichsys.c32 -iso- config iso.cfg -sys- sys.cfg -pxe- pxe.cfg Signed-off-by: Gert Hulselmans <gerth@zytor.com>
* | Merge remote branch 'gerth/chain_grubcfg'H. Peter Anvin2010-07-051-9/+112
|\ \
| * | chain.c32: Put declaration of *stage2 before common codeGert Hulselmans2010-07-051-2/+2
| | | | | | | | | | | | | | | | | | Put declaration of *stage2 before common code. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
| * | chain.c32: add grubcfg= for passing an alternative config filename to GRUB ↵Gert Hulselmans2010-07-041-9/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Legacy and cleanup the root partition passing GRUB Legacy reserves 89 bytes for storing the filename of the configfile from memory address 0x8217 to 0x826f. We allow overwriting the default value (/boot/grub/menu.lst) when grubcfg=<filename> is used together with grub=<loader>. Examples: chain.c32 fs grub=/boot/grub/stage2 grubcfg=/boot/grub/grub.lst chain.c32 hd1,10 grub=/boot/grub/stage2 grubcfg=/boot/grub/grub.lst Use a structure instead of hard-coded offsets for modifying the install_partition variable (and the configfile name) in the stage2 file. Add some comments about the "boot information format" of the Multiboot specification, which is very similar to the install_partition variable used by GRUB Legacy. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
* | | ifcpu.c32: need <unistd.h>H. Peter Anvin2010-07-051-0/+1
| | | | | | | | | | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | ifcpu.c32: remove open-coded sleep functionH. Peter Anvin2010-07-051-13/+1
| |/ |/| | | | | | | | | Remove open-coded sleep function, which uses an unreliable BIOS call. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | com32: canonicalize DEBUG to mean <dprintf.h>H. Peter Anvin2010-07-013-21/+3
|/ | | | | | | Remove historical uses of DEBUG/dprintf in favor of the centralized <dprintf.h>. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* 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 structureH. 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.c32H. Peter Anvin2010-06-242-2/+2
| | | | | | | | | | | | | | Use the term "ls" for directory listing, like real operating systems ;) -hpa