Developing NetBSD/hpcmips

This page contains information that current and potential developers of NetBSD/hpcmips might find useful.

Environment for developers

Building NetBSD/hpcmips bits

NetBSD/hpcmips kernel hacking

pbsdboot.exe - boot program from CE environment


Environment for developers


Self compile Environment (top)

Developers needs Ethernet cards and Large disks. Typical CE system has CF slot and PCMCIA slots. Assign CF to Ethernet card and PCMCIA to ATA/SCSI Interface.

CF Ethernet card
Type1:
Socket Communications CF Ethernet Cards
TDK CF Ethernet Cards
Type2:
Xircom CF Ethernet Cards
PCMCIA SCSI Card
Adaptec SlimSCSI 1460 series Card with any SCSI Disk works fine.
Adaptec SlimSCSI 1480 is Cardbus version,CardBus won't work.
If you want to build NetBSD/hpcmips system from source file. you have 2G SCSI Disks.
If you want to build NetBSD/hpcmips system with all packages from source file,5-10G Disks required.
PCMCIA ATA Card
some ATA-PCMCIA cards works fine,but I recommended SCSI system.

Cross compile Environment (top)

To make Cross Compiler, you can use pkgsrc/cross/mipsel-netbsd package from the The NetBSD packages collection (pkgsrc). After you've installed the mipsel-netbsd package, use the cross make script by sakamoto@splhack.org.

There's also an experimental ELF binary for a NetBSD/i386 cross compile environment. It is located at /pub/NetBSD/arch/hpcmips/cross/i386-hpcmips/mipsel-netbsd.tgz.


Building NetBSD/hpcmips bits


Preparing your system to build a kernel and binaries (top)

Getting Source from NetBSD CVS tree. (top)

NetBSD/hpcmips uses same source tree as other NetBSD ports. The Tracking NetBSD-current document will help you learn how to get a -current source tree via anoncvs and sup. You can also download tarballs of the -current source tree at ftp://ftp.NetBSD.org/pub/NetBSD-current/tar_files/src/.

Getting -current source snapshot

1. See AnonCVS mirrors and select your nearest anoncvs server.
2. CVS/Repository path fix to your nearest anoncvs server
3. Access anoncvs server (cf. to access jp.NetBSD.org anoncvs server)
cvs -d :pserver:anoncvs@jp.NetBSD.org:/cvs/cvsroot login
cvs -d :pserver:anoncvs@jp.NetBSD.org:/cvs/cvsroot co src
cvs update -P -d

fix CVS Repository Paths to your nearest server.

sh
for f in `find . -name Repository`; do
        mv $f $f.orig
        sed -e 's|^|/cvs|' $f.orig > $f
        rm $f.orig
done
echo ":pserver:anoncvs@sup.jp.NetBSD.org:/cvs/cvsroot" > /tmp/A
find . -name Root -exec cp /tmp/A {} \;

Building a kernel and binaries (top)


NetBSD/hpcmips kernel hacking


Adding support for a new system (top)

commit syssrc/sys/arch/hpcmips/hpcmips: platid.def
make syssrc/sys/arch/hpcmips/hpcmips dir.
regen syssrc/sys/arch/hpcmips/include: platid_generated.h platid_mask.h
commit syssrc/sys/arch/hpcmips/ dir.
add entry /syssrc/sys/arch/hpcmips/stand/pbsdboot/main.c and commit
keyboard translation table
commit /syssrc/sys/arch/hpcmips/vr/vrkiu.c

console frame buffer (top)

virtual TEXT vram implimentation
optimize scroll
hardware accelerator hooking mechanism
multiscreen (some bugs, so currently disabled)
if you want disable above codes, #define HPCFB_DISABLE

pbsdboot.exe - boot program from CE environment


Preparing to build Windows CE programs (top)

To build the NetBSD/hpcmips Windows CE "standalone" programs, you will need to use a properly configured Windows NT 4.0 system. This section will tell you what you tools you need and how you should configure your system to build the standalone programs. You should read the whole section before you proceed, but beware, some of the names of the products mentioned here are a bit confusing.

