Skip to contentSkip to conversation

I write a patch for Japanese NEC i386 old computers.

DISCUSSION 小関 一志 3 participants 7 messages Mar 24, 2007 – Mar 28, 2007

lore
Share & tools
lore
#0 lore raw

Hello, all.

I write a patch for GRUB 1.95. this is able to run GRUB2 under NEC PC-9800 series.
(NEC PC-9800 is Japanese i386 computer, but its hardware design is different with PC.)

Attach file: grub-1.95-nec98.diff.gz (113Kbytes)

Regards.
--
Hitoshi Ozeki [email protected]

#1 lore raw
Quoted 7 lines · 小関 一志

Hello, all.

I write a patch for GRUB 1.95. this is able to run GRUB2 under NEC PC-9800 series. (NEC PC-9800 is Japanese i386 computer, but its hardware design is different with PC.)

Attach file: grub-1.95-nec98.diff.gz (113Kbytes)

Thanks for your hard work!

You seem to have copied many files from i386/pc to i386/nec. A better approach would be to share them directly, for example by moving them to the i386 directory.

Could you separate your changes to common code (e.g. the code movement above, get_diskinfo, etc) and post those patches separately? That way we don't have a 650KB (!!!) patch to review.

The code movement patch should just be a list of

        old location -> new location

(that way it doesn't take up much space at all :) .

-Hollis

#2 lore raw

Sorry, my last article is too large, and includes copied part. I prepare for separated and removed copies patch.

Attached file: grub-1.95-nec98-patches.tar.gz (61Kbytes)

When you want to make the source tree for nec98, type below

$ tar xzf grub-1.95.tar.gz
$ tar xzf grub-1.95-nec98-patches.tar.gz
$ sh ./make-source-tree.sh
[end]

(file map)
boot/i386/pc/* -> boot/i386/nec98/* commands/i386/pc/* -> commands/i386/nec98/* conf/i386-pc.mk -> conf/i386-nec98.mk conf/i386-pc.rmk -> conf/i386-nec98.rmk disk/i386/pc/* -> disk/i386/nec98/* include/grub/i386/pc/* -> include/grub/i386/nec98/* (none) -> include/grub/i386/nec98/sca.h include/grub/i386/pc/util/* -> include/grub/i386/nec98/util/* include/grub/pc_partition.h -> include/grub/nec98_partition.h kern/i386/pc/* -> kern/i386/nec98/*
kern/i386/pc/* -> kern/i386/nec98/* loader/i386/pc/* -> loader/i386/nec98/* partmap/pc.c -> partmap/nec98.c
term/i386/pc/* -> term/i386/nec98/*
util/i386/pc/* -> util/i386/nec98/*
video/i386/pc/* -> video/i386/nec98/*

'include/grub/i386/nec98/sca.h' defines PC-9800 BIOS informations. 'video/i386/nec98/*' is only copied, hack nothing(PC-9800 does not have VGA and VBE).

Signature · 1 line
 Hitoshi Ozeki [email protected]
#3 lore raw
Quoted 8 lines · Hitoshi Ozeki

boot/i386/pc/* -> boot/i386/nec98/* commands/i386/pc/* -> commands/i386/nec98/* conf/i386-pc.mk -> conf/i386-nec98.mk conf/i386-pc.rmk -> conf/i386-nec98.rmk disk/i386/pc/* -> disk/i386/nec98/* include/grub/i386/pc/* -> include/grub/i386/nec98/* (none) -> include/grub/i386/nec98/sca.h include/grub/i386/pc/util/* -> include/grub/i386/nec98/util/*

Quoted 8 lines

include/grub/pc_partition.h -> include/grub/nec98_partition.h kern/i386/pc/* -> kern/i386/nec98/*
kern/i386/pc/* -> kern/i386/nec98/* loader/i386/pc/* -> loader/i386/nec98/* partmap/pc.c -> partmap/nec98.c
term/i386/pc/* -> term/i386/nec98/*
util/i386/pc/* -> util/i386/nec98/*
video/i386/pc/* -> video/i386/nec98/*

I have a question about the naming. Is it usual to call the platform "nec98"? I don't know how it is called in Linux/PC98 or FreeBSD(98), but it should be named in a similar way, I guess.

Thanks,
Okuji

#4 lore raw

Hello,

From: [email protected]

Quoted 5 lines

I have a question about the naming. Is it usual to call the platform "nec98"?
I don't know how it is called in Linux/PC98 or FreeBSD(98), but it should be
named in a similar way, I guess.

I expect to mistake 'PC98' for the Microsoft PC98 specification. EPSON's PC-9800 compatible machines? Uum...

Regards,

Signature · 1 line
 Hitoshi Ozeki [email protected]
#5 lore raw
In reply to Hitoshi Ozeki

Hello, all

Appendix: memory map of GRUB on NEC PC-9800 series.

At most machines have only one hardware mode, it is 'normal mode'.

[normal mode]

Start End Usage
0x000000 0x0003FF stack space of BIOS initial boot loader and
real mode interrupts
0x000400 0x0005FF BIOS system common area(BIOS parameter and
workarea)
? 0x001FFF Real mode stack
0x007C00 0x007FFF Chainloader loads a bootloader temporary,
and boot.img uses here for data area.
0x008000 ? GRUB kernel
? 0x01FFFF Limit of bootloader(boot sector and its next sector
loaded lower than here)
0x068000 0x077FFF Disk buffer
? 0x07FFFF Protected mode stack
0x080000 ? Heap
0x0A0000 0x0A7FFF Console text RAM, CG(Character Generator)
window and NVRAM
0x0A8000 0x0BFFFF Video RAM(RGB)
0x0C0000 0x0DFFFF extended BIOS ROM
0x0E0000 0x0E7FFF Video RAM(E).
0x0E8000 0x0FFFFF BIOS ROM

Few machines have two hardware mode, normal mode and high-rezo mode.

[high-resolution(high-rezo) mode]

Start End Usage
0x000000 0x0003FF stack space of BIOS initial boot loader and
real mode interrupts
0x000400 0x0005FF BIOS system common area(BIOS parameter and
workarea)
? 0x001FFF Real mode stack
0x007C00 0x007FFF Chainloader loads a bootloader temporary,
and boot.img uses here for data area.
0x008000 ? GRUB kernel
? 0x01FFFF Limit of bootloader(boot sector and its next sector
loaded lower than here)
0x068000 0x077FFF Disk buffer
? 0x07FFFF Protected mode stack
0x080000 0x0BFFFF protected mode memory window
0x0C0000 0x0CFFFF I forget.
0x0D0000 0x0DFFFF extended BIOS ROM
0x0E0000 0x0E7FFF Console text RAM, CG(Character Generator)
window and NVRAM
0x0E8000 0x0EFFFF I forget.
0x0F0000 0x0FFFFF BIOS ROM

Regards.

Signature · 1 line
 Hitoshi Ozeki [email protected]