diff options
author | hpa <hpa> | 2001-12-10 07:38:23 +0000 |
---|---|---|
committer | hpa <hpa> | 2001-12-10 07:38:23 +0000 |
commit | 886a10a343516d7680600faba3ebfa9735cd3dc3 (patch) | |
tree | ddc7f2379f5bc9a8a52b3d51878023973ed2f31d /pxelinux.asm | |
parent | a47c6d65c1fbab9d821b869fc0bd30ae441f24fc (diff) | |
download | syslinux-886a10a343516d7680600faba3ebfa9735cd3dc3.tar.gz |
Add support for "pseudo-kernels" < 64K in size.
Diffstat (limited to 'pxelinux.asm')
-rw-r--r-- | pxelinux.asm | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/pxelinux.asm b/pxelinux.asm index 1bf8060e..3dfdfa4c 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -1523,14 +1523,20 @@ kernel_good: ; kernel code. The boot sector is never executed when using an external ; booting utility, but it contains some status bytes that are necessary. ; -; First check that our kernel is at least 64K and less than 8M (if it is +; First check that our kernel is at least 1K and less than 8M (if it is ; more than 8M, we need to change the logic for loading it anyway...) ; +; We used to require the kernel to be 64K or larger, but it has gotten +; popular to use the Linux kernel format for other things, which may +; not be so large. +; is_linux_kernel: cmp dx,80h ; 8 megs ja kernel_corrupt and dx,dx - jz kernel_corrupt + jnz kernel_sane + cmp ax,1024 ; Bootsect + 1 setup sect + jb kernel_corrupt kernel_sane: push ax push dx push si @@ -1572,6 +1578,10 @@ kernel_sane: push ax call abort_check ; Check for abort key mov cx,[ClustPerMoby] shr cx,1 ; Half a moby + cmp cx,[KernelClust] + jna .normalkernel + mov cx,[KernelClust] +.normalkernel: sub [KernelClust],cx xor bx,bx pop si ; Cluster pointer on stack @@ -1821,6 +1831,8 @@ high_load_loop: call cwritestr call abort_check mov cx,[KernelClust] + and cx,cx + jz high_load_done ; Zero left (tiny kernel?) cmp cx,[ClustPerMoby] jna high_last_moby mov cx,[ClustPerMoby] |