All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 04/20] sandbox: Add cpu files
Date: Sat, 17 Sep 2011 09:48:43 -0700	[thread overview]
Message-ID: <1316278139-28635-5-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1316278139-28635-2-git-send-email-sjg@chromium.org>

This is an initial implementation with all functions defined but not working.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 arch/sandbox/config.mk              |   21 ++++++++++++
 arch/sandbox/cpu/sandbox/Makefile   |   47 +++++++++++++++++++++++++++
 arch/sandbox/cpu/sandbox/cpu.c      |   59 +++++++++++++++++++++++++++++++++++
 arch/sandbox/cpu/sandbox/u-boot.lds |   34 ++++++++++++++++++++
 4 files changed, 161 insertions(+), 0 deletions(-)
 create mode 100644 arch/sandbox/config.mk
 create mode 100644 arch/sandbox/cpu/sandbox/Makefile
 create mode 100644 arch/sandbox/cpu/sandbox/cpu.c
 create mode 100644 arch/sandbox/cpu/sandbox/u-boot.lds

diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
new file mode 100644
index 0000000..d9956ff
--- /dev/null
+++ b/arch/sandbox/config.mk
@@ -0,0 +1,21 @@
+# Copyright (c) 2011 The Chromium OS Authors.
+# 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
+
+PLATFORM_CPPFLAGS += -DCONFIG_SANDBOX -D__SANDBOX__
+LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
diff --git a/arch/sandbox/cpu/sandbox/Makefile b/arch/sandbox/cpu/sandbox/Makefile
new file mode 100644
index 0000000..8dfa828
--- /dev/null
+++ b/arch/sandbox/cpu/sandbox/Makefile
@@ -0,0 +1,47 @@
+#
+# Copyright (c) 2011 The Chromium OS Authors.
+#
+# (C) Copyright 2000-2003
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(CPU).o
+
+COBJS	:= cpu.o
+
+SRCS	:= $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+
+all:	$(obj).depend $(LIB)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $(OBJS))
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/arch/sandbox/cpu/sandbox/cpu.c b/arch/sandbox/cpu/sandbox/cpu.c
new file mode 100644
index 0000000..fd4ff1d
--- /dev/null
+++ b/arch/sandbox/cpu/sandbox/cpu.c
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors.
+ * 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 <common.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+	return -1;
+}
+
+/* delay x useconds */
+void __udelay(unsigned long usec)
+{
+	/* Ignore this for now */
+}
+
+unsigned long timer_get_us(void)
+{
+	return 0;
+}
+
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
+{
+	return -1;
+}
+
+int cleanup_before_linux(void)
+{
+	return 0;
+}
+
+void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
+{
+	return (void *)(gd->ram_buf + paddr);
+}
+
+void flush_dcache_range(unsigned long start, unsigned long stop)
+{
+}
diff --git a/arch/sandbox/cpu/sandbox/u-boot.lds b/arch/sandbox/cpu/sandbox/u-boot.lds
new file mode 100644
index 0000000..2d2e50f
--- /dev/null
+++ b/arch/sandbox/cpu/sandbox/u-boot.lds
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ *
+ * 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
+ */
+
+SECTIONS
+{
+  __u_boot_cmd_start = .;
+  .u_boot_cmd : { *(.u_boot_cmd) }
+  __u_boot_cmd_end = .;
+  __bss_start = .;
+
+}
+
+INSERT BEFORE .data;
-- 
1.7.3.1

  parent reply	other threads:[~2011-09-17 16:48 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-17 16:48 [U-Boot] [RFC PATCH 01/20] sandbox: Add architecture header files Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 02/20] sandbox: Add architecture image support Simon Glass
2011-09-17 19:29   ` Marek Vasut
2011-09-18  3:57     ` Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 03/20] sandbox: Add compiler defines to support a 64-bit x86_64 platform Simon Glass
2011-09-17 23:56   ` Mike Frysinger
2011-09-17 16:48 ` Simon Glass [this message]
2011-09-17 23:58   ` [U-Boot] [RFC PATCH 04/20] sandbox: Add cpu files Mike Frysinger
2011-09-23 15:54     ` Simon Glass
2011-09-25 19:25       ` Wolfgang Denk
2011-09-25 20:18         ` Simon Glass
2011-09-26  4:48           ` Mike Frysinger
2011-09-26 16:49             ` Simon Glass
2011-09-26 17:10               ` Anton Staaf
2011-09-26 19:11                 ` Simon Glass
2011-09-26 18:12             ` Wolfgang Denk
2011-09-26 18:16               ` Mike Frysinger
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 05/20] sandbox: Add architecture lib files Simon Glass
2011-09-18  0:02   ` Mike Frysinger
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 06/20] sandbox: Allow board_init_f() and board_init_r() to return Simon Glass
2011-09-18  0:05   ` Mike Frysinger
2011-09-23 15:55     ` Simon Glass
2011-09-25 19:55       ` Wolfgang Denk
2011-09-25 20:20         ` Simon Glass
2011-09-26  4:47       ` Mike Frysinger
2011-09-26 16:48         ` Simon Glass
2011-09-26 17:49           ` Anton Staaf
2011-09-26 19:22             ` Simon Glass
2011-09-26 19:25               ` Anton Staaf
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 07/20] sandbox: Add sandbox board Simon Glass
2011-09-18  0:17   ` Mike Frysinger
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 08/20] sandbox: Add board info for architecture Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 09/20] sandbox: Add bootm support Simon Glass
2011-09-18  0:16   ` Mike Frysinger
2011-09-23 15:55     ` Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 10/20] sandbox: Disable built-in malloc Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 11/20] sandbox: Disable standalone/API support Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 12/20] sandbox: Force command sections to be 4-byte aligned Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 13/20] sandbox: Add OS dependent layer Simon Glass
2011-09-18  0:20   ` Mike Frysinger
2011-09-23 15:59     ` Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 14/20] sandbox: Add board_init() Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 15/20] sandbox: Add main program Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 16/20] sandbox: Add serial uart Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 17/20] sandbox: Add basic config file Simon Glass
2011-09-18  0:22   ` Mike Frysinger
2011-09-23 16:00     ` Simon Glass
2011-09-26  4:52       ` Mike Frysinger
2011-09-26 18:18         ` Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 18/20] sandbox: Remove unused variable warnings Simon Glass
2011-09-18  0:25   ` Mike Frysinger
2011-09-23 16:01     ` Simon Glass
2011-09-26  4:49       ` Mike Frysinger
2011-09-26 18:07         ` Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 19/20] sandbox: Use uintptr_t for 32/64-bit compatibility Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 20/20] sandbox: Makefile changes to build sandbox architecture Simon Glass
2011-09-17 23:54 ` [U-Boot] [RFC PATCH 01/20] sandbox: Add architecture header files Mike Frysinger

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=1316278139-28635-5-git-send-email-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.