Diff for /wikisrc/ports/hpcmips/howto-develop.mdwn between versions 1.1 and 1.2

version 1.1, 2013/03/30 17:40:26 version 1.2, 2014/01/14 12:40:28
Line 1 Line 1
 NetBSD/hpcmips Developer How-To page  [[!meta title="NetBSD/hpcmips Developer How-To page"]]
 ====================================  
   
 Developing NetBSD/hpcmips  # Developing NetBSD/hpcmips
 -------------------------  
   
 ###   [[!toc startlevel=1 levels=2]]
   
 -   [About this page](#about)  
   
 ### Environment for developers  
   
 -   [Self compile Environment](#env-dev)  
 -   [Cross compile Environment](#cross-dev)  
   
 ### NetBSD/hpcmips kernel hacking  
   
 -   [Adding support for a new system](#add-platform)  
 -   [console frame buffer](#console-scroll)  
   
 ### pbsdboot.exe - boot program from CE environment  
   
 -   [Preparing to build Windows CE programs](#prep-booter)  
 -   [Building the Windows CE Boot Program (pbsdboot.exe)](#build-booter)  
 -   [Further references for the Microsoft tools](#build-references)  
 -   [Japanese characters in menu](#jp-menu)  
 -   [frame buffer type names](#fb-names)  
 -   [Share source tree with other ports](#share-source)  
 -   [binutils support WinCE](#binutils-wince)  
   
 * * * * *  * * * * *
   
 ###   ## About this page
   
 #### About this page ([top](#))  
   
 This page contains information that current and potential developers of  This page contains information that current and potential developers of
 NetBSD/hpcmips might find useful.  NetBSD/hpcmips might find useful.
   
 * * * * *  * * * * *
   
 ### Environment for developers  # Environment for developers
   
 #### Self compile Environment ([top](#))  ## Self compile Environment
   
 Developers needs Ethernet cards and Large disks. Typical CE system has  Developers needs Ethernet cards and Large disks. Typical CE system has
 CF slot and PCMCIA slots. Assign CF to Ethernet card and PCMCIA to  CF slot and PCMCIA slots. Assign CF to Ethernet card and PCMCIA to
 ATA/SCSI Interface.  ATA/SCSI Interface.
   
 CF Ethernet card  <dl>
 :     <dt>CF Ethernet card</dt>
 Type1:  <dd>Type1<br />
 :   Socket Communications CF Ethernet Cards  Socket Communications CF Ethernet Cards
   TDK CF Ethernet Cards
     TDK CF Ethernet Cards  </dd>
   <dt>Type2</dt>
 Type2:  <dd>
 :   Xircom CF Ethernet Cards  Xircom CF Ethernet Cards
   </dd>
 PCMCIA SCSI Card  <dt>PCMCIA SCSI Card</dt>
 :     <dd>Adaptec SlimSCSI 1460 series Card with any SCSI Disk works fine.<br />
 Adaptec SlimSCSI 1460 series Card with any SCSI Disk works fine.  Adaptec SlimSCSI 1480 is Cardbus version,CardBus won't work.<br />
 :     If you want to build NetBSD/hpcmips system from source file. you
 Adaptec SlimSCSI 1480 is Cardbus version,CardBus won't work.  have 2G SCSI Disks.<br />
 :   If you want to build NetBSD/hpcmips system from source file. you  If you want to build NetBSD/hpcmips system with all packages from
     have 2G SCSI Disks.  source file,5-10G Disks required.
   </dd>
   <dt>PCMCIA ATA Card</dt>
   <dd>
   some ATA-PCMCIA cards works fine, but I recommended SCSI system.
   </dd>
   </dl>
   
     If you want to build NetBSD/hpcmips system with all packages from  ## Cross compile Environment
     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  To make Cross Compiler, you can use pkgsrc/cross/mipsel-netbsd package
 from the [The NetBSD packages collection  from the [The NetBSD packages collection
 (pkgsrc)](../../docs/software/packages.html). After you've installed the  (pkgsrc)](http://www.pkgsrc.org/). After you've installed the
 mipsel-netbsd package, use the [cross make script](./hpcmips-make) by  mipsel-netbsd package, use the [[cross make script|hpcmips-make]] by
 `<sakamoto@splhack.org>`{.email}.  <mailto:sakamoto@splhack.org>.
   
 There's also an experimental ELF binary for a NetBSD/i386 cross compile  There's also an experimental ELF binary for a NetBSD/i386 cross compile
 environment. It is located at  environment. It is located at
Line 85  environment. It is located at Line 59  environment. It is located at
   
 * * * * *  * * * * *
   
 ### NetBSD/hpcmips kernel hacking  # NetBSD/hpcmips kernel hacking
   
 #### Adding support for a new system ([top](#))  ## Adding support for a new system
   
   [[!template id=programlisting text="""
 commit syssrc/sys/arch/hpcmips/hpcmips: platid.def  commit syssrc/sys/arch/hpcmips/hpcmips: platid.def
 :     
 make syssrc/sys/arch/hpcmips/hpcmips dir.  make syssrc/sys/arch/hpcmips/hpcmips dir.
 :   regen syssrc/sys/arch/hpcmips/include: platid\_generated.h  regen syssrc/sys/arch/hpcmips/include: platid_generated.h platid_mask.h
     platid\_mask.h  
 commit syssrc/sys/arch/hpcmips/ dir.  commit syssrc/sys/arch/hpcmips/ dir.
 :     
 add entry /syssrc/sys/arch/hpcmips/stand/pbsdboot/main.c and commit  add entry /syssrc/sys/arch/hpcmips/stand/pbsdboot/main.c and commit
 :     
 keyboard translation table  keyboard translation table
 :   commit /syssrc/sys/arch/hpcmips/vr/vrkiu.c  commit /syssrc/sys/arch/hpcmips/vr/vrkiu.c
   """]]
   
 #### console frame buffer ([top](#))  ## console frame buffer
   
 -   virtual TEXT vram implementation  -   virtual TEXT vram implementation
 -   optimize scroll  -   optimize scroll
Line 111  keyboard translation table Line 83  keyboard translation table
   
 * * * * *  * * * * *
   
 ### pbsdboot.exe - boot program from CE environment  # pbsdboot.exe - boot program from CE environment
   
 #### Preparing to build Windows CE programs ([top](#))  ## Preparing to build Windows CE programs
   
 To build the NetBSD/hpcmips Windows CE "standalone" programs, you will  To build the NetBSD/hpcmips Windows CE "standalone" programs, you will
 need to use a properly configured Windows NT 4.0 system. This section  need to use a properly configured Windows NT 4.0 system. This section
Line 132  for recent versions of Internet Explorer Line 104  for recent versions of Internet Explorer
 Language Pack:  Language Pack:
   
 1.  Put your Windows NT 4.0 CD-ROM into your PC's CD-ROM drive.  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`{.code}"  2.  With the Windows NT Explorer, enter the "`langpack`"
     directory in the root of the CD-ROM.      directory in the root of the CD-ROM.
 3.  Right-click on the file named "`Japanese`{.code}"  3.  Right-click on the file named "`Japanese`"
     ("`Japanese.inf`{.code}" if you have Explorer set to display known      ("`Japanese.inf`" if you have Explorer set to display known
     file extensions), and select the "`Install`{.code}" menu option to      file extensions), and select the "`Install`" menu option to
     install the language pack.      install the language pack.
 4.  When the system has finished installing the language pack, reboot  4.  When the system has finished installing the language pack, reboot
     your system.      your system.
Line 155  prepare these tools: Line 127  prepare these tools:
     version of Visual C++ (e.g., the Windows CE Toolkit for Visual C++      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      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      installation, you do not have to install the cross-compilation tools
     for platforms other than "`WCE MIPS`{.code}." You should install      for platforms other than "`WCE MIPS`." You should install
     both the Palm-size PC and Handheld PC components of the Toolkit.)      both the Palm-size PC and Handheld PC components of the Toolkit.)
   
 Finally, in order to build a boot loader with support for directly  Finally, in order to build a boot loader with support for directly
 reading kernels from BSD FFS disk partitions, you will need the Windows  reading kernels from BSD FFS disk partitions, you will need the Windows
 CE raw disk I/O control header, `diskio.h`{.code}, to be present in the  CE raw disk I/O control header, `diskio.h`, to be present in the
 "`sys/arch/hpcmips/stand/include`{.code}" directory of your source tree.  "`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  (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.)  boot loader which only supports reading kernels from FAT file systems.)
 `diskio.h`{.code} is part of the Windows CE Platform Builder (formerly  `diskio.h` is part of the Windows CE Platform Builder (formerly
 known as the "Embedded Toolkit"), and can be found in one of the  known as the "Embedded Toolkit"), and can be found in one of the
 following locations depending on Platform Builder/Embedded Toolkit  following locations depending on Platform Builder/Embedded Toolkit
 version:  version:
   
 Windows CE Embedded Toolkit for Visual C++ 5.0:  <dl>
 :   Unknown. If you know, [send us mail](mailto:www@NetBSD.org).  <dt>Windows CE Embedded Toolkit for Visual C++ 5.0:</dt>
 Windows CE Platform Builder 2.11:  <dd>
 :   On Disk 1, at the path "`\public\common\oak\inc\diskio.h`{.code}."  Unknown. If you know, [send us mail](mailto:www@NetBSD.org).
 Windows CE Platform Builder 2.12:  </dd>
 :   On Disk 2, at the path "`\public\common\oak\inc\diskio.h`{.code}."  <dt>Windows CE Platform Builder 2.11:</dt>
   <dd>
   On Disk 1, at the path "\public\common\oak\inc\diskio.h".
   </dd>
   <dt>Windows CE Platform Builder 2.12:</dt>
   <dd>
   On Disk 2, at the path "\public\common\oak\inc\diskio.h".
   </dd>
   </dl>
   
 #### Building the Windows CE Boot Program (pbsdboot.exe) ([top](#))  ## Building the Windows CE Boot Program (pbsdboot.exe)
   
 TODO  TODO
   
 #### Further references for the Microsoft tools ([top](#))  ## Further references for the Microsoft tools
   
 -   [Visual C++  -   [Visual C++
     Datasheet](http://msdn.microsoft.com/visualc/prodinfo/datasheet/default.asp)      Datasheet](http://msdn.microsoft.com/visualc/prodinfo/datasheet/default.asp)
Line 189  TODO Line 169  TODO
 -   [Windows CE Platform Builder  -   [Windows CE Platform Builder
     Datasheet](http://www.microsoft.com/windows/embedded/ce/tools/pb30datasheet.asp)      Datasheet](http://www.microsoft.com/windows/embedded/ce/tools/pb30datasheet.asp)
   
 #### Japanese characters in menu ([top](#))  ## Japanese characters in menu
   
 Having Japanese characters in menu is very important for Japanese  Having Japanese characters in menu is very important for Japanese
 version Windows CE users. Because, newer version of Windows CE (Japanese  version Windows CE users. Because, newer version of Windows CE (Japanese
Line 204  Japanese users. Line 184  Japanese users.
   
 (Does GetLocaleInfo API of WindowsCE help us?)  (Does GetLocaleInfo API of WindowsCE help us?)
   
 #### frame buffer type names ([top](#))  ## frame buffer type names
   
 D2  
 :   2bpp  
   
 Dxx\_yyyy and M2L\_y  
 :   xx means frame buffer depth  
   
     y means the pixel value of the foreground color in hexadecimal  <dl>
   <dt>D2</dt>
   <dd>
   2bpp
   </dd>
   <dt>Dxx\_yyyy and M2L\_y</dt>
   <dd>
   xx means frame buffer depth<br />
   y means the pixel value of the foreground color in hexadecimal<br />
   '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.
   </dd>
   </dl>
   
     'M2L means most significant bit to least significant bit. The MSB is  ## Share source tree with other ports
     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 to create object directories namend  set OBJMACHINE environment to create object directories namend
 `obj.${MACHINE}`{.filename} instead of `obj`{.filename}.  `obj.${MACHINE}` instead of `obj`.
   
 #### binutils support WinCE ([top](#))  ## binutils support WinCE
   
 [binutils](http://sources.redhat.com/binutils/) support WinCE for arm,  [binutils](http://sources.redhat.com/binutils/) support WinCE for arm,
 sh3, mips. Does anybody try to build pbsdboot with binutils? What shall  sh3, mips. Does anybody try to build pbsdboot with binutils? What shall
 we do?  we do?
   
   

Removed from v.1.1  
changed lines
  Added in v.1.2


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