···11+#22+# For a description of the syntax of this configuration file,33+# see Documentation/kbuild/config-language.txt.44+#55+66+config OPENRISC77+ def_bool y88+ select OF99+ select OF_EARLY_FLATTREE1010+ select HAVE_MEMBLOCK1111+ select ARCH_WANT_OPTIONAL_GPIOLIB1212+ select HAVE_ARCH_TRACEHOOK1313+ select HAVE_GENERIC_HARDIRQS1414+ select GENERIC_IRQ_CHIP1515+ select GENERIC_IRQ_PROBE1616+ select GENERIC_IRQ_SHOW1717+ select GENERIC_IOMAP1818+1919+config MMU2020+ def_bool y2121+2222+config WISHBONE_BUS_BIG_ENDIAN2323+ def_bool y2424+2525+config SYMBOL_PREFIX2626+ string2727+ default ""2828+2929+config HAVE_DMA_ATTRS3030+ def_bool y3131+3232+config UID163333+ def_bool y3434+3535+config RWSEM_GENERIC_SPINLOCK3636+ def_bool y3737+3838+config RWSEM_XCHGADD_ALGORITHM3939+ def_bool n4040+4141+config GENERIC_HWEIGHT4242+ def_bool y4343+4444+config GENERIC_IOMAP4545+ def_bool y4646+4747+config NO_IOPORT4848+ def_bool y4949+5050+config GENERIC_GPIO5151+ def_bool y5252+5353+config GENERIC_CLOCKEVENTS5454+ def_bool y5555+5656+config TRACE_IRQFLAGS_SUPPORT5757+ def_bool y5858+5959+# For now, use generic checksum functions6060+#These can be reimplemented in assembly later if so inclined6161+config GENERIC_CSUM6262+ def_bool y6363+6464+config GENERIC_FIND_NEXT_BIT6565+ def_bool y6666+6767+source "init/Kconfig"6868+6969+7070+menu "Processor type and features"7171+7272+choice7373+ prompt "Subarchitecture"7474+ default OR1K_12007575+7676+config OR1K_12007777+ bool "OR1200"7878+ help7979+ Generic OpenRISC 1200 architecture8080+8181+endchoice8282+8383+config OPENRISC_BUILTIN_DTB8484+ string "Builtin DTB"8585+ default ""8686+8787+menu "Class II Instructions"8888+8989+config OPENRISC_HAVE_INST_FF19090+ bool "Have instruction l.ff1"9191+ default y9292+ help9393+ Select this if your implementation has the Class II instruction l.ff19494+9595+config OPENRISC_HAVE_INST_FL19696+ bool "Have instruction l.fl1"9797+ default y9898+ help9999+ Select this if your implementation has the Class II instruction l.fl1100100+101101+config OPENRISC_HAVE_INST_MUL102102+ bool "Have instruction l.mul for hardware multiply"103103+ default y104104+ help105105+ Select this if your implementation has a hardware multiply instruction106106+107107+config OPENRISC_HAVE_INST_DIV108108+ bool "Have instruction l.div for hardware divide"109109+ default y110110+ help111111+ Select this if your implementation has a hardware divide instruction112112+endmenu113113+114114+115115+source "kernel/time/Kconfig"116116+source kernel/Kconfig.hz117117+source kernel/Kconfig.preempt118118+source "mm/Kconfig"119119+120120+config OPENRISC_NO_SPR_SR_DSX121121+ bool "use SPR_SR_DSX software emulation" if OR1K_1200122122+ default y123123+ help124124+ SPR_SR_DSX bit is status register bit indicating whether125125+ the last exception has happened in delay slot.126126+127127+ OpenRISC architecture makes it optional to have it implemented128128+ in hardware and the OR1200 does not have it.129129+130130+ Say N here if you know that your OpenRISC processor has131131+ SPR_SR_DSX bit implemented. Say Y if you are unsure.132132+133133+config CMDLINE134134+ string "Default kernel command string"135135+ default ""136136+ help137137+ On some architectures there is currently no way for the boot loader138138+ to pass arguments to the kernel. For these architectures, you should139139+ supply some command-line options at build time by entering them140140+ here.141141+142142+menu "Debugging options"143143+144144+config DEBUG_STACKOVERFLOW145145+ bool "Check for kernel stack overflow"146146+ default y147147+ help148148+ Make extra checks for space avaliable on stack in some149149+ critical functions. This will cause kernel to run a bit slower,150150+ but will catch most of kernel stack overruns and exit gracefuly.151151+152152+ Say Y if you are unsure.153153+154154+config JUMP_UPON_UNHANDLED_EXCEPTION155155+ bool "Try to die gracefully"156156+ default y157157+ help158158+ Now this puts kernel into infinite loop after first oops. Till159159+ your kernel crashes this doesn't have any influence.160160+161161+ Say Y if you are unsure.162162+163163+config OPENRISC_EXCEPTION_DEBUG164164+ bool "Print processor state at each exception"165165+ default n166166+ help167167+ This option will make your kernel unusable for all but kernel168168+ debugging.169169+170170+ Say N if you are unsure.171171+172172+config OPENRISC_ESR_EXCEPTION_BUG_CHECK173173+ bool "Check for possible ESR exception bug"174174+ default n175175+ help176176+ This option enables some checks that might expose some problems177177+ in kernel.178178+179179+ Say N if you are unsure.180180+181181+endmenu182182+183183+endmenu184184+185185+menu "Executable file formats"186186+187187+source "fs/Kconfig.binfmt"188188+189189+endmenu190190+191191+source "net/Kconfig"192192+193193+source "drivers/Kconfig"194194+195195+source "fs/Kconfig"196196+197197+source "security/Kconfig"198198+199199+source "crypto/Kconfig"200200+201201+source "lib/Kconfig"202202+203203+menu "Kernel hacking"204204+205205+source "lib/Kconfig.debug"206206+207207+endmenu
+55
arch/openrisc/Makefile
···11+# BK Id: %F% %I% %G% %U% %#%22+#33+# This file is included by the global makefile so that you can add your own44+# architecture-specific flags and dependencies. Remember to do have actions55+# for "archclean" and "archdep" for cleaning up and making dependencies for66+# this architecture77+#88+# This file is subject to the terms and conditions of the GNU General Public99+# License. See the file "COPYING" in the main directory of this archive1010+# for more details.1111+#1212+# Copyright (C) 1994 by Linus Torvalds1313+# Modifications for the OpenRISC architecture:1414+# Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>1515+# Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>1616+#1717+# Based on:1818+# arch/i386/Makefile1919+2020+KBUILD_DEFCONFIG := or1ksim_defconfig2121+2222+LDFLAGS :=2323+OBJCOPYFLAGS := -O binary -R .note -R .comment -S2424+LDFLAGS_vmlinux :=2525+LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)2626+2727+KBUILD_CFLAGS += -pipe -ffixed-r102828+2929+ifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y)3030+ KBUILD_CFLAGS += $(call cc-option,-mhard-mul)3131+else3232+ KBUILD_CFLAGS += $(call cc-option,-msoft-mul)3333+endif3434+3535+ifeq ($(CONFIG_OPENRISC_HAVE_INST_DIV),y)3636+ KBUILD_CFLAGS += $(call cc-option,-mhard-div)3737+else3838+ KBUILD_CFLAGS += $(call cc-option,-msoft-div)3939+endif4040+4141+head-y := arch/openrisc/kernel/head.o arch/openrisc/kernel/init_task.o4242+4343+core-y += arch/openrisc/lib/ \4444+ arch/openrisc/kernel/ \4545+ arch/openrisc/mm/4646+libs-y += $(LIBGCC)4747+4848+ifneq '$(CONFIG_OPENRISC_BUILTIN_DTB)' '""'4949+BUILTIN_DTB := y5050+else5151+BUILTIN_DTB := n5252+endif5353+core-$(BUILTIN_DTB) += arch/openrisc/boot/5454+5555+all: vmlinux
···11+CONFIG_CROSS_COMPILE="or32-linux-"22+CONFIG_LOG_BUF_SHIFT=1433+CONFIG_BLK_DEV_INITRD=y44+# CONFIG_RD_GZIP is not set55+CONFIG_EXPERT=y66+# CONFIG_SYSCTL_SYSCALL is not set77+# CONFIG_KALLSYMS is not set88+# CONFIG_EPOLL is not set99+# CONFIG_TIMERFD is not set1010+# CONFIG_EVENTFD is not set1111+# CONFIG_AIO is not set1212+# CONFIG_VM_EVENT_COUNTERS is not set1313+# CONFIG_COMPAT_BRK is not set1414+CONFIG_SLOB=y1515+CONFIG_MODULES=y1616+# CONFIG_BLOCK is not set1717+CONFIG_OPENRISC_BUILTIN_DTB="or1ksim"1818+CONFIG_NO_HZ=y1919+CONFIG_HZ_100=y2020+CONFIG_NET=y2121+CONFIG_PACKET=y2222+CONFIG_UNIX=y2323+CONFIG_INET=y2424+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set2525+# CONFIG_INET_XFRM_MODE_TUNNEL is not set2626+# CONFIG_INET_XFRM_MODE_BEET is not set2727+# CONFIG_INET_LRO is not set2828+# CONFIG_INET_DIAG is not set2929+CONFIG_TCP_CONG_ADVANCED=y3030+# CONFIG_TCP_CONG_BIC is not set3131+# CONFIG_TCP_CONG_CUBIC is not set3232+# CONFIG_TCP_CONG_WESTWOOD is not set3333+# CONFIG_TCP_CONG_HTCP is not set3434+# CONFIG_IPV6 is not set3535+# CONFIG_WIRELESS is not set3636+CONFIG_DEVTMPFS=y3737+CONFIG_DEVTMPFS_MOUNT=y3838+# CONFIG_PREVENT_FIRMWARE_BUILD is not set3939+# CONFIG_FW_LOADER is not set4040+CONFIG_PROC_DEVICETREE=y4141+CONFIG_NETDEVICES=y4242+CONFIG_MICREL_PHY=y4343+CONFIG_NET_ETHERNET=y4444+CONFIG_ETHOC=y4545+# CONFIG_NETDEV_1000 is not set4646+# CONFIG_NETDEV_10000 is not set4747+# CONFIG_WLAN is not set4848+# CONFIG_INPUT is not set4949+# CONFIG_SERIO is not set5050+# CONFIG_VT is not set5151+# CONFIG_LEGACY_PTYS is not set5252+# CONFIG_DEVKMEM is not set5353+CONFIG_SERIAL_8250=y5454+CONFIG_SERIAL_8250_CONSOLE=y5555+CONFIG_SERIAL_OF_PLATFORM=y5656+# CONFIG_HW_RANDOM is not set5757+# CONFIG_HWMON is not set5858+# CONFIG_MFD_SUPPORT is not set5959+# CONFIG_USB_SUPPORT is not set6060+# CONFIG_DNOTIFY is not set6161+CONFIG_TMPFS=y6262+CONFIG_NFS_FS=y6363+CONFIG_NFS_V3=y6464+# CONFIG_ENABLE_WARN_DEPRECATED is not set6565+# CONFIG_ENABLE_MUST_CHECK is not set
···11+#22+# Makefile for the linux kernel.33+#44+55+extra-y := head.o vmlinux.lds init_task.o66+77+obj-y := setup.o idle.o or32_ksyms.o process.o dma.o \88+ traps.o time.o irq.o entry.o ptrace.o signal.o sys_or32.o \99+ sys_call_table.o1010+1111+obj-$(CONFIG_MODULES) += module.o1212+obj-$(CONFIG_OF) += prom.o1313+1414+clean:
+115
arch/openrisc/kernel/vmlinux.lds.S
···11+/*22+ * OpenRISC vmlinux.lds.S33+ *44+ * Linux architectural port borrowing liberally from similar works of55+ * others. All original copyrights apply as per the original source66+ * declaration.77+ *88+ * Modifications for the OpenRISC architecture:99+ * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>1010+ * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>1111+ *1212+ * This program is free software; you can redistribute it and/or1313+ * modify it under the terms of the GNU General Public License1414+ * as published by the Free Software Foundation; either version1515+ * 2 of the License, or (at your option) any later version.1616+ *1717+ * ld script for OpenRISC architecture1818+ */1919+2020+/* TODO2121+ * - clean up __offset & stuff2222+ * - change all 8192 aligment to PAGE !!!2323+ * - recheck if all aligments are really needed2424+ */2525+2626+# define LOAD_OFFSET PAGE_OFFSET2727+# define LOAD_BASE PAGE_OFFSET2828+2929+#include <asm/page.h>3030+#include <asm/cache.h>3131+#include <asm-generic/vmlinux.lds.h>3232+3333+OUTPUT_FORMAT("elf32-or32", "elf32-or32", "elf32-or32")3434+jiffies = jiffies_64 + 4;3535+3636+SECTIONS3737+{3838+ /* Read-only sections, merged into text segment: */3939+ . = LOAD_BASE ;4040+4141+ /* _s_kernel_ro must be page aligned */4242+ . = ALIGN(PAGE_SIZE);4343+ _s_kernel_ro = .;4444+4545+ .text : AT(ADDR(.text) - LOAD_OFFSET)4646+ {4747+ _stext = .;4848+ TEXT_TEXT4949+ SCHED_TEXT5050+ LOCK_TEXT5151+ KPROBES_TEXT5252+ IRQENTRY_TEXT5353+ *(.fixup)5454+ *(.text.__*)5555+ _etext = .;5656+ }5757+ /* TODO: Check if fixup and text.__* are really necessary5858+ * fixup is definitely necessary5959+ */6060+6161+ _sdata = .;6262+6363+ /* Page alignment required for RO_DATA_SECTION */6464+ RO_DATA_SECTION(PAGE_SIZE)6565+ _e_kernel_ro = .;6666+6767+ /* Whatever comes after _e_kernel_ro had better be page-aligend, too */6868+6969+ /* 32 here is cacheline size... recheck this */7070+ RW_DATA_SECTION(32, PAGE_SIZE, PAGE_SIZE)7171+7272+ _edata = .;7373+7474+ EXCEPTION_TABLE(4)7575+ NOTES7676+7777+ /* Init code and data */7878+ . = ALIGN(PAGE_SIZE);7979+ __init_begin = .;8080+8181+ HEAD_TEXT_SECTION8282+8383+ /* Page aligned */8484+ INIT_TEXT_SECTION(PAGE_SIZE)8585+8686+ /* Align __setup_start on 16 byte boundary */8787+ INIT_DATA_SECTION(16)8888+8989+ PERCPU_SECTION(L1_CACHE_BYTES)9090+9191+ __init_end = .;9292+9393+ . = ALIGN(PAGE_SIZE);9494+ .initrd : AT(ADDR(.initrd) - LOAD_OFFSET)9595+ {9696+ __initrd_start = .;9797+ *(.initrd)9898+ __initrd_end = .;9999+ FILL (0);100100+ . = ALIGN (PAGE_SIZE);101101+ }102102+103103+ __vmlinux_end = .; /* last address of the physical file */104104+105105+ BSS_SECTION(0, 0, 0x20)106106+107107+ _end = .;108108+109109+ /* Throw in the debugging sections */110110+ STABS_DEBUG111111+ DWARF_DEBUG112112+113113+ /* Sections to be discarded -- must be last */114114+ DISCARDS115115+}
+5
arch/openrisc/lib/Makefile
···11+#22+# Makefile for or32 specific library files..33+#44+55+obj-y = string.o delay.o
+5
arch/openrisc/mm/Makefile
···11+#22+# Makefile for the linux openrisc-specific parts of the memory manager.33+#44+55+obj-y := fault.o tlb.o init.o ioremap.o