Re: [Qemu-devel] U-Boot patch for qemu -M mips TAKE 2

2007-10-04 Thread Wolfgang Denk
In message <[EMAIL PROTECTED]> you wrote:
> Now with board config file included, so it can be built :-)
> Thiemo, I'll think about the memory size issue and get back to you on that.
> How about a git repo for U-Boot, if this thing takes off?  

We actually have already a lot of them -  the  master  repo  and  the
custodian  repositories. Logically, your code should go into the MIPS
repo. I think you should start posting on  the  U-Boot  mailing  list
instead of sending to mydirectaddress;see
http://www.denx.de/wiki/UBoot/WebHome for details.

BTW: Your code has a few minor coding style  violations  (indentation
by spaces instead of TAB), and the signed-off-ny line is missing.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
"To IBM, 'open' means there is a modicum  of  interoperability  among
some of their equipment."- Harv Masterson




Re: [Qemu-devel] U-Boot patch for qemu -M mips TAKE 2

2007-10-04 Thread Vlad Lungu

Wolfgang Denk wrote:

In message <[EMAIL PROTECTED]> you wrote:
  

Now with board config file included, so it can be built :-)
Thiemo, I'll think about the memory size issue and get back to you on that.
How about a git repo for U-Boot, if this thing takes off?  



We actually have already a lot of them -  the  master  repo  and  the
custodian  repositories. Logically, your code should go into the MIPS
repo. I think you should start posting on  the  U-Boot  mailing  list
instead of sending to mydirectaddress;see
http://www.denx.de/wiki/UBoot/WebHome for details.
  
Actually, this was directed at the Qemu list. But thanks for the offer. 
I suppose they could just point
to your repo in the source release/dev tree and  store the corresponding 
source snapshot when doing a binary
release with information included in the README, and it would be kosher 
Re: GPL.

BTW: Your code has a few minor coding style  violations  (indentation
by spaces instead of TAB), and the signed-off-ny line is missing.
  
Might be. I use joe/mcedit/vi in random order to edit source files, 
that's the source of the spaces, and the patch was rather
informal so no signoff. I'll re-branch and do a 3-part (GOT,NE2000,qemu) 
patchset .


Vlad





Re: [Qemu-devel] U-Boot patch for qemu -M mips TAKE 2

2007-10-04 Thread Vlad Lungu

Now with board config file included, so it can be built :-)
Thiemo, I'll think about the memory size issue and get back to you on that.
How about a git repo for U-Boot, if this thing takes off?  


Vlad


---
diff --git a/Makefile b/Makefile
index 85885b1..8f650d2 100644
--- a/Makefile
+++ b/Makefile
@@ -2444,6 +2444,12 @@ pb1000_config:   unconfig
@echo "#define CONFIG_PB1000 1" >>$(obj)include/config.h
@$(MKCONFIG) -a pb1x00 mips mips pb1x00

+qemu_mips_config   :   unconfig
+   @mkdir -p $(obj)include
+   @ >$(obj)include/config.h
+   @echo "#define CONFIG_QEMU_MIPS 1" >>$(obj)include/config.h
+   @$(MKCONFIG) -a qemu-mips mips mips qemu-mips
+
#
## MIPS64 5Kc
#
diff --git a/board/qemu-mips/Makefile b/board/qemu-mips/Makefile
new file mode 100644
index 000..23be447
--- /dev/null
+++ b/board/qemu-mips/Makefile
@@ -0,0 +1,45 @@
+#
+# (C) Copyright 2003-2006
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# 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$(BOARD).a
+
+COBJS  = $(BOARD).o flash.o
+SOBJS  = lowlevel_init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/qemu-mips/README b/board/qemu-mips/README
new file mode 100644
index 000..39570b1
--- /dev/null
+++ b/board/qemu-mips/README
@@ -0,0 +1,11 @@
+By Vlad Lungu [EMAIL PROTECTED] 2007-Oct-01
+
+Qemu is a full system emulator. See
+
+http://fabrice.bellard.free.fr/qemu
+
+Limitations & comments
+--
+Supports the "-m mips" configuration of qemu: serial,NE2000,IDE.
+Support is big endian only for now (or at least this is what I tested).
+Derived from au1x00 with a lot of things cut out.
diff --git a/board/qemu-mips/config.mk b/board/qemu-mips/config.mk
new file mode 100644
index 000..61269ce
--- /dev/null
+++ b/board/qemu-mips/config.mk
@@ -0,0 +1,11 @@
+
+#
+# Qemu -M mips system emulator
+# See http://fabrice.bellard.free.fr/qemu
+#
+
+# ROM version
+TEXT_BASE = 0xbfc0
+
+# RAM version
+#TEXT_BASE = 0x80001000
diff --git a/board/qemu-mips/flash.c b/board/qemu-mips/flash.c
new file mode 100644
index 000..d419f41
--- /dev/null
+++ b/board/qemu-mips/flash.c
@@ -0,0 +1,43 @@
+/*
+ * (C) Copyright 2003
+ * Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+ *
+ * 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 
+#if 0
+flash_info_t flash_info[CFG_MAX_FLASH_BANKS];  /* info for FLASH chips */
+#endif
+/*---
+ * flash_init()
+ *
+ * sets up flash_info and returns size of FLASH (bytes)
+ */
+unsigned long flash_init (void)
+{
+   printf ("Skipping flash_init\n");
+   return (0);
+}
+
+int write_buff (/*flash_info_t */ void * info, uchar * src, ulong addr, u