Fix include paths in the kernel sources.
Max32 kernel successfully compiled with kconfig utility.
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
/*
|
||||
* Signals
|
||||
*/
|
||||
#include <signal.h>
|
||||
#include <sys/signal.h>
|
||||
|
||||
#define NBPW sizeof(int) /* number of bytes in an integer */
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
#define MAXHOSTNAMELEN 64
|
||||
|
||||
#if defined(KERNEL) && defined(INET)
|
||||
# include "machine/net_mac.h"
|
||||
# include <machine/net_mac.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "map.h"
|
||||
#include "inode.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "buf.h"
|
||||
#include "namei.h"
|
||||
#include "fs.h"
|
||||
#include "mount.h"
|
||||
#include "file.h"
|
||||
#include "resource.h"
|
||||
#include "exec.h"
|
||||
#include "exec_aout.h"
|
||||
#include "dir.h"
|
||||
#include "uio.h"
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/exec_aout.h>
|
||||
#include <sys/dir.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
int exec_aout_check(struct exec_params *epp)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* $NetBSD: exec_conf.c,v 1.43 2000/06/09 22:38:57 oki Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993, 1994 Christopher G. Demetriou
|
||||
* All rights reserved.
|
||||
@@ -29,10 +27,9 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
#include "inode.h"
|
||||
#include "exec.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/exec.h>
|
||||
|
||||
#ifdef EXEC_SCRIPT
|
||||
int exec_script_check(struct exec_params *epp);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* $NetBSD: exec_elf32.c,v 1.49.2.2 2000/11/03 20:00:38 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@@ -62,22 +60,20 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "kernel.h"
|
||||
#include "map.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "inode.h"
|
||||
#include "namei.h"
|
||||
#include "exec.h"
|
||||
#include "exec_elf.h"
|
||||
#include "fcntl.h"
|
||||
#include "signalvar.h"
|
||||
#include "mount.h"
|
||||
#include "stat.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/exec_elf.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
extern char sigcode[], esigcode[];
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "param.h"
|
||||
#include "inode.h"
|
||||
#include "dir.h"
|
||||
#include "namei.h"
|
||||
#include "exec.h"
|
||||
#include "user.h"
|
||||
#include "systm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/dir.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
int
|
||||
exec_script_check(struct exec_params *epp)
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "map.h"
|
||||
#include "inode.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "buf.h"
|
||||
#include "namei.h"
|
||||
#include "fs.h"
|
||||
#include "mount.h"
|
||||
#include "file.h"
|
||||
#include "resource.h"
|
||||
#include "exec.h"
|
||||
#include "dir.h"
|
||||
#include "uio.h"
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/dir.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
/*
|
||||
* How memory is set up.
|
||||
|
||||
@@ -3,25 +3,25 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "fs.h"
|
||||
#include "mount.h"
|
||||
#include "map.h"
|
||||
#include "proc.h"
|
||||
#include "ioctl.h"
|
||||
#include "inode.h"
|
||||
#include "conf.h"
|
||||
#include "buf.h"
|
||||
#include "fcntl.h"
|
||||
#include "vm.h"
|
||||
#include "clist.h"
|
||||
#include "reboot.h"
|
||||
#include "systm.h"
|
||||
#include "kernel.h"
|
||||
#include "namei.h"
|
||||
#include "stat.h"
|
||||
#include "rdisk.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/vm.h>
|
||||
#include <sys/clist.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/rdisk.h>
|
||||
|
||||
u_int swapstart, nswap; /* start and size of swap space */
|
||||
size_t physmem; /* total amount of physical memory */
|
||||
@@ -150,8 +150,11 @@ main()
|
||||
s = spl0();
|
||||
rdisk_init();
|
||||
|
||||
pipedev = rootdev = get_boot_device();
|
||||
swapdev = get_swap_device();
|
||||
if (rootdev == NODEV)
|
||||
rootdev = get_boot_device();
|
||||
if (swapdev == NODEV)
|
||||
swapdev = get_swap_device();
|
||||
pipedev = rootdev;
|
||||
|
||||
/* Mount a root filesystem. */
|
||||
for (;;) {
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "glob.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/glob.h>
|
||||
|
||||
#ifdef INET
|
||||
# define ifnet(narg, name) narg, name
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "callout.h"
|
||||
#include "dk.h"
|
||||
#include "kernel.h"
|
||||
#include "systm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/callout.h>
|
||||
#include <sys/dk.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
int noproc; /* no one is running just now */
|
||||
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "file.h"
|
||||
#include "systm.h"
|
||||
#include "inode.h"
|
||||
#include "ioctl.h"
|
||||
#include "stat.h"
|
||||
#include "conf.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/conf.h>
|
||||
#ifdef INET
|
||||
#include "socket.h"
|
||||
#include "socketvar.h"
|
||||
#include <sys/socket.h>
|
||||
#include <sys/socketvar.h>
|
||||
#endif
|
||||
#include <syslog.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
const struct devspec fddevs[] = {
|
||||
{ 0, "stdin" },
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "map.h"
|
||||
#include "inode.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "buf.h"
|
||||
#include "namei.h"
|
||||
#include "fs.h"
|
||||
#include "mount.h"
|
||||
#include "file.h"
|
||||
#include "signalvar.h"
|
||||
#include "exec.h"
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
/*
|
||||
* exec system call, with and without environments.
|
||||
@@ -153,4 +153,3 @@ done:
|
||||
if (ip)
|
||||
iput(ip);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "map.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "inode.h"
|
||||
#include "vm.h"
|
||||
#include "file.h"
|
||||
#include "wait.h"
|
||||
#include "kernel.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/vm.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/kernel.h>
|
||||
|
||||
/*
|
||||
* Notify parent that vfork child is finished with parent's data. Called
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "map.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "inode.h"
|
||||
#include "file.h"
|
||||
#include "vm.h"
|
||||
#include "kernel.h"
|
||||
#include "syslog.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/vm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
int mpid; /* generic for unique process id's */
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
* byte = rdglob(addr);
|
||||
* success = wrglob(addr,byte);
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "user.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/user.h>
|
||||
|
||||
#ifndef GLOBSZ
|
||||
#define GLOBSZ 256
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "vm.h"
|
||||
#include "systm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/vm.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
void
|
||||
brk()
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "systm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
/*
|
||||
* Is p an inferior of the current process?
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "systm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
void
|
||||
getpid()
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "systm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
void
|
||||
setuid()
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "systm.h"
|
||||
#include "vm.h"
|
||||
#include "kernel.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/vm.h>
|
||||
#include <sys/kernel.h>
|
||||
|
||||
/*
|
||||
* Resource controls and accounting.
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "user.h"
|
||||
#include "inode.h"
|
||||
#include "proc.h"
|
||||
#include "namei.h"
|
||||
#include "signalvar.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/signalvar.h>
|
||||
|
||||
/*
|
||||
* Can the current process send the signal `signum' to process `q'?
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "user.h"
|
||||
#include "buf.h"
|
||||
#include "uio.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
/*
|
||||
* Move data to/from user space.
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "buf.h"
|
||||
#include "signal.h"
|
||||
#include "signalvar.h"
|
||||
#include "vm.h"
|
||||
#include "kernel.h"
|
||||
#include "systm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/vm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
#define SQSIZE 16 /* Must be power of 2 */
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#include <sys/map.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <conf.h>
|
||||
#include <sys/conf.h>
|
||||
|
||||
sysctlfn kern_sysctl;
|
||||
sysctlfn hw_sysctl;
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "kernel.h"
|
||||
#include "systm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
static void
|
||||
setthetime (tv)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "buf.h"
|
||||
#include "errno.h"
|
||||
#include "dk.h"
|
||||
#include "debug.h"
|
||||
#include "ioctl.h"
|
||||
#include "rdisk.h"
|
||||
#include "conf.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/dk.h>
|
||||
#include <sys/debug.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/rdisk.h>
|
||||
#include <sys/conf.h>
|
||||
|
||||
#define Q2(X) #X
|
||||
#define QUOTE(X) Q2((X))
|
||||
|
||||
@@ -19,18 +19,18 @@
|
||||
#define NLOG 1
|
||||
int nlog = 1;
|
||||
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "ioctl.h"
|
||||
#include "msgbuf.h"
|
||||
#include "file.h"
|
||||
#include "inode.h"
|
||||
#include "errno.h"
|
||||
#include "uio.h"
|
||||
#include "map.h"
|
||||
#include "systm.h"
|
||||
#include "conf.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/msgbuf.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/conf.h>
|
||||
|
||||
const struct devspec logdevs[] = {
|
||||
{ 0, "klog" },
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "buf.h"
|
||||
#include "msgbuf.h"
|
||||
#include "conf.h"
|
||||
#include "ioctl.h"
|
||||
#include "tty.h"
|
||||
#include "reboot.h"
|
||||
#include "systm.h"
|
||||
#include "syslog.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/msgbuf.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#define TOCONS 0x1
|
||||
#define TOTTY 0x2
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "map.h"
|
||||
#include "vm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/vm.h>
|
||||
|
||||
/*
|
||||
* Resource map handling routines.
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "signalvar.h"
|
||||
#include "inode.h"
|
||||
#include "file.h"
|
||||
#include "ioctl.h"
|
||||
#include "conf.h"
|
||||
#include "uio.h"
|
||||
#include "kernel.h"
|
||||
#include "systm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
int selwait;
|
||||
|
||||
|
||||
@@ -3,23 +3,23 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "signalvar.h"
|
||||
#include "inode.h"
|
||||
#include "buf.h"
|
||||
#include "fs.h"
|
||||
#include "file.h"
|
||||
#include "stat.h"
|
||||
#include "mount.h"
|
||||
#include "conf.h"
|
||||
#include "uio.h"
|
||||
#include "ioctl.h"
|
||||
#include "tty.h"
|
||||
#include "kernel.h"
|
||||
#include "systm.h"
|
||||
#include "syslog.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
daddr_t rablock; /* block to be read ahead */
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "inode.h"
|
||||
#include "file.h"
|
||||
#include "fs.h"
|
||||
#include "mount.h"
|
||||
#include "uio.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
int
|
||||
readp (fp, uio, flag)
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "inode.h"
|
||||
#include "vm.h"
|
||||
#include "ptrace.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/vm.h>
|
||||
#include <sys/ptrace.h>
|
||||
|
||||
/*
|
||||
* sys-trace system call.
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "ioctl.h"
|
||||
#include "tty.h"
|
||||
#include "proc.h"
|
||||
#include "file.h"
|
||||
#include "conf.h"
|
||||
#include "dk.h"
|
||||
#include "uio.h"
|
||||
#include "kernel.h"
|
||||
#include "systm.h"
|
||||
#include "inode.h"
|
||||
#include "syslog.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/dk.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
static int rts = TIOCM_RTS;
|
||||
|
||||
|
||||
@@ -6,22 +6,22 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "pty.h"
|
||||
#include <sys/pty.h>
|
||||
|
||||
#if NPTY > 0
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "ioctl.h"
|
||||
#include "tty.h"
|
||||
#include "user.h"
|
||||
#include "conf.h"
|
||||
#include "file.h"
|
||||
#include "proc.h"
|
||||
#include "uio.h"
|
||||
#include "kernel.h"
|
||||
#include "inode.h"
|
||||
#include "types.h"
|
||||
#include "ttydev.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ttydev.h>
|
||||
|
||||
const struct devspec ptsdevs[] = {
|
||||
{ 0, "ttyp0" }, { 1, "ttyp1" }, { 2, "ttyp2" }, { 3, "ttyp3" },
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "clist.h"
|
||||
#include "ioctl.h"
|
||||
#include "tty.h"
|
||||
#include "systm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/clist.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
char cwaiting;
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
* Indirect driver for controlling tty.
|
||||
*
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "ioctl.h"
|
||||
#include "tty.h"
|
||||
#include "conf.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/conf.h>
|
||||
|
||||
const struct devspec sydevs[] = {
|
||||
{ 0, "tty" },
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "fs.h"
|
||||
#include "dir.h"
|
||||
#include "inode.h"
|
||||
#include "buf.h"
|
||||
#include "user.h"
|
||||
#include "kernel.h"
|
||||
#include "mount.h"
|
||||
#include "proc.h"
|
||||
#include "systm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/dir.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
typedef struct fblk *FBLKP;
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "buf.h"
|
||||
#include "user.h"
|
||||
#include "conf.h"
|
||||
#include "fs.h"
|
||||
#include "dk.h"
|
||||
#include "systm.h"
|
||||
#include "map.h"
|
||||
#include "proc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/dk.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/proc.h>
|
||||
|
||||
/*
|
||||
* Read in (if necessary) the block and return a buffer pointer.
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "conf.h"
|
||||
#include "dir.h"
|
||||
#include "inode.h"
|
||||
#include "user.h"
|
||||
#include "buf.h"
|
||||
#include "fs.h"
|
||||
#include "mount.h"
|
||||
#include "uio.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/dir.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
/*
|
||||
* Bmap defines the structure of file system storage
|
||||
|
||||
@@ -9,11 +9,10 @@
|
||||
/*
|
||||
* generalized seek sort for disk
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "buf.h"
|
||||
#include "dk.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/dk.h>
|
||||
|
||||
void
|
||||
disksort (dp, bp)
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "fs.h"
|
||||
#include "inode.h"
|
||||
#include "mount.h"
|
||||
#include "namei.h"
|
||||
#include "systm.h"
|
||||
#include "stat.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/*
|
||||
* Check mode permission on inode pointer.
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "inode.h"
|
||||
#include "fs.h"
|
||||
#include "mount.h"
|
||||
#include "kernel.h"
|
||||
#include "buf.h"
|
||||
#include "systm.h"
|
||||
#include "syslog.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#define INOHSZ 16 /* must be power of two */
|
||||
#define INOHASH(dev,ino) (((dev)+(ino))&(INOHSZ-1))
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "user.h"
|
||||
#include "inode.h"
|
||||
#include "fs.h"
|
||||
#include "buf.h"
|
||||
#include "mount.h"
|
||||
#include "file.h"
|
||||
#include "namei.h"
|
||||
#include "conf.h"
|
||||
#include "stat.h"
|
||||
#include "ioctl.h"
|
||||
#include "proc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/proc.h>
|
||||
|
||||
/*
|
||||
* Common code for mount and umount.
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "dir.h"
|
||||
#include "inode.h"
|
||||
#include "fs.h"
|
||||
#include "mount.h"
|
||||
#include "user.h"
|
||||
#include "buf.h"
|
||||
#include "namei.h"
|
||||
#include "proc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/dir.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/proc.h>
|
||||
|
||||
int dirchk = 0;
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "fs.h"
|
||||
#include "inode.h"
|
||||
#include "buf.h"
|
||||
#include "mount.h"
|
||||
#include "kernel.h"
|
||||
#include "systm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
int updlock; /* lock for sync */
|
||||
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "user.h"
|
||||
#include "inode.h"
|
||||
#include "namei.h"
|
||||
#include "fs.h"
|
||||
#include "file.h"
|
||||
#include "stat.h"
|
||||
#include "kernel.h"
|
||||
#include "proc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/proc.h>
|
||||
|
||||
/*
|
||||
* Common routine for chroot and chdir.
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
* ufs_syscalls was getting too large. Various UFS related system calls were
|
||||
* relocated to this file.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "sys/file.h"
|
||||
#include "user.h"
|
||||
#include "inode.h"
|
||||
#include "buf.h"
|
||||
#include "fs.h"
|
||||
#include "namei.h"
|
||||
#include "mount.h"
|
||||
#include "kernel.h"
|
||||
#include "systm.h"
|
||||
#include "proc.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
|
||||
static int
|
||||
statfs1 (mp, sbp)
|
||||
|
||||
@@ -41,8 +41,7 @@
|
||||
#include <sys/namei.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "systm.h"
|
||||
#include <sys/systm.h>
|
||||
|
||||
/*
|
||||
* 2.11BSD does not have "vnodes", having instead only old fashioned "inodes".
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "vm.h"
|
||||
#include "kernel.h"
|
||||
#include "systm.h"
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/vm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
#define MINFINITY -32767 /* minus infinity */
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "map.h"
|
||||
#include "buf.h"
|
||||
#include "systm.h"
|
||||
#include "vm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/vm.h>
|
||||
|
||||
/*
|
||||
* Swap a process in.
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "buf.h"
|
||||
#include "conf.h"
|
||||
#include "systm.h"
|
||||
#include "vm.h"
|
||||
#include "uio.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/vm.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
/*
|
||||
* swap I/O
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
#
|
||||
machine "pic32"
|
||||
|
||||
cpu "PIC32MX"
|
||||
cpu "PIC32MX7"
|
||||
ident CHIPKIT_MAX
|
||||
|
||||
# Linker script
|
||||
ldscript "pic32/bootloader-max32.ld"
|
||||
ldscript "cfg/bootloader-max32.ld"
|
||||
|
||||
# Need to set locally
|
||||
timezone 8 dst
|
||||
@@ -23,11 +23,7 @@ maxusers 2
|
||||
options "CPU_KHZ=80000" # Oscillator frequency of CPU core
|
||||
options "BUS_KHZ=80000" # Frequency of peripheral bus
|
||||
options "HZ=100" # Rate of clock interrupt
|
||||
#???options "BUS_DIV=1" # Bus clock divisor 1/2/4/8
|
||||
#???options "CRYSTAL=8" # PLL input frequency in MHz
|
||||
#???options "CPU_IDIV=2" # PLL input divisor 1/2/3/4/5/6/10/12
|
||||
#???options "CPU_ODIV=1" # PLL output divisor 1/2/4/8/16/32/64/256
|
||||
#???options "CPU_MUL=20" # PLL multiplier 15/16/17/18/19/20/21/24
|
||||
options "BUS_DIV=1" # Bus clock divisor 1/2/4/8
|
||||
options "EXEC_AOUT" # Run a.out binaries
|
||||
options "EXEC_ELF" # Run ELF binaries
|
||||
options "EXEC_SCRIPT" # Run shell scripts
|
||||
@@ -66,8 +62,13 @@ device uart1 # Serial-to-USB converter
|
||||
device uart2
|
||||
device uart3
|
||||
device uart4
|
||||
options "UART_ENABLED" # TODO: delete this option
|
||||
options "UART1_ENABLED" # TODO: delete this option
|
||||
options "UART2_ENABLED" # TODO: delete this option
|
||||
options "UART3_ENABLED" # TODO: delete this option
|
||||
options "UART4_ENABLED" # TODO: delete this option
|
||||
options "UART1_BAUD=115200" # default speed
|
||||
options "UART2_BAUD=115200" # default speed
|
||||
options "UART3_BAUD=115200" # default speed
|
||||
options "UART4_BAUD=115200" # default speed
|
||||
options "UART4_ENA_PORT=TRISB" # to enable power for uart4...
|
||||
options "UART4_ENA_PIN=13" # ...use pin RB13
|
||||
|
||||
@@ -33,7 +33,7 @@ AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL
|
||||
CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall
|
||||
CPP = ${MIPS_GCC_PREFIX}cpp
|
||||
LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL
|
||||
LDFLAGS = -nostdlib -T $A/${LDSCRIPT} -Wl,-Map=unix.map
|
||||
LDFLAGS = -nostdlib -T $S/pic32/${LDSCRIPT} -Wl,-Map=unix.map
|
||||
SIZE = ${MIPS_GCC_PREFIX}size
|
||||
OBJCOPY = ${MIPS_GCC_PREFIX}objcopy
|
||||
OBJDUMP = ${MIPS_GCC_PREFIX}objdump
|
||||
@@ -47,9 +47,8 @@ endif
|
||||
|
||||
# source tree is located via $S relative to the compilation directory
|
||||
S = ../..
|
||||
A = $S/pic32
|
||||
|
||||
COPTS = -I. -I$S/include ${IDENT} -DKERNEL
|
||||
COPTS = -I. ${IDENT} -DKERNEL
|
||||
CFLAGS = -O ${COPTS}
|
||||
|
||||
# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
|
||||
@@ -65,8 +64,8 @@ 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 $@
|
||||
NORMAL_S = ${CC} -c ${COPTS} $<
|
||||
NORMAL_S_C = ${CC} -c ${COPTS} ${PARAM} $<
|
||||
|
||||
%OBJS
|
||||
|
||||
@@ -77,37 +76,43 @@ NORMAL_S_C = ${CPP} ${COPTS} ${PARAM} $< | ${AS} -o $@
|
||||
# ${SYSTEM_LD_HEAD}
|
||||
# ${SYSTEM_LD} swapxxx.o
|
||||
# ${SYSTEM_LD_TAIL}
|
||||
SYSTEM_OBJ = startup.o ${OBJS} ioconf.o
|
||||
SYSTEM_OBJ = startup.o ${OBJS} #ioconf.o
|
||||
ifeq (devcfg.c,$(wildcard devcfg.c))
|
||||
SYSTEM_OBJ += devcfg.o
|
||||
endif
|
||||
SYSTEM_DEP = Makefile machine sys ${SYSTEM_OBJ}
|
||||
SYSTEM_LD_HEAD = sh $S/pic32/newvers.sh; ${CC} $(CFLAGS) -c vers.c; rm -f $@
|
||||
SYSTEM_DEP = Makefile ioconf.c swapunix.c machine sys ${SYSTEM_OBJ}
|
||||
SYSTEM_LD_HEAD = sh $S/pic32/newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@
|
||||
SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o unix.elf; \
|
||||
${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o unix.elf
|
||||
SYSTEM_LD_TAIL = ${SIZE} unix.elf; \
|
||||
$(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ unix.hex; \
|
||||
$(OBJCOPY) -O binary -R .boot -R .config $@ unix.bin; \
|
||||
$(OBJDUMP) -d -S unix.elf > unix.dis
|
||||
|
||||
%LOAD
|
||||
|
||||
clean:
|
||||
rm -f *.elf *.o *.map *.dis
|
||||
rm -f *.elf *.o *.map *.dis *.bin
|
||||
|
||||
clean-all: clean
|
||||
rm -f *.h *.c machine sys Makefile
|
||||
rm -f *.h *.c machine sys
|
||||
|
||||
#startup.o: $A/pic32/startup.S $A/include/machAsmDefs.h \
|
||||
# $A/include/machConst.h $A/include/reg.h $A/include/assym.h
|
||||
# ${CPP} ${COPTS} ${PARAM} -DLOCORE $A/pic32/startup.s | \
|
||||
# ${AS} -o startup.o
|
||||
reconfig ioconf.c swapunix.c: Config ../../../tools/kconfig/kconfig
|
||||
../../../tools/kconfig/kconfig Config
|
||||
$(MAKE) clean
|
||||
|
||||
load: unix.elf
|
||||
pic32prog unix.hex
|
||||
|
||||
startup.o: $S/pic32/startup.S
|
||||
${NORMAL_S}
|
||||
|
||||
# the following are necessary because the files depend on the types of
|
||||
# cpu's included in the system configuration
|
||||
clock.o machdep.o conf.o: Makefile
|
||||
|
||||
machine:
|
||||
ln -s $A $@
|
||||
ln -s $S/pic32 $@
|
||||
|
||||
sys:
|
||||
ln -s $S/include $@
|
||||
|
||||
@@ -21,15 +21,14 @@
|
||||
* arising out of or in connection with the use or performance of
|
||||
* this software.
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
#include "conf.h"
|
||||
#include "user.h"
|
||||
#include "ioctl.h"
|
||||
#include "systm.h"
|
||||
#include "uio.h"
|
||||
#include "adc.h"
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/adc.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
const struct devspec adcdevs[] = {
|
||||
{ 0, "adc0" }, { 1, "adc1" }, { 2, "adc2" }, { 3, "adc3" },
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "machine/pic32mx.h"
|
||||
#include <sys/param.h>
|
||||
#include <machine/pic32mx.h>
|
||||
|
||||
/*
|
||||
* Setup core timer for `hz' timer interrupts per second.
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "conf.h"
|
||||
#include "user.h"
|
||||
#include "ioctl.h"
|
||||
#include "tty.h"
|
||||
#include "systm.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
#include "uart.h"
|
||||
#include "usb_uart.h"
|
||||
#include <sys/uart.h>
|
||||
#include <sys/usb_uart.h>
|
||||
|
||||
#define CONCAT(x,y) x ## y
|
||||
#define BBAUD(x) CONCAT(B,x)
|
||||
|
||||
@@ -3,54 +3,54 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "conf.h"
|
||||
#include "buf.h"
|
||||
#include "time.h"
|
||||
#include "ioctl.h"
|
||||
#include "resource.h"
|
||||
#include "inode.h"
|
||||
#include "proc.h"
|
||||
#include "clist.h"
|
||||
#include "tty.h"
|
||||
#include "systm.h"
|
||||
#include "rdisk.h"
|
||||
#include "errno.h"
|
||||
#include "uart.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/clist.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/rdisk.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/uart.h>
|
||||
|
||||
#include "swap.h"
|
||||
#include <sys/swap.h>
|
||||
|
||||
extern int strcmp(char *s1, char *s2);
|
||||
|
||||
#ifdef UARTUSB_ENABLED
|
||||
# include "usb_uart.h"
|
||||
# include <sys/usb_uart.h>
|
||||
#endif
|
||||
#ifdef GPIO_ENABLED
|
||||
# include "gpio.h"
|
||||
# include <sys/gpio.h>
|
||||
#endif
|
||||
#ifdef ADC_ENABLED
|
||||
# include "adc.h"
|
||||
# include <sys/adc.h>
|
||||
#endif
|
||||
#ifdef SPI_ENABLED
|
||||
# include "spi.h"
|
||||
# include <sys/spi.h>
|
||||
#endif
|
||||
#ifdef GLCD_ENABLED
|
||||
# include "glcd.h"
|
||||
# include <sys/glcd.h>
|
||||
#endif
|
||||
#ifdef PWM_ENABLED
|
||||
# include "pwm.h"
|
||||
# include <sys/pwm.h>
|
||||
#endif
|
||||
#ifdef PICGA_ENABLED
|
||||
# include "picga.h"
|
||||
# include <sys/picga.h>
|
||||
#endif
|
||||
#ifdef PTY_ENABLED
|
||||
# include "pty.h"
|
||||
# include <sys/pty.h>
|
||||
#endif
|
||||
#ifdef HX8357_ENABLED
|
||||
# include "hx8357.h"
|
||||
# include <sys/hx8357.h>
|
||||
#endif
|
||||
#ifdef SKEL_ENABLED
|
||||
# include "skel.h"
|
||||
# include <sys/skel.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "signalvar.h"
|
||||
#include "systm.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "vm.h"
|
||||
#include "uart.h"
|
||||
#include "usb_uart.h"
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/vm.h>
|
||||
#include <sys/uart.h>
|
||||
#include <sys/usb_uart.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
//#define TRACE_EXCEPTIONS
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ pic32/signal.c standard
|
||||
pic32/skel.c optional skel
|
||||
pic32/spi.c optional spi
|
||||
pic32/spi_bus.c optional spi
|
||||
pic32/startup.S standard
|
||||
pic32/swap.c standard
|
||||
pic32/sysctl.c standard
|
||||
pic32/uart.c optional uart
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
* arising out of or in connection with the use or performance of
|
||||
* this software.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "conf.h"
|
||||
#include "user.h"
|
||||
#include "ioctl.h"
|
||||
#include "systm.h"
|
||||
#include "sys/uio.h"
|
||||
#include "glcd.h"
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/glcd.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
const struct devspec glcddevs[] = {
|
||||
{ 0, "glcd0" },
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
* arising out of or in connection with the use or performance of
|
||||
* this software.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "conf.h"
|
||||
#include "user.h"
|
||||
#include "ioctl.h"
|
||||
#include "gpio.h"
|
||||
#include "systm.h"
|
||||
#include "uio.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/gpio.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
const struct devspec gpiodevs[] = {
|
||||
{ 0, "porta" }, { 1, "portb" }, { 2, "portc" }, { 3, "portd" },
|
||||
|
||||
@@ -21,17 +21,16 @@
|
||||
* arising out of or in connection with the use or performance of
|
||||
* this software.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "conf.h"
|
||||
#include "user.h"
|
||||
#include "ioctl.h"
|
||||
#include "systm.h"
|
||||
#include "uio.h"
|
||||
#include "adc.h"
|
||||
#include "debug.h"
|
||||
#include "hx8357.h"
|
||||
|
||||
#include "fonts/default.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/adc.h>
|
||||
#include <sys/debug.h>
|
||||
#include <sys/hx8357.h>
|
||||
#include <sys/fonts/default.h>
|
||||
|
||||
char frame[40][80];
|
||||
|
||||
|
||||
@@ -3,32 +3,32 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "dir.h"
|
||||
#include "inode.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "fs.h"
|
||||
#include "map.h"
|
||||
#include "buf.h"
|
||||
#include "file.h"
|
||||
#include "clist.h"
|
||||
#include "callout.h"
|
||||
#include "reboot.h"
|
||||
#include "msgbuf.h"
|
||||
#include "namei.h"
|
||||
#include "mount.h"
|
||||
#include "systm.h"
|
||||
#include "debug.h"
|
||||
#include "uart.h"
|
||||
#include "usb_uart.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/dir.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/fs.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/clist.h>
|
||||
#include <sys/callout.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/msgbuf.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/debug.h>
|
||||
#include <sys/uart.h>
|
||||
#include <sys/usb_uart.h>
|
||||
#ifdef UARTUSB_ENABLED
|
||||
# include <machine/usb_device.h>
|
||||
# include <machine/usb_function_cdc.h>
|
||||
#endif
|
||||
|
||||
#ifdef HX8357_ENABLED
|
||||
#include "hx8357.h"
|
||||
#include <sys/hx8357.h>
|
||||
#endif
|
||||
|
||||
#ifdef POWER_ENABLED
|
||||
@@ -147,9 +147,15 @@ nodump(dev)
|
||||
|
||||
int (*dump)(dev_t) = nodump;
|
||||
|
||||
dev_t rootdev, swapdev, pipedev;
|
||||
|
||||
#ifdef CONFIG
|
||||
/*
|
||||
* Build using old configuration utility (configsys).
|
||||
*/
|
||||
dev_t rootdev = NODEV;
|
||||
dev_t swapdev = NODEV;
|
||||
dev_t dumpdev = NODEV;
|
||||
#endif
|
||||
dev_t pipedev;
|
||||
daddr_t dumplo = (daddr_t) 1024;
|
||||
|
||||
/*
|
||||
|
||||
3
sys/pic32/max32/.gitignore
vendored
3
sys/pic32/max32/.gitignore
vendored
@@ -7,3 +7,6 @@ unix.bin
|
||||
unix.map
|
||||
usbboot.map
|
||||
vers.c
|
||||
*.h
|
||||
ioconf.c
|
||||
swapunix.c
|
||||
|
||||
@@ -9,43 +9,30 @@
|
||||
#
|
||||
machine "pic32"
|
||||
|
||||
cpu "PIC32MX"
|
||||
cpu "PIC32MX7"
|
||||
ident CHIPKIT_MAX
|
||||
|
||||
# Linker script
|
||||
ldscript "pic32/bootloader-max32.ld"
|
||||
ldscript "cfg/bootloader-max32.ld"
|
||||
|
||||
# Need to set locally
|
||||
timezone 8 dst
|
||||
maxusers 2
|
||||
|
||||
# Standard system options
|
||||
#options "CONFIG=MAX32" # TODO
|
||||
options "CPU_KHZ=80000" # Oscillator frequency of CPU core
|
||||
options "BUS_KHZ=80000" # Frequency of peripheral bus
|
||||
options "HZ=100" # Rate of clock interrupt
|
||||
#???options "BUS_DIV=1" # Bus clock divisor 1/2/4/8
|
||||
#???options "CRYSTAL=8" # PLL input frequency in MHz
|
||||
#???options "CPU_IDIV=2" # PLL input divisor 1/2/3/4/5/6/10/12
|
||||
#???options "CPU_ODIV=1" # PLL output divisor 1/2/4/8/16/32/64/256
|
||||
#???options "CPU_MUL=20" # PLL multiplier 15/16/17/18/19/20/21/24
|
||||
options "BUS_DIV=1" # Bus clock divisor 1/2/4/8
|
||||
options "EXEC_AOUT" # Run a.out binaries
|
||||
options "EXEC_ELF" # Run ELF binaries
|
||||
options "EXEC_SCRIPT" # Run shell scripts
|
||||
options "UCB_METER" # Collect kernel statistics
|
||||
|
||||
# LEDs
|
||||
#options "LED_DISK_PORT=TRISF" # for disk activity LED...
|
||||
#options "LED_DISK_PIN=0" # ...use pin RF0
|
||||
#options "LED_DISK_INVERT" # invert disk LED
|
||||
#options "LED_SWAP_PORT=TRISF" # for swap activity LED...
|
||||
#options "LED_SWAP_PIN=1" # ...use pin RF1
|
||||
#options "LED_SWAP_INVERT" # invert swap LED
|
||||
#options "LED_TTY_PORT=TRISA" # for tty LED...
|
||||
#options "LED_TTY_PIN=2" # ...use pin RA2
|
||||
#options "LED_TTY_INVERT" # invert tty LED
|
||||
#options "LED_KERNEL_PORT=TRISA" # for kernel actibity LED...
|
||||
#options "LED_KERNEL_PIN=3" # ...use pin RA3
|
||||
#options "LED_KERNEL_INVERT" # invert kernel LED
|
||||
# LED
|
||||
options "LED_KERNEL_PORT=TRISA" # for kernel actibity LED...
|
||||
options "LED_KERNEL_PIN=3" # ...use pin RA3
|
||||
|
||||
# Root filesystem at /dev/sd0a, swap at /dev/sd0b
|
||||
config unix root on sd0a
|
||||
@@ -57,7 +44,10 @@ device uart1 # Serial-to-USB converter
|
||||
device uart2
|
||||
device uart3
|
||||
device uart4
|
||||
options "UART_ENABLED" # TODO: delete this option
|
||||
options "UART1_ENABLED" # TODO: delete this option
|
||||
options "UART2_ENABLED" # TODO: delete this option
|
||||
options "UART3_ENABLED" # TODO: delete this option
|
||||
options "UART4_ENABLED" # TODO: delete this option
|
||||
|
||||
# Console options
|
||||
options "CONSOLE_DEVICE=tty0" # /dev/tty0
|
||||
@@ -88,5 +78,5 @@ device pwm0
|
||||
options "PWM_ENABLED" # TODO: delete this option
|
||||
|
||||
# Skeleton driver
|
||||
device skel0
|
||||
options "SKEL_ENABLED" # TODO: delete this option
|
||||
#device skel0
|
||||
#options "SKEL_ENABLED" # TODO: delete this option
|
||||
|
||||
@@ -1,51 +1,367 @@
|
||||
BUILDPATH = ../../../tools/configsys/../../sys/pic32
|
||||
H = ../../../tools/configsys/../../sys/include
|
||||
M = ../../../tools/configsys/../../sys/pic32
|
||||
S = ../../../tools/configsys/../../sys/kernel
|
||||
IDENT=-DCHIPKIT_MAX -DPIC32MX7 -DPWM_ENABLED -DADC_ENABLED -DGPIO_ENABLED -DSD0_CS_PIN=14 -DSD0_CS_PORT=TRISC -DSD0_PORT=2 -DSD0_MHZ=10 -DSPI_ENABLED -DCONSOLE_DEVICE=tty0 -DUART4_ENABLED -DUART3_ENABLED -DUART2_ENABLED -DUART1_ENABLED -DLED_KERNEL_PIN=3 -DLED_KERNEL_PORT=TRISA -DUCB_METER -DEXEC_SCRIPT -DEXEC_ELF -DEXEC_AOUT -DBUS_DIV=1 -DHZ=100 -DBUS_KHZ=80000 -DCPU_KHZ=80000
|
||||
LDSCRIPT="cfg/bootloader-max32.ld"
|
||||
PARAM=-DTIMEZONE=480 -DDST=1 -DMAXUSERS=2
|
||||
#
|
||||
# Makefile for RetroBSD, pic32 target
|
||||
#
|
||||
# DEBUG is set to -g by kconfig if debugging is requested (kconfig -g).
|
||||
# PROF is set to -pg by kconfig if profiling is requested (kconfig -p).
|
||||
|
||||
vpath %.c $(M):$(S)
|
||||
vpath %.S $(M):$(S)
|
||||
ifndef MIPS_GCC_ROOT
|
||||
ifeq (/usr/local/mips-2014.05,$(wildcard /usr/local/mips-2014.05))
|
||||
MIPS_GCC_ROOT = /usr/local/mips-2014.05
|
||||
endif
|
||||
ifeq (/usr/local/mips-gcc-4.8.1,$(wildcard /usr/local/mips-gcc-4.8.1))
|
||||
MIPS_GCC_ROOT = /usr/local/mips-gcc-4.8.1
|
||||
endif
|
||||
ifeq (/usr/local/pic32-tools,$(wildcard /usr/local/pic32-tools))
|
||||
MIPS_GCC_ROOT = /usr/local/pic32-tools
|
||||
endif
|
||||
ifdef UECIDE
|
||||
MIPS_GCC_ROOT = ${UECIDE}/compilers/pic32-tools
|
||||
endif
|
||||
endif
|
||||
|
||||
KERNOBJ += adc.o clock.o cons.o devsw.o exception.o exec_aout.o exec_conf.o exec_elf.o exec_script.o exec_subr.o gpio.o init_main.o init_sysent.o kern_clock.o kern_descrip.o kern_exec.o kern_exit.o kern_fork.o kern_mman.o kern_proc.o kern_prot.o kern_prot2.o kern_resource.o kern_sig.o kern_sig2.o kern_subr.o kern_synch.o kern_sysctl.o kern_time.o machdep.o mem.o pwm.o rd_sd.o rdisk.o signal.o spi.o spi_bus.o startup.o subr_prf.o subr_rmap.o swap.o sys_generic.o sys_inode.o sys_pipe.o sys_process.o syscalls.o sysctl.o tty.o tty_subr.o tty_tty.o uart.o ufs_alloc.o ufs_bio.o ufs_bmap.o ufs_dsort.o ufs_fio.o ufs_inode.o ufs_mount.o ufs_namei.o ufs_subr.o ufs_syscalls.o ufs_syscalls2.o vers.o vfs_vnops.o vm_sched.o vm_swap.o vm_swp.o
|
||||
EXTRA_TARGETS =
|
||||
ifeq (${MIPS_GCC_ROOT}/bin/mips-sde-elf-gcc,$(wildcard ${MIPS_GCC_ROOT}/bin/mips-sde-elf-gcc))
|
||||
MIPS_GCC_PREFIX ?= ${MIPS_GCC_ROOT}/bin/mips-sde-elf-
|
||||
endif
|
||||
ifeq (${MIPS_GCC_ROOT}/bin/mips-elf-gcc,$(wildcard ${MIPS_GCC_ROOT}/bin/mips-elf-gcc))
|
||||
MIPS_GCC_PREFIX ?= ${MIPS_GCC_ROOT}/bin/mips-elf-
|
||||
endif
|
||||
ifeq (${MIPS_GCC_ROOT}/bin/pic32-gcc,$(wildcard ${MIPS_GCC_ROOT}/bin/pic32-gcc))
|
||||
MIPS_GCC_PREFIX ?= ${MIPS_GCC_ROOT}/bin/pic32-
|
||||
endif
|
||||
|
||||
DEFS += -DADC_ENABLED=YES
|
||||
DEFS += -DBUS_DIV=1
|
||||
DEFS += -DBUS_KHZ=80000
|
||||
DEFS += -DCONSOLE_DEVICE=tty0
|
||||
DEFS += -DCPU_IDIV=2
|
||||
DEFS += -DCPU_KHZ=80000
|
||||
DEFS += -DCPU_MUL=20
|
||||
DEFS += -DCPU_ODIV=1
|
||||
DEFS += -DCRYSTAL=8
|
||||
DEFS += -DEXEC_AOUT
|
||||
DEFS += -DEXEC_ELF
|
||||
DEFS += -DEXEC_SCRIPT
|
||||
DEFS += -DGPIO_ENABLED=YES
|
||||
DEFS += -DKERNEL
|
||||
DEFS += -DLED_KERNEL_PIN=3
|
||||
DEFS += -DLED_KERNEL_PORT=TRISA
|
||||
DEFS += -DPIC32MX7
|
||||
DEFS += -DPWM_ENABLED=YES
|
||||
DEFS += -DSD0_CS_PIN=14
|
||||
DEFS += -DSD0_CS_PORT=TRISC
|
||||
DEFS += -DSD0_MHZ=10
|
||||
DEFS += -DSD0_PORT=2
|
||||
DEFS += -DSPI_ENABLED=YES
|
||||
DEFS += -DUART1_BAUD=115200
|
||||
DEFS += -DUART1_ENABLED=YES
|
||||
DEFS += -DUART2_BAUD=115200
|
||||
DEFS += -DUART2_ENABLED=YES
|
||||
DEFS += -DUART3_BAUD=115200
|
||||
DEFS += -DUART3_ENABLED=YES
|
||||
DEFS += -DUART4_BAUD=115200
|
||||
DEFS += -DUART4_ENABLED=YES
|
||||
DEFS += -DUCB_METER
|
||||
AS = ${MIPS_GCC_PREFIX}as ${DEBUG} -mips32r2 -EL
|
||||
CC = ${MIPS_GCC_PREFIX}gcc ${DEBUG} -mips32r2 -EL -nostdinc -fno-builtin -Werror -Wall
|
||||
CPP = ${MIPS_GCC_PREFIX}cpp
|
||||
LD = ${MIPS_GCC_PREFIX}gcc -mips32r2 -EL
|
||||
LDFLAGS = -nostdlib -T $S/pic32/${LDSCRIPT} -Wl,-Map=unix.map
|
||||
SIZE = ${MIPS_GCC_PREFIX}size
|
||||
OBJCOPY = ${MIPS_GCC_PREFIX}objcopy
|
||||
OBJDUMP = ${MIPS_GCC_PREFIX}objdump
|
||||
|
||||
ifeq (${MIPS_GCC_ROOT}/bin/mips-elf-gcc,$(wildcard ${MIPS_GCC_ROOT}/bin/mips-elf-gcc))
|
||||
LDFLAGS += -Wl,--oformat=elf32-littlemips
|
||||
endif
|
||||
ifeq (${MIPS_GCC_ROOT}/bin/pic32-gcc,$(wildcard ${MIPS_GCC_ROOT}/bin/pic32-gcc))
|
||||
LDFLAGS += -Wl,--oformat=elf32-tradlittlemips
|
||||
endif
|
||||
|
||||
LDSCRIPT = ../../../tools/configsys/../../sys/pic32/cfg/bootloader-max32.ld
|
||||
# source tree is located via $S relative to the compilation directory
|
||||
S = ../..
|
||||
|
||||
CONFIG = MAX32
|
||||
CONFIGPATH = ../../../tools/configsys
|
||||
COPTS = -I. ${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 = ${CC} -c ${COPTS} $<
|
||||
NORMAL_S_C = ${CC} -c ${COPTS} ${PARAM} $<
|
||||
|
||||
OBJS=exec_aout.o exec_conf.o exec_elf.o exec_script.o exec_subr.o \
|
||||
init_main.o init_sysent.o kern_clock.o kern_descrip.o \
|
||||
kern_exec.o kern_exit.o kern_fork.o kern_mman.o kern_proc.o \
|
||||
kern_prot.o kern_prot2.o kern_resource.o kern_sig.o kern_sig2.o \
|
||||
kern_subr.o kern_synch.o kern_sysctl.o kern_time.o rdisk.o \
|
||||
subr_prf.o subr_rmap.o sys_generic.o sys_inode.o sys_pipe.o \
|
||||
sys_process.o syscalls.o tty.o tty_subr.o tty_tty.o ufs_alloc.o \
|
||||
ufs_bio.o ufs_bmap.o ufs_dsort.o ufs_fio.o ufs_inode.o \
|
||||
ufs_mount.o ufs_namei.o ufs_subr.o ufs_syscalls.o \
|
||||
ufs_syscalls2.o vfs_vnops.o vm_sched.o vm_swap.o vm_swp.o adc.o \
|
||||
clock.o cons.o devsw.o exception.o gpio.o machdep.o mem.o pwm.o \
|
||||
rd_sd.o signal.o spi.o spi_bus.o swap.o sysctl.o uart.o
|
||||
|
||||
CFILES=$S/kernel/exec_aout.c $S/kernel/exec_conf.c $S/kernel/exec_elf.c \
|
||||
$S/kernel/exec_script.c $S/kernel/exec_subr.c \
|
||||
$S/kernel/init_main.c $S/kernel/init_sysent.c \
|
||||
$S/kernel/kern_clock.c $S/kernel/kern_descrip.c \
|
||||
$S/kernel/kern_exec.c $S/kernel/kern_exit.c \
|
||||
$S/kernel/kern_fork.c $S/kernel/kern_mman.c \
|
||||
$S/kernel/kern_proc.c $S/kernel/kern_prot.c \
|
||||
$S/kernel/kern_prot2.c $S/kernel/kern_resource.c \
|
||||
$S/kernel/kern_sig.c $S/kernel/kern_sig2.c $S/kernel/kern_subr.c \
|
||||
$S/kernel/kern_synch.c $S/kernel/kern_sysctl.c \
|
||||
$S/kernel/kern_time.c $S/kernel/rdisk.c $S/kernel/subr_prf.c \
|
||||
$S/kernel/subr_rmap.c $S/kernel/sys_generic.c \
|
||||
$S/kernel/sys_inode.c $S/kernel/sys_pipe.c \
|
||||
$S/kernel/sys_process.c $S/kernel/syscalls.c $S/kernel/tty.c \
|
||||
$S/kernel/tty_subr.c $S/kernel/tty_tty.c $S/kernel/ufs_alloc.c \
|
||||
$S/kernel/ufs_bio.c $S/kernel/ufs_bmap.c $S/kernel/ufs_dsort.c \
|
||||
$S/kernel/ufs_fio.c $S/kernel/ufs_inode.c $S/kernel/ufs_mount.c \
|
||||
$S/kernel/ufs_namei.c $S/kernel/ufs_subr.c \
|
||||
$S/kernel/ufs_syscalls.c $S/kernel/ufs_syscalls2.c \
|
||||
$S/kernel/vfs_vnops.c $S/kernel/vm_sched.c $S/kernel/vm_swap.c \
|
||||
$S/kernel/vm_swp.c $S/pic32/adc.c $S/pic32/clock.c \
|
||||
$S/pic32/cons.c $S/pic32/devsw.c $S/pic32/exception.c \
|
||||
$S/pic32/gpio.c $S/pic32/machdep.c $S/pic32/mem.c $S/pic32/pwm.c \
|
||||
$S/pic32/rd_sd.c $S/pic32/signal.c $S/pic32/spi.c \
|
||||
$S/pic32/spi_bus.c $S/pic32/swap.c $S/pic32/sysctl.c \
|
||||
$S/pic32/uart.c swapunix.c
|
||||
|
||||
# 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 = startup.o ${OBJS} #ioconf.o
|
||||
ifeq (devcfg.c,$(wildcard devcfg.c))
|
||||
SYSTEM_OBJ += devcfg.o
|
||||
endif
|
||||
SYSTEM_DEP = Makefile ioconf.c swapunix.c machine sys ${SYSTEM_OBJ}
|
||||
SYSTEM_LD_HEAD = sh $S/pic32/newvers.sh > vers.c; ${CC} $(CFLAGS) -c vers.c; rm -f $@
|
||||
SYSTEM_LD = -@echo ${LD} ${LDFLAGS} '$${SYSTEM_OBJ}' vers.o -o unix.elf; \
|
||||
${LD} ${LDFLAGS} ${SYSTEM_OBJ} vers.o -o unix.elf
|
||||
SYSTEM_LD_TAIL = ${SIZE} unix.elf; \
|
||||
$(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ unix.hex; \
|
||||
$(OBJCOPY) -O binary -R .boot -R .config $@ unix.bin; \
|
||||
$(OBJDUMP) -d -S unix.elf > unix.dis
|
||||
|
||||
unix.elf: ${SYSTEM_DEP} swapunix.o
|
||||
${SYSTEM_LD_HEAD}
|
||||
${SYSTEM_LD} swapunix.o
|
||||
${SYSTEM_LD_TAIL}
|
||||
|
||||
swapunix.o: swapunix.c
|
||||
${NORMAL_C}
|
||||
|
||||
all: unix.elf
|
||||
|
||||
clean:
|
||||
rm -f *.elf *.o *.map *.dis *.bin
|
||||
|
||||
clean-all: clean
|
||||
rm -f *.h *.c machine sys
|
||||
|
||||
reconfig ioconf.c swapunix.c: Config ../../../tools/kconfig/kconfig
|
||||
../../../tools/kconfig/kconfig Config
|
||||
$(MAKE) clean
|
||||
|
||||
load: unix.elf
|
||||
pic32prog unix.hex
|
||||
|
||||
startup.o: $S/pic32/startup.S
|
||||
${NORMAL_S}
|
||||
|
||||
# the following are necessary because the files depend on the types of
|
||||
# cpu's included in the system configuration
|
||||
clock.o machdep.o conf.o: Makefile
|
||||
|
||||
machine:
|
||||
ln -s $S/pic32 $@
|
||||
|
||||
sys:
|
||||
ln -s $S/include $@
|
||||
|
||||
depend: machine
|
||||
mkdep ${COPTS} ${CFILES} ioconf.c
|
||||
|
||||
ioconf.o: ioconf.c
|
||||
${CC} -c ${CFLAGS} ioconf.c
|
||||
|
||||
exec_aout.o: $S/kernel/exec_aout.c
|
||||
${NORMAL_C}
|
||||
|
||||
exec_conf.o: $S/kernel/exec_conf.c
|
||||
${NORMAL_C}
|
||||
|
||||
exec_elf.o: $S/kernel/exec_elf.c
|
||||
${NORMAL_C}
|
||||
|
||||
exec_script.o: $S/kernel/exec_script.c
|
||||
${NORMAL_C}
|
||||
|
||||
exec_subr.o: $S/kernel/exec_subr.c
|
||||
${NORMAL_C}
|
||||
|
||||
init_main.o: $S/kernel/init_main.c
|
||||
${NORMAL_C}
|
||||
|
||||
init_sysent.o: $S/kernel/init_sysent.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_clock.o: $S/kernel/kern_clock.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_descrip.o: $S/kernel/kern_descrip.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_exec.o: $S/kernel/kern_exec.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_exit.o: $S/kernel/kern_exit.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_fork.o: $S/kernel/kern_fork.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_mman.o: $S/kernel/kern_mman.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_proc.o: $S/kernel/kern_proc.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_prot.o: $S/kernel/kern_prot.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_prot2.o: $S/kernel/kern_prot2.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_resource.o: $S/kernel/kern_resource.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_sig.o: $S/kernel/kern_sig.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_sig2.o: $S/kernel/kern_sig2.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_subr.o: $S/kernel/kern_subr.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_synch.o: $S/kernel/kern_synch.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_sysctl.o: $S/kernel/kern_sysctl.c
|
||||
${NORMAL_C}
|
||||
|
||||
kern_time.o: $S/kernel/kern_time.c
|
||||
${NORMAL_C}
|
||||
|
||||
rdisk.o: $S/kernel/rdisk.c
|
||||
${NORMAL_C}
|
||||
|
||||
subr_prf.o: $S/kernel/subr_prf.c
|
||||
${NORMAL_C}
|
||||
|
||||
subr_rmap.o: $S/kernel/subr_rmap.c
|
||||
${NORMAL_C}
|
||||
|
||||
sys_generic.o: $S/kernel/sys_generic.c
|
||||
${NORMAL_C}
|
||||
|
||||
sys_inode.o: $S/kernel/sys_inode.c
|
||||
${NORMAL_C}
|
||||
|
||||
sys_pipe.o: $S/kernel/sys_pipe.c
|
||||
${NORMAL_C}
|
||||
|
||||
sys_process.o: $S/kernel/sys_process.c
|
||||
${NORMAL_C}
|
||||
|
||||
syscalls.o: $S/kernel/syscalls.c
|
||||
${NORMAL_C}
|
||||
|
||||
tty.o: $S/kernel/tty.c
|
||||
${NORMAL_C}
|
||||
|
||||
tty_subr.o: $S/kernel/tty_subr.c
|
||||
${NORMAL_C}
|
||||
|
||||
tty_tty.o: $S/kernel/tty_tty.c
|
||||
${NORMAL_C}
|
||||
|
||||
ufs_alloc.o: $S/kernel/ufs_alloc.c
|
||||
${NORMAL_C}
|
||||
|
||||
ufs_bio.o: $S/kernel/ufs_bio.c
|
||||
${NORMAL_C}
|
||||
|
||||
ufs_bmap.o: $S/kernel/ufs_bmap.c
|
||||
${NORMAL_C}
|
||||
|
||||
ufs_dsort.o: $S/kernel/ufs_dsort.c
|
||||
${NORMAL_C}
|
||||
|
||||
ufs_fio.o: $S/kernel/ufs_fio.c
|
||||
${NORMAL_C}
|
||||
|
||||
ufs_inode.o: $S/kernel/ufs_inode.c
|
||||
${NORMAL_C}
|
||||
|
||||
ufs_mount.o: $S/kernel/ufs_mount.c
|
||||
${NORMAL_C}
|
||||
|
||||
ufs_namei.o: $S/kernel/ufs_namei.c
|
||||
${NORMAL_C}
|
||||
|
||||
ufs_subr.o: $S/kernel/ufs_subr.c
|
||||
${NORMAL_C}
|
||||
|
||||
ufs_syscalls.o: $S/kernel/ufs_syscalls.c
|
||||
${NORMAL_C}
|
||||
|
||||
ufs_syscalls2.o: $S/kernel/ufs_syscalls2.c
|
||||
${NORMAL_C}
|
||||
|
||||
vfs_vnops.o: $S/kernel/vfs_vnops.c
|
||||
${NORMAL_C}
|
||||
|
||||
vm_sched.o: $S/kernel/vm_sched.c
|
||||
${NORMAL_C}
|
||||
|
||||
vm_swap.o: $S/kernel/vm_swap.c
|
||||
${NORMAL_C}
|
||||
|
||||
vm_swp.o: $S/kernel/vm_swp.c
|
||||
${NORMAL_C}
|
||||
|
||||
adc.o: $S/pic32/adc.c
|
||||
${NORMAL_C}
|
||||
|
||||
clock.o: $S/pic32/clock.c
|
||||
${NORMAL_C}
|
||||
|
||||
cons.o: $S/pic32/cons.c
|
||||
${NORMAL_C}
|
||||
|
||||
devsw.o: $S/pic32/devsw.c
|
||||
${NORMAL_C}
|
||||
|
||||
exception.o: $S/pic32/exception.c
|
||||
${NORMAL_C}
|
||||
|
||||
gpio.o: $S/pic32/gpio.c
|
||||
${NORMAL_C}
|
||||
|
||||
machdep.o: $S/pic32/machdep.c
|
||||
${NORMAL_C}
|
||||
|
||||
mem.o: $S/pic32/mem.c
|
||||
${NORMAL_C}
|
||||
|
||||
pwm.o: $S/pic32/pwm.c
|
||||
${NORMAL_C}
|
||||
|
||||
rd_sd.o: $S/pic32/rd_sd.c
|
||||
${NORMAL_C}
|
||||
|
||||
signal.o: $S/pic32/signal.c
|
||||
${NORMAL_C}
|
||||
|
||||
spi.o: $S/pic32/spi.c
|
||||
${NORMAL_C}
|
||||
|
||||
spi_bus.o: $S/pic32/spi_bus.c
|
||||
${NORMAL_C}
|
||||
|
||||
swap.o: $S/pic32/swap.c
|
||||
${NORMAL_C}
|
||||
|
||||
sysctl.o: $S/pic32/sysctl.c
|
||||
${NORMAL_C}
|
||||
|
||||
uart.o: $S/pic32/uart.c
|
||||
${NORMAL_C}
|
||||
|
||||
include ../../../tools/configsys/../../sys/pic32/kernel-post.mk
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "conf.h"
|
||||
#include "systm.h"
|
||||
#include "uio.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
const struct devspec mmdevs[] = {
|
||||
{ 0, "mem" },
|
||||
|
||||
@@ -21,16 +21,15 @@
|
||||
* arising out of or in connection with the use or performance of
|
||||
* this software.
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
#include "conf.h"
|
||||
#include "user.h"
|
||||
#include "ioctl.h"
|
||||
#include "systm.h"
|
||||
#include "uio.h"
|
||||
#include "picga.h"
|
||||
#include "spi_bus.h"
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/picga.h>
|
||||
#include <sys/spi_bus.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
const struct devspec picgadevs[] = {
|
||||
{ 0, "picga" },
|
||||
@@ -45,7 +44,7 @@ void blockdelay(unsigned int v)
|
||||
{
|
||||
for( ; v>0 ; v--)
|
||||
asm volatile ("nop");
|
||||
}
|
||||
}
|
||||
|
||||
void picga_command(unsigned char cmd, unsigned char len, void *data)
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "param.h"
|
||||
#include "conf.h"
|
||||
#include "user.h"
|
||||
#include "systm.h"
|
||||
#include "machparam.h"
|
||||
#include "reboot.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/machparam.h>
|
||||
#include <sys/reboot.h>
|
||||
|
||||
volatile unsigned int psCounter;
|
||||
int countdown;
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
* arising out of or in connection with the use or performance of
|
||||
* this software.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "conf.h"
|
||||
#include "user.h"
|
||||
#include "ioctl.h"
|
||||
#include "systm.h"
|
||||
#include "sys/uio.h"
|
||||
#include "pwm.h"
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/pwm.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
/*
|
||||
* Devices:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "buf.h"
|
||||
#include "errno.h"
|
||||
#include "dk.h"
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/dk.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
extern unsigned char flash_data[] asm("_binary_flash_img_start");
|
||||
extern unsigned char flash_data_size[] asm("_binary_flash_img_size");
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "buf.h"
|
||||
#include "errno.h"
|
||||
#include "dk.h"
|
||||
#include "rdisk.h"
|
||||
#include "spi_bus.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/dk.h>
|
||||
#include <sys/rdisk.h>
|
||||
#include <sys/spi_bus.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
#define MRAM_WREN 0x06
|
||||
#define MRAM_WRDI 0x04
|
||||
|
||||
@@ -29,15 +29,14 @@
|
||||
* arising out of or in connection with the use or performance of
|
||||
* this software.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "buf.h"
|
||||
#include "errno.h"
|
||||
#include "dk.h"
|
||||
#include "rdisk.h"
|
||||
#include "spi_bus.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/dk.h>
|
||||
#include <sys/rdisk.h>
|
||||
#include <sys/spi_bus.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
/*
|
||||
* Two SD/MMC disks on SPI.
|
||||
|
||||
@@ -5,20 +5,19 @@
|
||||
*
|
||||
* This code could use a bit of optimization.
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "buf.h"
|
||||
#include "errno.h"
|
||||
#include "dk.h"
|
||||
#include "sdram.h"
|
||||
#include "rd_sdramp.h"
|
||||
#include "rdisk.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/dk.h>
|
||||
#include <sys/sdram.h>
|
||||
#include <sys/rd_sdramp.h>
|
||||
#include <sys/rdisk.h>
|
||||
|
||||
/*
|
||||
* See rd_sdramp_config.h for sdramp port/pin configuration
|
||||
*/
|
||||
#include "rd_sdramp_config.h"
|
||||
#include <machine/rd_sdramp_config.h>
|
||||
|
||||
int sw_dkn = -1; /* Statistics slot number */
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "buf.h"
|
||||
#include "errno.h"
|
||||
#include "dk.h"
|
||||
#include "rdisk.h"
|
||||
#include "spi_bus.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/dk.h>
|
||||
#include <sys/rdisk.h>
|
||||
#include <sys/spi_bus.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
#define SPIRAM_WREN 0x06
|
||||
#define SPIRAM_WRDI 0x04
|
||||
|
||||
@@ -16,14 +16,13 @@
|
||||
* Signals PMRD, PMWR are active LOW and idle HIGH
|
||||
* Signal PMA0 is LOW when accessing RAM Data, and HIGH when accessing RAM Addresses
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "buf.h"
|
||||
#include "errno.h"
|
||||
#include "dk.h"
|
||||
#include "rdisk.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/dk.h>
|
||||
#include <sys/rdisk.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
int sw_dkn = -1; /* Statistics slot number */
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/*
|
||||
* See rd_sdramp_config.h for sdramp port/pin configuration
|
||||
*/
|
||||
#include "rd_sdramp_config.h"
|
||||
#include <machine/rd_sdramp_config.h>
|
||||
|
||||
/* Offsets (from TRISA) for the various port control registers */
|
||||
#define TRIS_OFFSET 0x0
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "signalvar.h"
|
||||
#include "user.h"
|
||||
#include "proc.h"
|
||||
#include "buf.h"
|
||||
#include "map.h"
|
||||
#include "syslog.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
//#define DIAGNOSTIC
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
* arising out of or in connection with the use or performance of
|
||||
* this software.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "conf.h"
|
||||
#include "user.h"
|
||||
#include "ioctl.h"
|
||||
#include "systm.h"
|
||||
#include "uio.h"
|
||||
#include "skel.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/skel.h>
|
||||
|
||||
/*
|
||||
* List of device names and minor numbers.
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
* arising out of or in connection with the use or performance of
|
||||
* this software.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "conf.h"
|
||||
#include "user.h"
|
||||
#include "ioctl.h"
|
||||
#include "systm.h"
|
||||
#include "uio.h"
|
||||
#include "spi.h"
|
||||
#include "spi_bus.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/spi.h>
|
||||
#include <sys/spi_bus.h>
|
||||
|
||||
const struct devspec spidevs[] = {
|
||||
{ 0, "spi1" },
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "param.h"
|
||||
#include "conf.h"
|
||||
#include "user.h"
|
||||
#include "ioctl.h"
|
||||
#include "systm.h"
|
||||
#include "uio.h"
|
||||
#include "spi_bus.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/spi_bus.h>
|
||||
|
||||
#define NSPI 4 /* Ports SPI1...SPI4 */
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* Sean Justice 15_Sept-2008 First release
|
||||
* Anton Alkhimenok 06_Jun-2009 Ported to PIC24
|
||||
*/
|
||||
#include "ssd1926.h"
|
||||
#include <machine/ssd1926.h>
|
||||
|
||||
/*
|
||||
* Helper Macros
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
# arising out of or in connection with the use or performance of
|
||||
# this software.
|
||||
#
|
||||
#include "machine/io.h"
|
||||
#include <machine/io.h>
|
||||
|
||||
#define UBASE 0x7f008000 /* User space base address */
|
||||
|
||||
|
||||
@@ -2,18 +2,17 @@
|
||||
* Simple proxy for swap partition. Forwards requests for /dev/swap on to the
|
||||
* device specified by swapdev
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "buf.h"
|
||||
#include "errno.h"
|
||||
#include "dk.h"
|
||||
#include "uio.h"
|
||||
#include "conf.h"
|
||||
#include "fcntl.h"
|
||||
#include "map.h"
|
||||
#include "swap.h"
|
||||
#include "rdisk.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/dk.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/swap.h>
|
||||
#include <sys/rdisk.h>
|
||||
|
||||
#ifndef NTMP
|
||||
#define NTMP 3
|
||||
|
||||
@@ -3,24 +3,24 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "user.h"
|
||||
#include "ioctl.h"
|
||||
#include "proc.h"
|
||||
#include "kernel.h"
|
||||
#include "file.h"
|
||||
#include "inode.h"
|
||||
#include "sysctl.h"
|
||||
#include "cpu.h"
|
||||
#include "tty.h"
|
||||
#include "systm.h"
|
||||
#include "dk.h"
|
||||
#include "vmsystm.h"
|
||||
#include "ptrace.h"
|
||||
#include "namei.h"
|
||||
#include "vmmeter.h"
|
||||
#include "map.h"
|
||||
#include "conf.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/inode.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/dk.h>
|
||||
#include <sys/vmsystm.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/vmmeter.h>
|
||||
#include <sys/map.h>
|
||||
#include <sys/conf.h>
|
||||
|
||||
/*
|
||||
* Errno messages.
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "conf.h"
|
||||
#include "user.h"
|
||||
#include "ioctl.h"
|
||||
#include "tty.h"
|
||||
#include "systm.h"
|
||||
#include "uart.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/uart.h>
|
||||
|
||||
#define CONCAT(x,y) x ## y
|
||||
#define BBAUD(x) CONCAT(B,x)
|
||||
|
||||
@@ -92,7 +92,6 @@ usage: fputs("usage: kconfig [-gp] sysname\n", stderr);
|
||||
makefile(); /* build Makefile */
|
||||
headers(); /* make a lot of .h files */
|
||||
swapconf(); /* swap config files */
|
||||
printf("Don't forget to run \"make depend\"\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -93,6 +93,13 @@ do_swap(fl)
|
||||
fprintf(fp, "dev_t\tdumpdev = makedev(%d, %d);\t/* %s */\n",
|
||||
major(fl->f_dumpdev), minor(fl->f_dumpdev),
|
||||
devtoname(fl->f_dumpdev));
|
||||
#if 1
|
||||
/* Only one swap device is supported. */
|
||||
dev = swap->f_swapdev;
|
||||
fprintf(fp, "dev_t\tswapdev = makedev(%d, %d);\t/* %s */\n",
|
||||
major(swap->f_swapdev), minor(swap->f_swapdev),
|
||||
devtoname(swap->f_swapdev));
|
||||
#else
|
||||
fprintf(fp, "\n");
|
||||
fprintf(fp, "struct\tswdevt swdevt[] = {\n");
|
||||
do {
|
||||
@@ -104,6 +111,7 @@ do_swap(fl)
|
||||
} while (swap && swap->f_type == SWAPSPEC);
|
||||
fprintf(fp, "\t{ NODEV, 0, 0 }\n");
|
||||
fprintf(fp, "};\n");
|
||||
#endif
|
||||
fclose(fp);
|
||||
return (swap);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user