NetBSD Problem Report #51659

From www@NetBSD.org  Sat Nov 26 20:38:48 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 6819C7A30C
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 26 Nov 2016 20:38:48 +0000 (UTC)
Message-Id: <20161126203846.AF3AA7A340@mollari.NetBSD.org>
Date: Sat, 26 Nov 2016 20:38:46 +0000 (UTC)
From: nullnilaki@gmail.com
Reply-To: nullnilaki@gmail.com
To: gnats-bugs@NetBSD.org
Subject: NetBSD/ofppc's ramdisk kernel doesn't have /dev directory
X-Send-Pr-Version: www-1.0

>Number:         51659
>Category:       port-ofppc
>Synopsis:       NetBSD/ofppc's ramdisk kernel doesn't have /dev directory
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    mrg
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 26 20:40:00 +0000 2016
>Closed-Date:    Mon Dec 24 20:11:44 +0000 2018
>Last-Modified:  Mon Dec 24 20:15:00 +0000 2018
>Originator:     Naruaki Etomi
>Release:        7.0.2
>Organization:
Jpan
>Environment:
NetBSD 7.0.2 (INSTALL.201610210724Z)
Model: IBM,7044-170
>Description:
NetBSD/ofppc's ramdisk kernel doesn't have /dev directory.
This problem is reported many times in NetBSD/ofppc mailing list.

------------------------------------------------------------------

0 > boot cdrom:,\ofwboot netbsd 
>> NetBSD/ofppc OpenFirmware Boot, Revision 1.13
10522876+172576 [282464+276209]=0xabbe18
 start=0x100000
mem region 0 start=0 size=80000000
avail region 0 start=0x4000 size=0xbfc000
avail region 1 start=0x1420000 size=0x7ebe0000
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
    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 7.0.2 (INSTALL.201610210724Z)
Model: IBM,7044-170
total memory = 2048 MB
avail memory = 1960 MB
kern.module.path=/stand/ofppc/7.0/modules
bootpath: /pci@fef00000/scsi@c/sd@1,0/netbsd
mainbus0 (root)
rtas0 at mainbus0: version 1, entry @pa 0x16206f8
cpu0 at mainbus0: POWER3II (Revision 1.4), ID 0 (primary)
cpu0: HID0 0xf001d1a0<EMCP,DBP,EBA,EBD,NHR,ICE,DCE,DLOCK,IFEM,SGE,BTIC>, powersave: -1
cpu0: L1 I-cache 32 KB 128B/line, D-cache 64 KB 128B/line
cpu0: L2 cache 1 MB 128B/line
ofwpci0 at mainbus0
OpenPIC Version 1.2: Supports 8 CPUs and 32 interrupt sources.
pci0 at ofwpci0 bus 0: OFW method configuration space access
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x1014 product 0x002d (rev. 0x0a)
pcib0 at pci0 dev 11 function 0: vendor 0x10ad product 0x0565 (rev. 0x10)
pciide0 at pci0 dev 11 function 1: vendor 0x10ad product 0x0105 (rev. 0x05)
pciide0: couldn't map native-PCI interrupt
pciide0: couldn't map native-PCI interrupt
esiop0 at pci0 dev 12 function 0: Symbios Logic 53c896 (ultra2-wide scsi)
esiop0: using on-board RAM
esiop0: interrupting at irq 20
scsibus0 at esiop0: 16 targets, 8 luns per target
esiop1 at pci0 dev 12 function 1: Symbios Logic 53c896 (ultra2-wide scsi)
esiop1: using on-board RAM
esiop1: interrupting at irq 17
scsibus1 at esiop1: 16 targets, 8 luns per target
fxp0 at pci0 dev 14 function 0: i82550 Ethernet (rev. 0x0d)
fxp0: interrupting at irq 29
fxp0: Ethernet address 00:02:55:af:cd:5b
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vendor 0x1133 product 0xb921 (miscellaneous network) at pci0 dev 15 function 0 not configured
pcn0 at pci0 dev 16 function 0: AMD PCnet-PCI Ethernet
pcn0: Am79c971 PCnet-FAST rev 6, Ethernet address 00:09:6b:de:0a:81
pcn0: interrupting at irq 18
nsphy0 at pcn0 phy 1: DP83840 10/100 media interface, rev. 1
nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ukphy0 at pcn0 phy 31: OUI 0x000058, model 0x0001, rev. 1
ukphy0: 10baseT, 10baseT-FDX, auto
genfb0 at pci0 dev 17 function 0: vendor 0x102b product 0x0520 (rev. 0x01)
genfb0: unable to map the framebuffer
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
attimer0 at isa0 port 0x40-0x43
pcppi0 at isa0 port 0x61
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
attimer0: attached to pcppi0
ofwpci1 at mainbus0
pci_configure_bus() failed
pci1 at ofwpci1 bus 64
pchb1 at pci1 dev 0 function 0
pchb1: vendor 0x1014 product 0x002d (rev. 0x0a)
vmmask 3c800000 schedmask 3c800000 highmask 7f800000
scsibus0: waiting 2 seconds for devices to settle...
scsibus1: waiting 2 seconds for devices to settle...
cd0 at scsibus0 target 1 lun 0: <IBM, CDRM00203\000\000\000\000\000!K, 1_06> cdrom removable
cd0: sync (50.00ns offset 15), 16-bit (40.000MB/s) transfers
st0 at scsibus0 target 2 lun 0: <EXABYTE, Mammoth2, 07wR> tape removable
st0 : drive empty
st0: sync (50.00ns offset 31), 16-bit (40.000MB/s) transfers
boot device: cd0
cd0: no disk label
root on md0a dumps on md0b
root file system type: ffs
warning: no /dev/console
------------------------------------------------------------------
>How-To-Repeat:

