Subject: Re: T5048 Continuous Reset (D102GGC2)
To: None <port-i386@NetBSD.org>
From: Kenneth Freidank <kennethcf@earthlink.net>
List: port-i386
Date: 02/12/2007 02:15:11
I have the secret to installing NetBSD on this !@#%$% machine.  I have 
not tweaked the config file to use all the devices 100%, so tweak as 
necessary.  However, you will get NetBSD installed.  The procedure:

- You must already have NetBSD on a machine (mine runs 3.99.21), and 
know how to create a custom Install kernel along with custom install 
floppies.  You will install the sets from the distribution CD, but 
replacing the installed kernel from the distribution CD with a custom 
boot kernel.
    - or -
- Install NetBSD and a custom boot kernel on the hard drive while the 
hard drive is installed on another machine, then return the hard drive 
to the T5048 (mother board D102GGC2).
    - or -
- some other combination that achieves the same result.

Here is how I did it, using the boot floppies and an external USB floppy 
drive (the 1st described method).

1) Using NetBSD 3.1 release for source on another machine (I used my 
3.99.21 machine), replace the INSTALL kernel config file, 
"/usr/src/sys/arch/i386/conf/INSTALL", with the following kernel config.

#    $NetBSD: T5048,v 1.00.0.0 2007/02/11 00:00:00 tron Exp $
#
#    INSTALL - T5048 (D102GGC2 motherboard) Installation kernel.
#
#    This kernel should be rebuild with install items removed as
#       the normal boot kernel.  Do not use GENERIC as machine will
#       continually restart.
#

include "arch/i386/conf/std.i386"

makeoptions    COPTS="-Os"        # Optimise for space. Implies -O2

# Enable the hooks used for initializing the root memory-disk.
options     MEMORY_DISK_HOOKS
options     MEMORY_DISK_IS_ROOT    # force root on memory disk
options     MEMORY_DISK_SERVER=0    # no userspace memory disk support
options     MEMORY_DISK_ROOT_SIZE=10000    # size of memory disk, in blocks
maxusers    2        # estimated number of users

# CPU support.  At least one is REQUIRED.
options     I386_CPU
options     I486_CPU
options     I586_CPU
options     I686_CPU

# CPU-related options.
options     MATH_EMULATE    # floating point emulation

# Save a physical page per process by not setting a kernel stack red zone.
options     NOREDZONE

# The following options override the memory sizes passed in from the boot
# block.  Use them *only* if the boot block is unable to determine the 
correct
# values.  Note that the BIOS may *correctly* report less than 640k of base
# memory if the extended BIOS data area is located at the top of base memory
# (as is the case on most recent systems).
options     REALBASEMEM=639        # size of base memory
options     REALEXTMEM=440901    # size of extended memory

options     INSECURE    # disable kernel security levels

options     RTC_OFFSET=0    # hardware clock is this many mins. west of GMT

options     PIPE_SOCKETPAIR        # smaller, but slower pipe(2)
options     MALLOC_NOINLINE        # Not inlining MALLOC saves memory


# Compatibility options
options     COMPAT_386BSD_MBRPART # recognize old partition ID
options        COMPAT_BSDPTY    # /dev/[pt]ty?? ptys.

# File systems
file-system     FFS        # UFS
file-system     MFS        # memory file system
file-system     NFS        # Network File System client
file-system     CD9660        # ISO 9660 + Rock Ridge file system
file-system     MSDOSFS        # MS-DOS file system
file-system     FDESC        # /dev/fd
file-system     KERNFS        # /kern

# Filesystem options
options     NFS_V2_ONLY    # Exclude NFS3 and NQNFS code to save space
options     VNODE_OP_NOINLINE    # Not inlining vnode op calls saves mem
options     FFS_NO_SNAPSHOT    # ffs snapshots

# Networking options
options     INET        # IP + ICMP + TCP + UDP

