KONRAD Frederic
Builds for 1 pipeline passed

qboxbase: Handle the standard parameters in qboxbase.

No need to duplicated this code.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
... ... @@ -70,6 +70,11 @@ void qbox_export_irq(QBOXBase *qbox, qemu_irq *irq, size_t size);
void qbox_add_argument(QBOXBase *qbox, const char *argument);
/**
* Add all the standard arguments.
*/
void qbox_add_standard_arguments(QBOXBase *qbox);
/**
* Add all linux related arguments (kernel, initrd, append, ..) according to the
* environment parameters.
*/
... ...
... ... @@ -53,23 +53,9 @@ QBOXARM926 arm926_handle;
static void qbox_arm926_init(void)
{
const char *argv[] = {
"./toplevel",
"-nographic",
"-monitor",
"/dev/null",
"-icount",
"1",
"-M",
"qbox_arm926",
"-s"};
int argc = 9;
int i;
for (i = 0; i < argc; i++) {
qbox_add_argument(arm926_handle.base, argv[i]);
}
qbox_add_standard_arguments(arm926_handle.base);
qbox_add_argument(arm926_handle.base, "-M");
qbox_add_argument(arm926_handle.base, "qbox_arm926");
qbox_add_linux_arguments(arm926_handle.base);
}
... ...
... ... @@ -53,23 +53,9 @@ QBOXCORTEXM3 cortexm3_handle;
static void qbox_cortexm3_init(void)
{
const char *argv[] = {
"./toplevel",
"-nographic",
"-monitor",
"/dev/null",
"-icount",
"1",
"-M",
"qbox_cortexm3",
"-s"};
int argc = 9;
int i;
for (i = 0; i < argc; i++) {
qbox_add_argument(cortexm3_handle.base, argv[i]);
}
qbox_add_standard_arguments(cortexm3_handle.base);
qbox_add_argument(cortexm3_handle.base, "-M");
qbox_add_argument(cortexm3_handle.base, "qbox_cortexm3");
qbox_add_linux_arguments(cortexm3_handle.base);
}
... ...
... ... @@ -348,6 +348,24 @@ void qbox_exit(void)
env_request_stop();
}
void qbox_add_standard_arguments(QBOXBase *qbox)
{
const char *argv[] = {
"./toplevel",
"-nographic",
"-monitor",
"/dev/null",
"-icount",
"1",
"-s"};
int argc = 7;
int i;
for (i = 0; i < argc; i++) {
qbox_add_argument(qbox, argv[i]);
}
}
void qbox_add_linux_arguments(QBOXBase *qbox)
{
char *kernel = NULL;
... ...