[U-Boot] [PATCH v2 01/10] MIPS: qemu-malta: add support for emulated MIPS Malta board

Gabor Juhos juhosg at openwrt.org
Sun Feb 3 08:19:36 CET 2013


Hi Daniel,

...
>> diff --git a/board/qemu-malta/lowlevel_init.S b/board/qemu-malta/lowlevel_init.S
>> new file mode 100644
>> index 0000000..c5c5bd9
>> --- /dev/null
>> +++ b/board/qemu-malta/lowlevel_init.S
>> @@ -0,0 +1,19 @@
>> +/*
>> + * Copyright (C) 2013 Gabor Juhos <juhosg at openwrt.org>
>> + *
>> + * This program is free software; you can redistribute it and/or modify it
>> + * under the terms of the GNU General Public License version 2 as published
>> + * by the Free Software Foundation.
>> + */
>> +
>> +#include <asm/regdef.h>
>> +
>> +       .text
>> +       .set noreorder
>> +       .set mips32
>> +
>> +       .globl  lowlevel_init
>> +lowlevel_init:
>> +
>> +       jr      ra
>> +        nop
> 
> can't we use CONFIG_SKIP_LOWLEVEL_INIT and drop this file?
> We neither need to initialize a memory controller nor caches on Qemu.

We can use that option and drop the file from this patch. However in that case I
will have to reintroduce it and remove the config option in a subsequent patch.
The lowlevel_init will be used to initialize the Galileo system controller.

...

>> diff --git a/include/configs/qemu-malta.h b/include/configs/qemu-malta.h
>> new file mode 100644
>> index 0000000..c72c5dd
>> --- /dev/null
>> +++ b/include/configs/qemu-malta.h
>> @@ -0,0 +1,104 @@
>> +/*
>> + * Copyright (C) 2013 Gabor Juhos <juhosg at openwrt.org>
>> + *
>> + * This program is free software; you can redistribute it and/or modify it
>> + * under the terms of the GNU General Public License version 2 as published
>> + * by the Free Software Foundation.
>> + */
>> +
>> +#ifndef _QEMU_MALTA_CONFIG_H
>> +#define _QEMU_MALTA_CONFIG_H
>> +
>> +#include <asm/addrspace.h>
>> +#include <asm/malta.h>
>> +
>> +/*
>> + * System configuration
>> + */
>> +#define CONFIG_QEMU_MALTA
> 
> we should extend qemu-mips.h and define CONFIG_QEMU_MALTA
> respectively CONFIG_QEMU_MALTA in boards.cfg to avoid redundant code.
> All differences could be handled with these options.

Sure, we can do it if you prefer that. In my opinion it is much cleaner to
introduce a new config file, instead of adding random ifdef statements into
another file.

-Gabor


More information about the U-Boot mailing list