Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arc/conf Try to shrink kernels to smaller than ~6MB...



details:   https://anonhg.NetBSD.org/src/rev/ac8ed558264b
branches:  trunk
changeset: 933737:ac8ed558264b
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Fri May 29 23:24:39 2020 +0000

description:
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.

diffstat:

 sys/arch/arc/conf/GENERIC |   55 ++++++++++++-----------
 sys/arch/arc/conf/RAMDISK |  107 ++++++++++++++++++++++++++++++++++-----------
 2 files changed, 108 insertions(+), 54 deletions(-)

diffs (truncated from 341 to 300 lines):

diff -r df8acb918cdf -r ac8ed558264b sys/arch/arc/conf/GENERIC
--- a/sys/arch/arc/conf/GENERIC Fri May 29 23:12:12 2020 +0000
+++ b/sys/arch/arc/conf/GENERIC Fri May 29 23:24:39 2020 +0000
@@ -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 @@
 
 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 @@
 
 # CPU related options
 makeoptions    CPUFLAGS="-march=mips3 -mabi=32"
+makeoptions    COPTS="-O2 -fno-unwind-tables"
 
 # Standard system options
 
@@ -78,34 +79,34 @@
 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       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        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 @@
 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 @@
 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 @@
 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 @@
 # 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  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  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 wsmux
 pseudo-device  ksyms                   # /dev/ksyms
 
-include "dev/veriexec.config"
+#include "dev/veriexec.config"
diff -r df8acb918cdf -r ac8ed558264b sys/arch/arc/conf/RAMDISK
--- a/sys/arch/arc/conf/RAMDISK Fri May 29 23:12:12 2020 +0000
+++ b/sys/arch/arc/conf/RAMDISK Fri May 29 23:24:39 2020 +0000
@@ -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 @@
 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     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        OVERLAY
+no file-system PROCFS
+#no file-system        UMAPFS
+#no file-system        UNION
+no file-system PTYFS
 no file-system TMPFS
-no file-system PTYFS
 
-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?



Home | Main Index | Thread Index | Old Index