-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kernel config files modified to support new machine "pic32".
Created dummy files for pic32 drivers.
- Loading branch information
Sergey
committed
Apr 27, 2014
1 parent
7ec2108
commit 030bc65
Showing
43 changed files
with
11,170 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# | ||
# GENERIC PIC32MZ target | ||
# | ||
machine "pic32" | ||
|
||
cpu "PIC32MZ" | ||
ident GENERIC | ||
|
||
# Need to set locally | ||
timezone 8 dst | ||
maxusers 2 | ||
|
||
# Standard system options | ||
options SWAPPAGER # swap pager (anonymous and swap space) | ||
options VNODEPAGER # vnode pager (mapped files) | ||
options DEVPAGER # device pager (mapped devices) | ||
options DIAGNOSTIC # extra kernel debugging checks | ||
options DEBUG # extra kernel debugging support | ||
options "COMPAT_43" # compatibility with 4.3BSD binaries | ||
options KTRACE # system call tracing support | ||
options "NKMEMCLUSTERS=16" # 4K pages in kernel malloc pool, default 128 pages | ||
options "NMBCLUSTERS=16" # 4K pages in network mbuf pool, default 256/512 pages | ||
|
||
# Filesystem options | ||
options FIFO # POSIX fifo support (in all filesystems) | ||
options FFS # fast filesystem with user and group quotas | ||
#options MFS # memory-based filesystem | ||
#options NFS # Sun NFS-compatible filesystem | ||
options UNION # Union filesystem | ||
options KERNFS # kernel data-structure filesystem | ||
options FDESC # user file descriptor filesystem | ||
options PROCFS # /proc filesystem | ||
#options UMAPFS # uid/gid remapping filesystem | ||
#options NULLFS # null layer filesystem | ||
#options LFS # Log-based filesystem (still experimental) | ||
#options PORTAL # portal filesystem (still experimental) | ||
|
||
# Networking options | ||
options INET # Internet protocols | ||
options "TCP_COMPAT_42" # compatibility with 4.2BSD TCP/IP | ||
#options GATEWAY # IP packet forwarding | ||
#options MULTICAST # Multicast support | ||
#options MROUTING # Multicast routing support | ||
|
||
#config vmunix swap generic | ||
config vmunix root on sd0a swap on sd0b dumps on sd0b | ||
|
||
controller uart0 | ||
controller spi0 | ||
disk sd0 at spi0 drive 0 | ||
disk sd1 at spi0 drive 1 | ||
|
||
pseudo-device pty 4 # pseudo ptys | ||
pseudo-device bpfilter 1 # packet filter ports | ||
pseudo-device loop | ||
pseudo-device ether |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
# | ||
# Makefile for 4.4 BSD, pic32 target | ||
# | ||
# This makefile is constructed from a machine description: | ||
# config machineid | ||
# Most changes should be made in the machine description | ||
# /sys/conf/``machineid'' | ||
# after which you should do | ||
# config machineid | ||
# Machine generic makefile changes should be made in | ||
# /sys/conf/Makefile.``machinetype'' | ||
# after which config should be rerun for all machines of that type. | ||
# | ||
# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE | ||
# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING | ||
# | ||
# -DTRACE compile in kernel tracing hooks | ||
# -DQUOTA compile in file system quotas | ||
|
||
|
||
# DEBUG is set to -g by config if debugging is requested (config -g). | ||
# PROF is set to -pg by config if profiling is requested (config -p). | ||
AS= ${MIPS_TOOLCHAIN}as ${DEBUG} | ||
CC= ${MIPS_TOOLCHAIN}gcc ${DEBUG} -fno-builtin | ||
LOCALCC= gcc -m32 ${DEBUG} | ||
CPP= cpp | ||
LD= ${MIPS_TOOLCHAIN}gcc | ||
LDFLAGS= -nostdlib -T $A/pic32/bootloader-max32.ld -Wl,-Map=unix.map | ||
SIZE= ${MIPS_TOOLCHAIN}size | ||
|
||
# source tree is located via $S relative to the compilation directory | ||
S= ../.. | ||
A= $S/mips | ||
|
||
INCLUDES= -I. -I$S | ||
COPTS= ${INCLUDES} ${IDENT} -DKERNEL | ||
CFLAGS= -O ${COPTS} | ||
|
||
# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP} | ||
# where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix, | ||
# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file | ||
# is marked as config-dependent. | ||
|
||
NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< | ||
NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< | ||
|
||
DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $< | ||
DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< | ||
|
||
PROFILE_C= ${CC} -p -c ${COPTS} $< | ||
|
||
NORMAL_S= ${CPP} ${COPTS} $< | ${AS} -o $@ | ||
NORMAL_S_C= ${CPP} ${COPTS} ${PARAM} $< | ${AS} -o $@ | ||
|
||
%OBJS | ||
|
||
%CFILES | ||
|
||
# load lines for config "xxx" will be emitted as: | ||
# xxx: ${SYSTEM_DEP} swapxxx.o | ||
# ${SYSTEM_LD_HEAD} | ||
# ${SYSTEM_LD} swapxxx.o | ||
# ${SYSTEM_LD_TAIL} | ||
SYSTEM_OBJ= locore.o ${OBJS} param.o ioconf.o vnode_if.o | ||
SYSTEM_DEP= Makefile ${SYSTEM_OBJ} $S/libkern/libkern.a | ||
SYSTEM_LD_HEAD= rm -f $@ | ||
SYSTEM_LD= -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -L$S/libkern -lkern -o vmunix; \ | ||
${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -L$S/libkern -lkern -o vmunix | ||
SYSTEM_LD_TAIL= chmod 755 $@; ${SIZE} $@ | ||
|
||
%LOAD | ||
|
||
$S/libkern/libkern.a: | ||
${MAKE} -C $S/libkern all | ||
|
||
newvers: | ||
sh $S/conf/newvers.sh | ||
${CC} $(CFLAGS) -c vers.c | ||
|
||
clean: | ||
rm -f eddep *vmunix vmunix.gdb tags *.o locore.i [a-z]*.s \ | ||
Errs errs linterrs makelinks | ||
|
||
lint: /tmp param.c | ||
@lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \ | ||
$A/pic32/Locore.c ${CFILES} $A/pic32/swapgeneric.c \ | ||
ioconf.c param.c | ||
|
||
symbols.sort: $A/pic32/symbols.raw | ||
grep -v '^#' $A/pic32/symbols.raw \ | ||
| sed 's/^ //' | sort -u > symbols.sort | ||
|
||
locore.o: $A/pic32/locore.s $A/include/machAsmDefs.h \ | ||
$A/include/machConst.h $A/include/reg.h assym.h | ||
${CPP} ${COPTS} ${PARAM} -DLOCORE $A/pic32/locore.s | \ | ||
${AS} -o locore.o | ||
|
||
# the following is necessary because autoconf.o depends on #if GENERIC | ||
autoconf.o: Makefile | ||
|
||
# the following are necessary because the files depend on the types of | ||
# cpu's included in the system configuration | ||
clock.o machdep.o autoconf.o conf.o: Makefile | ||
|
||
# depend on network configuration | ||
uipc_proto.o vfs_conf.o: Makefile | ||
|
||
assym.h: genassym | ||
./genassym >assym.h | ||
|
||
genassym: $A/pic32/genassym.c machine | ||
${LOCALCC} -nostdinc -fno-builtin ${INCLUDES} -I. ${IDENT} ${PARAM} -o genassym $A/pic32/genassym.c | ||
|
||
machine: | ||
ln -s $A/include $@ | ||
|
||
depend: machine assym.h param.c vnode_if.h | ||
mkdep ${COPTS} ${CFILES} ioconf.c param.c | ||
mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} $A/pic32/genassym.c | ||
|
||
links: | ||
egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ | ||
sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink | ||
echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ | ||
sort -u | comm -23 - dontlink | \ | ||
sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks | ||
sh makelinks && rm -f dontlink | ||
|
||
tags: | ||
@echo "see $S/kern/Makefile for tags" | ||
|
||
ioconf.o: ioconf.c | ||
${CC} -c ${CFLAGS} ioconf.c | ||
|
||
param.c: $S/conf/param.c | ||
rm -f param.c | ||
cp $S/conf/param.c . | ||
|
||
param.o: param.c Makefile | ||
${CC} -c ${CFLAGS} ${PARAM} param.c | ||
|
||
vnode_if.c: $S/kern/vnode_if.sh $S/kern/vnode_if.src | ||
sh $S/kern/vnode_if.sh $S/kern/vnode_if.src | ||
vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src | ||
sh $S/kern/vnode_if.sh $S/kern/vnode_if.src | ||
|
||
%RULES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sd 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
mips/pic32/autoconf.c standard | ||
mips/pic32/clock.c standard | ||
mips/pic32/conf.c standard | ||
mips/pic32/cons.c standard | ||
mips/pic32/fp.s standard | ||
mips/pic32/machdep.c standard config-dependent | ||
mips/pic32/mem.c standard | ||
mips/pic32/pmap.c standard | ||
mips/pic32/procfs_machdep.c optional procfs | ||
mips/pic32/sys_machdep.c standard | ||
mips/pic32/trap.c standard | ||
mips/pic32/vm_machdep.c standard | ||
mips/dev/uart.c optional uart device-driver | ||
mips/dev/spi.c optional spi device-driver | ||
mips/dev/sd.c optional sd device-driver | ||
netinet/in_cksum.c optional inet | ||
dev/vn.c optional vn | ||
thisisfor_in_proto.c optional hy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.