146 lines
2.6 KiB
Plaintext
146 lines
2.6 KiB
Plaintext
|
/*
|
||
|
* This file is part of Jehanne.
|
||
|
*
|
||
|
* Copyright (C) 2022 Giacomo Tesio <giacomo@tesio.it>
|
||
|
*
|
||
|
* Jehanne is free software: you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU General Public License as published by
|
||
|
* the Free Software Foundation, version 3 of the License.
|
||
|
*
|
||
|
* Jehanne is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU General Public License
|
||
|
* along with Jehanne. If not, see <http://www.gnu.org/licenses/>.
|
||
|
*/
|
||
|
#include "u.h"
|
||
|
#include "../port/lib.h"
|
||
|
#include "mem.h"
|
||
|
#include "dat.h"
|
||
|
#include "fns.h"
|
||
|
#include "../port/error.h"
|
||
|
#include "io.h"
|
||
|
|
||
|
void
|
||
|
rdb(void)
|
||
|
{
|
||
|
splhi();
|
||
|
iprint("rdb...not installed\n");
|
||
|
for(;;);
|
||
|
}
|
||
|
|
||
|
#! for (file in ./ramdisk/*) {
|
||
|
#! FNAME=`{basename $file}
|
||
|
#! FSIZE=`{cat $file|wc -c}
|
||
|
static unsigned char ramfs_$FNAME^_code[] = {
|
||
|
#! cat $file |
|
||
|
#! hexdump -v -e '1/1 " 0x%02x, " 6/1 "0x%02x, " 1/1 " 0x%02x,\n"' |
|
||
|
#! sed '$s/0x ,/0x00,/g'
|
||
|
0x00,
|
||
|
};
|
||
|
int ramfs_$FNAME^_len = $FSIZE;
|
||
|
#! }
|
||
|
|
||
|
#! for (device in $DEVICES) {
|
||
|
extern Dev $device^devtab;
|
||
|
#! }
|
||
|
|
||
|
Dev *devtab[] = {
|
||
|
#! for (device in $DEVICES) {
|
||
|
&$device^devtab,
|
||
|
#! }
|
||
|
nil,
|
||
|
};
|
||
|
|
||
|
#! for (driver in $LINKS) {
|
||
|
extern void $driver^link(void);
|
||
|
#! }
|
||
|
|
||
|
void
|
||
|
links(void)
|
||
|
{
|
||
|
|
||
|
#! for (file in ./ramdisk/*) {
|
||
|
#! FNAME=`{basename $file}
|
||
|
addbootfile("$FNAME^", ramfs_$FNAME^_code, ramfs_$FNAME^_len);
|
||
|
#! }
|
||
|
|
||
|
#! for (driver in $LINKS) {
|
||
|
$driver^link();
|
||
|
#! }
|
||
|
}
|
||
|
|
||
|
#include "../ip/ip.h"
|
||
|
|
||
|
#! for (protocol in $PROTOCOLS) {
|
||
|
extern void $protocol^init(Fs*);
|
||
|
#! }
|
||
|
|
||
|
void (*ipprotoinit[])(Fs*) = {
|
||
|
#! for (protocol in $PROTOCOLS) {
|
||
|
$protocol^init,
|
||
|
#! }
|
||
|
nil,
|
||
|
};
|
||
|
|
||
|
#include "../port/sd.h"
|
||
|
|
||
|
#! for (interface in $SDINTERFACES) {
|
||
|
extern SDifc $interface^ifc;
|
||
|
#! }
|
||
|
|
||
|
SDifc* sdifc[] = {
|
||
|
#! for (interface in $SDINTERFACES) {
|
||
|
&$interface^ifc,
|
||
|
#! }
|
||
|
nil,
|
||
|
};
|
||
|
|
||
|
#! for (interface in $UARTS) {
|
||
|
extern PhysUart $interface^physuart;
|
||
|
#! }
|
||
|
|
||
|
PhysUart* physuart[] = {
|
||
|
#! for (interface in $UARTS) {
|
||
|
&$interface^physuart,
|
||
|
#! }
|
||
|
nil,
|
||
|
};
|
||
|
|
||
|
#define Image IMAGE
|
||
|
#include <draw.h>
|
||
|
#include <memdraw.h>
|
||
|
#include <cursor.h>
|
||
|
#include "screen.h"
|
||
|
|
||
|
#! for (driver in $VGA) {
|
||
|
extern VGAdev $driver^dev;
|
||
|
#! }
|
||
|
|
||
|
VGAdev* vgadev[] = {
|
||
|
#! for (driver in $VGA) {
|
||
|
&$driver^dev,
|
||
|
#! }
|
||
|
nil,
|
||
|
};
|
||
|
|
||
|
#! for (driver in $VGA) {
|
||
|
extern VGAcur $driver^cur;
|
||
|
#! }
|
||
|
|
||
|
VGAcur* vgacur[] = {
|
||
|
#! for (driver in $VGA) {
|
||
|
&$driver^cur,
|
||
|
#! }
|
||
|
nil,
|
||
|
};
|
||
|
|
||
|
int cpuserver = 1;
|
||
|
uint32_t kerndate = 1;
|
||
|
int printallsyscalls;
|
||
|
|
||
|
char* conffile = "$CONFFILE";
|
||
|
|