Tweaks to the beri boot loader so that it builds w/o warnings.
Sponsored by: Netflix
This commit is contained in:
parent
07c8409a7a
commit
b7ed534767
@ -47,9 +47,7 @@ MAN=
|
|||||||
|
|
||||||
AFLAGS= -G0
|
AFLAGS= -G0
|
||||||
|
|
||||||
CFLAGS+= -I${.CURDIR} \
|
CFLAGS+= -I${LDRSRC} \
|
||||||
-I${LDRSRC} \
|
|
||||||
-D_KERNEL \
|
|
||||||
-Wall \
|
-Wall \
|
||||||
-G0 \
|
-G0 \
|
||||||
-fno-pic -mno-abicalls \
|
-fno-pic -mno-abicalls \
|
||||||
|
@ -500,7 +500,7 @@ parse()
|
|||||||
*/
|
*/
|
||||||
unit = q[len-1];
|
unit = q[len-1];
|
||||||
if (unit < '0' || unit > '9') {
|
if (unit < '0' || unit > '9') {
|
||||||
printf("Invalid device: invalid unit\n", q,
|
printf("Invalid device: invalid unit %c\n",
|
||||||
unit);
|
unit);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
@ -130,13 +130,6 @@ uart_control_write(uint32_t v)
|
|||||||
ALTERA_JTAG_UART_DATA_OFF), v);
|
ALTERA_JTAG_UART_DATA_OFF), v);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
uart_writable(void)
|
|
||||||
{
|
|
||||||
|
|
||||||
return ((uart_control_read() & ALTERA_JTAG_UART_CONTROL_WSPACE) != 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
uart_readable(void)
|
uart_readable(void)
|
||||||
{
|
{
|
||||||
|
@ -67,7 +67,7 @@ SRCS+= altera_jtag_uart.c \
|
|||||||
# Since we don't have a backward compatibility issue, default to this on BERI.
|
# Since we don't have a backward compatibility issue, default to this on BERI.
|
||||||
CFLAGS+= -DBOOT_PROMPT_123
|
CFLAGS+= -DBOOT_PROMPT_123
|
||||||
|
|
||||||
HELP_FILES+= help.mips
|
HELP_FILES+= ${.CURDIR}/help.mips
|
||||||
|
|
||||||
# Always add MI sources
|
# Always add MI sources
|
||||||
.include "${BOOTSRC}/loader.mk"
|
.include "${BOOTSRC}/loader.mk"
|
||||||
|
@ -88,7 +88,7 @@ beri_arch_parsedev(struct disk_devdesc **dev, const char *devspec,
|
|||||||
struct disk_devdesc *idev;
|
struct disk_devdesc *idev;
|
||||||
struct devsw *dv;
|
struct devsw *dv;
|
||||||
int i, unit, err;
|
int i, unit, err;
|
||||||
const char *cp;
|
char *cp;
|
||||||
const char *np;
|
const char *np;
|
||||||
|
|
||||||
/* minimum length check */
|
/* minimum length check */
|
||||||
@ -130,8 +130,10 @@ beri_arch_parsedev(struct disk_devdesc **dev, const char *devspec,
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cp = np;
|
err = EUNIT;
|
||||||
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*cp && (*cp != ':')) {
|
if (*cp && (*cp != ':')) {
|
||||||
err = EINVAL;
|
err = EINVAL;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -119,7 +119,7 @@ beri_elf64_exec(struct preloaded_file *fp)
|
|||||||
* least bootinfop.
|
* least bootinfop.
|
||||||
*/
|
*/
|
||||||
(*entry)(boot2_argc, (register_t)boot2_argv, (register_t)boot2_envv,
|
(*entry)(boot2_argc, (register_t)boot2_argv, (register_t)boot2_envv,
|
||||||
&bootinfo);
|
(register_t)&bootinfo);
|
||||||
|
|
||||||
panic("exec returned");
|
panic("exec returned");
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@ extern struct devsw beri_cfi_disk;
|
|||||||
extern struct devsw beri_sdcard_disk;
|
extern struct devsw beri_sdcard_disk;
|
||||||
|
|
||||||
/* devicename.c */
|
/* devicename.c */
|
||||||
|
struct env_var;
|
||||||
int beri_arch_setcurrdev(struct env_var *, int, const void *);
|
int beri_arch_setcurrdev(struct env_var *, int, const void *);
|
||||||
char *beri_arch_fmtdev(void *);
|
char *beri_arch_fmtdev(void *);
|
||||||
int beri_arch_getdev(void **, const char *, const char **);
|
int beri_arch_getdev(void **, const char *, const char **);
|
||||||
|
Loading…
Reference in New Issue
Block a user