From: Shinya Kuribayashi <skuribay@pobox.com>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/2] Add MIPS arch support to barebox
Date: Wed, 29 Jun 2011 00:06:56 +0900 [thread overview]
Message-ID: <4E09EE10.1050607@pobox.com> (raw)
In-Reply-To: <1309194834-2292-2-git-send-email-antonynpavlov@gmail.com>
On 6/28/11 2:13 AM, Antony Pavlov wrote:
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> new file mode 100644
> index 0000000..10c0fbb
> --- /dev/null
> +++ b/arch/mips/Kconfig
> @@ -0,0 +1,55 @@
[...]
> +source arch/mips/mach-qemu/Kconfig
> +
> +choice
> + prompt "Bring up type"
> +
> + config MIPS_NATIVE_BRINGUP
> + bool "native"
> + help
> + Barebox will act as a native bootloader. This includes all the
> + required initialization needed to bring up a piece of hardware.
> +
> +endchoice
Native bringup / native bootloader should be replaced with
something more appropriate or descriptive.
> +source arch/mips/boot/Kconfig
> +
> +source common/Kconfig
> +source commands/Kconfig
> +source net/Kconfig
> +source drivers/Kconfig
> +source fs/Kconfig
> +source lib/Kconfig
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> new file mode 100644
> index 0000000..60d88e5
> --- /dev/null
> +++ b/arch/mips/Makefile
> @@ -0,0 +1,51 @@
> +CPPFLAGS += -D__MIPS__ -fno-strict-aliasing -fno-merge-constants
> +
> +CPPFLAGS += -march=mips64 -P -EB -mno-abicalls
> +CPPFLAGS += -Wall -Wmissing-prototypes -Wstrict-prototypes \
> + -Wno-uninitialized -Wno-format -Wno-main
> +#CPPFLAGS += -save-temps
it's good thing to take 64-bit support into account from the beginning.
> diff --git a/arch/mips/boot/entry.c b/arch/mips/boot/entry.c
> new file mode 100644
> index 0000000..98d954e
> --- /dev/null
> +++ b/arch/mips/boot/entry.c
> @@ -0,0 +1,80 @@
> +/*
> + * (C) Copyright 2000-2006
> + * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
Which part in this file belongs to Wolfgang? I don't see any, and
recommend you to replace with yours.
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#include<debug_ll.h>
> +#include<common.h>
> +#include<init.h>
> +#include<asm-generic/memory_layout.h>
> +
> +#include<asm/io.h>
> +
> +#include<string.h>
> +
> +/* These symbols are generated by the linker */
> +extern long __bss_start;
> +extern long __bss_end;
> +
> +extern void start_barebox(void);
> +
> +/************************************************************************
> + *
> + * This is the first part of the initialization sequence: we are now
> + * running from ROM.
> + *
> + ************************************************************************
> + */
> +
> +void board_init_in_rom(void *rom, void *ram)
> +{
> + int i;
> + int * a, *b;
> +#define ROM_SIZE 512 * 1024
> +
> + a = rom;
> + b = ram;
> +
> + for (i = ROM_SIZE; i> 0; i-=sizeof(int)) {
> + *b = *a;
> + a++;
> + b++;
> + }
> +}
> +
> +/************************************************************************
> + *
> + * This is the next part if the initialization sequence: we are now
> + * running from RAM and have a "normal" C environment, i. e. global
> + * data can be written, BSS has been cleared, the stack size in not
> + * that critical any more, etc.
> + *
> + ************************************************************************
> + */
> +
> +void board_init_in_ram()
> +{
> + /* clear the BSS first */
> + memset(&__bss_start, 0x00,&__bss_end -&__bss_start);
> +
> + /* Initialization complete - start the monitor */
> + start_barebox();
> +}
> diff --git a/arch/mips/boot/head.S b/arch/mips/boot/head.S
> new file mode 100644
> index 0000000..f5712b8
> --- /dev/null
> +++ b/arch/mips/boot/head.S
> @@ -0,0 +1,233 @@
> +/*
> + * Startup Code for MIPS32 CPU-core
> + *
> + * Copyright (c) 2003 Wolfgang Denk<wd@denx.de>
> + * Further modifications by Antony Pavlov
Hmm, not really, and stopped reviewing here. I might be able to
give a thorough review, but don't have any spare time these days.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-06-28 15:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-27 17:13 [PATCH 1/2] include/linux/stat.h: make struct stat unified Antony Pavlov
2011-06-27 17:13 ` [PATCH 2/2] Add MIPS arch support to barebox Antony Pavlov
2011-06-28 5:11 ` Jean-Christophe PLAGNIOL-VILLARD
2011-06-28 6:14 ` Antony Pavlov
2011-06-28 9:37 ` Antony Pavlov
2011-06-28 10:06 ` Sascha Hauer
2011-06-28 13:29 ` Jean-Christophe PLAGNIOL-VILLARD
2011-06-28 16:23 ` Shinya Kuribayashi
2011-06-28 7:21 ` Sascha Hauer
2011-06-28 9:03 ` Antony Pavlov
2011-06-28 15:06 ` Shinya Kuribayashi [this message]
2011-06-28 15:42 ` Antony Pavlov
2011-06-28 6:40 ` [PATCH 1/2] include/linux/stat.h: make struct stat unified Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E09EE10.1050607@pobox.com \
--to=skuribay@pobox.com \
--cc=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox