kernel, ramdisk: some boot unification

To use the new SD building script, Linux has to be configured with
loop.max_part=15 on the command line (or set at module load time)
to make the loopback device see the partitions.

This commit removes a lot of differences between the ARM and x86
boot ramdisk and rc scripts. It changes the ARM build from running
from ramdisk to requiring a full filesystem on the SD image and
booting into it.

	. ramdisk: remove some arm-only utilities only used for running
	  from the shell
	. remove ARM-only rc.arm, proto.arm.small, ttys and mylogin.sh
	  boot-time ramdisk files
	. change kernel to add "arch" variable so userland knows what
	  we're running on from sysenv
	. make ARM use the regular ramdisk rc file, changed to distinguish
	  i386-only and ARM-only drivers; requires rootdevname to be set
	. change /etc/rc and /usr/etc/rc to start i386-only drivers only on
	  i386 systems
	. change the kernel/arm to have a special case for the memory
	  driver to load it higher so it can be bigger
	. add uEnv.txt, cmdline.txt and a for now highly linux-dependent
	  SD preparation script arm_sdimage.sh to the git repository in
	  releasetools/

Change-Id: I68910ba4e96ee80f7a12b65e48b5d39b43ca6397
This commit is contained in:
Ben Gras
2013-03-06 19:27:47 +01:00
parent b9674650f1
commit 5acaa0814f
17 changed files with 265 additions and 164 deletions

View File

@@ -123,7 +123,16 @@ void setup_mbi(multiboot_info_t *mbi)
int i;
for (i = 0; i < MB_MODS_NR; ++i) {
mb_modlist[i].mod_start = MB_MODS_BASE + i * MB_MODS_ALIGN;
mb_modlist[i].mod_end = mb_modlist[i].mod_start + MB_MODS_ALIGN - 1; mb_modlist[i].cmdline = 0;
mb_modlist[i].mod_end = mb_modlist[i].mod_start + MB_MODS_ALIGN - 1;
mb_modlist[i].cmdline = 0;
if (i == 5) {
/* LSC HACK: Special case for memory, it is actually loaded at the
* end, so that it can grow without having to change the
* alignment of everything. currently reserving 64MiB */
mb_modlist[i].mod_start = 0x96800000;
mb_modlist[i].mod_end = mb_modlist[i].mod_start + (0x04000000) - 1;
}
}
/* Final 'module' is actually a string holding the boot cmdline */
@@ -193,6 +202,9 @@ void get_parameters(u32_t ebx, kinfo_t *cbi)
}
}
/* let higher levels know what we are booting on */
mb_set_param(cbi->param_buf, ARCHVARNAME, "earm", cbi);
/* round user stack down to leave a gap to catch kernel
* stack overflow; and to distinguish kernel and user addresses
* at a glance (0xf.. vs 0xe..)

View File

@@ -153,6 +153,9 @@ void get_parameters(u32_t ebx, kinfo_t *cbi)
}
}
/* let higher levels know what we are booting on */
mb_set_param(cbi->param_buf, ARCHVARNAME, "i386", cbi);
/* round user stack down to leave a gap to catch kernel
* stack overflow; and to distinguish kernel and user addresses
* at a glance (0xf.. vs 0xe..)