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

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

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