# These options enable verbose messages for several subsystems.
# Warning, these may compile large string tables into the kernel!
options     PCIVERBOSE    # verbose PCI device autoconfig messages

# wscons options
#
options     WSEMUL_VT100        # VT100 / VT220 emulation
options     PCDISPLAY_SOFTCURSOR

# Squeeze...
options     NVNODE=50
options     NBUF=20
options     BUFPAGES=20
options     NMBCLUSTERS=64

# Kernel root file system and dump configuration.
config        netbsd    root on ? type ?

#
# Device configuration
#

mainbus0 at root
cpu0    at mainbus0


# Basic Bus Support

# PCI bus support
pci*    at mainbus? bus ?
pci*    at pchb? bus ?
pci*    at ppb? bus ?

# PCI bridges
pchb*    at pci? dev ? function ?    # PCI-Host bridges
pceb*    at pci? dev ? function ?    # PCI-EISA bridges
pcib*    at pci? dev ? function ?    # PCI-ISA bridges
ppb*    at pci? dev ? function ?    # PCI-PCI bridges

# As well as 5 and 7, avoid irq 4 and 3 because we do not probe com* here
options     PCIC_ISA_INTR_ALLOC_MASK=0xff47

# ISA bus support
isa0    at pcib?

# Coprocessor Support

# Math Coprocessor support
npx0    at isa? port 0xf0 irq 13    # x86 math coprocessor

# Console Devices

# wscons
pckbc0        at isa?            # pc keyboard controller
pckbd*        at pckbc?        # PC keyboard
pms*        at pckbc?        # PS/2 mouse for wsmouse
vga*        at pci? dev ? function ?
wsdisplay*    at vga? console ?
wskbd*        at pckbd? console ?
wsmouse*    at pms? mux 0

pcppi0    at isa?
sysbeep0    at pcppi?

# SCSI Controllers and Devices

# SCSI bus support
scsibus* at scsi?

# SCSI devices
sd*    at scsibus? target ? lun ?    # SCSI disk drives

# IDE and related devices
# PCI IDE controllers - see pciide(4) for supported hardware.
# The 0x0001 flag force the driver to use DMA, even if the driver 
doesn't know
# how to set up DMA modes for this chip. This may work, or may cause
# a machine hang with some controllers.
pciide*     at pci? dev ? function ? flags 0x0001    # GENERIC pciide driver
ixpide*        at pci? dev ? function ?    # ATI IXP IDE controllers

# ATA (IDE) bus support
atabus* at ata?

# IDE drives
# Flags are used only with controllers that support DMA operations
# and mode settings (e.g. some pciide controllers)
# The lowest order four bits (rightmost digit) of the flags define the PIO
# mode to use, the next set of four bits the DMA mode and the third set the
# UltraDMA mode. For each set of four bits, the 3 lower bits define the mode
# to use, and the last bit must be 1 for this setting to be used.
# For DMA and UDMA, 0xf (1111) means 'disable'.
# 0x0fac means 'use PIO mode 4, DMA mode 2, disable UltraDMA'.
# (0xc=1100, 0xa=1010, 0xf=1111)
# 0x0000 means "use whatever the drive claims to support".
wd*    at atabus? drive ? flags 0x0000

# ATAPI bus support
atapibus* at atapi?

# ATAPI devices
cd*    at atapibus? drive ?        # ATAPI CD-ROM drives
sd*    at atapibus? drive ? flags 0x0000    # ATAPI disk drives

# Miscellaneous mass storage devices

# ISA floppy
fdc0    at isa? port 0x3f0 irq 6 drq 2    # standard PC floppy controllers
fd*    at fdc? drive ?            # the drives themselves

# Network Interfaces
# PCI network interfaces
rtk*    at pci? dev ? function ?    # Realtek 8129/8139

# MII PHY network interfaces
urlphy* at mii? phy ?            # Realtek RTL8150L internal PHYs


# USB Controller and Devices

