UML - part 2 of 3
Subsystems (2)
PATCH 1/1 UML - part 2 of 3
This patch contains the remaining unmerged change to generic code that UML needs. It adds boot entries for the UML block device.
Jeff
init/do_mounts.c +16 -0
@@ -156,6 +156,22 @@ { "pf", 0x2f00 }, { "apblock", APBLOCK_MAJOR << 8}, { "ddv", DDV_MAJOR << 8}, + { "ubd0", UBD_MAJOR << 8 | 0 << 4}, + { "ubda", UBD_MAJOR << 8 | 0 << 4}, + { "ubd1", UBD_MAJOR << 8 | 1 << 4}, + { "ubdb", UBD_MAJOR << 8 | 1 << 4}, + { "ubd2", UBD_MAJOR << 8 | 2 << 4}, + { "ubdc", UBD_MAJOR << 8 | 2 << 4}, + { "ubd3", UBD_MAJOR << 8 | 3 << 4}, + { "ubdd", UBD_MAJOR << 8 | 3 << 4}, + { "ubd4", UBD_MAJOR << 8 | 4 << 4}, + { "ubde", UBD_MAJOR << 8 | 4 << 4}, + { "ubd5", UBD_MAJOR << 8 | 5 << 4}, + { "ubdf", UBD_MAJOR << 8 | 5 << 4}, + { "ubd6", UBD_MAJOR << 8 | 6 << 4}, + { "ubdg", UBD_MAJOR << 8 | 6 << 4}, + { "ubd7", UBD_MAJOR << 8 | 7 << 4}, + { "ubdh", UBD_MAJOR << 8 | 7 << 4}, { "jsfd", JSFD_MAJOR << 8}, #if defined(CONFIG_ARCH_S390) { "dasda", (DASD_MAJOR << MINORBITS) },
Quoted 3 lines · Jeff Dike
This patch contains the remaining unmerged change to generic code that UML needs. It adds boot entries for the UML block device.
I absolutely detest the array in do_mounts, and I detest it even more when somebody adds a gazillion new entries to it.
Please use "root=0xXXYY" instead, or consider figuring out the name _automatically_ from the list of genhd's in the system (ie the reverse of blkdev_name() or whatever it is called).
Linus
Quoted 3 lines · [email protected] said:
Please use "root=0xXXYY" instead, or consider figuring out the name _automatically_ from the list of genhd's in the system (ie the reverse of
blkdev_name()or whatever it is called).
OK, consider that patch withdrawn. In its place is the one below. It's in UML arch code, so it needs to be applied after UML itself. It disables 'root=/dev/ubdxx' in UML for the time being.
The root_dev_names array looks like it can be eliminated entirely, as long as the gendisk list is populated before checksetup. This means either there needs to be a before_setup_initcall or the calculation of the rootdev kdev_t needs to be split out from the argument parsing and put in a late initcall. I don't know if that breaks anything.
If that is reasonable, I can start laying the groundwork.
Jeff
arch/um/kernel/um_arch.c Tue Aug 13 14:32:39 2002 renamed from arch/um/kernel/um_arch.c~ Fri Aug 2 22:06:03 2002 +1 -1
@@ -38,7 +38,7 @@ int fg_console; struct kbd_struct kbd_table[MAX_NR_CONSOLES]; -#define DEFAULT_COMMAND_LINE "root=/dev/ubd0" +#define DEFAULT_COMMAND_LINE "root=6200" unsigned long thread_saved_pc(struct task_struct *task) {
Quoted 3 lines · Jeff Dike
The
root_dev_namesarray looks like it can be eliminated entirely, as long as the gendisk list is populated before checksetup.
Well, think of it as "gendisk is populated before root device needs to be mounted".
And the fact is, it clearly has to be _anyway_.
The name lookup shouldn't be done any earlier than the actual mount anyway.
Linus