Subject: Re: Ericsson MC16 (HP 360LX) endianness
To: Adam Wysocki via ArcaBit <gophi@arcabit.pl>
From: Christer O. Andersson <christer@a-son.net>
List: port-hpcsh
Date: 07/26/2006 11:38:47
--7ZAtKRhVyVSsbBD2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Jul 26, 2006 at 04:44:44AM +0200, Adam Wysocki via ArcaBit wrote:
> 25.07.06 gophi@arcabit.pl wrote:
> 
> My config file (minimalistic, just to check if it boots, diff against 
> GENERIC): http://www.chmurka.net/r/ERICSSON.txt
> 
> Any ideas?

Try the attached config, it works for me. Unfortunately it only
supports serial console, so you won't see much if your serial port
is broken. Do you have the correct cable? It is an ordinary null-modem
serial cable but with a strange usb shaped connector.  The only
thing you will see is that it doesn't reboot if you cannot use the
serial line, I'm afraid.

The resulting kernel uses a detached miniroot. Let me know if you
want it. It is a somewhat reduced miniroot from the installation
kernel.

-- 
Christer O. Andersson
Odensbacken

--7ZAtKRhVyVSsbBD2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=HP360LX

# $NetBSD: GENERIC,v 1.62 2005/12/09 23:34:02 elad Exp $
#
# GENERIC machine description file
# 
# This machine description file is used to generate the default NetBSD
# kernel.  The generic kernel does not include all options, subsystems
# and device drivers, but should be useful for most applications.
#
# The machine description file can be customised for your specific
# machine to reduce the kernel size and improve its performance.
#
# For further information on compiling NetBSD kernels, see the config(8)
# man page.
#
# For further information on hardware support for this architecture, see
# the intro(4) man page.  For further information about kernel options
# for this architecture, see the options(4) man page.  For an explanation
# of each device driver in this file see the section 4 man page for the
# device.

#
# This kernel supports...
#	HP Jornada 680/690
#	HP HP620LX
#	HITACHI HPW50PA
#

include 	"arch/hpcsh/conf/std.hpcsh"

options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary

maxusers	32			# estimated number of users


# System options specific to hpcsh

# CPU support.  At least one is REQUIRED.
options 	SH3
#options 	SH4

# Example of how to set gcc optimization options (XXX: not tested)
#makeoptions	COPTS="-Os"		# generic
#makeoptions	CPUFLAGS="-m3"		# CPU specific

#
# PCLOCK is estimated by kernel.
#				PCLOCK		CPU CLOCK
#	HP Jornada 680/690	22.22MHz	133MHz
#	HP HP620LX		18.75MHz	 75MHz
#	HITACHI HPW50PA		25MHz		100MHz
#
#options 	PCLOCK=...

# in-kernel bootloader, see kloader(4)
options 	KLOADER_KERNEL_PATH="\"/netbsd\""
#options 	KLOADER_DEBUG

#options 	HPC_DEBUG_INTERRUPT_MONITOR
#options 	KSTACK_DEBUG


# Standard system options

#options 	RTC_OFFSET=-540 # hardware clock is this many mins. west of GMT
				# (overrides tz info that hpcboot.exe passes)

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 	SEMMNI=10	# number of semaphore identifiers
#options 	SEMMNS=60	# number of semaphores in system
#options 	SEMUME=10	# max number of undo entries per process
#options 	SEMMNU=30	# number of undo structures in system
#options 	SYSVSHM		# System V-like memory sharing
#options 	SHMMAXPGS=2048	# 2048 pages is the default
#options 	P1003_1B_SEMAPHORE # p1003.1b semaphore support

#options 	LKM		# loadable kernel modules

options 	USERCONF		# userconf(4) support
options 	PIPE_SOCKETPAIR		# smaller, but slower pipe(2)
options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel

# Enable experimental buffer queue strategy for better responsiveness under
# high disk I/O load. Likely stable but not yet the default.
#options 	BUFQ_READPRIO
#options 	BUFQ_PRIOCSCAN

# Diagnostic/debugging support options
#options 	DIAGNOSTIC	# expensive kernel consistency checks
#options 	DEBUG		# expensive debugging checks/support
#options 	KMEMSTATS	# kernel memory statistics (vmstat -m)
#options 	DDB		# in-kernel debugger
#options 	DDB_ONPANIC=1	# see also sysctl(8): `ddb.onpanic'
#options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
#options 	KGDB		# remote debugger
#options 	KGDB_DEVRATE=115200
#options 	"KGDB_DEVNAME=\"scif\""		# HP Jornada
#options 	"KGDB_DEVNAME=\"hd64461uart\""	# HITACHI PERSONA (SH3)
#options 	"KGDB_DEVNAME=\"hd64465uart\""	# HITACHI PERSONA (SH4)
#makeoptions	DEBUG="-g"	# compile full symbol table

# Compatibility options
options 	COMPAT_15	# NetBSD 1.5
options 	COMPAT_16	# NetBSD 1.6
options 	COMPAT_20	# NetBSD 2.0
options 	COMPAT_30	# NetBSD 3.0 compatibility.
#options 	BSDDISKLABEL_EI	# endian independent disklabel support
#options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.

# Executable format options
options 	EXEC_COFF	# 32-bit COFF executables
options 	EXEC_ELF32	# 32-bit ELF executables

# File systems
file-system 	FFS		# UFS
file-system 	MFS		# memory file system (requires FFS)
#file-system 	EXT2FS		# second extended file system (linux)
file-system 	MSDOSFS		# MS-DOS file system
#file-system	NFS		# Sun NFS-compatible filesystem client
#file-system 	NULLFS		# loopback file system
#file-system 	UMAPFS		# NULLFS + uid and gid remapping
#file-system 	UNION		# union file system
#file-system 	OVERLAY		# overlay file system
#file-system 	PORTAL		# portal filesystem (still experimental)
#file-system 	FDESC		# /dev/fd
file-system 	KERNFS		# /kern
file-system 	PROCFS		# /proc
#file-system	CODA		# Coda File System; also needs vcoda (below)
#file-system	SMBFS		# experimental - CIFS; also needs nsmb (below)
#file-system	PTYFS		# /dev/pts/N support
#file-system	TMPFS		# experimental - Efficient memory file-system

# File system options
#options 	FFS_EI		# FFS Endian Independent support
options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
#options 	EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
				# immutable) behave as system flags.

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

#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
#options 	IPFILTER_DEFAULT_BLOCK	# block all packets by default

#options 	ALTQ		# Manipulate network interfaces' output queues
#options 	ALTQ_BLUE	# Stochastic Fair Blue
#options 	ALTQ_CBQ	# Class-Based Queueing
#options 	ALTQ_CDNR	# Diffserv Traffic Conditioner
#options 	ALTQ_FIFOQ	# First-In First-Out Queue
#options 	ALTQ_FLOWVALVE	# RED/flow-valve (red-penalty-box)
#options 	ALTQ_HFSC	# Hierarchical Fair Service Curve
#options 	ALTQ_LOCALQ	# Local queueing discipline
#options 	ALTQ_PRIQ	# Priority Queueing
#options 	ALTQ_RED	# Random Early Detection
#options 	ALTQ_RIO	# RED with IN/OUT
#options 	ALTQ_WFQ	# Weighted Fair Queueing

# These options enable verbose messages for several subsystems.
# Warning, these may compile large string tables into the kernel!
#options 	MIIVERBOSE	# verbose PHY autoconfig messages
#options 	PCMCIAVERBOSE	# verbose PCMCIA configuration messages

#options 	NFS_BOOT_DHCP

#
# wscons options
#
# builtin terminal emulations
#options 	WSEMUL_VT100
# allocate a number of virtual screens at autoconfiguration time
#options 	WSDISPLAY_DEFAULTSCREENS=4

# customization of console and kernel output - see dev/wscons/wsdisplayvar.h
#options 	WSDISPLAY_CUSTOM_OUTPUT	# color customization from wsconsctl(8)
#options 	WS_DEFAULT_FG=WSCOL_WHITE
#options 	WS_DEFAULT_BG=WSCOL_BLACK
#options 	WS_DEFAULT_COLATTR="(0)"
#options 	WS_DEFAULT_MONOATTR="(0)"
#options 	WS_KERNEL_FG=WSCOL_BROWN
#options 	WS_KERNEL_BG=WSCOL_BLUE
#options 	WS_KERNEL_COLATTR=""
#options 	WS_KERNEL_MONOATTR=""

# 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

#options 	FONT_VT220L8x10			# the console font


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

#
# Device configuration
#
mainbus0 at root

# temporally power management
#hpcapm0		at mainbus0			# power management
#apmdev0		at hpcapm0			# APM
#btnmgr0		at mainbus0
#wskbd*		at btnmgr0 mux 1

cpu*		at mainbus?
shb*		at mainbus?
#adc*		at shb?			# analog->digital converter
#pfckbd*		at mainbus?

#
# Workstation Console attachments
#
#hpcfb*		at hd64461video?
#wsdisplay*	at hpcfb?

#hpckbd*		at pfckbd?
#wskbd0		at hpckbd? mux 1

#
# HP Jornada
#
# Serial Devices
# don't need to define SCICONSOLE. you can select from bootloader.
scif0		at shb?
#options 	SCICONSOLE,SCIFCN_SPEED=115200
options 	SCIFCN_SPEED=115200

#j6x0pwr*	at adc?			# '680 battery, on/off, etc

#j6x0lcd*	at shb?			# '680 LCD power, brightness, contrast

#j6x0tp*		at adc?			# '680 touch panel
#wsmouse*	at j6x0tp? mux 0	# - as a pointing device
#wskbd1		at j6x0tp? mux 1	# - "hard icons" as keys
# Do not convert hard icons to key presses while serving mouse input.
options 	J6X0TP_WSMOUSE_EXCLUSIVE
# Customization for the mini-keymap of hard icons.
#options 	J6X0TP_SETTINGS_ICON_KEYSYM="KS_Home"
#options 	J6X0TP_PGUP_ICON_KEYSYM="KS_Prior"
#options 	J6X0TP_PGDN_ICON_KEYSYM="KS_Next"
#options 	J6X0TP_SWITCH_ICON_KEYSYM="KS_End"

#
# HITACHI PERSONA (HPW-50PAD, HPQ-650PA)
#
#com0		at hd64461if?

#psh3lcd*	at shb?			# PERSONA SH3 power, brightness, contrast

#psh3tp*		at adc?			# PERSONA SH3 touch panel
#wsmouse*	at psh3tp? mux 0

hd64461if* at shb?
#hd64461pcmcia*	at hd64461if?
#options 	HD64461PCMCIA_REORDER_ATTACH	# attach channel 1 (CF) first
#hd64461video*	at hd64461if?

#
# machine independent part
#

# PCMCIA bus support
#pcmcia* at hd64461pcmcia? controller ? socket ?
#pcmcia0 at hd64461pcmcia? controller 0 socket ?	# I/O card, memory card
#pcmcia1 at hd64461pcmcia? controller 1 socket ? # memory card only

# PCMCIA IDE controllers
#wdc*	at pcmcia? function ?
#wdc0	at pcmcia1 function ?		# CF slot
#wdc1	at pcmcia0 function ?		# PC Card slot

# ATA (IDE) bus support
#atabus* at ata?
#atabus0 at wdc0 channel ?		# CF slot
#atabus1 at wdc1 channel ?		# PC Card slot

# IDE drives
#wd*	at atabus? drive ? flags 0x0000

# PCMCIA network interfaces
#mbe*	at pcmcia0 function ?		# MB8696x based Ethernet
#ne*	at pcmcia0 function ?		# NE2000-compatible Ethernet
#wi*	at pcmcia0 function ?		# Lucent/Intersil WaveLan IEEE (802.11)

