Module Name:    src
Committed By:   tsutsui
Date:           Fri May 29 23:24:39 UTC 2020

Modified Files:
        src/sys/arch/arc/conf: GENERIC RAMDISK

Log Message:
Try to shrink kernels to smaller than ~6MB due to ARC BIOS restriction.

Currently NetBSD/arc kernels are loaded at 0x80200000
(on some machines ARC BIOS uses regions before it) and
ARC BIOS also uses around 0x807f0000, so bootloader fails
on loading >6MB kernels.

Note GXemul doesn't have this restriction because it loads
a kernel directly via a command line argument.

Tested by installing using sysinst on RAMDISK kernel on netbsd-9.

Should be pulled up to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/sys/arch/arc/conf/GENERIC
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/arc/conf/RAMDISK

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

Modified files:

Index: src/sys/arch/arc/conf/GENERIC
diff -u src/sys/arch/arc/conf/GENERIC:1.197 src/sys/arch/arc/conf/GENERIC:1.198
--- src/sys/arch/arc/conf/GENERIC:1.197	Sat Jan 25 18:38:35 2020
+++ src/sys/arch/arc/conf/GENERIC	Fri May 29 23:24:39 2020
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.197 2020/01/25 18:38:35 thorpej Exp $
+# $NetBSD: GENERIC,v 1.198 2020/05/29 23:24:39 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/arc/conf/std.arc"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.197 $"
+#ident		"GENERIC-$Revision: 1.198 $"
 
 maxusers	32		# estimated number of users
 
@@ -41,6 +41,7 @@ options 	PLATFORM_SNI_RM200PCI
 
 # CPU related options
 makeoptions	CPUFLAGS="-march=mips3 -mabi=32"
+makeoptions	COPTS="-O2 -fno-unwind-tables"
 
 # Standard system options
 
@@ -78,34 +79,34 @@ include 	"conf/compat_netbsd10.config"
 options 	COMPAT_386BSD_MBRPART # recognize old partition ID
 
 # mipsel specific
-options 	COMPAT_ULTRIX	# Ultrix binary compatibility
+#options 	COMPAT_ULTRIX	# Ultrix binary compatibility
 options 	EXEC_ECOFF	# Ultrix RISC binaries are ECOFF format
 
 # File systems
 file-system 	FFS		# fast filesystem
 file-system 	EXT2FS		# second extended file system (linux)
-file-system 	LFS		# log-structured file system
+#file-system 	LFS		# log-structured file system
 file-system 	MFS		# memory file system
-file-system 	NTFS		# Windows/NT file system (experimental)
+#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 	NFS		# Network File System client
 file-system 	FDESC		# /dev/fd
 file-system 	KERNFS		# /kern
 file-system 	NULLFS		# loopback file system
-file-system 	OVERLAY		# overlay file system
-file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g & sshfs)
+#file-system 	OVERLAY		# overlay file system
+#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g & sshfs)
 file-system 	PROCFS		# /proc
-file-system 	UMAPFS		# NULLFS + uid and gid remapping
-file-system 	UNION		# union file system
+#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	PTYFS		# /dev/pts/N support
 file-system	TMPFS		# Efficient memory file-system
 #file-system	UDF		# experimental - OSTA UDF CD/DVD file-system
 
 # File system options
-options 	QUOTA		# legacy UFS quotas
-options 	QUOTA2		# new, in-filesystem UFS quotas
+#options 	QUOTA		# legacy UFS quotas
+#options 	QUOTA2		# new, in-filesystem UFS quotas
 #options 	FFS_EI		# FFS Endian Independent support
 options 	WAPBL		# File system journaling support
 #options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
@@ -123,7 +124,7 @@ options 	INET6		# IPV6
 #options 	IPSEC_DEBUG	# debug for IP security
 #options 	MROUTING	# IP multicast routing
 #options 	PIM		# Protocol Independent Multicast
-options 	NETATALK	# AppleTalk networking protocols
+#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)
@@ -159,7 +160,7 @@ options 	WSEMUL_VT100	# VT100 emulation
 options 	WSDISPLAY_COMPAT_USL		# wsconscfg VT handling
 
 # Kernel root file system and dump configuration.
-options 	NFS_BOOT_DHCP,NFS_BOOT_BOOTPARAM
+options 	NFS_BOOT_DHCP
 config		netbsd	root on ? type ?
 #config		netbsd	root on sd0a type ffs
 #config		netbsd	root on ? type nfs
@@ -236,8 +237,8 @@ com0		at isa? port 0x3f8 irq 4
 com1		at isa? port 0x2f8 irq 3
 com2		at isa? port 0x3e8 irq 4
 com3		at isa? port 0x2e8 irq 3
-ast0		at isa? port 0x1a0 irq 3	# AST 4-port serial cards
-com*		at ast? slave ?
+#ast0		at isa? port 0x1a0 irq 3	# AST 4-port serial cards
+#com*		at ast? slave ?
 
 # Joystick driver. Probe is a little strange; add only if you have one.
 #joy0		at isa? port 0x201