>Fix:
diff -Naru src.orig/distrib/ofppc/ramdisks/common/Makefile.ramdisk src/distrib/ofppc/ramdisks/common/Makefile.ramdisk
--- src.orig/distrib/ofppc/ramdisks/common/Makefile.ramdisk     2016-11-26 19:51:55.000000000 +0000
+++ src/distrib/ofppc/ramdisks/common/Makefile.ramdisk  2016-11-26 20:27:58.000000000 +0000
@@ -17,7 +17,8 @@
 LISTS?=                ${.CURDIR}/list
 LISTS+=                ${OFPPCCOMMON}/list.ramdisk
 MTREECONF=     ${DISTRIBDIR}/common/mtree.common ${.CURDIR}/../common/mtree.ramdisk
-IMAGEENDIAN=   le
+IMAGEENDIAN=   be
+MAKEDEVTARGETS=        all
 IMAGEDEPENDS+=         ${CRUNCHBIN} \
                dot.profile \
                ${DESTDIR}/usr/mdec/ofwboot \

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-ofppc/51659: NetBSD/ofppc's ramdisk kernel doesn't have /dev directory
Date: Sat, 26 Nov 2016 21:53:53 +0100

 Just to clarify: does it not have /dev or is /dev empty?

 Does it have tmpfs or mfs support in the kernel? If one of that is available
 and /dev exists, init should mount a ramdisk over /dev and populate it.

 And for the patch: MAKEDEVTARGET all sounds a bit heavy, most architectures
 use a special "minimal" or "ramdisk" target (i.e. to create opty entries,
 which are considered a security issue in non-install scenarios, but are
 more lightweight than offering ptyfs support).

 Martin

From: "Naruaki.Etomi" <nullnilaki@gmail.com>
To: gnats-bugs@netbsd.org
Cc: port-ofppc-maintainer@netbsd.org, gnats-admin@netbsd.org, 
	netbsd-bugs@netbsd.org
Subject: Re: port-ofppc/51659: NetBSD/ofppc's ramdisk kernel doesn't have /dev directory
Date: Sun, 27 Nov 2016 07:32:11 +0900

 Dear Martin,

 Hello!

 >Just to clarify: does it not have /dev or is /dev empty?

 My expression might be bad.
 NetBSD/ofppc's ramdisk kernel doesn't have /dev/MAKEDEV.
 /dev is empty!

 >And for the patch: MAKEDEVTARGET all sounds a bit heavy

 My POWER3 is the fastest CPU in the world. ;-)

 diff -Naru src.orig/distrib/ofppc/ramdisks/common/Makefile.ramdisk
 src/distrib/ofppc/ramdisks/common/Makefile.ramdisk
 --- src.orig/distrib/ofppc/ramdisks/common/Makefile.ramdisk
 2016-11-26 19:51:55.000000000 +0000
 +++ src/distrib/ofppc/ramdisks/common/Makefile.ramdisk  2016-11-26
 20:27:58.000000000 +0000
 @@ -17,7 +17,8 @@
  LISTS?=                ${.CURDIR}/list
  LISTS+=                ${OFPPCCOMMON}/list.ramdisk
  MTREECONF=     ${DISTRIBDIR}/common/mtree.common
 ${.CURDIR}/../common/mtree.ramdisk
 -IMAGEENDIAN=   le
 +IMAGEENDIAN=   be
 +MAKEDEVTARGETS=        ramdisk
  IMAGEDEPENDS+=         ${CRUNCHBIN} \
                 dot.profile \
                 ${DESTDIR}/usr/mdec/ofwboot \

Responsible-Changed-From-To: port-ofppc-maintainer->mrg
Responsible-Changed-By: mrg@NetBSD.org
Responsible-Changed-When: Thu, 20 Dec 2018 22:16:10 +0000
Responsible-Changed-Why:
i'll merge the suggest changea fter a quick test.


State-Changed-From-To: open->closed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Mon, 24 Dec 2018 20:11:44 +0000
State-Changed-Why:
ramdisk has /dev nodes now.  thanks!


From: "matthew green" <mrg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51659 CVS commit: src/distrib/ofppc/ramdisks/common
Date: Mon, 24 Dec 2018 20:11:23 +0000

 Module Name:	src
 Committed By:	mrg
 Date:		Mon Dec 24 20:11:23 UTC 2018

 Modified Files:
 	src/distrib/ofppc/ramdisks/common: Makefile.ramdisk

 Log Message:
 set MAKEDEVTARGETS=ramdisk so that the ramdisk /dev/ is populated.
 from PR#51659.


 To generate a diff of this commit:
 cvs rdiff -u -r1.8 -r1.9 src/distrib/ofppc/ramdisks/common/Makefile.ramdisk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.