# PCI USB controllers
ehci*    at pci?    dev ? function ?    # Enhanced Host Controller

# USB bus support
usb*    at ehci?

# USB Hubs
uhub*    at usb?

# USB Printer
ulpt*    at uhub? port ? configuration ? interface ?

# USB Mass Storage
umass*    at uhub? port ? configuration ? interface ?
scsibus* at umass?

# Audio Devices

# Audio support
audio*    at audiobus?

# PCI audio devices
azalia*    at pci? dev ? function ?    # High Definition Audio

# Miscellaneous Devices

# Pull in optional local configuration
include    "arch/i386/conf/GENERIC.local"


# Pseudo-Devices

# disk/mass storage pseudo-devices
pseudo-device    md        1    # memory disk device (ramdisk)

# network pseudo-devices
pseudo-device    loop            # network loopback

# miscellaneous pseudo-devices
pseudo-device    pty        2    # pseudo-terminals (Sysinst needs two)
options    NO_DEV_PTM

# wscons pseudo-devices
pseudo-device    wsmux            # mouse & keyboard multiplexor



2) Replace the GENERIC kernel config file, 
"/usr/src/sys/arch/i386/conf/GENERIC", with the following kernel config:

#    $NetBSD: T5048,v 1.0.0.0 2001/02/11 00:00:00 tron Exp $
#
#    GENERIC - T5048 (D102GGC2 motherboard) normal boot kernel.
#
#    This kernel should be substituted for the distribution GENERIC kernal
#       when creating a distribution set for the T5048.
#

include "arch/i386/conf/std.i386"
options     INCLUDE_CONFIG_FILE    # embed config file in kernel binary

maxusers    32        # estimated number of users

# CPU support.  At least one is REQUIRED.
options     I386_CPU
options     I486_CPU
options     I586_CPU
options     I686_CPU

# CPU-related options.
options     MATH_EMULATE    # floating point emulation
options     VM86        # virtual 8086 emulation
options     USER_LDT    # user-settable LDT; used by WINE

options     ENHANCED_SPEEDSTEP
options     MTRR        # memory-type range register syscall support


# The following options override the memory sizes passed in from the boot
# block.  Use them *only* if the boot block is unable to determine the 
correct
# values.  Note that the BIOS may *correctly* report less than 640k of base
# memory if the extended BIOS data area is located at the top of base memory
# (as is the case on most recent systems).
options     REALBASEMEM=639        # size of base memory
options     REALEXTMEM=440901    # size of extended memory

options     INSECURE    # disable kernel security levels

options     RTC_OFFSET=0    # hardware clock is this many mins. west of GMT
options     KTRACE        # system call tracing via ktrace(1)
options     SYSTRACE    # system call vetting via systrace(1)
options     SYSVMSG        # System V-like message queues
options     SYSVSEM        # System V-like semaphores
options     SYSVSHM        # System V-like memory sharing
options     P1003_1B_SEMAPHORE    # p1003.1b semaphore support
options     LKM        # loadable kernel modules
options     USERCONF    # userconf(4) support

options     SYSCTL_INCLUDE_DESCR    # Include sysctl descriptions in kernel

# Diagnostic/debugging support options
options     DDB        # in-kernel debugger
options     DDB_HISTORY_SIZE=512    # enable history editing in DDB

# Compatibility options
options     COMPAT_NOMID    # NetBSD 0.8, 386BSD, and BSDI
options     COMPAT_09    # NetBSD 0.9
options     COMPAT_10    # NetBSD 1.0
options     COMPAT_11    # NetBSD 1.1
options     COMPAT_12    # NetBSD 1.2, 386BSD, and BSDI
options     COMPAT_13    # NetBSD 1.3, 386BSD, and BSDI
options     COMPAT_14    # NetBSD 1.4
options     COMPAT_15    # NetBSD 1.5
options     COMPAT_16    # NetBSD 1.6
options     COMPAT_20    # NetBSD 2.0
options     COMPAT_43    # 4.3BSD, 386BSD, and BSDI
options     COMPAT_386BSD_MBRPART # recognize old partition ID

options     COMPAT_OSSAUDIO    # OSS (Voxware) audio driver compatibility
options     COMPAT_SVR4    # binary compatibility with SVR4
options     COMPAT_IBCS2    # binary compatibility with SCO and ISC
options     COMPAT_LINUX    # binary compatibility with Linux
options     COMPAT_FREEBSD    # binary compatibility with FreeBSD
options        COMPAT_BSDPTY    # /dev/[pt]ty?? ptys.

# File systems
file-system     FFS        # UFS
file-system     EXT2FS        # second extended file system (linux)
file-system     LFS        # log-structured file system
file-system     MFS        # memory file system
file-system     NFS        # Network File System client
file-system     NTFS        # Windows/NT file system (experimental)
file-system     CD9660        # ISO 9660 + Rock Ridge file system
file-system     MSDOSFS        # MS-DOS file system
file-system     FDESC        # /dev/fd
file-system     KERNFS        # /kern
file-system     NULLFS        # loopback file system
file-system     OVERLAY        # overlay file system
file-system     PORTAL        # portal filesystem (still experimental)
file-system     PROCFS        # /proc
file-system     UMAPFS        # NULLFS + uid and gid remapping
file-system     UNION        # union file system
file-system    CODA        # Coda File System; also needs vcoda (below)
file-system    SMBFS        # experimental - CIFS; also needs nsmb (below)

# Filesystem options
options     QUOTA        # UFS quotas
options     SOFTDEP        # FFS soft updates support.
options     NFSSERVER    # Network File System server

# Networking options
options     INET        # IP + ICMP + TCP + UDP
options     INET6        # IPV6
options     NS        # XNS
options     ISO,TPIP    # OSI
options     CCITT,LLC,HDLC    # X.25
options     NETATALK    # AppleTalk networking protocols
options     PPP_BSDCOMP    # BSD-Compress compression support for PPP
options     PPP_DEFLATE    # Deflate compression support for PPP
options     PPP_FILTER    # Active filter support for PPP (requires bpf)
options     PFIL_HOOKS    # pfil(9) packet filter hooks
options     IPFILTER_LOG    # ipmon(8) log support

# These options enable verbose messages for several subsystems.
# Warning, these may compile large string tables into the kernel!
options     EISAVERBOSE    # verbose EISA device autoconfig messages
options     MIIVERBOSE    # verbose PHY autoconfig messages
options     PCIVERBOSE    # verbose PCI device autoconfig messages
options     SCSIVERBOSE    # human readable SCSI error messages
options     USBVERBOSE    # verbose USB device autoconfig messages
options     I2OVERBOSE    # verbose I2O driver messages
options     MCAVERBOSE    # verbose MCA device autoconfig messages

options     NFS_BOOT_DHCP,NFS_BOOT_BOOTPARAM

# wscons options
#
options     WSEMUL_VT100        # VT100 / VT220 emulation
options     PCDISPLAY_SOFTCURSOR
# customization of console and kernel output - see dev/wscons/wsdisplayvar.h
options     WSDISPLAY_CUSTOM_OUTPUT    # color customization from 
wsconsctl(8)
options     WS_KERNEL_FG=WSCOL_GREEN
# customization of console border color
options     WSDISPLAY_CUSTOM_BORDER    # border customization from 
wsconsctl(8)# compatibility to other console drivers
options     WSDISPLAY_COMPAT_PCVT        # emulate some ioctls
options     WSDISPLAY_COMPAT_SYSCONS    # emulate some ioctls
options     WSDISPLAY_COMPAT_USL        # VT handling
options     WSDISPLAY_COMPAT_RAWKBD        # can get raw scancodes

# Kernel root file system and dump configuration.
config        netbsd    root on ? type ?

#
# Device configuration
#

mainbus0 at root
cpu0    at mainbus0

