2010-09-08 19:23:07 +00:00
|
|
|
|
2007-07-05 16:02:19 +00:00
|
|
|
/*
|
2009-12-15 08:11:09 +00:00
|
|
|
* common.c - common wrapper functions between barebox and the host
|
2007-07-05 16:02:19 +00:00
|
|
|
*
|
|
|
|
* Copyright (c) 2007 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
|
|
|
|
*
|
|
|
|
* See file CREDITS for list of people who contributed to this
|
|
|
|
* project.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2
|
|
|
|
* as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program 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 this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
2007-07-05 16:01:42 +00:00
|
|
|
|
2007-10-20 14:56:29 +00:00
|
|
|
/**
|
|
|
|
* @file
|
2009-12-15 08:11:09 +00:00
|
|
|
* @brief Common wrapper functions between barebox and the host
|
2007-10-20 14:56:29 +00:00
|
|
|
*/
|
2007-07-05 16:02:19 +00:00
|
|
|
/*
|
2009-12-15 08:11:09 +00:00
|
|
|
* These are host includes. Never include any barebox header
|
2007-07-05 16:02:19 +00:00
|
|
|
* files here...
|
|
|
|
*/
|
2007-07-05 16:01:42 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <termios.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <getopt.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <libgen.h>
|
|
|
|
#include <sys/mman.h>
|
|
|
|
#include <errno.h>
|
2007-07-05 16:01:51 +00:00
|
|
|
#include <signal.h>
|
|
|
|
#include <sys/select.h>
|
2011-12-03 05:47:50 +00:00
|
|
|
#include <sys/wait.h>
|
2007-07-05 16:02:19 +00:00
|
|
|
/*
|
2009-12-15 08:11:09 +00:00
|
|
|
* ...except the ones needed to connect with barebox
|
2007-07-05 16:02:19 +00:00
|
|
|
*/
|
2009-10-22 12:21:29 +00:00
|
|
|
#include <mach/linux.h>
|
|
|
|
#include <mach/hostfile.h>
|
2007-07-05 16:01:42 +00:00
|
|
|
|
|
|
|
static struct termios term_orig, term_vi;
|
2007-07-05 16:02:04 +00:00
|
|
|
static char erase_char; /* the users erase character */
|
2007-07-05 16:01:42 +00:00
|
|
|
|
|
|
|
static void rawmode(void)
|
|
|
|
{
|
|
|
|
tcgetattr(0, &term_orig);
|
|
|
|
term_vi = term_orig;
|
2007-07-05 16:01:59 +00:00
|
|
|
term_vi.c_lflag &= (~ICANON & ~ECHO & ~ISIG);
|
2007-07-05 16:01:42 +00:00
|
|
|
term_vi.c_iflag &= (~IXON & ~ICRNL);
|
2007-07-05 16:01:59 +00:00
|
|
|
term_vi.c_oflag |= (ONLCR);
|
2007-07-05 16:01:42 +00:00
|
|
|
term_vi.c_cc[VMIN] = 1;
|
|
|
|
term_vi.c_cc[VTIME] = 0;
|
|
|
|
erase_char = term_vi.c_cc[VERASE];
|
|
|
|
tcsetattr(0, TCSANOW, &term_vi);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void cookmode(void)
|
|
|
|
{
|
|
|
|
fflush(stdout);
|
|
|
|
tcsetattr(0, TCSANOW, &term_orig);
|
|
|
|
}
|
|
|
|
|
2007-07-05 16:02:04 +00:00
|
|
|
int linux_tstc(int fd)
|
2007-07-05 16:01:42 +00:00
|
|
|
{
|
2007-11-28 09:05:47 +00:00
|
|
|
struct timeval tv = {
|
|
|
|
.tv_usec = 100,
|
|
|
|
};
|
2007-07-05 16:01:51 +00:00
|
|
|
fd_set rfds;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
FD_ZERO(&rfds);
|
2007-07-05 16:01:59 +00:00
|
|
|
FD_SET(fd, &rfds);
|
2007-07-05 16:01:51 +00:00
|
|
|
|
2007-07-05 16:02:18 +00:00
|
|
|
/*
|
|
|
|
* We set the timeout here to 100us, because otherwise
|
2009-12-15 08:11:09 +00:00
|
|
|
* barebox would eat all cpu resources while waiting
|
2008-03-11 20:48:38 +00:00
|
|
|
* for input.
|
2007-07-05 16:02:18 +00:00
|
|
|
*/
|
2007-07-05 16:01:59 +00:00
|
|
|
ret = select(fd + 1, &rfds, NULL, NULL, &tv);
|
2007-07-05 16:01:51 +00:00
|
|
|
|
|
|
|
if (ret)
|
|
|
|
return 1;
|
|
|
|
|
2007-07-05 16:01:42 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-03-10 23:00:37 +00:00
|
|
|
int ctrlc(void)
|
|
|
|
{
|
|
|
|
char chr;
|
|
|
|
|
|
|
|
if (linux_read_nonblock(0, &chr, 1) == 1 && chr == 3)
|
|
|
|
return 1;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-07-05 16:01:42 +00:00
|
|
|
uint64_t linux_get_time(void)
|
|
|
|
{
|
|
|
|
struct timespec ts;
|
|
|
|
uint64_t now;
|
|
|
|
|
|
|
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
|
|
|
|
|
|
now = ts.tv_sec * 1000 * 1000 * 1000 + ts.tv_nsec;
|
|
|
|
|
|
|
|
return now;
|
|
|
|
}
|
|
|
|
|
2010-10-22 16:44:53 +00:00
|
|
|
void __attribute__((noreturn)) reset_cpu(unsigned long addr)
|
2007-07-05 16:01:42 +00:00
|
|
|
{
|
|
|
|
cookmode();
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
int linux_read(int fd, void *buf, size_t count)
|
|
|
|
{
|
2007-11-28 09:12:38 +00:00
|
|
|
ssize_t ret;
|
|
|
|
|
2007-12-23 19:07:03 +00:00
|
|
|
if (count == 0)
|
|
|
|
return 0;
|
|
|
|
|
2007-11-28 09:12:38 +00:00
|
|
|
do {
|
|
|
|
ret = read(fd, buf, count);
|
|
|
|
|
|
|
|
if (ret == 0) {
|
|
|
|
printf("read on fd %d returned 0, device gone? - exiting\n", fd);
|
|
|
|
reset_cpu(0);
|
|
|
|
} else if (ret == -1) {
|
|
|
|
if (errno == EAGAIN)
|
2008-03-11 20:48:38 +00:00
|
|
|
return -errno;
|
2007-11-28 09:12:38 +00:00
|
|
|
else if (errno == EINTR)
|
|
|
|
continue;
|
|
|
|
else {
|
|
|
|
printf("read on fd %d returned -1, errno %d - exiting\n", fd, errno);
|
|
|
|
reset_cpu(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} while (ret <= 0);
|
|
|
|
|
|
|
|
return (int)ret;
|
2007-07-05 16:01:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int linux_read_nonblock(int fd, void *buf, size_t count)
|
|
|
|
{
|
|
|
|
int oldflags, ret;
|
|
|
|
|
|
|
|
oldflags = fcntl(fd, F_GETFL);
|
|
|
|
if (oldflags == -1)
|
|
|
|
goto err_out;
|
|
|
|
|
|
|
|
if (fcntl(fd, F_SETFL, oldflags | O_NONBLOCK) == -1)
|
|
|
|
goto err_out;
|
|
|
|
|
2007-11-28 09:12:38 +00:00
|
|
|
ret = linux_read(fd, buf, count);
|
2007-07-05 16:01:42 +00:00
|
|
|
|
|
|
|
if (fcntl(fd, F_SETFL, oldflags) == -1)
|
|
|
|
goto err_out;
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
err_out:
|
|
|
|
perror("fcntl");
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
ssize_t linux_write(int fd, const void *buf, size_t count)
|
|
|
|
{
|
|
|
|
return write(fd, buf, count);
|
|
|
|
}
|
|
|
|
|
2007-07-05 16:01:59 +00:00
|
|
|
off_t linux_lseek(int fd, off_t offset)
|
2007-07-05 16:01:42 +00:00
|
|
|
{
|
2007-07-05 16:01:59 +00:00
|
|
|
return lseek(fd, offset, SEEK_SET);
|
2007-07-05 16:01:42 +00:00
|
|
|
}
|
|
|
|
|
2011-12-03 05:47:50 +00:00
|
|
|
int linux_execve(const char * filename, char *const argv[], char *const envp[])
|
|
|
|
{
|
|
|
|
pid_t pid, tpid;
|
|
|
|
int execve_status;
|
|
|
|
|
|
|
|
pid = fork();
|
|
|
|
|
|
|
|
if (pid == -1) {
|
|
|
|
perror("linux_execve");
|
|
|
|
return pid;
|
|
|
|
} else if (pid == 0) {
|
|
|
|
exit(execve(filename, argv, envp));
|
|
|
|
} else {
|
|
|
|
do {
|
|
|
|
tpid = wait(&execve_status);
|
|
|
|
} while(tpid != pid);
|
|
|
|
|
|
|
|
return execve_status;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-12-15 08:11:09 +00:00
|
|
|
extern void start_barebox(void);
|
2007-07-05 16:02:04 +00:00
|
|
|
extern void mem_malloc_init(void *start, void *end);
|
2007-07-05 16:01:42 +00:00
|
|
|
|
2009-06-11 13:33:49 +00:00
|
|
|
static int add_image(char *str, char *name)
|
2007-07-05 16:01:42 +00:00
|
|
|
{
|
|
|
|
char *file;
|
|
|
|
int readonly = 0, map = 1;
|
|
|
|
struct stat s;
|
|
|
|
char *opt;
|
|
|
|
int fd, ret;
|
|
|
|
struct hf_platform_data *hf = malloc(sizeof(struct hf_platform_data));
|
|
|
|
|
|
|
|
if (!hf)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
file = strtok(str, ",");
|
|
|
|
while ((opt = strtok(NULL, ","))) {
|
|
|
|
if (!strcmp(opt, "ro"))
|
|
|
|
readonly = 1;
|
|
|
|
if (!strcmp(opt, "map"))
|
|
|
|
map = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
printf("add file %s(%s)\n", file, readonly ? "ro" : "");
|
|
|
|
|
|
|
|
fd = open(file, readonly ? O_RDONLY : O_RDWR);
|
|
|
|
hf->fd = fd;
|
|
|
|
hf->filename = file;
|
|
|
|
|
|
|
|
if (fd < 0) {
|
|
|
|
perror("open");
|
|
|
|
goto err_out;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (fstat(fd, &s)) {
|
|
|
|
perror("fstat");
|
|
|
|
goto err_out;
|
|
|
|
}
|
|
|
|
|
|
|
|
hf->size = s.st_size;
|
2009-06-11 13:33:49 +00:00
|
|
|
hf->name = strdup(name);
|
2007-07-05 16:01:42 +00:00
|
|
|
|
|
|
|
if (map) {
|
2011-07-29 07:16:45 +00:00
|
|
|
hf->base = (unsigned long)mmap(NULL, hf->size,
|
2007-07-05 16:01:42 +00:00
|
|
|
PROT_READ | (readonly ? 0 : PROT_WRITE),
|
|
|
|
MAP_SHARED, fd, 0);
|
2011-07-29 07:16:45 +00:00
|
|
|
if ((void *)hf->base == MAP_FAILED)
|
2007-07-05 16:01:42 +00:00
|
|
|
printf("warning: mmapping %s failed\n", file);
|
|
|
|
}
|
|
|
|
|
2009-12-15 08:11:09 +00:00
|
|
|
ret = barebox_register_filedev(hf);
|
2007-07-05 16:01:42 +00:00
|
|
|
if (ret)
|
|
|
|
goto err_out;
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
err_out:
|
|
|
|
if (fd > 0)
|
|
|
|
close(fd);
|
|
|
|
free(hf);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2007-10-20 14:56:29 +00:00
|
|
|
static void print_usage(const char*);
|
2007-07-05 16:01:42 +00:00
|
|
|
|
2012-09-03 06:18:08 +00:00
|
|
|
static struct option long_options[] = {
|
|
|
|
{"help", 0, 0, 'h'},
|
|
|
|
{"malloc", 1, 0, 'm'},
|
|
|
|
{"image", 1, 0, 'i'},
|
|
|
|
{"env", 1, 0, 'e'},
|
|
|
|
{"stdout", 1, 0, 'O'},
|
|
|
|
{"stdin", 1, 0, 'I'},
|
|
|
|
{0, 0, 0, 0},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char optstring[] = "hm:i:e:O:I:";
|
|
|
|
|
2007-07-05 16:01:42 +00:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
void *ram;
|
2007-07-05 16:01:59 +00:00
|
|
|
int opt, ret, fd;
|
2007-07-05 16:02:18 +00:00
|
|
|
int malloc_size = 8 * 1024 * 1024;
|
2009-06-11 13:33:49 +00:00
|
|
|
char str[6];
|
2012-09-03 06:18:08 +00:00
|
|
|
int fdno = 0, envno = 0, option_index = 0;
|
2007-07-05 16:01:42 +00:00
|
|
|
|
2010-09-08 19:23:07 +00:00
|
|
|
while (1) {
|
2012-09-03 06:18:08 +00:00
|
|
|
option_index = 0;
|
|
|
|
opt = getopt_long(argc, argv, optstring,
|
2010-09-08 19:23:07 +00:00
|
|
|
long_options, &option_index);
|
|
|
|
|
|
|
|
if (opt == -1)
|
|
|
|
break;
|
|
|
|
|
2007-07-05 16:01:42 +00:00
|
|
|
switch (opt) {
|
|
|
|
case 'h':
|
|
|
|
print_usage(basename(argv[0]));
|
|
|
|
exit(0);
|
|
|
|
case 'm':
|
|
|
|
malloc_size = strtoul(optarg, NULL, 0);
|
|
|
|
break;
|
2012-09-11 05:30:45 +00:00
|
|
|
case 'i':
|
|
|
|
break;
|
2007-07-05 16:01:42 +00:00
|
|
|
case 'e':
|
2009-06-11 13:33:49 +00:00
|
|
|
sprintf(str, "env%d", envno);
|
2009-12-15 15:42:13 +00:00
|
|
|
ret = add_image(optarg, str);
|
2007-07-05 16:01:42 +00:00
|
|
|
if (ret)
|
|
|
|
exit(1);
|
2009-06-11 13:33:49 +00:00
|
|
|
envno++;
|
2007-07-05 16:01:42 +00:00
|
|
|
break;
|
2007-07-05 16:01:59 +00:00
|
|
|
case 'O':
|
|
|
|
fd = open(optarg, O_WRONLY);
|
|
|
|
if (fd < 0) {
|
|
|
|
perror("open");
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
2009-12-15 08:11:09 +00:00
|
|
|
barebox_register_console("cout", -1, fd);
|
2007-07-05 16:01:59 +00:00
|
|
|
break;
|
|
|
|
case 'I':
|
|
|
|
fd = open(optarg, O_RDWR);
|
|
|
|
if (fd < 0) {
|
|
|
|
perror("open");
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
2009-12-15 08:11:09 +00:00
|
|
|
barebox_register_console("cin", fd, -1);
|
2007-07-05 16:01:59 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
exit(1);
|
2007-07-05 16:01:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-09-03 06:18:08 +00:00
|
|
|
ram = malloc(malloc_size);
|
|
|
|
if (!ram) {
|
|
|
|
printf("unable to get malloc space\n");
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
mem_malloc_init(ram, ram + malloc_size - 1);
|
|
|
|
|
2012-09-11 05:30:45 +00:00
|
|
|
/*
|
|
|
|
* Reset getopt.
|
|
|
|
* We need to run a second getopt to count -i parameters.
|
|
|
|
* This is for /dev/fd# devices.
|
|
|
|
*/
|
2012-09-03 06:18:08 +00:00
|
|
|
optind = 1;
|
|
|
|
|
|
|
|
while (1) {
|
|
|
|
option_index = 0;
|
|
|
|
opt = getopt_long(argc, argv, optstring,
|
|
|
|
long_options, &option_index);
|
|
|
|
|
|
|
|
if (opt == -1)
|
|
|
|
break;
|
|
|
|
|
|
|
|
switch (opt) {
|
|
|
|
case 'h':
|
|
|
|
break;
|
|
|
|
case 'm':
|
|
|
|
break;
|
|
|
|
case 'i':
|
|
|
|
sprintf(str, "fd%d", fdno);
|
|
|
|
ret = add_image(optarg, str);
|
|
|
|
if (ret)
|
|
|
|
exit(1);
|
|
|
|
fdno++;
|
|
|
|
break;
|
|
|
|
case 'e':
|
|
|
|
break;
|
|
|
|
case 'O':
|
|
|
|
break;
|
|
|
|
case 'I':
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-12-15 08:11:09 +00:00
|
|
|
barebox_register_console("console", fileno(stdin), fileno(stdout));
|
2007-07-05 16:01:59 +00:00
|
|
|
|
2007-07-05 16:01:42 +00:00
|
|
|
rawmode();
|
2009-12-15 08:11:09 +00:00
|
|
|
start_barebox();
|
2007-07-05 16:01:42 +00:00
|
|
|
|
|
|
|
/* never reached */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-11-15 20:40:11 +00:00
|
|
|
#ifdef __PPC__
|
|
|
|
/* HACK: we need this symbol on PPC, better ask a PPC export about this :) */
|
|
|
|
char _SDA_BASE_[4096];
|
|
|
|
#endif
|
|
|
|
|
2007-10-20 14:56:29 +00:00
|
|
|
static void print_usage(const char *prgname)
|
|
|
|
{
|
|
|
|
printf(
|
|
|
|
"Usage: %s [OPTIONS]\n"
|
2010-09-08 19:23:07 +00:00
|
|
|
"Start barebox.\n\n"
|
|
|
|
"Options:\n\n"
|
2012-09-03 06:18:08 +00:00
|
|
|
" -m, "
|
2010-09-08 19:23:07 +00:00
|
|
|
" -i, --image=<file> Map an image file to barebox. This option can be given\n"
|
|
|
|
" multiple times. The files will show up as\n"
|
|
|
|
" /dev/fd0 ... /dev/fdx under barebox.\n"
|
|
|
|
" -e, --env=<file> Map a file with an environment to barebox. With this \n"
|
|
|
|
" option, files are mapped as /dev/env0 ... /dev/envx\n"
|
|
|
|
" and thus are used as the default environment.\n"
|
|
|
|
" An empty file generated with dd will do to get started\n"
|
|
|
|
" with an empty environment.\n"
|
|
|
|
" -O, --stdout=<file> Register a file as a console capable of doing stdout.\n"
|
|
|
|
" <file> can be a regular file or a FIFO.\n"
|
|
|
|
" -I, --stdin=<file> Register a file as a console capable of doing stdin.\n"
|
|
|
|
" <file> can be a regular file or a FIFO.\n",
|
2007-10-20 14:56:29 +00:00
|
|
|
prgname
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-12-15 08:11:09 +00:00
|
|
|
* @page barebox_simul barebox Simulator
|
2007-10-20 14:56:29 +00:00
|
|
|
*
|
2009-12-15 08:11:09 +00:00
|
|
|
* barebox can be run as a simulator on your host to check and debug new non
|
2007-10-20 14:56:29 +00:00
|
|
|
* hardware related features.
|
|
|
|
*
|
2009-12-15 08:11:09 +00:00
|
|
|
* @section simu_build How to build barebox for simulation
|
2007-10-20 14:56:29 +00:00
|
|
|
*
|
2009-12-15 08:11:09 +00:00
|
|
|
* @section simu_run How to run barebox simulator
|
2007-10-20 14:56:29 +00:00
|
|
|
*
|
2009-12-15 08:11:09 +00:00
|
|
|
* $ barebox [\<OPTIONS\>]
|
2007-10-20 14:56:29 +00:00
|
|
|
*
|
|
|
|
* Options can be:
|
|
|
|
*
|
2008-04-04 10:14:35 +00:00
|
|
|
* -i \<file\>
|
2007-10-20 14:56:29 +00:00
|
|
|
*
|
2009-12-15 08:11:09 +00:00
|
|
|
* Map a \<file\> to barebox. This option can be given multiple times. The \<file\>s
|
|
|
|
* will show up as /dev/fd0 ... /dev/fdx in the barebox simulator.
|
2007-10-20 14:56:29 +00:00
|
|
|
*
|
2008-04-04 10:14:35 +00:00
|
|
|
* -e \<file\>
|
2007-10-20 14:56:29 +00:00
|
|
|
*
|
2009-12-15 08:11:09 +00:00
|
|
|
* Map \<file\> to barebox. With this option \<file\>s are mapped as /dev/env0 ...
|
2007-10-20 14:56:29 +00:00
|
|
|
* /dev/envx and thus are used as default environment. A clean file generated
|
|
|
|
* with dd will do to get started with an empty environment
|
|
|
|
*
|
2008-04-04 10:14:35 +00:00
|
|
|
* -O \<file\>
|
2007-10-20 14:56:29 +00:00
|
|
|
*
|
2008-04-04 10:14:35 +00:00
|
|
|
* Register \<file\> as a console capable of doing stdout. \<file\> can be a
|
2007-10-20 14:56:29 +00:00
|
|
|
* regular file or a fifo.
|
|
|
|
*
|
2008-04-04 10:14:35 +00:00
|
|
|
* -I \<file\>
|
2007-10-20 14:56:29 +00:00
|
|
|
*
|
2008-04-04 10:14:35 +00:00
|
|
|
* Register \<file\> as a console capable of doing stdin. \<file\> can be a regular
|
2007-10-20 14:56:29 +00:00
|
|
|
* file or a fifo.
|
|
|
|
*
|
2009-12-15 08:11:09 +00:00
|
|
|
* @section simu_dbg How to debug barebox simulator
|
2007-10-20 14:56:29 +00:00
|
|
|
*
|
2007-11-28 09:05:47 +00:00
|
|
|
*/
|