Annotation of wikisrc/ports/hpcmips/howto-develop.mdwn, revision 1.2

1.2     ! ryoon       1: [[!meta title="NetBSD/hpcmips Developer How-To page"]]
1.1       mspo        2: 
1.2     ! ryoon       3: # Developing NetBSD/hpcmips
1.1       mspo        4: 
1.2     ! ryoon       5: [[!toc startlevel=1 levels=2]]
1.1       mspo        6: 
                      7: * * * * *
                      8: 
1.2     ! ryoon       9: ## About this page
1.1       mspo       10: 
                     11: This page contains information that current and potential developers of
                     12: NetBSD/hpcmips might find useful.
                     13: 
                     14: * * * * *
                     15: 
1.2     ! ryoon      16: # Environment for developers
1.1       mspo       17: 
1.2     ! ryoon      18: ## Self compile Environment
1.1       mspo       19: 
                     20: Developers needs Ethernet cards and Large disks. Typical CE system has
                     21: CF slot and PCMCIA slots. Assign CF to Ethernet card and PCMCIA to
                     22: ATA/SCSI Interface.
                     23: 
1.2     ! ryoon      24: <dl>
        !            25: <dt>CF Ethernet card</dt>
        !            26: <dd>Type1<br />
        !            27: Socket Communications CF Ethernet Cards
        !            28: TDK CF Ethernet Cards
        !            29: </dd>
        !            30: <dt>Type2</dt>
        !            31: <dd>
        !            32: Xircom CF Ethernet Cards
        !            33: </dd>
        !            34: <dt>PCMCIA SCSI Card</dt>
        !            35: <dd>Adaptec SlimSCSI 1460 series Card with any SCSI Disk works fine.<br />
        !            36: Adaptec SlimSCSI 1480 is Cardbus version,CardBus won't work.<br />
        !            37: If you want to build NetBSD/hpcmips system from source file. you
        !            38: have 2G SCSI Disks.<br />
        !            39: If you want to build NetBSD/hpcmips system with all packages from
        !            40: source file,5-10G Disks required.
        !            41: </dd>
        !            42: <dt>PCMCIA ATA Card</dt>
        !            43: <dd>
        !            44: some ATA-PCMCIA cards works fine, but I recommended SCSI system.
        !            45: </dd>
        !            46: </dl>
