Changeset c45ffb669e96ed42d563831d13f3d113f7e18ebf
- Timestamp:
- 10/19/09 13:26:20 (2 years ago)
- Author:
- Erwan Velu <erwan.velu@…>
- Children:
- ac729becd4e99890a9fc4e6f543c0ae46fd92b05
- Parents:
- 961ae24c5508a1de642c674609c379dd3202f9c7, 3d6f5132894acf54b1958ae190624fc0a774294f
- git-committer:
- Erwan Velu <erwan.velu@free.fr> / 2009-10-19T15:26:20Z+0200
- Message:
-
Merge commit 'hpa/master'
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
ra2ad37
|
r961ae2
|
|
| 32 | 32 | MODULES_PCIMAP_FILE ?= /lib/modules/$(KERNEL_VERSION)/modules.pcimap |
| 33 | 33 | PCI_IDS_FILE ?= $(PWD)/floppy/pci.ids |
| | 34 | ISO_DIR ?= iso/isolinux |
| 34 | 35 | |
| 35 | 36 | all: $(MODULES) $(TESTFILES) |
| … |
… |
|
| 50 | 51 | MTOOLSRC=$(PWD)/floppy/mtools.conf $(MCOPY) floppy/hdt.cfg a:syslinux.cfg |
| 51 | 52 | |
| | 53 | hdt.iso: hdt.c32 $(topdir)/core/isolinux.bin floppy/hdt.cfg |
| | 54 | rm -rf $(ISO_DIR) |
| | 55 | rm -rf hdt.iso |
| | 56 | mkdir -p $(ISO_DIR) |
| | 57 | cp $(topdir)/core/isolinux.bin $(ISO_DIR) |
| | 58 | cp floppy/hdt.cfg $(ISO_DIR)/isolinux.cfg |
| | 59 | cp hdt.c32 $(ISO_DIR) |
| | 60 | -[ ! -f $(PCI_IDS_FILE) ] && cp /usr/share/hwdata/pci.ids $(ISO_DIR) |
| | 61 | -[ ! -f $(PCI_IDS_FILE) ] && cp /usr/share/pci.ids $(ISO_DIR) |
| | 62 | -[ -f $(MODULES_ALIAS_FILE) ] && cp $(MODULES_ALIAS_FILE) $(ISO_DIR) |
| | 63 | -[ -f $(MODULES_PCIMAP_FILE) ] && cp $(MODULES_PCIMAP_FILE) $(ISO_DIR) |
| | 64 | -[ ! -f $(ISO_DIR)/pci.ids ] && printf "\nThe floppy/pci.ids file is missing and can be downloaded from http://pciids.sourceforge.net and put in\nthe ./com32/hdt/floppy directory of the extracted Syslinux source.\n\n" |
| | 65 | mkisofs -o hdt.iso -b isolinux/isolinux.bin -c isolinux/boot.cat \ |
| | 66 | -no-emul-boot -boot-load-size 4 -boot-info-table \ |
| | 67 | iso/ |
| | 68 | |
| 52 | 69 | tidy dist: |
| 53 | 70 | rm -f *.o *.lo *.a *.lst *.elf .*.d *.tmp |
| … |
… |
|
| 57 | 74 | |
| 58 | 75 | spotless: clean |
| 59 | | rm -f *.lss *.c32 *.com hdt.img |
| | 76 | rm -f *.lss *.c32 *.com hdt.img hdt.iso |
| 60 | 77 | rm -f *~ \#* |
| 61 | 78 | |
-
|
rfd0064
|
r3d6f51
|
|
| 128 | 128 | mbh_len = 12; |
| 129 | 129 | |
| 130 | | if (i + mbh_len < len) |
| | 130 | if (i + mbh_len > len) |
| 131 | 131 | mbh_len = 0; /* Invalid... */ |
| 132 | 132 | else |
-
|
r15c6dc
|
r1d8b22
|
|
| 234 | 234 | |
| 235 | 235 | hcdhcp_magic dd 0x2983c8ac ; Magic number |
| 236 | | dd 5*4 ; Size of this structure |
| 237 | | hcdhcp_offset dd 0 ; Offset (entered by patcher) |
| 238 | | hcdhcp_len dd 0 ; Length (entered by patcher) |
| | 236 | hcdhcp_len dd 7*4 ; Size of this structure |
| 239 | 237 | hcdhcp_flags dd 0 ; Reserved for the future |
| | 238 | ; Parameters to be parsed before the ones from PXE |
| | 239 | bdhcp_offset dd 0 ; Offset (entered by patcher) |
| | 240 | bdhcp_len dd 0 ; Length (entered by patcher) |
| | 241 | ; Parameters to be parsed *after* the ones from PXE |
| | 242 | adhcp_offset dd 0 ; Offset (entered by patcher) |
| | 243 | adhcp_len dd 0 ; Length (entered by patcher) |
| 240 | 244 | |
| 241 | 245 | _start1: |
| … |
… |
|
| 269 | 273 | ; Move the hardwired DHCP options (if present) to a safe place... |
| 270 | 274 | ; |
| 271 | | hcdhcp_copy: |
| 272 | | mov cx,[hcdhcp_len] |
| 273 | | mov ax,trackbufsize |
| | 275 | bdhcp_copy: |
| | 276 | mov cx,[bdhcp_len] |
| | 277 | mov ax,trackbufsize/2 |
| 274 | 278 | jcxz .none |
| 275 | 279 | cmp cx,ax |
| 276 | 280 | jbe .oksize |
| 277 | 281 | mov cx,ax |
| 278 | | mov [hcdhcp_len],ax |
| | 282 | mov [bdhcp_len],ax |
| 279 | 283 | .oksize: |
| 280 | | mov eax,[hcdhcp_offset] |
| | 284 | mov eax,[bdhcp_offset] |
| 281 | 285 | add eax,_start |
| 282 | 286 | mov si,ax |
| … |
… |
|
| 286 | 290 | mov ds,ax |
| 287 | 291 | mov di,trackbuf |
| | 292 | add cx,3 |
| | 293 | shr cx,2 |
| | 294 | rep movsd |
| | 295 | pop ds |
| | 296 | .none: |
| | 297 | |
| | 298 | adhcp_copy: |
| | 299 | mov cx,[adhcp_len] |
| | 300 | mov ax,trackbufsize/2 |
| | 301 | jcxz .none |
| | 302 | cmp cx,ax |
| | 303 | jbe .oksize |
| | 304 | mov cx,ax |
| | 305 | mov [adhcp_len],ax |
| | 306 | .oksize: |
| | 307 | mov eax,[adhcp_offset] |
| | 308 | add eax,_start |
| | 309 | mov si,ax |
| | 310 | and si,000Fh |
| | 311 | shr eax,4 |
| | 312 | push ds |
| | 313 | mov ds,ax |
| | 314 | mov di,trackbuf+trackbufsize/2 |
| 288 | 315 | add cx,3 |
| 289 | 316 | shr cx,2 |
| … |
… |
|
| 578 | 605 | ; an option field. |
| 579 | 606 | ; |
| 580 | | mov cx,[hcdhcp_len] |
| | 607 | mov cx,[bdhcp_len] |
| 581 | 608 | mov si,trackbuf |
| 582 | 609 | call parse_dhcp_options |
| … |
… |
|
| 635 | 662 | call parse_dhcp ; Parse DHCP packet |
| 636 | 663 | call crlf |
| | 664 | |
| | 665 | ; |
| | 666 | ; Process any hardwired options the user may have specified. This is |
| | 667 | ; different than the actual packets in that there is no header, just |
| | 668 | ; an option field. This handles the "after" options |
| | 669 | ; |
| | 670 | mov cx,[adhcp_len] |
| | 671 | mov si,trackbuf+trackbufsize/2 |
| | 672 | call parse_dhcp_options |
| 637 | 673 | |
| 638 | 674 | ; |
| … |
… |
|
| 2300 | 2336 | ; |
| 2301 | 2337 | ; Get a DHCP packet from the PXE stack into the trackbuf. |
| | 2338 | ; Leaves the upper half of the trackbuf untouched. |
| 2302 | 2339 | ; |
| 2303 | 2340 | ; Input: |
| … |
… |
|
| 2320 | 2357 | movzx ax,dl |
| 2321 | 2358 | stosw ; Packet type |
| 2322 | | mov ax,trackbufsize |
| | 2359 | mov ax,trackbufsize/2 |
| 2323 | 2360 | stosw ; Buffer size |
| 2324 | 2361 | mov ax,trackbuf |