如何配置netbsd内核

发布时间:2021-10-12 14:50:56 作者:iii
来源:亿速云 阅读:143

这篇文章主要讲解了“如何配置netbsd内核”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“如何配置netbsd内核”吧!

这个内核配置文件,要经过config进行处理

第一行表示,要包含一个文件

include     "arch/evbmips/conf/std.loongson", 内容如下:

# $NetBSD: std.loongson,v 1.2 2017/08/08 12:22:21 maya Exp $


machine evbmips mips
include        "conf/std"    # MI standard options


options     MIPS3_ENABLE_CLOCK_INTR
options     ENABLE_MIPS_16KB_PAGE


options     PMON


# Platform support
options        MIPS3_LOONGSON2
options        MIPS3
options        MIPS3_LOONGSON2F
options     LOONGSON2        # IDT LOONGSON2


makeoptions    LP64="yes"


options     EXEC_ELF64
options        EXEC_ELF32    # exec ELF32 binaries
options        EXEC_SCRIPT    # exec #! scripts
options     COMPAT_NETBSD32


makeoptions    CPUFLAGS="-mips3 -mdivide-breaks -Wa,-mfix-loongson2f-btb -Wa,-mfix-loongson2f-jump -Wa,-mfix-loongson2f-nop" # CPU codegen options
makeoptions    DEFTEXTADDR="0x80200000"
makeoptions    BOARDTYPE="loongson"


include "arch/evbmips/conf/files.loongson"

它又包含了两个文件:

1 conf/std

# $NetBSD: std,v 1.23 2019/01/27 02:08:41 pgoyette Exp $
#
# standard MI 'options'   标准的不能取消的选项
#
# this file is for options which can't be off-by-default for some reasons.
# "it's commonly used" is NOT a good reason to enable options here.


#
# Always include "kern" attribute (module).  Other attributes don't need to
# depend on "kern".
#
select    kern       有内核模块属性,在输出目录里,有kern_xxx.d & kern_xxx.o


# Always include the "vfs" attribute (module).  Although all of the
# ufs/xxx file systems depend on the vfs attribute, it is not required
# that any file system actually be built-in to the kernel.  (At least
# on some architectures, file system modules can be loaded at boot
# time.)


select vfs            有vfs,虚拟文件系统属性,在输出目录里,有vfs_xxx.d & vfs_xxx.o 


select    net        # XXX Clean up dependency


# the following options are on-by-default to keep
# kernel config file compatibility.
下面的选项,默认都是打开的

options    VMSWAP        # Swap device/file support
options    BUFQ_FCFS    # First-come First-serve strategy
options    BUFQ_DISKSORT    # Traditional min seek sort strategy
options    RFC2292        # Previous version of Adv. Sockets API for IPv6
options    PTRACE        # Include ptrace(2) syscall
options    PTRACE_HOOKS    # Include ptrace hooks
options    COREDUMP    # allow processes to coredump.
options    AIO        # POSIX asynchronous I/O
options    MQUEUE        # POSIX message queues


# Common compatibility functions. They happen to be needed even when
# no compatibility option is explicitly enabled.
#
options        COMPAT_UTILS


#
# Security model.
#
options    secmodel_bsd44    # Traditional 4.4BSD security model


#
# Scheduling algorithm
#
options    SCHED_4BSD


pseudo-device    cpuctl


#
# Kernel entropy pool and random-number generator pseudodevice.
# The pseudodevice might stop being "std" when the two are torn
# apart some day but the entropy pool itself never will (they are
# presently implemented in the same source file)
#
pseudo-device    rnd

2 arch/evbmips/conf/files.loongson

#    $NetBSD: files.loongson,v 1.5 2014/07/20 10:22:54 alnsn Exp $


# Standard stanzas config(8) can't run without
maxpartitions 16
maxusers 8 16 64


file    arch/evbmips/loongson/autoconf.c
file    arch/evbmips/loongson/loongson_bus_io.c
file    arch/evbmips/loongson/loongson_bus_mem.c
file    kern/subr_disk_mbr.c
file    arch/evbmips/loongson/loongson_intr.c
file    arch/evbmips/evbmips/interrupt.c
file    arch/evbmips/loongson/gdium_machdep.c
file    arch/evbmips/loongson/generic2e_machdep.c
file    arch/evbmips/loongson/yeeloong_machdep.c
file    arch/evbmips/loongson/isa_machdep.c    isa
file    arch/evbmips/loongson/loongson2_machdep.c
file    arch/evbmips/loongson/machdep.c


file    arch/mips/mips/bus_dma.c
file    arch/mips/mips/mips3_clock.c
file    arch/mips/mips/mips3_clockintr.c


# Memory Disk
file    dev/md_root.c                memory_disk_hooks


# Stack-less Just-In-Time compiler
include    "external/bsd/sljit/conf/files.sljit"


include "dev/ata/files.ata"
include "dev/scsipi/files.scsipi"
include "dev/i2o/files.i2o"
include "dev/isa/files.isa"
include "dev/pci/files.pci"
include "dev/pci/files.agp"
include "dev/usb/files.usb"
include "dev/bluetooth/files.bluetooth"
include "dev/pckbport/files.pckbport"


device    mainbus {[addr = -1] }
attach    mainbus at root
file    arch/evbmips/loongson/mainbus.c        mainbus


file    arch/evbmips/loongson/bonito_mainbus.c    bonito_mainbus


device    cpu
attach    cpu at mainbus
file    arch/evbmips/evbmips/cpu.c        cpu


device    clock
attach    clock at mainbus


include "arch/mips/conf/files.bonito"


# AMD Geode CS5536 companion chip
file    arch/evbmips/loongson/dev/glx.c        bonito & pci


# AMD Geode CS5535/CS5536 PCI-ISA bridge
device    gcscpcib: isabus, sysmon_wdog, gpiobus
attach    gcscpcib at pci with gcscpcib_pci
file    arch/evbmips/loongson/dev/gcscpcib_pci.c gcscpcib_pci
file    dev/ic/gcscpcib.c            gcscpcib


# Other PCI-ISA bridges
device    pcib: isabus
attach    pcib at pci
file    arch/evbmips/loongson/dev/pcib.c    pcib | gcscpcib


file    arch/mips/pci/pciide_machdep.c        pciide_common


device    mcclock: mc146818
attach    mcclock at isa with mcclock_isa
file    arch/evbmips/isa/mcclock_isa.c        mcclock_isa


# Lemote Yeeloong KB3310B Embedded Controller
device    ykbec
attach    ykbec at isa
file    arch/evbmips/loongson/dev/kb3310.c    ykbec needs-flag


# Gdium ST7 controller
device    stvii
attach    stvii at iic
file    arch/evbmips/loongson/dev/stvii.c            stvii needs-flag
defflag opt_stvii.h STVII_DEBUG


# SM502 OHCI
#attach    ohci at voyager with ohci_voyager
#file    arch/loongson/dev/ohci_voyager.c    ohci_voyager

感谢各位的阅读,以上就是“如何配置netbsd内核”的内容了,经过本文的学习后,相信大家对如何配置netbsd内核这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是亿速云,小编将为大家推送更多相关知识点的文章,欢迎关注!

推荐阅读:
  1. 参考内核配置
  2. 下载配置linux内核的步骤

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

上一篇:如何使用Pycharm中的File Watchers

下一篇:css中图片路径问题的示例分析

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》