@@ -279,8 +280,8 @@ options 	PCI_NETBSD_CONFIGURE
 ppb*		at pci? dev ? function ?	# PCI-PCI bridges
 
 # PCI cryptographic devices
-hifn*	at pci? dev ? function ?	# Hifn 7755/7811/795x
-ubsec*	at pci? dev ? function ?	# Broadcom 5501/5601/580x/582x
+#hifn*	at pci? dev ? function ?	# Hifn 7755/7811/795x
+#ubsec*	at pci? dev ? function ?	# Broadcom 5501/5601/580x/582x
 
 #vga*	 	at pci? dev ? function ?
 tga*		at pci? dev ? function ?	# DEC ZLXp-E[123] Graphics
@@ -311,7 +312,7 @@ pdcide* 	at pci? dev ? function ?	# Prom
 pdcsata* 	at pci? dev ? function ?	# Promise SATA150 controllers
 satalink*	at pci? dev ? function ?	# SiI SATALink controllers
 #siside* 	at pci? dev ? function ?	# SiS IDE controllers
-slide*  	at pci? dev ? function ?	# Symphony Labs IDE controllers
+#slide*  	at pci? dev ? function ?	# Symphony Labs IDE controllers
 viaide* 	at pci? dev ? function ?	# VIA/AMD/Nvidia IDE controllers
 
 # PCI network devices
@@ -424,7 +425,7 @@ pseudo-device	swcrypto		# software crypt
 # disk/mass storage pseudo-devices
 pseudo-device	ccd			# concatenated/striped disk devices
 #pseudo-device	cgd			# cryptographic disk devices
-pseudo-device	raid			# RAIDframe disk driver
+#pseudo-device	raid			# RAIDframe disk driver
 #options 	RAID_AUTOCONFIG
 # Options to enable various other RAIDframe RAID types.
 #options 	RF_INCLUDE_EVENODD=1
@@ -438,11 +439,11 @@ pseudo-device	fss			# file system snapsh
 pseudo-device	md			# memory disk device (ramdisk)
 pseudo-device	vnd			# disk-like interface to files
 #options 	VND_COMPRESSION		# compressed vnd(4)
-pseudo-device	putter			# for puffs and pud
+#pseudo-device	putter			# for puffs and pud
 
 # network pseudo-devices
 pseudo-device	bpfilter		# Berkeley packet filter
-pseudo-device	carp			# Common Address Redundancy Protocol
+#pseudo-device	carp			# Common Address Redundancy Protocol
 pseudo-device	npf			# NPF packet filter
 pseudo-device	loop			# network loopback
 pseudo-device	ppp			# Point-to-Point Protocol
@@ -451,18 +452,18 @@ pseudo-device	sl			# Serial Line IP
 pseudo-device	tun			# network tunneling over tty
 pseudo-device	tap			# virtual Ethernet
 #pseudo-device	gre			# generic L3 over IP tunnel
-pseudo-device	gif			# IPv[46] over IPv[46] tunnel (RFC1933)
+#pseudo-device	gif			# IPv[46] over IPv[46] tunnel (RFC1933)
 #pseudo-device	faith			# IPv[46] tcp relay translation i/f
-pseudo-device	stf			# 6to4 IPv6 over IPv4 encapsulation
+#pseudo-device	stf			# 6to4 IPv6 over IPv4 encapsulation
 pseudo-device	vlan			# IEEE 802.1q encapsulation
 pseudo-device	bridge			# simple inter-network bridging
 #options 	BRIDGE_IPF		# bridge uses IP/IPv6 pfil hooks too
-pseudo-device	agr			# IEEE 802.3ad link aggregation
+#pseudo-device	agr			# IEEE 802.3ad link aggregation
 
 #
 # accept filters
-pseudo-device   accf_data		# "dataready" accept filter
-pseudo-device   accf_http		# "httpready" accept filter
+#pseudo-device   accf_data		# "dataready" accept filter
+#pseudo-device   accf_http		# "httpready" accept filter
 
 # miscellaneous pseudo-devices
 pseudo-device	pty			# pseudo-terminals
@@ -478,4 +479,4 @@ pseudo-device	clockctl		# user control o
 #pseudo-device	wsmux
 pseudo-device	ksyms			# /dev/ksyms
 
-include "dev/veriexec.config"
+#include "dev/veriexec.config"

Index: src/sys/arch/arc/conf/RAMDISK
diff -u src/sys/arch/arc/conf/RAMDISK:1.82 src/sys/arch/arc/conf/RAMDISK:1.83
--- src/sys/arch/arc/conf/RAMDISK:1.82	Sat May  2 23:21:40 2015
+++ src/sys/arch/arc/conf/RAMDISK	Fri May 29 23:24:39 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: RAMDISK,v 1.82 2015/05/02 23:21:40 christos Exp $
+#	$NetBSD: RAMDISK,v 1.83 2020/05/29 23:24:39 tsutsui Exp $
 #
 #	memory disk based configuration file for MIPS R4x00 ARC Systems
 #
