0001
0002
0003
0004
0005
0006 #include <linux/init.h>
0007 #include <linux/memblock.h>
0008 #include <linux/initrd.h>
0009 #include <asm/types.h>
0010 #include <init.h>
0011 #include <os.h>
0012
0013 #include "um_arch.h"
0014
0015
0016 static char *initrd __initdata = NULL;
0017
0018 int __init read_initrd(void)
0019 {
0020 unsigned long long size;
0021 void *area;
0022
0023 if (!initrd)
0024 return 0;
0025
0026 area = uml_load_file(initrd, &size);
0027 if (!area)
0028 return 0;
0029
0030 initrd_start = (unsigned long) area;
0031 initrd_end = initrd_start + size;
0032 return 0;
0033 }
0034
0035 static int __init uml_initrd_setup(char *line, int *add)
0036 {
0037 initrd = line;
0038 return 0;
0039 }
0040
0041 __uml_setup("initrd=", uml_initrd_setup,
0042 "initrd=<initrd image>\n"
0043 " This is used to boot UML from an initrd image. The argument is the\n"
0044 " name of the file containing the image.\n\n"
0045 );