# Basic Bus Support

# PCI bus support
pci*    at mainbus? bus ?
pci*    at pchb? bus ?
pci*    at ppb? bus ?

# PCI bridges
pchb*    at pci? dev ? function ?    # PCI-Host bridges
pceb*    at pci? dev ? function ?    # PCI-EISA bridges
pcib*    at pci? dev ? function ?    # PCI-ISA bridges
ppb*    at pci? dev ? function ?    # PCI-PCI bridges

# As well as 5 and 7, avoid irq 4 and 3 because we do not probe com* here
options     PCIC_ISA_INTR_ALLOC_MASK=0xff47

# ISA bus support
isa0    at pcib?

# Coprocessor Support

# Math Coprocessor support
npx0    at isa? port 0xf0 irq 13    # x86 math coprocessor


# Console Devices

# wscons
pckbc0        at isa?            # pc keyboard controller
pckbd*        at pckbc?        # PC keyboard
pms*        at pckbc?        # PS/2 mouse for wsmouse
vga*        at pci? dev ? function ?
wsdisplay*    at vga? console ?
wskbd*        at pckbd? console ?
wsmouse*    at pms? mux 0

pcppi0    at isa?
sysbeep0    at pcppi?

# SCSI Controllers and Devices

# SCSI bus support
scsibus* at scsi?

# SCSI devices
sd*    at scsibus? target ? lun ?    # SCSI disk drives


# IDE and related devices
# PCI IDE controllers - see pciide(4) for supported hardware.
# The 0x0001 flag force the driver to use DMA, even if the driver 
doesn't know
# how to set up DMA modes for this chip. This may work, or may cause
# a machine hang with some controllers.
pciide*     at pci? dev ? function ? flags 0x0001    # GENERIC pciide driver
ixpide*        at pci? dev ? function ?    # ATI IXP IDE controllers

# ATA (IDE) bus support
atabus* at ata?

# IDE drives
# Flags are used only with controllers that support DMA operations
# and mode settings (e.g. some pciide controllers)
# The lowest order four bits (rightmost digit) of the flags define the PIO
# mode to use, the next set of four bits the DMA mode and the third set the
# UltraDMA mode. For each set of four bits, the 3 lower bits define the mode
# to use, and the last bit must be 1 for this setting to be used.
# For DMA and UDMA, 0xf (1111) means 'disable'.
# 0x0fac means 'use PIO mode 4, DMA mode 2, disable UltraDMA'.
# (0xc=1100, 0xa=1010, 0xf=1111)
# 0x0000 means "use whatever the drive claims to support".
wd*    at atabus? drive ? flags 0x0000

# ATAPI bus support
atapibus* at atapi?

# ATAPI devices
cd*    at atapibus? drive ?        # ATAPI CD-ROM drives
sd*    at atapibus? drive ? flags 0x0000    # ATAPI disk drives

# Miscellaneous mass storage devices

# ISA floppy
fdc0    at isa? port 0x3f0 irq 6 drq 2    # standard PC floppy controllers
fd*    at fdc? drive ?            # the drives themselves

# Network Interfaces
# PCI network interfaces
rtk*    at pci? dev ? function ?    # Realtek 8129/8139

# MII PHY network interfaces
urlphy* at mii? phy ?            # Realtek RTL8150L internal PHYs


# USB Controller and Devices

# PCI USB controllers
ehci*    at pci?    dev ? function ?    # Enhanced Host Controller

# USB bus support
usb*    at ehci?

# USB Hubs
uhub*    at usb?

# USB Printer
ulpt*    at uhub? port ? configuration ? interface ?

# USB Mass Storage
umass*    at uhub? port ? configuration ? interface ?
scsibus* at umass?

# Audio Devices

# Audio support
audio*    at audiobus?

# PCI audio devices
azalia*    at pci? dev ? function ?    # High Definition Audio

# Miscellaneous Devices