1.1       mspo       47: 
1.2     ! ryoon      48: ## Cross compile Environment
1.1       mspo       49: 
                     50: To make Cross Compiler, you can use pkgsrc/cross/mipsel-netbsd package
                     51: from the [The NetBSD packages collection
1.2     ! ryoon      52: (pkgsrc)](http://www.pkgsrc.org/). After you've installed the
        !            53: mipsel-netbsd package, use the [[cross make script|hpcmips-make]] by
        !            54: <mailto:sakamoto@splhack.org>.
1.1       mspo       55: 
                     56: There's also an experimental ELF binary for a NetBSD/i386 cross compile
                     57: environment. It is located at
                     58: [/pub/NetBSD/arch/hpcmips/cross/i386-hpcmips/mipsel-netbsd.tgz](ftp://ftp.NetBSD.org/pub/NetBSD/arch/hpcmips/cross/i386-hpcmips/mipsel-netbsd.tgz).
                     59: 
                     60: * * * * *
                     61: 
1.2     ! ryoon      62: # NetBSD/hpcmips kernel hacking
1.1       mspo       63: 
1.2     ! ryoon      64: ## Adding support for a new system
1.1       mspo       65: 
1.2     ! ryoon      66: [[!template id=programlisting text="""
1.1       mspo       67: commit syssrc/sys/arch/hpcmips/hpcmips: platid.def
                     68: make syssrc/sys/arch/hpcmips/hpcmips dir.
1.2     ! ryoon      69: regen syssrc/sys/arch/hpcmips/include: platid_generated.h platid_mask.h
1.1       mspo       70: commit syssrc/sys/arch/hpcmips/ dir.
                     71: add entry /syssrc/sys/arch/hpcmips/stand/pbsdboot/main.c and commit
                     72: keyboard translation table
1.2     ! ryoon      73: commit /syssrc/sys/arch/hpcmips/vr/vrkiu.c
        !            74: """]]
1.1       mspo       75: 
1.2     ! ryoon      76: ## console frame buffer
1.1       mspo       77: 
                     78: -   virtual TEXT vram implementation
                     79: -   optimize scroll
                     80: -   hardware accelerator hooking mechanism
                     81: -   multiscreen (some bugs, so currently disabled)
                     82: -   if you want disable above codes, \#define HPCFB\_DISABLE
                     83: 
                     84: * * * * *
                     85: 
1.2     ! ryoon      86: # pbsdboot.exe - boot program from CE environment
1.1       mspo       87: 
1.2     ! ryoon      88: ## Preparing to build Windows CE programs
1.1       mspo       89: 
                     90: To build the NetBSD/hpcmips Windows CE "standalone" programs, you will
                     91: need to use a properly configured Windows NT 4.0 system. This section
                     92: will tell you what you tools you need and how you should configure your
                     93: system to build the standalone programs. You should read the whole
                     94: section before you proceed, but beware, some of the names of the
                     95: products mentioned here are a bit confusing.
                     96: 
                     97: Building the NetBSD/hpcmips standalone programs *requires* Japanese
                     98: language character encoding ("code page") support in Windows NT. If your
                     99: installation of Windows NT does not already support Japanese language
                    100: character encoding, you will need to install the Japanese Language Pack.
                    101: (Windows NT installations in the United States will typically not
                    102: include this support, even if you've installed Japanese language support
                    103: for recent versions of Internet Explorer.) To install the Japanese
                    104: Language Pack:
                    105: 
                    106: 1.  Put your Windows NT 4.0 CD-ROM into your PC's CD-ROM drive.
1.2     ! ryoon     107: 2.  With the Windows NT Explorer, enter the "`langpack`"
1.1       mspo      108:     directory in the root of the CD-ROM.
1.2     ! ryoon     109: 3.  Right-click on the file named "`Japanese`"
        !           110:     ("`Japanese.inf`" if you have Explorer set to display known
        !           111:     file extensions), and select the "`Install`" menu option to
1.1       mspo      112:     install the language pack.
                    113: 4.  When the system has finished installing the language pack, reboot
                    114:     your system.
                    115: 
                    116: Microsoft Visual C++ and the Windows CE Toolkit for Visual C++ are
                    117: *required* to build the NetBSD/hpcmips standalone programs. Versions 5.0
                    118: and 6.0 of Visual C++ are known to build the standalone programs
                    119: correctly. (You might be able to substitute the Windows CE Platform
                    120: Builder or the Windows CE Embedded Toolkit in place of the Windows CE
                    121: Toolkit if you don't have the latter, but this documentation assumes
                    122: that if you have the expensive tools you know how to use them.) To
                    123: prepare these tools:
                    124: 
                    125: 1.  Install Microsoft Visual C++ 5.0 or 6.0.
                    126: 2.  Install the Windows CE Toolkit for Visual C++ corresponding to your
                    127:     version of Visual C++ (e.g., the Windows CE Toolkit for Visual C++
                    128:     6.0, if you're using Visual C++ 6.0. (If you are doing a custom
                    129:     installation, you do not have to install the cross-compilation tools
1.2     ! ryoon     130:     for platforms other than "`WCE MIPS`." You should install
1.1       mspo      131:     both the Palm-size PC and Handheld PC components of the Toolkit.)
                    132: 
                    133: Finally, in order to build a boot loader with support for directly
                    134: reading kernels from BSD FFS disk partitions, you will need the Windows
1.2     ! ryoon     135: CE raw disk I/O control header, `diskio.h`, to be present in the
        !           136: "`sys/arch/hpcmips/stand/include`" directory of your source tree.
1.1       mspo      137: (This header is not required if you're content to build a version of the
                    138: boot loader which only supports reading kernels from FAT file systems.)
1.2     ! ryoon     139: `diskio.h` is part of the Windows CE Platform Builder (formerly
1.1       mspo      140: known as the "Embedded Toolkit"), and can be found in one of the
                    141: following locations depending on Platform Builder/Embedded Toolkit
                    142: version:
                    143: 
1.2     ! ryoon     144: <dl>
        !           145: <dt>Windows CE Embedded Toolkit for Visual C++ 5.0:</dt>
        !           146: <dd>
        !           147: Unknown. If you know, [send us mail](mailto:www@NetBSD.org).
        !           148: </dd>
        !           149: <dt>Windows CE Platform Builder 2.11:</dt>
        !           150: <dd>
        !           151: On Disk 1, at the path "\public\common\oak\inc\diskio.h".
        !           152: </dd>
        !           153: <dt>Windows CE Platform Builder 2.12:</dt>
        !           154: <dd>
        !           155: On Disk 2, at the path "\public\common\oak\inc\diskio.h".
        !           156: </dd>
        !           157: </dl>
1.1       mspo      158: 
1.2     ! ryoon     159: ## Building the Windows CE Boot Program (pbsdboot.exe)
1.1       mspo      160: 
                    161: TODO
                    162: 
1.2     ! ryoon     163: ## Further references for the Microsoft tools
1.1       mspo      164: 
                    165: -   [Visual C++
                    166:     Datasheet](http://msdn.microsoft.com/visualc/prodinfo/datasheet/default.asp)
                    167: -   [Windows CE eMbedded Visual Tools
                    168:     Datasheet](http://www.microsoft.com/windows/embedded/ce/tools/factsheet.asp)
                    169: -   [Windows CE Platform Builder
                    170:     Datasheet](http://www.microsoft.com/windows/embedded/ce/tools/pb30datasheet.asp)
                    171: 
1.2     ! ryoon     172: ## Japanese characters in menu
1.1       mspo      173: 
                    174: Having Japanese characters in menu is very important for Japanese
                    175: version Windows CE users. Because, newer version of Windows CE (Japanese
                    176: version; 2.11?) treats CF/PC Card folder as 'MEMORIKA-DO' (spelled in
                    177: Japanese, Katakana), not 'Storage Card'.
                    178: 
                    179: On the other hand, older version of Windows CE(Japanese version; 1.0 and
                    180: 2.0?) treats them as 'Storage Card'.
                    181: 
                    182: Therefore, both of 'Storage Card' and 'MEMORIKA-DO' are necessary for
                    183: Japanese users.
                    184: 
                    185: (Does GetLocaleInfo API of WindowsCE help us?)
                    186: 
1.2     ! ryoon     187: ## frame buffer type names
1.1       mspo      188: 
1.2     ! ryoon     189: <dl>
        !           190: <dt>D2</dt>
        !           191: <dd>
        !           192: 2bpp
        !           193: </dd>
        !           194: <dt>Dxx\_yyyy and M2L\_y</dt>
        !           195: <dd>
        !           196: xx means frame buffer depth<br />
        !           197: y means the pixel value of the foreground color in hexadecimal<br />
        !           198: 'M2L' means most significant bit to least significant bit. The MSB is
        !           199: left pixel and LSB is right pixel if a byte represents two or more
        !           200: pixels. 'L2M' means reverse order. The 'x2' option provides virtual
        !           201: double width screen. For example, Palm Size PC, Freestype, which has
        !           202: LCD of 320x240, pretend to has LCD of 640x480. It had been hack for
        !           203: debugging until serial port got available. Please don't mind about
        !           204: it.
        !           205: </dd>
        !           206: </dl>
1.1       mspo      207: 
1.2     ! ryoon     208: ## Share source tree with other ports
1.1       mspo      209: 
                    210: set OBJMACHINE environment to create object directories namend
1.2     ! ryoon     211: `obj.${MACHINE}` instead of `obj`.
1.1       mspo      212: 
1.2     ! ryoon     213: ## binutils support WinCE
1.1       mspo      214: 
                    215: [binutils](http://sources.redhat.com/binutils/) support WinCE for arm,
                    216: sh3, mips. Does anybody try to build pbsdboot with binutils? What shall
                    217: we do?

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb