Subject: RE: Problems creating an install kernel for the hpcarm platform
To: None <tech-install@NetBSD.org>
From: Jason Mitchell <jmitchel@bigjar.com>
List: port-hpcarm
Date: 04/02/2007 07:01:28
I figured it out. My crunchgened binary was set up to with mount_ffs as a
link to mount. That was true in 1.6, but is no longer the case in 3.0.

> -----Original Message-----
> From: port-hpcarm-owner@NetBSD.org
> [mailto:port-hpcarm-owner@NetBSD.org]On Behalf Of Jason Mitchell
> Sent: Sunday, April 01, 2007 11:24 PM
> To: tech-install@NetBSD.org
> Cc: port-hpcarm@NetBSD.org
> Subject: Problems creating an install kernel for the hpcarm platform
>
>
> Hello,
>
> 	I'm trying to create an install kernel for the hpcarm
> platform and I'm
> running in to some difficulties. The hpcarm platform is a bit
> challenging in
> that the kernel (including embedded ram disk) can't be bigger than around
> 3.7Mbytes. If the kernel is too big it won't boot. On the hpcarm platform
> the NetBSD kernel is launched from WinCE using a program called
> hpcboot. If
> the kernel is too big hpcboot loads the kernel and then hangs --
> there might
> be some output on the serial port, I'm not sure. This problem has been
> around in the hpcarm port since at least NetBSD 1.6.
>
> 	I've managed to create a kernel with a 3400block (1.7MByte)
> embedded RAM
> disk. I did this by stripping out most of the options and all but one
> network card. On the embedded ramdisk is a crunchgened binary. The kernel
> boots up, gives the "Enter pathname of shell or press RETURN for /bin/sh:"
> prompt, then tries to run .profile. .profile tries to mount the md0a slice
> read/write and gives the following error message:
>
> 	proc: table is full - increase kern.maxproc or NPROC
> 	mount_ffs: vfork: Resource temporarily unavailable
>
> 	If I run sysctl -w kern.maxproc=512 then try the mount
> again I get a uvm
> fault:
>
> uvm_fault(0xc0380e54, e59ff000, 2, 0) -> e
> Fatal kernel mode data abort: 'Translation Fault (S)'
> trapframe: 0xc2bdac54
> FSR=c0491005, FAR=e59ff11c, spsr=a0000013
> r0 =c2bb30c8, r1 =e59ff114, r2 =c2bb30e0, r3 =e59ff114
> r4 =c0382120, r5 =c0000000, r6 =c2ba9544, r7 =00000000
> r8 =c0000000, r9 =c2bdad60, r10=00000003, r11=c2bdacc0
> r12=00000000, ssp=c2bdaca0, slr=c015efc8, pc =c015decc
>
> Stopped in pid 922.1 (gumby) at netbsd:pmap_alloc_11+0x1c:
> strne   r3,
> [r1, #0x008]
>
> 	The uvm fault has the same first three lines and the same
> last line every
> time. Some but not all of the registers are the same too. If I
> recompile the
> kernel with MAXUSERS=32, then I get this message:
>
> UVM: pid 10 (sh), uid 0 killed: out of swap
>
> 	If I do a ps awux, there are 10 processes running. 7 are
> names with []'s
> around them (kernel processes?) and the three are init, sh, and
> ps awux. By
> the way, gumby is the name of my crunchgen binary. I tried recompiling a
> kernel with more memory (the default kernel using 32MBytes, but
> the machine
> I'm testing on has 64MBytes) and that produced no change.
>
> 	My current theory is that when I created the install kernel
> I commented out
> some necessary option. My other choice is that this is a problem with
> versions. The kernel is 3.0.2 (I couldn't get cross compiling
> tools to build
> for 3.0) while the crunchgened binary comes from 3.0. Also the machine I'm
> doing the cross compiling on is an i386 running NetBSD 2.0.2.
> I've tried the
> kernel on multiple machines with no change in results. Also the
> standard 3.0
> kernel boots fine on an hpcarm box and NetBSD 3.0 runs without complaint.
>
> 	I'm attaching my kernel config. Please let me know if
> there's some option I
> need to enable or if there's some other fault in my set up. I'm
> setting this
> to tech-install, because I don't have any reason to believe this
> problem is
> specific to hpcarm. If there's another list I should send this to, please
> let me know.
>
> Thanks,
>
> Jason M.
>
>
> INSTALLv8
> #       $NetBSD: JORNADA720,v 1.41.2.1 2005/07/18 21:14:54 riz Exp $
> #
> #       JORNADA -- Windows-CE based jornada 720
> #
>
> include "arch/hpcarm/conf/std.hpcarm"
>
> #options        INCLUDE_CONFIG_FILE     # embed config file in
> kernel binary
>
> #ident          "GENERIC-$Revision: 1.41.2.1 $"
>
> # estimated number of users
> maxusers        8
>
> #options      DRAM_PAGES=16384 # 64Mb of memory is standard on Jornada728s
>
> # Standard system options
>
> options         RTC_OFFSET=0    # hardware clock is this many
> mins. west of
> GMT
> #options        NTP             # NTP phase/frequency locked loop
>
> # CPU options
>
> options         CPU_SA1110      # Support the SA1110 core
>
> # Architecture options
>
> # FPA options
>
> #options        ARMFPE          # ARM Ltd FPE
>
> # File systems
>
> file-system     FFS             # UFS
> #file-system    LFS             # log-structured file system
> file-system     MFS             # memory file system
> file-system     NFS             # Network file system
> #file-system    ADOSFS          # AmigaDOS-compatible file system
> #file-system    EXT2FS          # second extended file system (linux)
> #file-system    CD9660          # ISO 9660 + Rock Ridge file system
> file-system     MSDOSFS         # MS-DOS file system
> #file-system    FDESC           # /dev/fd
> #file-system    FILECORE        # Acorn filecore file system
> file-system     KERNFS          # /kern
> #file-system    NULLFS          # loopback file system
> #file-system    OVERLAY         # overlay filesystem
> #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 options
> #options        QUOTA           # UFS quotas
> #options        FFS_EI          # FFS Endian Independant support
> options         SOFTDEP         # FFS soft updates support.
> #options        FFS_NO_SNAPSHOT # ffs snapshots
> #options        NFSSERVER
>
> # Networking options
>
> #options        GATEWAY         # packet forwarding
> options         INET            # IP + ICMP + TCP + UDP
> #options        INET6           # IPV6
> #options        IPSEC           # IP security
> #options        IPSEC_ESP       # IP security (encryption part; define
> w/IPSEC)
> #options        IPSEC_NAT_T     # IPsec NAT traversal (NAT-T)
> #options        IPSEC_DEBUG     # debug for IP security
> #options        MROUTING        # IP multicast routing
> #options        PIM             # Protocol Independent Multicast
> #options        NS              # XNS
> #options        NSIP            # XNS tunneling over IP
> #options        ISO,TPIP        # OSI
> #options        EON             # OSI tunneling over IP
> #options        CCITT,LLC,HDLC  # X.25
> #options        NETATALK        # AppleTalk networking
> #options        PFIL_HOOKS      # pfil(9) packet filter hooks
> #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        TCP_DEBUG       # Record last TCP_NDEBUG packets with
> SO_DEBUG
>
> # Compatibility options
>
> #options        COMPAT_43       # 4.3BSD compatibility.
> options         COMPAT_20       # NetBSD 2.0 compatibility.
> options         COMPAT_16       # NetBSD 1.6 compatibility.
> #options        COMPAT_14       # NetBSD 1.4 compatibility.
> #options        COMPAT_13       # NetBSD 1.3 compatibility.
> #options        COMPAT_12       # NetBSD 1.2 compatibility.
> #options        COMPAT_11       # NetBSD 1.1 compatibility.
> #options        COMPAT_10       # NetBSD 1.0 compatibility.
> #options        COMPAT_09       # NetBSD 0.9 compatibility.
> #options        TCP_COMPAT_42   # 4.2BSD TCP/IP bug compat. Not
> recommended.
> #options                COMPAT_BSDPTY   # /dev/[pt]ty?? ptys.
>
> # Shared memory options
>
> #options        SYSVMSG         # System V-like message queues
> #options        SYSVSEM         # System V-like semaphores
> #options        SYSVSHM         # System V-like memory sharing
> #options        SHMMAXPGS=1024  # 1024 pages is the default
>
> # Device options
>
> options         MEMORY_DISK_HOOKS       # boottime setup of ramdisk
> options         MEMORY_DISK_ROOT_SIZE=3400      # Size in blocks
> options         MEMORY_DISK_IS_ROOT     # use memory disk as root
>
> # Miscellaneous kernel options
> #options        KTRACE          # system call tracing, a la ktrace(1)
> #options        IRQSTATS        # manage IRQ statistics
> #options        LKM             # loadable kernel modules
> #options        KMEMSTATS       # kernel memory statistics
> #options        SCSIVERBOSE     # Verbose SCSI errors
> #options        USERCONF        # userconf(4) support
> #options        PIPE_SOCKETPAIR # smaller, but slower pipe(2)
> #options        SYSCTL_INCLUDE_DESCR    # Include sysctl descriptions in
> kernel
>
> #options        NFS_BOOT_DHCP
>
> # Development and Debugging options
>
> #options        BOOT_DUMP       # Enable memorydump at boot
> #options        PORTMASTER      # Enable PortMaster only options
> options         DIAGNOSTIC      # internal consistency checks
> #options        PMAP_DEBUG      # Enable pmap_debug_level code
> #options        IPKDB           # remote kernel debugging
> options         DDB             # in-kernel debugger
> #options        DDB_HISTORY_SIZE=100    # Enable history editing in DDB
> #makeoptions    DEBUG="-g"      # compile full symbol table
>
> config          netbsd  root on ? type ?
> #options        COMCONSOLE=0,CONADDR=0x3f8,CONUNIT=0
>
> # The main bus device
> mainbus0 at root
>
> # The boot CPU
> cpu0 at mainbus?
>
> saip0   at mainbus?
>
> # Serial
> options         CONSPEED=19200
> sacom*  at saip? addr 0xd000d000 size 0x24      intr 17
>
> #OS Timer
> saost*  at saip? addr 0x90000000 size 0x20
>
> # SA1111 companion chip
> sacc0   at saip? addr 0x40000000 size 0x2000
>
> # PCMCIA bus support
> sacpcic*        at sacc?
> pcmcia*         at sacpcic?
>
> # PCMCIA serial interfaces
> com*    at pcmcia? function ?           # Modems and serial cards
>
> # PCMCIA IDE controllers and disks
> wdc*    at pcmcia? function ?
> atabus* at ata?
> wd*     at atabus? drive ?
>
> # PCMCIA network interfaces
> #an*    at pcmcia? function ?           # Aironet PC4500/PC4800 (802.11)
> #awi*   at pcmcia? function ?           # BayStack 650/660 (802.11FH/DS)
> #cnw*   at pcmcia? function ?           # Xircom/Netwave AirSurfer
> #ep*    at pcmcia? function ?           # 3Com 3c589 and 3c562 Ethernet
> #mbe*   at pcmcia? function ?           # MB8696x based Ethernet
> ne*     at pcmcia? function ?           # NE2000-compatible Ethernet
> #ray*   at pcmcia? function ?           # Raytheon Raylink (802.11)
> #sm*    at pcmcia? function ?           # Megahertz Ethernet
> #wi*    at pcmcia? function ?           # Lucent WaveLan IEEE (802.11)
> #xi*    at pcmcia? function ?           # Xircom CreditCard Ethernet
>
> #mhzc*  at pcmcia? function ?           # Megahertz Ethernet/Modem combo
> cards
> #com*   at mhzc?
> #sm*    at mhzc?
>
> # MII/PHY support
> #acphy* at mii? phy ?                   # DAltima AC101 and AMD Am79c874
> PHYs
> #amhphy*        at mii? phy ?                   # AMD 79c901 Ethernet PHYs
> #bmtphy*        at mii? phy ?                   # Broadcom BCM5201 and
> BCM5202 PHYs
> #brgphy*        at mii? phy ?                   # Broadcom BCM5400-family
> PHYs
> #dmphy* at mii? phy ?                   # Davicom DM9101 PHYs
> #exphy* at mii? phy ?                   # 3Com internal PHYs
> #glxtphy* at mii? phy ?                 # Level One LXT-1000 PHYs
> #gphyter* at mii? phy ?                 # NS83861 Gig-E PHY
> #icsphy*        at mii? phy ?                   # Integrated
> Circuit Systems
> ICS189x
> #inphy* at mii? phy ?                   # Intel 82555 PHYs
> #iophy* at mii? phy ?                   # Intel 82553 PHYs
> #lxtphy*        at mii? phy ?                   # Level One LXT-970 PHYs
> #makphy*        at mii? phy ?                   # Marvell Semiconductor
> 88E1000 PHYs
> nsphy*  at mii? phy ?                   # NS83840 PHYs
> nsphyter* at mii? phy ?                 # NS83843 PHYs
> #pnaphy*        at mii? phy ?                   # generic HomePNA PHYs
> #qsphy* at mii? phy ?                   # Quality Semiconductor
> QS6612 PHYs
> #sqphy* at mii? phy ?                   # Seeq 80220/80221/80223 PHYs
> #tlphy* at mii? phy ?                   # ThunderLAN PHYs
> #tqphy* at mii? phy ?                   # TDK Semiconductor PHYs
> ukphy*  at mii? phy ?                   # generic unknown PHYs
> #urlphy* at mii? phy ?                  # Realtek RTL8150L internal PHYs
>
> # Peripheral IO Controller
> #pioc0  at mainbus? base 0x00210000
>
> # Serial ports
> #com*   at pioc? offset 0x03f8 irq 10
> #com*   at pioc? offset 0x02f8 irq -1
> #com*   at pioc? offset 0x0338 irq -1
> #com*   at pioc? offset 0x0238 irq -1
>
> # Parallel ports
> #lpt*   at pioc? offset 0x0278 irq 0
> #lpt*   at pioc? offset 0x0378 irq -1
> #lpt*   at pioc? offset 0x03bc irq -1
>
> options         WSEMUL_VT100
> options         WSDISPLAY_DEFAULTSCREENS=2
> # see arch/hpcarm/dev/j720kbdmap.c for implemented layouts
> #options        J720KBD_LAYOUT=KB_FR
> options         FONT_VT220L8x10
> # The X server requires theses two options
> options         WSDISPLAY_COMPAT_USL
> options         WSDISPLAY_COMPAT_RAWKBD
>
> # physical console
> sed0            at saip?
> hpcfb*          at sed?
> wsdisplay*      at hpcfb?
> j720ssp0        at saip?        addr 0x80070000 size 0x100
> wskbd*          at j720ssp?     mux 1
> wsmouse*        at j720ssp?     mux 0
>
> pseudo-device   loop    1               # network loopback
> #pseudo-device  bpfilter 8              # packet filter
> #pseudo-device  sl      2               # CSLIP
> #pseudo-device  ppp     2               # PPP
> #pseudo-device  tun     2               # network tunneling over tty
> #pseudo-device  gre             2       # generic L3 over IP tunnel
> #pseudo-device  ipfilter 1              # ip filter
> #pseudo-device  gif     4               # IPv[46] over IPv[46] tunnel
> (RFC1933)
> #pseudo-device  faith   1               # IPv[46] tcp relay
> translation i/f
> #pseudo-device  stf     1               # 6to4 IPv6 over IPv4
> encapsulation
> #pseudo-device  strip   4               # STarmode Radio IP (Metricon
> Ricochet)
> #pseudo-device  vlan                    # IEEE 802.1q encapsulation
> pseudo-device   pty                     # pseudo-terminals
> #pseudo-device  tb      1               # tablet line discipline
> pseudo-device   vnd     4               # disk-like interface to files
> #pseudo-device  ccd     2               # concatenated disk devices
> #pseudo-device  cgd     2               # cryptographic disk devices
> #pseudo-device  raid    4               # RAIDframe disk driver
> #options        RAID_AUTOCONFIG         # auto-configuration of RAID
> components
> #pseudo-device  fss     4               # file system snapshot device
>
> pseudo-device   biconsdev 1             # build-in console device
> pseudo-device   wsmux
>
> pseudo-device   md      1               # Ramdisk driver
> pseudo-device   rnd                     # /dev/random and in-kernel
> generator
> #pseudo-device  clockctl                # user control of clock subsystem
>