@@ -9,13 +9,15 @@ include		"arch/arc/conf/GENERIC"
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT		# force root on memory disk
 options 	MEMORY_DISK_SERVER=0		# no userspace md(4) support
-options 	MEMORY_DISK_ROOT_SIZE=8420	# size of memory disk, in blocks
+options 	MEMORY_DISK_ROOT_SIZE=5760	# size of memory disk, in blocks
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
-makeoptions	COPTS="-Os -mmemcpy"	# generates smaller code than -O2, -O1
+no makeoptions	COPTS
+makeoptions	COPTS="-Os -mmemcpy -fno-unwind-tables"
 
-# shrink kernel since ARC BIOS seems to have 8MB limit
+# shrink kernel since ARC BIOS seems to have ~6MB limit
 options 	FFS_NO_SNAPSHOT
+options 	PIPE_SOCKETPAIR
 
 no options 	KTRACE
 no options 	NTP
@@ -23,44 +25,91 @@ no options 	SYSVMSG
 no options 	SYSVSEM
 no options 	SYSVSHM
 no options 	SYSCTL_INCLUDE_DESCR
+no options 	BUFQ_PRIOCSCAN
+
 no options 	COMPAT_10
-no options 	COMPAT_11
-no options 	COMPAT_12
-no options 	COMPAT_13
-no options 	COMPAT_14
-no options 	COMPAT_ULTRIX
+no options 	DDB
+#no options 	COMPAT_ULTRIX
 no options 	EXEC_ECOFF
 
 no file-system	EXT2FS
-no file-system	LFS
+#no file-system	LFS
 no file-system	FDESC
 no file-system	KERNFS
 no file-system	NULLFS
-no file-system	OVERLAY
-no file-system	UMAPFS
-no file-system	UNION
-no file-system	TMPFS
+#no file-system	OVERLAY
+no file-system	PROCFS
+#no file-system	UMAPFS
+#no file-system	UNION
 no file-system	PTYFS
+no file-system	TMPFS
 
-no options 	QUOTA
-no options 	QUOTA2
+#no options 	QUOTA
+#no options 	QUOTA2
+no options 	WAPBL
+no options 	UFS_EXTATTR
+options 	NFS_V2_ONLY
+options 	NO_DEV_PTM
+
+no options	INET6
 no options 	NFSSERVER
 no options 	PPP_FILTER
-no options 	NETATALK
+#no options 	NETATALK
+
 no options 	MIIVERBOSE
 no options 	PCIVERBOSE
 no options 	SCSIVERBOSE
 
+no options 	WSDISPLAY_COMPAT_USL
+
 no lpt0 at jazzio?
-no ast0 at isa?
+#no ast0 at isa?
 no lpt0 at isa?
 
-no hifn* at pci?
-no ubsec* at pci?
+#no hifn* at pci?
+#no ubsec* at pci?
 
 no pms* at pckbc?
 no wsmouse* at pms?
 
+# drop non-bootable SCSI/ATA devices
+no adv* at pci?
+no ahc* at pci?
+no iha* at pci?
+no njs* at pci?
+no pcscp* at pci?
+no siop* at pci?
+no esiop* at pci?
+no trm* at pci?
+
+no acardide* at pci?
+no cmdide* at pci?
+no hptide* at pci?
+no optiide* at pci?
+no pdcide* at pci?
+no satalink* at pci?
+no viaide* at pci?
+
+# drop most PCI Network devices
+no bge* at pci?
+no ep* at pci?
+no epic* at pci?
+no ex* at pci?
+no fxp* at pci?
+no gsip* at pci?
+no ne* at pci?
+no pcn* at pci?
+no re* at pci?
+no rtk* at pci?
+no sf* at pci?
+no sip* at pci?
+no ste* at pci?
+no tl* at pci?
+no tlp* at pci?
+no vge* at pci?
+no vr* at pci?
+no wm* at pci?
+
 no ch*  at scsibus?
 no ss*  at scsibus?
 no uk*  at scsibus?
@@ -69,21 +118,25 @@ no uk*  at atapibus?
 no pseudo-device crypto
 no pseudo-device swcrypto
 
+no pseudo-device ccd
 no pseudo-device raid
 no pseudo-device vnd
 no pseudo-device fss
 
-no pseudo-device ipfilter
+no pseudo-device npf
 no pseudo-device ppp
 no pseudo-device pppoe
-no pseudo-device tap
+no pseudo-device sl
 no pseudo-device tun
-no pseudo-device gif
-no pseudo-device stf
+no pseudo-device tap
+#no pseudo-device gif
+#no pseudo-device stf
 no pseudo-device vlan
 no pseudo-device bridge
-no pseudo-device agr
+#no pseudo-device agr
 no pseudo-device clockctl
 
-no pseudo-device accf_data
-no pseudo-device accf_http
+#no pseudo-device accf_data
+#no pseudo-device accf_http
+
+no pseudo-device ksyms

Reply via email to