# Pull in optional local configuration
include    "arch/i386/conf/GENERIC.local"


# Pseudo-Devices

# disk/mass storage pseudo-devices
pseudo-device    md        1    # memory disk device (ramdisk)

# network pseudo-devices
pseudo-device    loop            # network loopback

# miscellaneous pseudo-devices
pseudo-device    pty        2    # pseudo-terminals (Sysinst needs two)
options    NO_DEV_PTM
pseudo-device    tb        1    # tablet line discipline
pseudo-device    rnd            # /dev/random and in-kernel generator
pseudo-device    clockctl        # user control of clock subsystem
# a pseudo device needed for Coda    # also needs CODA (above)
pseudo-device    vcoda        4    # coda minicache <-> venus comm.
# a pseudo device needed for SMBFS
pseudo-device    nsmb            # experimental - SMB requester

#<--> added the next 2 lines
# wscons pseudo-devices
pseudo-device    wsmux            # mouse & keyboard multiplexor
pseudo-device    wsfont
pseudo-device    ksyms            # /dev/ksyms



3) Compile the release.

$ cd /usr/src
$ ./build.sh  -T  /usr/tools  -O  /usr/obj  -D  /usr/obj/distrib  -U  
tools  release

4)  Compile the kernel (again) separately.  I did because I did not know 
how to expand the "/usr/obj/i386/binary/kernel/netbsd-GENERIC.gz" file 
created during the release build, and not the time test the steps in 
doing so.  Note where the kernel is placed in the messages when the 
build is over.

$ ./build.sh  -T  /usr/tools  -O  /usr/obj  -D  /usr/obj/distrib   -U  
-u   kernel=GENERIC

5) Create the floppy install disks from files "boot1.fs" and "boot2.fs" 
in directory "/usr/obj/i386/installation/floppy", one command for each disk.
# dd   if=/usr/obj/i386/installation/floppy/boot1.fs   of=/dev/fd0a  bs=36b
# dd   if=/usr/obj/i386/installation/floppy/boot2.fs   of=/dev/fd0a  bs=36b

6) Copy the GENERIC kernel to a USB stick for transfer to the T5048.  My 
memory sticks are all MSDOS formatted.
# mount  -t   msdos   /dev/sd0e   /mnt
# cp   /usr/obj/sys/arch/i386/compile/GENERIC/netbsd  /mnt
# umount   /mnt

7) Turn off recognition of drives and disable booting off the network 
card in the T5048's bios.   I had to turn off the recognition of the 
hard drives because the machine would not boot off my USB floppy untill 
I did so.  The NetBSD boot loader will still recognize the hard drive.

8) Boot with the USB floppy plugged in and the 2 boot floppies.  Install 
from the foppies normally.  Install NetBSD sets from the 3.1 
distribution CD.  If you create a distribution CD from your own release 
you made in step 3, your installation will be complete as the GENERIC 
kernel you made can be installed during the installation process.  I did 
not do this.  I did not know to create a custom distribution CD the 
time.  I used the 3.1 distribution CD.

9) After installation, do not reboot.  Exit NetBSD's systinst program, 
mount the USB stick, and replace the kernel just installed on the T5048.
# mount   -t   msdos   /dev/sd0e   /mnt
# cp   /mnt/netbsd   /.
# umount   /mnt

10)  Reboot the T5048, and return the bios to recognize hard drives and 
boot from the network.

11)  Your NetBSD system should come up.  I also successfully used my 
3.99.21 machine to compile the same boot kernel config file (minus 
obsolete options) using the 4.99.9 source.  The new kernel worked on my 
T5048.  Please remember that this kernel config is just to get going.  
You will have to play to add in serial and parallel ports, the HP 9-in-1 
media manager, and maybe some others.  I haven't tested the network card 
or configured X yet, but other posts have noted success with the 
hardware in this machine.  You might have to play with the extended 
memory number in the kernel configs if you have more or less memory.

I hope this is beneficial to someone.