# MII/PHY support
#lxtphy*	at mii? phy ?			# Level One LXT-970 PHYs
#nsphyter* at mii? phy ?			# NS83843 PHYs
#ukphy*	at mii? phy ?			# generic unknown PHYs

# PCMCIA Serial Devices
#com*	at pcmcia? function ?		# Modems and serial cards


# Pseudo-Devices

# disk/mass storage pseudo-devices
#pseudo-device	vnd		4	# disk-like interface to files
#options 	VND_COMPRESSION		# compressed vnd(4)
pseudo-device	fss		4	# file system snapshot device

# network pseudo-devices
pseudo-device	loop			# network loopback
#pseudo-device	ppp		1	# serial-line IP ports
#pseudo-device	bpfilter	2	# Berkeley packet filter
#pseudo-device	ipfilter		# IP filter, NAT
#pseudo-device	pf			# PF packet filter
#pseudo-device	pflog			# PF log if

# miscellaneous pseudo-devices
#pseudo-device	pty			# pseudo-terminals
pseudo-device	rnd			# /dev/random and in-kernel generator
pseudo-device	clockctl		# user control of clock subsystem
#pseudo-device	irframetty		# IrDA frame line discipline
pseudo-device	ksyms			# kernel symbol table interface

# 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

# wscons pseudo-devices
#pseudo-device	wsmux			# mouse & keyboard multiplexor
#pseudo-device	wsfont			# dynamic font loading support
#pseudo-device	hpf1275a		# HP F1275A external keyboard
#wskbd* at hpf1275a? mux 1

# Veriexec
#options VERIFIED_EXEC
#
# a pseudo device needed for veriexec
#pseudo-device	veriexec		1
#
# Uncomment the fingerprint methods below that are desired. Note that
# removing fingerprint methods will have almost no impact on the kernel
# code size.
#
#options VERIFIED_EXEC_FP_RMD160
#options VERIFIED_EXEC_FP_SHA256
#options VERIFIED_EXEC_FP_SHA384
#options VERIFIED_EXEC_FP_SHA512
#options VERIFIED_EXEC_FP_SHA1
#options VERIFIED_EXEC_FP_MD5

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

# 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_IMAGE
options 	MEMORY_DISK_DYNAMIC	# fs image don't exist in data section.
#options 	MEMORY_DISK_ROOT_SIZE=2048	# size of memory disk, in blocks

--7ZAtKRhVyVSsbBD2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="boot.msg"

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 3.99.17 (HP360LX) #2: Wed Jul 26 11:08:59 CEST 2006
        christer@tango.mejeriet.home:/export/netbsd-current/src/sys/arch/hpcsh/compile/obj/HP360LX
HP 360LX (Ericsson MC-16)
total memory = 8192 KB
avail memory = 6036 KB
mainbus0 (root)
cpu0 at mainbus0: HITACHI SH3 59.998 MHz PCLOCK 14.991 MHz
cpu0: 16KB/16B 4-way set-associative I/D-unified cache.
cpu0: P0, U0, P3 write-back; P1 write-through
cpu0: 4-way set-associative 128 TLB entries
cpu0: VPN mode, multiple virtual storage mode
shb0 at mainbus0
scif0 at shb0
scif0: console
hd64461if0 at shb0
hd64461video at hd64461if0 not configured
hd64461pcmcia at hd64461if0 not configured
hd64461gpio at hd64461if0 not configured
hd64461afe at hd64461if0 not configured
hd64461uart at hd64461if0 not configured
hd64461fir at hd64461if0 not configured
md0: internal 1024 KB image area
rn_init: radix functions require max_keylen be set
root on md0a dumps on md0b
WARNING: preposterous clock chip time
 -- CHECK AND RESET THE DATE!
erase ^?, werase ^W, kill ^U, intr ^C
stty: not found

mount: mount_mfs not found for /
mount: mount_kernfs not found for /kern
# ls
.profile   dev        kern       mnt2       targetroot usr
bin        etc        mnt        sbin       tmp        var
# 

--7ZAtKRhVyVSsbBD2--