Building the NetBSD/hpcmips standalone programs requires Japanese language character encoding ("code page") support in Windows NT. If your installation of Windows NT does not already support Japanese language character encoding, you will need to install the Japanese Language Pack. (Windows NT installations in the United States will typically not include this support, even if you've installed Japanese language support for recent versions of Internet Explorer.) To install the Japanese Language Pack:

  1. Put your Windows NT 4.0 CD-ROM into your PC's CD-ROM drive.
  2. With the Windows NT Explorer, enter the "langpack" directory in the root of the CD-ROM.
  3. Right-click on the file named "Japanese" ("Japanese.inf" if you have Explorer set to display known file extensions), and select the "Install" menu option to install the language pack.
  4. When the system has finished installing the language pack, reboot your system.

Microsoft Visual C++ and the Windows CE Toolkit for Visual C++ are required to build the NetBSD/hpcmips standalone programs. Versions 5.0 and 6.0 of Visual C++ are known to build the standalone programs correctly. (You might be able to substitute the Windows CE Platform Builder or the Windows CE Embedded Toolkit in place of the Windows CE Toolkit if you don't have the latter, but this documentation assumes that if you have the expensive tools you know how to use them.) To prepare these tools:

  1. Install Microsoft Visual C++ 5.0 or 6.0.
  2. Install the Windows CE Toolkit for Visual C++ corresponding to your version of Visual C++ (e.g., the Windows CE Toolkit for Visual C++ 6.0, if you're using Visual C++ 6.0. (If you are doing a custom installation, you do not have to install the cross-compilation tools for platforms other than "WCE MIPS." You should install both the Palm-size PC and Handheld PC components of the Toolkit.)

Finally, in order to build a boot loader with support for directly reading kernels from BSD FFS disk partitions, you will need the Windows CE raw disk I/O control header, diskio.h, to be present in the "sys/arch/hpcmips/stand/include" directory of your source tree. (This header is not required if you're content to build a version of the boot loader which only supports reading kernels from FAT file systems.) diskio.h is part of the Windows CE Platform Builder (formerly known as the "Embedded Toolkit"), and can be found in one of the following locations depending on Platform Builder/Embedded Toolkit version:

Windows CE Embedded Toolkit for Visual C++ 5.0:
Unknown. If you know, send us mail.
Windows CE Platform Builder 2.11:
On Disk 1, at the path "\public\common\oak\inc\diskio.h."
Windows CE Platform Builder 2.12:
On Disk 2, at the path "\public\common\oak\inc\diskio.h."

Building the Windows CE Boot Program (pbsdboot.exe) (top)

Further references for the Microsoft tools (top)

Japanese characters in menu (top)

Having Japanese characters in menu is very important for Japanese version Windows CE users. Because, newer version of Windows CE (Japanese version; 2.11?) treats CF/PC Card folder as 'MEMORIKA-DO' (spelled in Japanese, Katakana), not 'Storage Card'.

On the other hand, older version of Windows CE(Japanese version; 1.0 and 2.0?) treats them as 'Storage Card'.

Therefore, both of 'Storage Card' and 'MEMORIKA-DO' are necessary for Japanese users.

(Does GetLocaleInfo API of WindowsCE help us?)

frame buffer type names (top)

D2
2bpp
Dxx_yyyy and M2L_y
xx means frame buffer depth
y means the pixel value of the foreground color in hexadecimal

'M2L means most significant bit to least significant bit. The MSB is left pixel and LSB is right pixel if a byte represents two or more pixels. 'L2M means reverse order. The 'x2' option provides virtual double width screen. For example, Palm Size PC, Freestype, which has LCD of 320x240, pretend to has LCD of 640x480. It had been hack for debugging until serial port got available. Please don't mind about it.

share source tree with other ports (top)

set OBJMACHINE environment.

binutils support WinCE (top)

binutils support WinCE for arm, sh3, mips. Does anybody try to build pbsdboot with binutils? What shall we do?

Up to NetBSD/hpcmips Port Page
Home page
Supported Architectures

www@NetBSD.org
$NetBSD: howto-develop.html,v 1.35 2006/01/29 20:19:51 jschauma Exp $
Copyright © 2000-2003 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.