Added 'bootdelay' feature in boot monitor, it pauses a given number of ms

so the list of programs in the image and their sizes can be seen before the
kernel starts filling the screen.

Added some formatting fixes in installboot and boot monitor itself,
some of the segments were larger than the formatting allowed.
This commit is contained in:
Ben Gras 2005-05-30 15:02:52 +00:00
parent b421423c77
commit 5927788cdd
3 changed files with 13 additions and 6 deletions

View file

@ -1549,6 +1549,7 @@ void help(void)
{ "ramimagedev", "RAM disk image if root is RAM" },
{ "ramsize", "RAM disk size" },
{ "bootdev", "Special name for the boot device" },
{ "bootdelay", "Delay after loading, before booting (ms)" },
{ "fd0, d0p2, c0d0p1s0", "Devices (as in /dev)" },
{ "image", "Name of the kernel image" },
{ "main", "Startup function" },

View file

@ -377,6 +377,7 @@ int get_segment(u32_t *vsec, long *size, u32_t *addr, u32_t limit)
void exec_image(char *image)
/* Get a Minix image into core, patch it up and execute. */
{
char *delayvalue;
int i;
struct image_header hdr;
char *buf;
@ -454,7 +455,7 @@ void exec_image(char *image)
raw_copy(aout + i * A_MINHDR, mon2abs(&hdr.process), A_MINHDR);
if (!banner) {
printf(" cs ds text data bss");
printf(" cs ds text data bss");
if (k_flags & K_CHMEM) printf(" stack");
putch('\n');
banner= 1;
@ -497,7 +498,7 @@ void exec_image(char *image)
a_data+= a_text;
}
printf("%06lx %06lx %7ld %7ld %7ld",
printf("%07lx %07lx %8ld %8ld %8ld",
procp->cs, procp->ds,
hdr.process.a_text, hdr.process.a_data,
hdr.process.a_bss
@ -570,6 +571,11 @@ void exec_image(char *image)
/* Run the trailer function just before starting Minix. */
if (!run_trailer()) { errno= 0; return; }
/* Do delay if wanted. */
if((delayvalue = b_value("bootdelay")) != nil > 0) {
delay(delayvalue);
}
/* Translate the boot parameters to what Minix likes best. */
if (!params2params(params, sizeof(params))) { errno= 0; return; }

View file

@ -128,12 +128,12 @@ void read_header(int talk, char *proc, FILE *procf, struct image_header *ihdr)
}
if (talk && !banner) {
printf(" text data bss size\n");
printf(" text data bss size\n");
banner= 1;
}
if (talk) {
printf("%8ld%8ld%8ld%9ld %s\n",
printf(" %8ld %8ld %8ld %9ld %s\n",
phdr->a_text, phdr->a_data, phdr->a_bss,
phdr->a_text + phdr->a_data + phdr->a_bss, proc);
}
@ -259,8 +259,8 @@ void make_image(char *image, char **procv)
if (fclose(imagef) == EOF) fatal(image);
printf(" ------ ------ ------ -------\n");
printf("%8ld%8ld%8ld%9ld total\n",
printf(" ------ ------ ------ -------\n");
printf(" %8ld %8ld %8ld %9ld total\n",
total_text, total_data, total_bss,
total_text + total_data + total_bss);
}