All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V3 1/3] bcm2835/rpi: add SPDX license tags for some files
@ 2015-02-16 19:16 Stephen Warren
  2015-02-16 19:16 ` [U-Boot] [PATCH V3 2/3] bcm2836 SoC support (used in Raspberry Pi 2 model B) Stephen Warren
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Stephen Warren @ 2015-02-16 19:16 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
---
 arch/arm/cpu/arm1176/bcm2835/Makefile     | 12 ++----------
 arch/arm/include/asm/arch-bcm2835/sdhci.h | 12 +-----------
 arch/arm/include/asm/arch-bcm2835/timer.h | 12 +-----------
 arch/arm/include/asm/arch-bcm2835/wdog.h  | 12 +-----------
 board/raspberrypi/rpi/Makefile            | 12 ++----------
 board/raspberrypi/rpi/rpi.c               | 12 +-----------
 include/configs/rpi.h                     | 12 +-----------
 7 files changed, 9 insertions(+), 75 deletions(-)

diff --git a/arch/arm/cpu/arm1176/bcm2835/Makefile b/arch/arm/cpu/arm1176/bcm2835/Makefile
index 0ad36906dfc5..7e5dbe1fdeaf 100644
--- a/arch/arm/cpu/arm1176/bcm2835/Makefile
+++ b/arch/arm/cpu/arm1176/bcm2835/Makefile
@@ -1,15 +1,7 @@
 #
-# See file CREDITS for list of people who contributed to this
-# project.
+# (C) Copyright 2012 Stephen Warren
 #
-# 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.
-#
-# 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.
+# SPDX-License-Identifier:	GPL-2.0
 #
 
 obj-y	:= lowlevel_init.o
diff --git a/arch/arm/include/asm/arch-bcm2835/sdhci.h b/arch/arm/include/asm/arch-bcm2835/sdhci.h
index a4f867b2e9a4..da4d5cd5a88f 100644
--- a/arch/arm/include/asm/arch-bcm2835/sdhci.h
+++ b/arch/arm/include/asm/arch-bcm2835/sdhci.h
@@ -1,17 +1,7 @@
 /*
  * (C) Copyright 2012 Stephen Warren
  *
- * 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
- * version 2 as published by the Free Software Foundation.
- *
- * 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.
+ * SPDX-License-Identifier:	GPL-2.0
  */
 
 #ifndef _BCM2835_SDHCI_H_
diff --git a/arch/arm/include/asm/arch-bcm2835/timer.h b/arch/arm/include/asm/arch-bcm2835/timer.h
index c2001b6f932a..2d7cfe5c56f8 100644
--- a/arch/arm/include/asm/arch-bcm2835/timer.h
+++ b/arch/arm/include/asm/arch-bcm2835/timer.h
@@ -1,17 +1,7 @@
 /*
  * (C) Copyright 2012 Stephen Warren
  *
- * 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
- * version 2 as published by the Free Software Foundation.
- *
- * 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.
+ * SPDX-License-Identifier:	GPL-2.0
  */
 
 #ifndef _BCM2835_TIMER_H
diff --git a/arch/arm/include/asm/arch-bcm2835/wdog.h b/arch/arm/include/asm/arch-bcm2835/wdog.h
index 303a65f32e08..f369ab589c9a 100644
--- a/arch/arm/include/asm/arch-bcm2835/wdog.h
+++ b/arch/arm/include/asm/arch-bcm2835/wdog.h
@@ -1,17 +1,7 @@
 /*
  * (C) Copyright 2012 Stephen Warren
  *
- * 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
- * version 2 as published by the Free Software Foundation.
- *
- * 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.
+ * SPDX-License-Identifier:	GPL-2.0
  */
 
 #ifndef _BCM2835_TIMER_H
diff --git a/board/raspberrypi/rpi/Makefile b/board/raspberrypi/rpi/Makefile
index c53c92b1ddb7..4ce2c983b382 100644
--- a/board/raspberrypi/rpi/Makefile
+++ b/board/raspberrypi/rpi/Makefile
@@ -1,15 +1,7 @@
 #
-# See file CREDITS for list of people who contributed to this
-# project.
+# (C) Copyright 2012 Stephen Warren
 #
-# 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.
-#
-# 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.
+# SPDX-License-Identifier:	GPL-2.0
 #
 
 obj-y	:= rpi.o
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 948078b958f7..fdbf87d6fa79 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -1,17 +1,7 @@
 /*
  * (C) Copyright 2012-2013 Stephen Warren
  *
- * 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
- * version 2 as published by the Free Software Foundation.
- *
- * 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.
+ * SPDX-License-Identifier:	GPL-2.0
  */
 
 #include <common.h>
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index 7ad8d080215d..9b32149b0ea3 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -1,17 +1,7 @@
 /*
  * (C) Copyright 2012 Stephen Warren
  *
- * 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
- * version 2 as published by the Free Software Foundation.
- *
- * 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.
+ * SPDX-License-Identifier:	GPL-2.0
  */
 
 #ifndef __CONFIG_H
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 2/3] bcm2836 SoC support (used in Raspberry Pi 2 model B)
  2015-02-16 19:16 [U-Boot] [PATCH V3 1/3] bcm2835/rpi: add SPDX license tags for some files Stephen Warren
@ 2015-02-16 19:16 ` Stephen Warren
  2015-02-22  2:57   ` Tom Rini
  2015-02-16 19:16 ` [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B Stephen Warren
  2015-02-22  2:57 ` [U-Boot] [PATCH V3 1/3] bcm2835/rpi: add SPDX license tags for some files Tom Rini
  2 siblings, 1 reply; 17+ messages in thread
From: Stephen Warren @ 2015-02-16 19:16 UTC (permalink / raw)
  To: u-boot

The bcm2835 and bcm2836 are essentially identical, except:
- The CPU is an ARM1176 v.s. a quad-core Cortex-A7.
- The physical address of many IO controllers has moved.

Rather than introducing a whole new bcm2836 value for $(SOC) or $(ARCH),
update the existing bcm2835 code to handle the minor differences, and
plumb it into the ARMv7 CPU architecture.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
---
 arch/arm/cpu/armv7/Makefile               |  1 +
 arch/arm/cpu/armv7/bcm2835/Makefile       | 13 +++++++++++++
 arch/arm/include/asm/arch-bcm2835/gpio.h  |  5 +++++
 arch/arm/include/asm/arch-bcm2835/mbox.h  |  6 +++++-
 arch/arm/include/asm/arch-bcm2835/sdhci.h |  6 +++++-
 arch/arm/include/asm/arch-bcm2835/timer.h |  6 +++++-
 arch/arm/include/asm/arch-bcm2835/wdog.h  |  6 +++++-
 7 files changed, 39 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/bcm2835/Makefile

diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile
index 409e6f5651b6..7f77c729a191 100644
--- a/arch/arm/cpu/armv7/Makefile
+++ b/arch/arm/cpu/armv7/Makefile
@@ -41,6 +41,7 @@ endif
 obj-$(if $(filter am33xx,$(SOC)),y) += am33xx/
 obj-$(if $(filter armada-xp,$(SOC)),y) += armada-xp/
 obj-$(CONFIG_AT91FAMILY) += at91/
+obj-$(CONFIG_BCM2835) += bcm2835/
 obj-$(if $(filter bcm281xx,$(SOC)),y) += bcm281xx/
 obj-$(if $(filter bcmcygnus,$(SOC)),y) += bcmcygnus/
 obj-$(if $(filter bcmnsp,$(SOC)),y) += bcmnsp/
diff --git a/arch/arm/cpu/armv7/bcm2835/Makefile b/arch/arm/cpu/armv7/bcm2835/Makefile
new file mode 100644
index 000000000000..ed1ee4753d49
--- /dev/null
+++ b/arch/arm/cpu/armv7/bcm2835/Makefile
@@ -0,0 +1,13 @@
+#
+# (C) Copyright 2012 Stephen Warren
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+src_dir := ../../arm1176/bcm2835/
+
+obj-y	:=
+obj-y	+= $(src_dir)/init.o
+obj-y	+= $(src_dir)/reset.o
+obj-y	+= $(src_dir)/timer.o
+obj-y	+= $(src_dir)/mbox.o
diff --git a/arch/arm/include/asm/arch-bcm2835/gpio.h b/arch/arm/include/asm/arch-bcm2835/gpio.h
index db42896201b3..c8ef8f528a21 100644
--- a/arch/arm/include/asm/arch-bcm2835/gpio.h
+++ b/arch/arm/include/asm/arch-bcm2835/gpio.h
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2012 Vikram Narayananan
  * <vikram186@gmail.com>
+ * (C) Copyright 2012,2015 Stephen Warren
  *
  * SPDX-License-Identifier:	GPL-2.0+
  */
@@ -8,7 +9,11 @@
 #ifndef _BCM2835_GPIO_H_
 #define _BCM2835_GPIO_H_
 
+#ifdef CONFIG_BCM2836
+#define BCM2835_GPIO_BASE		0x3f200000
+#else
 #define BCM2835_GPIO_BASE		0x20200000
+#endif
 #define BCM2835_GPIO_COUNT		54
 
 #define BCM2835_GPIO_FSEL_MASK		0x7
diff --git a/arch/arm/include/asm/arch-bcm2835/mbox.h b/arch/arm/include/asm/arch-bcm2835/mbox.h
index 88d2ec11a7c2..c4bbacaf3c3f 100644
--- a/arch/arm/include/asm/arch-bcm2835/mbox.h
+++ b/arch/arm/include/asm/arch-bcm2835/mbox.h
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2012 Stephen Warren
+ * (C) Copyright 2012,2015 Stephen Warren
  *
  * SPDX-License-Identifier:	GPL-2.0+
  */
@@ -38,7 +38,11 @@
 
 /* Raw mailbox HW */
 
+#ifdef CONFIG_BCM2836
+#define BCM2835_MBOX_PHYSADDR	0x3f00b880
+#else
 #define BCM2835_MBOX_PHYSADDR	0x2000b880
+#endif
 
 struct bcm2835_mbox_regs {
 	u32 read;
diff --git a/arch/arm/include/asm/arch-bcm2835/sdhci.h b/arch/arm/include/asm/arch-bcm2835/sdhci.h
index da4d5cd5a88f..2a21ccbf66ba 100644
--- a/arch/arm/include/asm/arch-bcm2835/sdhci.h
+++ b/arch/arm/include/asm/arch-bcm2835/sdhci.h
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2012 Stephen Warren
+ * (C) Copyright 2012,2015 Stephen Warren
  *
  * SPDX-License-Identifier:	GPL-2.0
  */
@@ -7,7 +7,11 @@
 #ifndef _BCM2835_SDHCI_H_
 #define _BCM2835_SDHCI_H_
 
+#ifdef CONFIG_BCM2836
+#define BCM2835_SDHCI_BASE 0x3f300000
+#else
 #define BCM2835_SDHCI_BASE 0x20300000
+#endif
 
 int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq);
 
diff --git a/arch/arm/include/asm/arch-bcm2835/timer.h b/arch/arm/include/asm/arch-bcm2835/timer.h
index 2d7cfe5c56f8..fc7aec7b7c59 100644
--- a/arch/arm/include/asm/arch-bcm2835/timer.h
+++ b/arch/arm/include/asm/arch-bcm2835/timer.h
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2012 Stephen Warren
+ * (C) Copyright 2012,2015 Stephen Warren
  *
  * SPDX-License-Identifier:	GPL-2.0
  */
@@ -7,7 +7,11 @@
 #ifndef _BCM2835_TIMER_H
 #define _BCM2835_TIMER_H
 
+#ifdef CONFIG_BCM2836
+#define BCM2835_TIMER_PHYSADDR	0x3f003000
+#else
 #define BCM2835_TIMER_PHYSADDR	0x20003000
+#endif
 
 struct bcm2835_timer_regs {
 	u32 cs;
diff --git a/arch/arm/include/asm/arch-bcm2835/wdog.h b/arch/arm/include/asm/arch-bcm2835/wdog.h
index f369ab589c9a..beb6a0820601 100644
--- a/arch/arm/include/asm/arch-bcm2835/wdog.h
+++ b/arch/arm/include/asm/arch-bcm2835/wdog.h
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2012 Stephen Warren
+ * (C) Copyright 2012,2015 Stephen Warren
  *
  * SPDX-License-Identifier:	GPL-2.0
  */
@@ -7,7 +7,11 @@
 #ifndef _BCM2835_TIMER_H
 #define _BCM2835_TIMER_H
 
+#ifdef CONFIG_BCM2836
+#define BCM2835_WDOG_PHYSADDR			0x3f100000
+#else
 #define BCM2835_WDOG_PHYSADDR			0x20100000
+#endif
 
 struct bcm2835_wdog_regs {
 	u32 unknown0[7];
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
  2015-02-16 19:16 [U-Boot] [PATCH V3 1/3] bcm2835/rpi: add SPDX license tags for some files Stephen Warren
  2015-02-16 19:16 ` [U-Boot] [PATCH V3 2/3] bcm2836 SoC support (used in Raspberry Pi 2 model B) Stephen Warren
@ 2015-02-16 19:16 ` Stephen Warren
  2015-02-17  1:03   ` Tom Rini
  2015-02-22  2:57   ` Tom Rini
  2015-02-22  2:57 ` [U-Boot] [PATCH V3 1/3] bcm2835/rpi: add SPDX license tags for some files Tom Rini
  2 siblings, 2 replies; 17+ messages in thread
From: Stephen Warren @ 2015-02-16 19:16 UTC (permalink / raw)
  To: u-boot

USB doesn't seem to work yet; the controller detects the on-board Hub/
Ethernet device but can't read the descriptors from it. I haven't
investigated yet.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
---
v3: Rebased on top of u-boot-dm merge.
v2: Implement new board_rev decoding scheme, to avoid hard-coding the
board revision onthe RPi 2.
---
 arch/arm/Kconfig                         |   5 +
 arch/arm/cpu/arm1176/bcm2835/Kconfig     |   2 +-
 arch/arm/include/asm/arch-bcm2835/mbox.h |   4 +
 board/raspberrypi/rpi/rpi.c              |  28 ++++-
 board/raspberrypi/rpi_2/Kconfig          |  15 +++
 board/raspberrypi/rpi_2/MAINTAINERS      |   6 +
 board/raspberrypi/rpi_2/Makefile         |   7 ++
 configs/rpi_2_defconfig                  |   4 +
 include/configs/rpi-common.h             | 186 +++++++++++++++++++++++++++++++
 include/configs/rpi.h                    | 168 +---------------------------
 include/configs/rpi_2.h                  |  15 +++
 11 files changed, 271 insertions(+), 169 deletions(-)
 create mode 100644 board/raspberrypi/rpi_2/Kconfig
 create mode 100644 board/raspberrypi/rpi_2/MAINTAINERS
 create mode 100644 board/raspberrypi/rpi_2/Makefile
 create mode 100644 configs/rpi_2_defconfig
 create mode 100644 include/configs/rpi-common.h
 create mode 100644 include/configs/rpi_2.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 41f322058038..f62b38912daa 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -413,6 +413,10 @@ config TARGET_RPI
 	bool "Support rpi"
 	select CPU_ARM1176
 
+config TARGET_RPI_2
+	bool "Support rpi_2"
+	select CPU_V7
+
 config TARGET_TNETV107X_EVM
 	bool "Support tnetv107x_evm"
 	select CPU_ARM1176
@@ -975,6 +979,7 @@ source "board/phytec/pcm051/Kconfig"
 source "board/ppcag/bg0900/Kconfig"
 source "board/pxa255_idp/Kconfig"
 source "board/raspberrypi/rpi/Kconfig"
+source "board/raspberrypi/rpi_2/Kconfig"
 source "board/ronetix/pm9261/Kconfig"
 source "board/ronetix/pm9263/Kconfig"
 source "board/ronetix/pm9g45/Kconfig"
diff --git a/arch/arm/cpu/arm1176/bcm2835/Kconfig b/arch/arm/cpu/arm1176/bcm2835/Kconfig
index 94f57d732fe3..162f973f6cce 100644
--- a/arch/arm/cpu/arm1176/bcm2835/Kconfig
+++ b/arch/arm/cpu/arm1176/bcm2835/Kconfig
@@ -1,4 +1,4 @@
-if TARGET_RPI
+if TARGET_RPI || TARGET_RPI_2
 
 config DM
 	default y if !SPL_BUILD
diff --git a/arch/arm/include/asm/arch-bcm2835/mbox.h b/arch/arm/include/asm/arch-bcm2835/mbox.h
index c4bbacaf3c3f..04bf480a5493 100644
--- a/arch/arm/include/asm/arch-bcm2835/mbox.h
+++ b/arch/arm/include/asm/arch-bcm2835/mbox.h
@@ -125,6 +125,9 @@ struct bcm2835_mbox_tag_hdr {
 
 #define BCM2835_MBOX_TAG_GET_BOARD_REV	0x00010002
 
+#ifdef CONFIG_BCM2836
+#define BCM2836_BOARD_REV_2_B		0x4
+#else
 /*
  * 0x2..0xf from:
  * http://raspberryalphaomega.org.uk/2013/02/06/automatic-raspberry-pi-board-revision-detection-model-a-b1-and-b2/
@@ -145,6 +148,7 @@ struct bcm2835_mbox_tag_hdr {
 #define BCM2835_BOARD_REV_B_PLUS	0x10
 #define BCM2835_BOARD_REV_CM		0x11
 #define BCM2835_BOARD_REV_A_PLUS	0x12
+#endif
 
 struct bcm2835_mbox_tag_get_board_rev {
 	struct bcm2835_mbox_tag_hdr tag_hdr;
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index fdbf87d6fa79..50a699bb9e0c 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2012-2013 Stephen Warren
+ * (C) Copyright 2012-2013,2015 Stephen Warren
  *
  * SPDX-License-Identifier:	GPL-2.0
  */
@@ -29,7 +29,11 @@ U_BOOT_DEVICE(bcm2835_gpios) = {
 };
 
 static const struct pl01x_serial_platdata serial_platdata = {
+#ifdef CONFIG_BCM2836
+	.base = 0x3f201000,
+#else
 	.base = 0x20201000,
+#endif
 	.type = TYPE_PL011,
 	.clock = 3000000,
 };
@@ -77,9 +81,20 @@ static const struct {
 } models[] = {
 	[0] = {
 		"Unknown model",
+#ifdef CONFIG_BCM2836
+		"bcm2836-rpi-other.dtb",
+#else
 		"bcm2835-rpi-other.dtb",
+#endif
 		false,
 	},
+#ifdef CONFIG_BCM2836
+	[BCM2836_BOARD_REV_2_B] = {
+		"2 Model B",
+		"bcm2836-rpi-2-b.dtb",
+		true,
+	},
+#else
 	[BCM2835_BOARD_REV_B_I2C0_2] = {
 		"Model B (no P5)",
 		"bcm2835-rpi-b-i2c0.dtb",
@@ -150,6 +165,7 @@ static const struct {
 		"bcm2835-rpi-a-plus.dtb",
 		false,
 	},
+#endif
 };
 
 u32 rpi_board_rev = 0;
@@ -257,7 +273,15 @@ static void get_board_rev(void)
 		return;
 	}
 
+	/*
+	 * For details of old-vs-new scheme, see:
+	 * https://github.com/pimoroni/RPi.version/blob/master/RPi/version.py
+	 * http://www.raspberrypi.org/forums/viewtopic.php?f=63&t=99293&p=690282
+	 * (a few posts down)
+	 */
 	rpi_board_rev = msg->get_board_rev.body.resp.rev;
+	if (rpi_board_rev & 0x800000)
+		rpi_board_rev = (rpi_board_rev >> 4) & 0xff;
 	if (rpi_board_rev >= ARRAY_SIZE(models)) {
 		printf("RPI: Board rev %u outside known range\n",
 		       rpi_board_rev);
@@ -269,7 +293,7 @@ static void get_board_rev(void)
 	}
 
 	name = models[rpi_board_rev].name;
-	printf("RPI model: %s\n", name);
+	printf("RPI %s\n", name);
 }
 
 int board_init(void)
diff --git a/board/raspberrypi/rpi_2/Kconfig b/board/raspberrypi/rpi_2/Kconfig
new file mode 100644
index 000000000000..032184d5ad54
--- /dev/null
+++ b/board/raspberrypi/rpi_2/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_RPI_2
+
+config SYS_BOARD
+	default "rpi_2"
+
+config SYS_VENDOR
+	default "raspberrypi"
+
+config SYS_SOC
+	default "bcm2835"
+
+config SYS_CONFIG_NAME
+	default "rpi_2"
+
+endif
diff --git a/board/raspberrypi/rpi_2/MAINTAINERS b/board/raspberrypi/rpi_2/MAINTAINERS
new file mode 100644
index 000000000000..85a480c9d1b0
--- /dev/null
+++ b/board/raspberrypi/rpi_2/MAINTAINERS
@@ -0,0 +1,6 @@
+RPI_2 BOARD
+M:	Stephen Warren <swarren@wwwdotorg.org>
+S:	Maintained
+F:	board/raspberrypi/rpi_2/
+F:	include/configs/rpi_2.h
+F:	configs/rpi_2_defconfig
diff --git a/board/raspberrypi/rpi_2/Makefile b/board/raspberrypi/rpi_2/Makefile
new file mode 100644
index 000000000000..d82cd21f4cf7
--- /dev/null
+++ b/board/raspberrypi/rpi_2/Makefile
@@ -0,0 +1,7 @@
+#
+# (C) Copyright 2012,2015 Stephen Warren
+#
+# SPDX-License-Identifier:	GPL-2.0
+#
+
+obj-y	:= ../rpi/rpi.o
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
new file mode 100644
index 000000000000..b539d4a689e5
--- /dev/null
+++ b/configs/rpi_2_defconfig
@@ -0,0 +1,4 @@
+CONFIG_ARM=y
+CONFIG_TARGET_RPI_2=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/include/configs/rpi-common.h b/include/configs/rpi-common.h
new file mode 100644
index 000000000000..3121ac9874af
--- /dev/null
+++ b/include/configs/rpi-common.h
@@ -0,0 +1,186 @@
+/*
+ * (C) Copyright 2012,2015 Stephen Warren
+ *
+ * SPDX-License-Identifier:	GPL-2.0
+ */
+
+#ifndef _RPI_COMMON_H_
+#define _RPI_COMMON_H_
+
+#include <linux/sizes.h>
+
+/* Architecture, CPU, etc.*/
+#define CONFIG_SYS_GENERIC_BOARD
+#define CONFIG_BCM2835
+#define CONFIG_ARCH_CPU_INIT
+#define CONFIG_SYS_DCACHE_OFF
+/*
+ * 2835 is a SKU in a series for which the 2708 is the first or primary SoC,
+ * so 2708 has historically been used rather than a dedicated 2835 ID.
+ *
+ * We don't define a machine type for bcm2709/bcm2836 since the RPi Foundation
+ * chose to use someone else's previously registered machine ID (3139, MX51_GGC)
+ * rather than obtaining a valid ID:-/
+ */
+#ifndef CONFIG_BCM2836
+#define CONFIG_MACH_TYPE		MACH_TYPE_BCM2708
+#endif
+
+/* Memory layout */
+#define CONFIG_NR_DRAM_BANKS		1
+#define CONFIG_SYS_SDRAM_BASE		0x00000000
+#define CONFIG_SYS_TEXT_BASE		0x00008000
+#define CONFIG_SYS_UBOOT_BASE		CONFIG_SYS_TEXT_BASE
+/*
+ * The board really has 256M. However, the VC (VideoCore co-processor) shares
+ * the RAM, and uses a configurable portion at the top. We tell U-Boot that a
+ * smaller amount of RAM is present in order to avoid stomping on the area
+ * the VC uses.
+ */
+#define CONFIG_SYS_SDRAM_SIZE		SZ_128M
+#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + \
+					 CONFIG_SYS_SDRAM_SIZE - \
+					 GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_MALLOC_LEN		SZ_4M
+#define CONFIG_SYS_MEMTEST_START	0x00100000
+#define CONFIG_SYS_MEMTEST_END		0x00200000
+#define CONFIG_LOADADDR			0x00200000
+
+/* Flash */
+#define CONFIG_SYS_NO_FLASH
+
+/* Devices */
+/* GPIO */
+#define CONFIG_BCM2835_GPIO
+/* LCD */
+#define CONFIG_LCD
+#define CONFIG_LCD_DT_SIMPLEFB
+#define LCD_BPP				LCD_COLOR16
+/*
+ * Prevent allocation of RAM for FB; the real FB address is queried
+ * dynamically from the VideoCore co-processor, and comes from RAM
+ * not owned by the ARM CPU.
+ */
+#define CONFIG_FB_ADDR			0
+#define CONFIG_VIDEO_BCM2835
+#define CONFIG_SYS_WHITE_ON_BLACK
+
+/* SD/MMC configuration */
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MMC
+#define CONFIG_SDHCI
+#define CONFIG_MMC_SDHCI_IO_ACCESSORS
+#define CONFIG_BCM2835_SDHCI
+
+#define CONFIG_CMD_USB
+#ifdef CONFIG_CMD_USB
+#define CONFIG_USB_DWC2
+#ifdef CONFIG_BCM2836
+#define CONFIG_USB_DWC2_REG_ADDR 0x3f980000
+#else
+#define CONFIG_USB_DWC2_REG_ADDR 0x20980000
+#endif
+#define CONFIG_USB_STORAGE
+#define CONFIG_USB_HOST_ETHER
+#define CONFIG_USB_ETHER_SMSC95XX
+#define CONFIG_MISC_INIT_R
+#endif
+
+/* Console UART */
+#define CONFIG_PL01X_SERIAL
+#define CONFIG_CONS_INDEX		0
+#define CONFIG_BAUDRATE			115200
+
+/* Console configuration */
+#define CONFIG_SYS_CBSIZE		1024
+#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE +		\
+					 sizeof(CONFIG_SYS_PROMPT) + 16)
+
+/* Environment */
+#define CONFIG_ENV_SIZE			SZ_16K
+#define CONFIG_ENV_IS_IN_FAT
+#define FAT_ENV_INTERFACE		"mmc"
+#define FAT_ENV_DEVICE_AND_PART		"0:1"
+#define FAT_ENV_FILE			"uboot.env"
+#define CONFIG_FAT_WRITE
+#define CONFIG_ENV_VARS_UBOOT_CONFIG
+#define CONFIG_SYS_LOAD_ADDR		0x1000000
+#define CONFIG_CONSOLE_MUX
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+
+/* Shell */
+#define CONFIG_SYS_MAXARGS		8
+#define CONFIG_SYS_PROMPT		"U-Boot> "
+#define CONFIG_COMMAND_HISTORY
+
+/* Commands */
+#include <config_cmd_default.h>
+#define CONFIG_CMD_GPIO
+#define CONFIG_CMD_MMC
+#define CONFIG_PARTITION_UUIDS
+#define CONFIG_CMD_PART
+
+/* Device tree support */
+#define CONFIG_OF_BOARD_SETUP
+/* ATAGs support for bootm/bootz */
+#define CONFIG_SETUP_MEMORY_TAGS
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_INITRD_TAG
+
+#include <config_distro_defaults.h>
+
+/* Some things don't make sense on this HW or yet */
+#undef CONFIG_CMD_FPGA
+
+/* Environment */
+#define ENV_DEVICE_SETTINGS \
+	"stdin=serial,lcd\0" \
+	"stdout=serial,lcd\0" \
+	"stderr=serial,lcd\0"
+
+/*
+ * Memory layout for where various images get loaded by boot scripts:
+ *
+ * scriptaddr can be pretty much anywhere that doesn't conflict with something
+ *   else. Put it low in memory to avoid conflicts.
+ *
+ * pxefile_addr_r can be pretty much anywhere that doesn't conflict with
+ *   something else. Put it low in memory to avoid conflicts.
+ *
+ * kernel_addr_r must be within the first 128M of RAM in order for the
+ *   kernel's CONFIG_AUTO_ZRELADDR option to work. Since the kernel will
+ *   decompress itself to 0x8000 after the start of RAM, kernel_addr_r
+ *   should not overlap that area, or the kernel will have to copy itself
+ *   somewhere else before decompression. Similarly, the address of any other
+ *   data passed to the kernel shouldn't overlap the start of RAM. Pushing
+ *   this up to 16M allows for a sizable kernel to be decompressed below the
+ *   compressed load address.
+ *
+ * fdt_addr_r simply shouldn't overlap anything else. Choosing 32M allows for
+ *   the compressed kernel to be up to 16M too.
+ *
+ * ramdisk_addr_r simply shouldn't overlap anything else. Choosing 33M allows
+ *   for the FDT/DTB to be up to 1M, which is hopefully plenty.
+ */
+#define ENV_MEM_LAYOUT_SETTINGS \
+	"scriptaddr=0x00000000\0" \
+	"pxefile_addr_r=0x00100000\0" \
+	"kernel_addr_r=0x01000000\0" \
+	"fdt_addr_r=0x02000000\0" \
+	"ramdisk_addr_r=0x02100000\0" \
+
+#define BOOT_TARGET_DEVICES(func) \
+	func(MMC, mmc, 0) \
+	func(USB, usb, 0) \
+	func(PXE, pxe, na) \
+	func(DHCP, dhcp, na)
+#include <config_distro_bootcmd.h>
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	ENV_DEVICE_SETTINGS \
+	ENV_MEM_LAYOUT_SETTINGS \
+	BOOTENV
+
+#define CONFIG_BOOTDELAY 2
+
+#endif
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index 9b32149b0ea3..ab2f4db39fec 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2012 Stephen Warren
+ * (C) Copyright 2012,2015 Stephen Warren
  *
  * SPDX-License-Identifier:	GPL-2.0
  */
@@ -7,170 +7,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#include <linux/sizes.h>
-
-/* Architecture, CPU, etc.*/
-#define CONFIG_SYS_GENERIC_BOARD
-#define CONFIG_BCM2835
-#define CONFIG_ARCH_CPU_INIT
-#define CONFIG_SYS_DCACHE_OFF
-/*
- * 2835 is a SKU in a series for which the 2708 is the first or primary SoC,
- * so 2708 has historically been used rather than a dedicated 2835 ID.
- */
-#define CONFIG_MACH_TYPE		MACH_TYPE_BCM2708
-
-/* Memory layout */
-#define CONFIG_NR_DRAM_BANKS		1
-#define CONFIG_SYS_SDRAM_BASE		0x00000000
-#define CONFIG_SYS_TEXT_BASE		0x00008000
-#define CONFIG_SYS_UBOOT_BASE		CONFIG_SYS_TEXT_BASE
-/*
- * The board really has 256M. However, the VC (VideoCore co-processor) shares
- * the RAM, and uses a configurable portion at the top. We tell U-Boot that a
- * smaller amount of RAM is present in order to avoid stomping on the area
- * the VC uses.
- */
-#define CONFIG_SYS_SDRAM_SIZE		SZ_128M
-#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + \
-					 CONFIG_SYS_SDRAM_SIZE - \
-					 GENERATED_GBL_DATA_SIZE)
-#define CONFIG_SYS_MALLOC_LEN		SZ_4M
-#define CONFIG_SYS_MEMTEST_START	0x00100000
-#define CONFIG_SYS_MEMTEST_END		0x00200000
-#define CONFIG_LOADADDR			0x00200000
-
-/* Flash */
-#define CONFIG_SYS_NO_FLASH
-
-/* Devices */
-/* GPIO */
-#define CONFIG_BCM2835_GPIO
-/* LCD */
-#define CONFIG_LCD
-#define CONFIG_LCD_DT_SIMPLEFB
-#define LCD_BPP				LCD_COLOR16
-/*
- * Prevent allocation of RAM for FB; the real FB address is queried
- * dynamically from the VideoCore co-processor, and comes from RAM
- * not owned by the ARM CPU.
- */
-#define CONFIG_FB_ADDR			0
-#define CONFIG_VIDEO_BCM2835
-#define CONFIG_SYS_WHITE_ON_BLACK
-
-/* SD/MMC configuration */
-#define CONFIG_GENERIC_MMC
-#define CONFIG_MMC
-#define CONFIG_SDHCI
-#define CONFIG_MMC_SDHCI_IO_ACCESSORS
-#define CONFIG_BCM2835_SDHCI
-
-#define CONFIG_CMD_USB
-#ifdef CONFIG_CMD_USB
-#define CONFIG_USB_DWC2
-#define CONFIG_USB_DWC2_REG_ADDR 0x20980000
-#define CONFIG_USB_STORAGE
-#define CONFIG_USB_HOST_ETHER
-#define CONFIG_USB_ETHER_SMSC95XX
-#define CONFIG_MISC_INIT_R
-#endif
-
-/* Console UART */
-#define CONFIG_PL01X_SERIAL
-#define CONFIG_CONS_INDEX		0
-#define CONFIG_BAUDRATE			115200
-
-/* Console configuration */
-#define CONFIG_SYS_CBSIZE		1024
-#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE +		\
-					 sizeof(CONFIG_SYS_PROMPT) + 16)
-
-/* Environment */
-#define CONFIG_ENV_SIZE			SZ_16K
-#define CONFIG_ENV_IS_IN_FAT
-#define FAT_ENV_INTERFACE		"mmc"
-#define FAT_ENV_DEVICE_AND_PART		"0:1"
-#define FAT_ENV_FILE			"uboot.env"
-#define CONFIG_FAT_WRITE
-#define CONFIG_ENV_VARS_UBOOT_CONFIG
-#define CONFIG_SYS_LOAD_ADDR		0x1000000
-#define CONFIG_CONSOLE_MUX
-#define CONFIG_SYS_CONSOLE_IS_IN_ENV
-
-/* Shell */
-#define CONFIG_SYS_MAXARGS		8
-#define CONFIG_SYS_PROMPT		"U-Boot> "
-#define CONFIG_COMMAND_HISTORY
-
-/* Commands */
-#include <config_cmd_default.h>
-#define CONFIG_CMD_GPIO
-#define CONFIG_CMD_MMC
-#define CONFIG_PARTITION_UUIDS
-#define CONFIG_CMD_PART
-
-/* Device tree support */
-#define CONFIG_OF_BOARD_SETUP
-/* ATAGs support for bootm/bootz */
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_INITRD_TAG
-
-#include <config_distro_defaults.h>
-
-/* Some things don't make sense on this HW or yet */
-#undef CONFIG_CMD_FPGA
-
-/* Environment */
-#define ENV_DEVICE_SETTINGS \
-	"stdin=serial,lcd\0" \
-	"stdout=serial,lcd\0" \
-	"stderr=serial,lcd\0"
-
-/*
- * Memory layout for where various images get loaded by boot scripts:
- *
- * scriptaddr can be pretty much anywhere that doesn't conflict with something
- *   else. Put it low in memory to avoid conflicts.
- *
- * pxefile_addr_r can be pretty much anywhere that doesn't conflict with
- *   something else. Put it low in memory to avoid conflicts.
- *
- * kernel_addr_r must be within the first 128M of RAM in order for the
- *   kernel's CONFIG_AUTO_ZRELADDR option to work. Since the kernel will
- *   decompress itself to 0x8000 after the start of RAM, kernel_addr_r
- *   should not overlap that area, or the kernel will have to copy itself
- *   somewhere else before decompression. Similarly, the address of any other
- *   data passed to the kernel shouldn't overlap the start of RAM. Pushing
- *   this up to 16M allows for a sizable kernel to be decompressed below the
- *   compressed load address.
- *
- * fdt_addr_r simply shouldn't overlap anything else. Choosing 32M allows for
- *   the compressed kernel to be up to 16M too.
- *
- * ramdisk_addr_r simply shouldn't overlap anything else. Choosing 33M allows
- *   for the FDT/DTB to be up to 1M, which is hopefully plenty.
- */
-#define ENV_MEM_LAYOUT_SETTINGS \
-	"scriptaddr=0x00000000\0" \
-	"pxefile_addr_r=0x00100000\0" \
-	"kernel_addr_r=0x01000000\0" \
-	"fdt_addr_r=0x02000000\0" \
-	"ramdisk_addr_r=0x02100000\0" \
-
-#define BOOT_TARGET_DEVICES(func) \
-	func(MMC, mmc, 0) \
-	func(USB, usb, 0) \
-	func(PXE, pxe, na) \
-	func(DHCP, dhcp, na)
-#include <config_distro_bootcmd.h>
-
-#define CONFIG_EXTRA_ENV_SETTINGS \
-	ENV_DEVICE_SETTINGS \
-	ENV_MEM_LAYOUT_SETTINGS \
-	BOOTENV
-
-#define CONFIG_BOOTDELAY 2
+#include "rpi-common.h"
 
 #endif
diff --git a/include/configs/rpi_2.h b/include/configs/rpi_2.h
new file mode 100644
index 000000000000..2e7e74fd563b
--- /dev/null
+++ b/include/configs/rpi_2.h
@@ -0,0 +1,15 @@
+/*
+ * (C) Copyright 2012,2015 Stephen Warren
+ *
+ * SPDX-License-Identifier:	GPL-2.0
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_BCM2836
+
+#include "rpi-common.h"
+
+#endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
  2015-02-16 19:16 ` [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B Stephen Warren
@ 2015-02-17  1:03   ` Tom Rini
  2015-02-17  4:09     ` Stephen Warren
  2015-02-17 19:35     ` Stephen Warren
  2015-02-22  2:57   ` Tom Rini
  1 sibling, 2 replies; 17+ messages in thread
From: Tom Rini @ 2015-02-17  1:03 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren wrote:

> USB doesn't seem to work yet; the controller detects the on-board Hub/
> Ethernet device but can't read the descriptors from it. I haven't
> investigated yet.
> 
> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
> ---
> v3: Rebased on top of u-boot-dm merge.
> v2: Implement new board_rev decoding scheme, to avoid hard-coding the
> board revision onthe RPi 2.

+(rpi_2) make[3]: *** No rule to make target
`arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o', needed by
`arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop.
+(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2
+(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2

When I try and build it with buildman.  Something get left out
somewhere?  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150216/e863d7ab/attachment.sig>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
  2015-02-17  1:03   ` Tom Rini
@ 2015-02-17  4:09     ` Stephen Warren
  2015-02-17  4:15       ` Simon Glass
  2015-02-17 19:35     ` Stephen Warren
  1 sibling, 1 reply; 17+ messages in thread
From: Stephen Warren @ 2015-02-17  4:09 UTC (permalink / raw)
  To: u-boot

On 02/16/2015 06:03 PM, Tom Rini wrote:
> On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren wrote:
> 
>> USB doesn't seem to work yet; the controller detects the on-board
>> Hub/ Ethernet device but can't read the descriptors from it. I
>> haven't investigated yet.
>> 
>> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> --- v3:
>> Rebased on top of u-boot-dm merge. v2: Implement new board_rev
>> decoding scheme, to avoid hard-coding the board revision onthe
>> RPi 2.
> 
> +(rpi_2) make[3]: *** No rule to make target 
> `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o', needed
> by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop. +(rpi_2)
> make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 +(rpi_2) make[1]:
> *** [arch/arm/cpu/armv7] Error 2
> 
> When I try and build it with buildman.  Something get left out 
> somewhere?  Thanks!

It works fine for me using make:

export CROSS_COMPILE=arm-linux-gnueabi-
make ARCH=arm rpi_2_defconfig && make ARCH=arm -j8 -s

git status doesn't think I forgot to check anything in. The build
works after git clean -f -d -x.

I can't remember how to run buildman, and the help text doesn't really
clue me in. I guess I'll go wade through the README.

Do the commits at the following git branch work any better for you? I
just rebased them on the latest u-boot.git master branch:

git://github.com/swarren/u-boot.git rpi_dev

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
  2015-02-17  4:09     ` Stephen Warren
@ 2015-02-17  4:15       ` Simon Glass
  2015-02-17  4:19         ` Stephen Warren
  0 siblings, 1 reply; 17+ messages in thread
From: Simon Glass @ 2015-02-17  4:15 UTC (permalink / raw)
  To: u-boot

Hi Stephen,

On 16 February 2015 at 21:09, Stephen Warren <swarren@wwwdotorg.org> wrote:
>
> On 02/16/2015 06:03 PM, Tom Rini wrote:
> > On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren wrote:
> >
> >> USB doesn't seem to work yet; the controller detects the on-board
> >> Hub/ Ethernet device but can't read the descriptors from it. I
> >> haven't investigated yet.
> >>
> >> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> --- v3:
> >> Rebased on top of u-boot-dm merge. v2: Implement new board_rev
> >> decoding scheme, to avoid hard-coding the board revision onthe
> >> RPi 2.
> >
> > +(rpi_2) make[3]: *** No rule to make target
> > `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o', needed
> > by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop. +(rpi_2)
> > make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 +(rpi_2) make[1]:
> > *** [arch/arm/cpu/armv7] Error 2
> >
> > When I try and build it with buildman.  Something get left out
> > somewhere?  Thanks!
>
> It works fine for me using make:
>
> export CROSS_COMPILE=arm-linux-gnueabi-
> make ARCH=arm rpi_2_defconfig && make ARCH=arm -j8 -s
>
> git status doesn't think I forgot to check anything in. The build
> works after git clean -f -d -x.
>
> I can't remember how to run buildman, and the help text doesn't really
> clue me in. I guess I'll go wade through the README.
>

Well worth it :-)

Something like this might work for you:

buildman --fetch-arch arm
buildman rpi_2

or if you want to build the whole branch:

buildman -b <local_branch> rpi_2

Regards,
Simon

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
  2015-02-17  4:15       ` Simon Glass
@ 2015-02-17  4:19         ` Stephen Warren
  2015-02-18  2:39           ` Simon Glass
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Warren @ 2015-02-17  4:19 UTC (permalink / raw)
  To: u-boot

On 02/16/2015 09:15 PM, Simon Glass wrote:
> Hi Stephen,
> 
> On 16 February 2015 at 21:09, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>
>> On 02/16/2015 06:03 PM, Tom Rini wrote:
>>> On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren wrote:
>>>
>>>> USB doesn't seem to work yet; the controller detects the on-board
>>>> Hub/ Ethernet device but can't read the descriptors from it. I
>>>> haven't investigated yet.
>>>>
>>>> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> --- v3:
>>>> Rebased on top of u-boot-dm merge. v2: Implement new board_rev
>>>> decoding scheme, to avoid hard-coding the board revision onthe
>>>> RPi 2.
>>>
>>> +(rpi_2) make[3]: *** No rule to make target
>>> `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o', needed
>>> by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop. +(rpi_2)
>>> make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 +(rpi_2) make[1]:
>>> *** [arch/arm/cpu/armv7] Error 2
>>>
>>> When I try and build it with buildman.  Something get left out
>>> somewhere?  Thanks!
>>
>> It works fine for me using make:
>>
>> export CROSS_COMPILE=arm-linux-gnueabi-
>> make ARCH=arm rpi_2_defconfig && make ARCH=arm -j8 -s
>>
>> git status doesn't think I forgot to check anything in. The build
>> works after git clean -f -d -x.
>>
>> I can't remember how to run buildman, and the help text doesn't really
>> clue me in. I guess I'll go wade through the README.
>>
> 
> Well worth it :-)
> 
> Something like this might work for you:
> 
> buildman --fetch-arch arm
> buildman rpi_2
> 
> or if you want to build the whole branch:
> 
> buildman -b <local_branch> rpi_2

What do I put into ~/.buildman's toolchain section (and why can't it
just automatically pick it up from the CROSS_COMPILE environment
variable)? I usually set CROSS_COMPILE to arm-linux-gnueabi- to point at
Ubuntu's system packaged compiler. However, none of the following works,
since buildman seems to require a compiler that's placed into its own
directory rather than /usr/bin:

[toolchain]
xxx1: /usr/bin/arm-linux-gnueabi-gcc
xxx2: arm-linux-gnueabi-gcc
xxx3: /usr/bin/arm-linux-gnueabi-
xxx4: arm-linux-gnueabi-
xxx5: /usr/bin/arm-linux-gnueabi
xxx6: arm-linux-gnueabi

[swarren at dart u-boot.git]$ ./tools/buildman/buildman --list-tool-chains
Scanning for tool chains
   - scanning path '/usr/bin/arm-linux-gnueabi-gcc'
      - looking in '/usr/bin/arm-linux-gnueabi-gcc/.'
      - looking in '/usr/bin/arm-linux-gnueabi-gcc/bin'
      - looking in '/usr/bin/arm-linux-gnueabi-gcc/usr/bin'
   - scanning path 'arm-linux-gnueabi-gcc'
      - looking in 'arm-linux-gnueabi-gcc/.'
      - looking in 'arm-linux-gnueabi-gcc/bin'
      - looking in 'arm-linux-gnueabi-gcc/usr/bin'
   - scanning path '/usr/bin/arm-linux-gnueabi-'
      - looking in '/usr/bin/arm-linux-gnueabi-/.'
      - looking in '/usr/bin/arm-linux-gnueabi-/bin'
      - looking in '/usr/bin/arm-linux-gnueabi-/usr/bin'
   - scanning path 'arm-linux-gnueabi-'
      - looking in 'arm-linux-gnueabi-/.'
      - looking in 'arm-linux-gnueabi-/bin'
      - looking in 'arm-linux-gnueabi-/usr/bin'
   - scanning path '/usr/bin/arm-linux-gnueabi'
      - looking in '/usr/bin/arm-linux-gnueabi/.'
      - looking in '/usr/bin/arm-linux-gnueabi/bin'
      - looking in '/usr/bin/arm-linux-gnueabi/usr/bin'
   - scanning path 'arm-linux-gnueabi'
      - looking in 'arm-linux-gnueabi/.'
      - looking in 'arm-linux-gnueabi/bin'
      - looking in 'arm-linux-gnueabi/usr/bin'
List of available toolchains (0):
None

I'm not going to download a whole new toolchain just to use a different
build tool. I thought I had this working on my work machine before, but
I have no idea how I had that configured.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
  2015-02-17  1:03   ` Tom Rini
  2015-02-17  4:09     ` Stephen Warren
@ 2015-02-17 19:35     ` Stephen Warren
  2015-02-17 20:22       ` Tom Rini
  1 sibling, 1 reply; 17+ messages in thread
From: Stephen Warren @ 2015-02-17 19:35 UTC (permalink / raw)
  To: u-boot

On 02/16/2015 06:03 PM, Tom Rini wrote:
> On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren wrote:
>
>> USB doesn't seem to work yet; the controller detects the on-board Hub/
>> Ethernet device but can't read the descriptors from it. I haven't
>> investigated yet.
>>
>> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
>> ---
>> v3: Rebased on top of u-boot-dm merge.
>> v2: Implement new board_rev decoding scheme, to avoid hard-coding the
>> board revision onthe RPi 2.
>
> +(rpi_2) make[3]: *** No rule to make target
> `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o', needed by
> `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop.
> +(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2
> +(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2
>
> When I try and build it with buildman.  Something get left out
> somewhere?  Thanks!

I've reproduced this error on my machine at work, where I previously 
worked out the right stuff to put into ~/.buildman.

Now that I try the regular build process (in-tree build using just make) 
multiple times after a "git clean -f -d -x" , I see the same error that 
way too, sometimes, so it's nothing to do with buildman.

However, I don't always get the error with either plain make or with 
buildman, and it doesn't always complain about the same file:

> +make[1]: *** No rule to make target `arch//cpu/u-boot.lds', needed by `u-boot.lds'.  Stop.

> +make[3]: *** No rule to make target `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o', needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop.

This isn't anything to do with these patches; I can see the exact same 
issue building the following existing boards in unmodified u-boot/master:

rpi (arm1176, no SPL)
tnetv107x_evm_defconfigs (arm1176 no SPL)
mx35pdk_defconfig (arm1136, no SPL)
nhk8815_defconfig (arm926ejs, no SPL)
imx27lite_defconfig (arm926ejs, SPL)
vexpress_ca15_tc2_defconfig (ARMv7, no SPL)

Strangely I don't see the issue for:

seaboard (ARMv7, SPL)
maxbcm_defconfig (ARMv7, SPL)

I wonder if bisecting would show up where this issue was introduced.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
  2015-02-17 19:35     ` Stephen Warren
@ 2015-02-17 20:22       ` Tom Rini
  2015-02-19  6:00         ` Stephen Warren
  0 siblings, 1 reply; 17+ messages in thread
From: Tom Rini @ 2015-02-17 20:22 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 17, 2015 at 12:35:41PM -0700, Stephen Warren wrote:
> On 02/16/2015 06:03 PM, Tom Rini wrote:
> >On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren wrote:
> >
> >>USB doesn't seem to work yet; the controller detects the on-board Hub/
> >>Ethernet device but can't read the descriptors from it. I haven't
> >>investigated yet.
> >>
> >>Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
> >>---
> >>v3: Rebased on top of u-boot-dm merge.
> >>v2: Implement new board_rev decoding scheme, to avoid hard-coding the
> >>board revision onthe RPi 2.
> >
> >+(rpi_2) make[3]: *** No rule to make target
> >`arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o', needed by
> >`arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop.
> >+(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2
> >+(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2
> >
> >When I try and build it with buildman.  Something get left out
> >somewhere?  Thanks!
> 
> I've reproduced this error on my machine at work, where I previously
> worked out the right stuff to put into ~/.buildman.
> 
> Now that I try the regular build process (in-tree build using just
> make) multiple times after a "git clean -f -d -x" , I see the same
> error that way too, sometimes, so it's nothing to do with buildman.
> 
> However, I don't always get the error with either plain make or with
> buildman, and it doesn't always complain about the same file:
> 
> >+make[1]: *** No rule to make target `arch//cpu/u-boot.lds', needed by `u-boot.lds'.  Stop.
> 
> >+make[3]: *** No rule to make target `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o', needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop.
> 
> This isn't anything to do with these patches; I can see the exact
> same issue building the following existing boards in unmodified
> u-boot/master:
> 
> rpi (arm1176, no SPL)
> tnetv107x_evm_defconfigs (arm1176 no SPL)
> mx35pdk_defconfig (arm1136, no SPL)
> nhk8815_defconfig (arm926ejs, no SPL)
> imx27lite_defconfig (arm926ejs, SPL)
> vexpress_ca15_tc2_defconfig (ARMv7, no SPL)
> 
> Strangely I don't see the issue for:
> 
> seaboard (ARMv7, SPL)
> maxbcm_defconfig (ARMv7, SPL)
> 
> I wonder if bisecting would show up where this issue was introduced.

I bet it will and I bet it's when we switch to Kconfig.  Masahiro, any
ideas?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150217/8893be97/attachment.sig>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
  2015-02-17  4:19         ` Stephen Warren
@ 2015-02-18  2:39           ` Simon Glass
  0 siblings, 0 replies; 17+ messages in thread
From: Simon Glass @ 2015-02-18  2:39 UTC (permalink / raw)
  To: u-boot

Hi Stephen,

On 16 February 2015 at 21:19, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 02/16/2015 09:15 PM, Simon Glass wrote:
>> Hi Stephen,
>>
>> On 16 February 2015 at 21:09, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>>
>>> On 02/16/2015 06:03 PM, Tom Rini wrote:
>>>> On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren wrote:
>>>>
>>>>> USB doesn't seem to work yet; the controller detects the on-board
>>>>> Hub/ Ethernet device but can't read the descriptors from it. I
>>>>> haven't investigated yet.
>>>>>
>>>>> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> --- v3:
>>>>> Rebased on top of u-boot-dm merge. v2: Implement new board_rev
>>>>> decoding scheme, to avoid hard-coding the board revision onthe
>>>>> RPi 2.
>>>>
>>>> +(rpi_2) make[3]: *** No rule to make target
>>>> `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o', needed
>>>> by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop. +(rpi_2)
>>>> make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 +(rpi_2) make[1]:
>>>> *** [arch/arm/cpu/armv7] Error 2
>>>>
>>>> When I try and build it with buildman.  Something get left out
>>>> somewhere?  Thanks!
>>>
>>> It works fine for me using make:
>>>
>>> export CROSS_COMPILE=arm-linux-gnueabi-
>>> make ARCH=arm rpi_2_defconfig && make ARCH=arm -j8 -s
>>>
>>> git status doesn't think I forgot to check anything in. The build
>>> works after git clean -f -d -x.
>>>
>>> I can't remember how to run buildman, and the help text doesn't really
>>> clue me in. I guess I'll go wade through the README.
>>>
>>
>> Well worth it :-)
>>
>> Something like this might work for you:
>>
>> buildman --fetch-arch arm
>> buildman rpi_2
>>
>> or if you want to build the whole branch:
>>
>> buildman -b <local_branch> rpi_2
>
> What do I put into ~/.buildman's toolchain section (and why can't it
> just automatically pick it up from the CROSS_COMPILE environment
> variable)? I usually set CROSS_COMPILE to arm-linux-gnueabi- to point at
> Ubuntu's system packaged compiler. However, none of the following works,
> since buildman seems to require a compiler that's placed into its own
> directory rather than /usr/bin:
>
> [toolchain]
> xxx1: /usr/bin/arm-linux-gnueabi-gcc
> xxx2: arm-linux-gnueabi-gcc
> xxx3: /usr/bin/arm-linux-gnueabi-
> xxx4: arm-linux-gnueabi-
> xxx5: /usr/bin/arm-linux-gnueabi
> xxx6: arm-linux-gnueabi
>
> [swarren at dart u-boot.git]$ ./tools/buildman/buildman --list-tool-chains
> Scanning for tool chains
>    - scanning path '/usr/bin/arm-linux-gnueabi-gcc'
>       - looking in '/usr/bin/arm-linux-gnueabi-gcc/.'
>       - looking in '/usr/bin/arm-linux-gnueabi-gcc/bin'
>       - looking in '/usr/bin/arm-linux-gnueabi-gcc/usr/bin'
>    - scanning path 'arm-linux-gnueabi-gcc'
>       - looking in 'arm-linux-gnueabi-gcc/.'
>       - looking in 'arm-linux-gnueabi-gcc/bin'
>       - looking in 'arm-linux-gnueabi-gcc/usr/bin'
>    - scanning path '/usr/bin/arm-linux-gnueabi-'
>       - looking in '/usr/bin/arm-linux-gnueabi-/.'
>       - looking in '/usr/bin/arm-linux-gnueabi-/bin'
>       - looking in '/usr/bin/arm-linux-gnueabi-/usr/bin'
>    - scanning path 'arm-linux-gnueabi-'
>       - looking in 'arm-linux-gnueabi-/.'
>       - looking in 'arm-linux-gnueabi-/bin'
>       - looking in 'arm-linux-gnueabi-/usr/bin'
>    - scanning path '/usr/bin/arm-linux-gnueabi'
>       - looking in '/usr/bin/arm-linux-gnueabi/.'
>       - looking in '/usr/bin/arm-linux-gnueabi/bin'
>       - looking in '/usr/bin/arm-linux-gnueabi/usr/bin'
>    - scanning path 'arm-linux-gnueabi'
>       - looking in 'arm-linux-gnueabi/.'
>       - looking in 'arm-linux-gnueabi/bin'
>       - looking in 'arm-linux-gnueabi/usr/bin'
> List of available toolchains (0):
> None
>
> I'm not going to download a whole new toolchain just to use a different
> build tool. I thought I had this working on my work machine before, but
> I have no idea how I had that configured.

That's up to you, just trying to help.

You probably want:

xxx1: /

$ ./tools/buildman/buildman -H
...
This selects the available toolchain paths. Add the base directory for
each of your toolchains here. Buildman will search inside these directories
and also in any '/usr' and '/usr/bin' subdirectories.
...

Regards,
Simon

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
  2015-02-17 20:22       ` Tom Rini
@ 2015-02-19  6:00         ` Stephen Warren
  2015-02-19  8:50           ` Masahiro Yamada
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Warren @ 2015-02-19  6:00 UTC (permalink / raw)
  To: u-boot

On 02/17/2015 01:22 PM, Tom Rini wrote:
> On Tue, Feb 17, 2015 at 12:35:41PM -0700, Stephen Warren wrote:
>> On 02/16/2015 06:03 PM, Tom Rini wrote:
>>> On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren
>>> wrote:
>>> 
>>>> USB doesn't seem to work yet; the controller detects the
>>>> on-board Hub/ Ethernet device but can't read the descriptors
>>>> from it. I haven't investigated yet.
>>>> 
>>>> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> --- v3:
>>>> Rebased on top of u-boot-dm merge. v2: Implement new
>>>> board_rev decoding scheme, to avoid hard-coding the board
>>>> revision onthe RPi 2.
>>> 
>>> +(rpi_2) make[3]: *** No rule to make target 
>>> `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o',
>>> needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop. 
>>> +(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 
>>> +(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2
>>> 
>>> When I try and build it with buildman.  Something get left out 
>>> somewhere?  Thanks!
>> 
>> I've reproduced this error on my machine at work, where I
>> previously worked out the right stuff to put into ~/.buildman.
>> 
>> Now that I try the regular build process (in-tree build using
>> just make) multiple times after a "git clean -f -d -x" , I see
>> the same error that way too, sometimes, so it's nothing to do
>> with buildman.
>> 
>> However, I don't always get the error with either plain make or
>> with buildman, and it doesn't always complain about the same
>> file:
>> 
>>> +make[1]: *** No rule to make target `arch//cpu/u-boot.lds',
>>> needed by `u-boot.lds'.  Stop.
>> 
>>> +make[3]: *** No rule to make target
>>> `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o',
>>> needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop.
>> 
>> This isn't anything to do with these patches; I can see the
>> exact same issue building the following existing boards in
>> unmodified u-boot/master:
>> 
>> rpi (arm1176, no SPL) tnetv107x_evm_defconfigs (arm1176 no SPL) 
>> mx35pdk_defconfig (arm1136, no SPL) nhk8815_defconfig (arm926ejs,
>> no SPL) imx27lite_defconfig (arm926ejs, SPL) 
>> vexpress_ca15_tc2_defconfig (ARMv7, no SPL)
>> 
>> Strangely I don't see the issue for:
>> 
>> seaboard (ARMv7, SPL) maxbcm_defconfig (ARMv7, SPL)
>> 
>> I wonder if bisecting would show up where this issue was
>> introduced.
> 
> I bet it will and I bet it's when we switch to Kconfig.  Masahiro,
> any ideas?

Yes, a git bisect (running up to 100 successful builds to test each
commit, or failing on the first failure) says:

first bad commit: [51148790f26e42ef1fd4a1a8d056bf0252539525]
kconfig: switch to Kconfig

(which was applied at the end of July last year)

Interesting: The problem never seems to happen on my laptop (where I
do all my rpi dev work), but is quite easy to reproduce on my faster
machine at work. I would guess it only affects parallel builds in
certain timing circumstances, but haven't checked that.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
  2015-02-19  6:00         ` Stephen Warren
@ 2015-02-19  8:50           ` Masahiro Yamada
  2015-02-19 12:18             ` Tom Rini
  2015-03-24 15:36             ` Stephen Warren
  0 siblings, 2 replies; 17+ messages in thread
From: Masahiro Yamada @ 2015-02-19  8:50 UTC (permalink / raw)
  To: u-boot

Hi.



On Wed, 18 Feb 2015 23:00:36 -0700
Stephen Warren <swarren@wwwdotorg.org> wrote:

> On 02/17/2015 01:22 PM, Tom Rini wrote:
> > On Tue, Feb 17, 2015 at 12:35:41PM -0700, Stephen Warren wrote:
> >> On 02/16/2015 06:03 PM, Tom Rini wrote:
> >>> On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren
> >>> wrote:
> >>> 
> >>>> USB doesn't seem to work yet; the controller detects the
> >>>> on-board Hub/ Ethernet device but can't read the descriptors
> >>>> from it. I haven't investigated yet.
> >>>> 
> >>>> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> --- v3:
> >>>> Rebased on top of u-boot-dm merge. v2: Implement new
> >>>> board_rev decoding scheme, to avoid hard-coding the board
> >>>> revision onthe RPi 2.
> >>> 
> >>> +(rpi_2) make[3]: *** No rule to make target 
> >>> `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o',
> >>> needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop. 
> >>> +(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 
> >>> +(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2
> >>> 
> >>> When I try and build it with buildman.  Something get left out 
> >>> somewhere?  Thanks!
> >> 
> >> I've reproduced this error on my machine at work, where I
> >> previously worked out the right stuff to put into ~/.buildman.
> >> 
> >> Now that I try the regular build process (in-tree build using
> >> just make) multiple times after a "git clean -f -d -x" , I see
> >> the same error that way too, sometimes, so it's nothing to do
> >> with buildman.
> >> 
> >> However, I don't always get the error with either plain make or
> >> with buildman, and it doesn't always complain about the same
> >> file:
> >> 
> >>> +make[1]: *** No rule to make target `arch//cpu/u-boot.lds',
> >>> needed by `u-boot.lds'.  Stop.
> >> 
> >>> +make[3]: *** No rule to make target
> >>> `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o',
> >>> needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop.
> >> 
> >> This isn't anything to do with these patches; I can see the
> >> exact same issue building the following existing boards in
> >> unmodified u-boot/master:
> >> 
> >> rpi (arm1176, no SPL) tnetv107x_evm_defconfigs (arm1176 no SPL) 
> >> mx35pdk_defconfig (arm1136, no SPL) nhk8815_defconfig (arm926ejs,
> >> no SPL) imx27lite_defconfig (arm926ejs, SPL) 
> >> vexpress_ca15_tc2_defconfig (ARMv7, no SPL)
> >> 
> >> Strangely I don't see the issue for:
> >> 
> >> seaboard (ARMv7, SPL) maxbcm_defconfig (ARMv7, SPL)
> >> 
> >> I wonder if bisecting would show up where this issue was
> >> introduced.
> > 
> > I bet it will and I bet it's when we switch to Kconfig.  Masahiro,
> > any ideas?
> 
> Yes, a git bisect (running up to 100 successful builds to test each
> commit, or failing on the first failure) says:
> 
> first bad commit: [51148790f26e42ef1fd4a1a8d056bf0252539525]
> kconfig: switch to Kconfig
> 
> (which was applied at the end of July last year)
> 
> Interesting: The problem never seems to happen on my laptop (where I
> do all my rpi dev work), but is quite easy to reproduce on my faster
> machine at work. I would guess it only affects parallel builds in
> certain timing circumstances, but haven't checked that.

Sorry for my late reply and inconveniene about this.

I recongnize this problem is the same as what has been reported by some people
for a few months.

Although I have never been able to reproduce this problem (I guess my computer is too slow...),
I do understand this is a real, significant and urgent problem.


I bet the root cause of this issue is the following lines.

autoconf_is_current := $(if $(wildcard $(KCONFIG_CONFIG)),$(shell find . \
                -path ./include/config/auto.conf -newer $(KCONFIG_CONFIG)))
ifneq ($(autoconf_is_current),)
include $(srctree)/config.mk
include $(srctree)/arch/$(ARCH)/Makefile
endif


This comes from the difference about how ARCH is given.

In Linux, ARCH is given from the command line by the user,
so the correct arch/$(ARCH)/Makefile can be always included.

In U-boot, on the other hand, ARCH is decided by Kconfig.
It is impossible to include arch/$(ARCH)/Makefile
until Kconfig creates the include/configs/auto.conf for the target board,
i.e. "make silentoldconfig" is done.

I do not know the reason exactly, but $(autoconf_is_current) might not be set correctly
in some cases depending on some race condition.

Of course, if we adopted the "ARCH from the command line", this problem would immediately go away,
but I am not sure how many people are happy about the more typing every time,
considering that most of the target boards of U-Boot use cross-compiling.


I will take a closer look on it, but I am doing some big changes for the build system.

  - single .config switch ( I have just posted the series.)
  - Moving SoC directory    arch/arm/cpu/$(CPU)/$(SOC)  -> arch/arm/mach-$(SOC)


As usual, I'd like to solve the problems one by one, so as not to mess up things by big conflicts.

Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
  2015-02-19  8:50           ` Masahiro Yamada
@ 2015-02-19 12:18             ` Tom Rini
  2015-03-24 15:36             ` Stephen Warren
  1 sibling, 0 replies; 17+ messages in thread
From: Tom Rini @ 2015-02-19 12:18 UTC (permalink / raw)
  To: u-boot

On Thu, Feb 19, 2015 at 05:50:37PM +0900, Masahiro Yamada wrote:
> Hi.
> 
> 
> 
> On Wed, 18 Feb 2015 23:00:36 -0700
> Stephen Warren <swarren@wwwdotorg.org> wrote:
> 
> > On 02/17/2015 01:22 PM, Tom Rini wrote:
> > > On Tue, Feb 17, 2015 at 12:35:41PM -0700, Stephen Warren wrote:
> > >> On 02/16/2015 06:03 PM, Tom Rini wrote:
> > >>> On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren
> > >>> wrote:
> > >>> 
> > >>>> USB doesn't seem to work yet; the controller detects the
> > >>>> on-board Hub/ Ethernet device but can't read the descriptors
> > >>>> from it. I haven't investigated yet.
> > >>>> 
> > >>>> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> --- v3:
> > >>>> Rebased on top of u-boot-dm merge. v2: Implement new
> > >>>> board_rev decoding scheme, to avoid hard-coding the board
> > >>>> revision onthe RPi 2.
> > >>> 
> > >>> +(rpi_2) make[3]: *** No rule to make target 
> > >>> `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o',
> > >>> needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop. 
> > >>> +(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 
> > >>> +(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2
> > >>> 
> > >>> When I try and build it with buildman.  Something get left out 
> > >>> somewhere?  Thanks!
> > >> 
> > >> I've reproduced this error on my machine at work, where I
> > >> previously worked out the right stuff to put into ~/.buildman.
> > >> 
> > >> Now that I try the regular build process (in-tree build using
> > >> just make) multiple times after a "git clean -f -d -x" , I see
> > >> the same error that way too, sometimes, so it's nothing to do
> > >> with buildman.
> > >> 
> > >> However, I don't always get the error with either plain make or
> > >> with buildman, and it doesn't always complain about the same
> > >> file:
> > >> 
> > >>> +make[1]: *** No rule to make target `arch//cpu/u-boot.lds',
> > >>> needed by `u-boot.lds'.  Stop.
> > >> 
> > >>> +make[3]: *** No rule to make target
> > >>> `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o',
> > >>> needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop.
> > >> 
> > >> This isn't anything to do with these patches; I can see the
> > >> exact same issue building the following existing boards in
> > >> unmodified u-boot/master:
> > >> 
> > >> rpi (arm1176, no SPL) tnetv107x_evm_defconfigs (arm1176 no SPL) 
> > >> mx35pdk_defconfig (arm1136, no SPL) nhk8815_defconfig (arm926ejs,
> > >> no SPL) imx27lite_defconfig (arm926ejs, SPL) 
> > >> vexpress_ca15_tc2_defconfig (ARMv7, no SPL)
> > >> 
> > >> Strangely I don't see the issue for:
> > >> 
> > >> seaboard (ARMv7, SPL) maxbcm_defconfig (ARMv7, SPL)
> > >> 
> > >> I wonder if bisecting would show up where this issue was
> > >> introduced.
> > > 
> > > I bet it will and I bet it's when we switch to Kconfig.  Masahiro,
> > > any ideas?
> > 
> > Yes, a git bisect (running up to 100 successful builds to test each
> > commit, or failing on the first failure) says:
> > 
> > first bad commit: [51148790f26e42ef1fd4a1a8d056bf0252539525]
> > kconfig: switch to Kconfig
> > 
> > (which was applied at the end of July last year)
> > 
> > Interesting: The problem never seems to happen on my laptop (where I
> > do all my rpi dev work), but is quite easy to reproduce on my faster
> > machine at work. I would guess it only affects parallel builds in
> > certain timing circumstances, but haven't checked that.
> 
> Sorry for my late reply and inconveniene about this.
> 
> I recongnize this problem is the same as what has been reported by some people
> for a few months.
> 
> Although I have never been able to reproduce this problem (I guess my computer is too slow...),
> I do understand this is a real, significant and urgent problem.
> 
> 
> I bet the root cause of this issue is the following lines.
> 
> autoconf_is_current := $(if $(wildcard $(KCONFIG_CONFIG)),$(shell find . \
>                 -path ./include/config/auto.conf -newer $(KCONFIG_CONFIG)))
> ifneq ($(autoconf_is_current),)
> include $(srctree)/config.mk
> include $(srctree)/arch/$(ARCH)/Makefile
> endif
> 
> 
> This comes from the difference about how ARCH is given.
> 
> In Linux, ARCH is given from the command line by the user,
> so the correct arch/$(ARCH)/Makefile can be always included.
> 
> In U-boot, on the other hand, ARCH is decided by Kconfig.
> It is impossible to include arch/$(ARCH)/Makefile
> until Kconfig creates the include/configs/auto.conf for the target board,
> i.e. "make silentoldconfig" is done.
> 
> I do not know the reason exactly, but $(autoconf_is_current) might not be set correctly
> in some cases depending on some race condition.
> 
> Of course, if we adopted the "ARCH from the command line", this problem would immediately go away,
> but I am not sure how many people are happy about the more typing every time,
> considering that most of the target boards of U-Boot use cross-compiling.
> 
> 
> I will take a closer look on it, but I am doing some big changes for the build system.
> 
>   - single .config switch ( I have just posted the series.)
>   - Moving SoC directory    arch/arm/cpu/$(CPU)/$(SOC)  -> arch/arm/mach-$(SOC)
> 
> 
> As usual, I'd like to solve the problems one by one, so as not to mess up things by big conflicts.

I'm OK waiting, it is a real pain in the butt to trigger race.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150219/20d7c87a/attachment.sig>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 1/3] bcm2835/rpi: add SPDX license tags for some files
  2015-02-16 19:16 [U-Boot] [PATCH V3 1/3] bcm2835/rpi: add SPDX license tags for some files Stephen Warren
  2015-02-16 19:16 ` [U-Boot] [PATCH V3 2/3] bcm2836 SoC support (used in Raspberry Pi 2 model B) Stephen Warren
  2015-02-16 19:16 ` [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B Stephen Warren
@ 2015-02-22  2:57 ` Tom Rini
  2 siblings, 0 replies; 17+ messages in thread
From: Tom Rini @ 2015-02-22  2:57 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 16, 2015 at 12:16:13PM -0700, Stephen Warren wrote:

> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>

Applied to u-boot/master, thanks!

-- 
Tom

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
  2015-02-16 19:16 ` [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B Stephen Warren
  2015-02-17  1:03   ` Tom Rini
@ 2015-02-22  2:57   ` Tom Rini
  1 sibling, 0 replies; 17+ messages in thread
From: Tom Rini @ 2015-02-22  2:57 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren wrote:

> USB doesn't seem to work yet; the controller detects the on-board Hub/
> Ethernet device but can't read the descriptors from it. I haven't
> investigated yet.
> 
> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>

Applied to u-boot/master, thanks!

-- 
Tom

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 2/3] bcm2836 SoC support (used in Raspberry Pi 2 model B)
  2015-02-16 19:16 ` [U-Boot] [PATCH V3 2/3] bcm2836 SoC support (used in Raspberry Pi 2 model B) Stephen Warren
@ 2015-02-22  2:57   ` Tom Rini
  0 siblings, 0 replies; 17+ messages in thread
From: Tom Rini @ 2015-02-22  2:57 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 16, 2015 at 12:16:14PM -0700, Stephen Warren wrote:

> The bcm2835 and bcm2836 are essentially identical, except:
> - The CPU is an ARM1176 v.s. a quad-core Cortex-A7.
> - The physical address of many IO controllers has moved.
> 
> Rather than introducing a whole new bcm2836 value for $(SOC) or $(ARCH),
> update the existing bcm2835 code to handle the minor differences, and
> plumb it into the ARMv7 CPU architecture.
> 
> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>

Applied to u-boot/master, thanks!

-- 
Tom

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
  2015-02-19  8:50           ` Masahiro Yamada
  2015-02-19 12:18             ` Tom Rini
@ 2015-03-24 15:36             ` Stephen Warren
  1 sibling, 0 replies; 17+ messages in thread
From: Stephen Warren @ 2015-03-24 15:36 UTC (permalink / raw)
  To: u-boot

On 02/19/2015 01:50 AM, Masahiro Yamada wrote:
> On Wed, 18 Feb 2015 23:00:36 -0700
> Stephen Warren <swarren@wwwdotorg.org> wrote:
>
>> On 02/17/2015 01:22 PM, Tom Rini wrote:
>>> On Tue, Feb 17, 2015 at 12:35:41PM -0700, Stephen Warren wrote:
>>>> On 02/16/2015 06:03 PM, Tom Rini wrote:
>>>>> On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren
>>>>> wrote:
>>>>>
>>>>>> USB doesn't seem to work yet; the controller detects the
>>>>>> on-board Hub/ Ethernet device but can't read the descriptors
>>>>>> from it. I haven't investigated yet.
>>>>>>
>>>>>> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> --- v3:
>>>>>> Rebased on top of u-boot-dm merge. v2: Implement new
>>>>>> board_rev decoding scheme, to avoid hard-coding the board
>>>>>> revision onthe RPi 2.
>>>>>
>>>>> +(rpi_2) make[3]: *** No rule to make target
>>>>> `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o',
>>>>> needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop.
>>>>> +(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2
>>>>> +(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2
>>>>>
>>>>> When I try and build it with buildman.  Something get left out
>>>>> somewhere?  Thanks!
>>>>
>>>> I've reproduced this error on my machine at work, where I
>>>> previously worked out the right stuff to put into ~/.buildman.
>>>>
>>>> Now that I try the regular build process (in-tree build using
>>>> just make) multiple times after a "git clean -f -d -x" , I see
>>>> the same error that way too, sometimes, so it's nothing to do
>>>> with buildman.
>>>>
>>>> However, I don't always get the error with either plain make or
>>>> with buildman, and it doesn't always complain about the same
>>>> file:
>>>>
>>>>> +make[1]: *** No rule to make target `arch//cpu/u-boot.lds',
>>>>> needed by `u-boot.lds'.  Stop.
>>>>
>>>>> +make[3]: *** No rule to make target
>>>>> `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o',
>>>>> needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'.  Stop.
>>>>
>>>> This isn't anything to do with these patches; I can see the
>>>> exact same issue building the following existing boards in
>>>> unmodified u-boot/master:
>>>>
>>>> rpi (arm1176, no SPL) tnetv107x_evm_defconfigs (arm1176 no SPL)
>>>> mx35pdk_defconfig (arm1136, no SPL) nhk8815_defconfig (arm926ejs,
>>>> no SPL) imx27lite_defconfig (arm926ejs, SPL)
>>>> vexpress_ca15_tc2_defconfig (ARMv7, no SPL)
>>>>
>>>> Strangely I don't see the issue for:
>>>>
>>>> seaboard (ARMv7, SPL) maxbcm_defconfig (ARMv7, SPL)
>>>>
>>>> I wonder if bisecting would show up where this issue was
>>>> introduced.
>>>
>>> I bet it will and I bet it's when we switch to Kconfig.  Masahiro,
>>> any ideas?
>>
>> Yes, a git bisect (running up to 100 successful builds to test each
>> commit, or failing on the first failure) says:
>>
>> first bad commit: [51148790f26e42ef1fd4a1a8d056bf0252539525]
>> kconfig: switch to Kconfig
>>
>> (which was applied at the end of July last year)
>>
>> Interesting: The problem never seems to happen on my laptop (where I
>> do all my rpi dev work), but is quite easy to reproduce on my faster
>> machine at work. I would guess it only affects parallel builds in
>> certain timing circumstances, but haven't checked that.
>
> Sorry for my late reply and inconveniene about this.
>
> I recongnize this problem is the same as what has been reported by some people
> for a few months.
>
> Although I have never been able to reproduce this problem (I guess my computer is too slow...),
> I do understand this is a real, significant and urgent problem.
>
>
> I bet the root cause of this issue is the following lines.
>
> autoconf_is_current := $(if $(wildcard $(KCONFIG_CONFIG)),$(shell find . \
>                  -path ./include/config/auto.conf -newer $(KCONFIG_CONFIG)))
> ifneq ($(autoconf_is_current),)
> include $(srctree)/config.mk
> include $(srctree)/arch/$(ARCH)/Makefile
> endif
>
>
> This comes from the difference about how ARCH is given.
>
> In Linux, ARCH is given from the command line by the user,
> so the correct arch/$(ARCH)/Makefile can be always included.
>
> In U-boot, on the other hand, ARCH is decided by Kconfig.
> It is impossible to include arch/$(ARCH)/Makefile
> until Kconfig creates the include/configs/auto.conf for the target board,
> i.e. "make silentoldconfig" is done.
>
> I do not know the reason exactly, but $(autoconf_is_current) might not be set correctly
> in some cases depending on some race condition.
>
> Of course, if we adopted the "ARCH from the command line", this problem would immediately go away,
> but I am not sure how many people are happy about the more typing every time,
> considering that most of the target boards of U-Boot use cross-compiling.
>
>
> I will take a closer look on it, but I am doing some big changes for the build system.
>
>    - single .config switch ( I have just posted the series.)
>    - Moving SoC directory    arch/arm/cpu/$(CPU)/$(SOC)  -> arch/arm/mach-$(SOC)
>
>
> As usual, I'd like to solve the problems one by one, so as not to mess up things by big conflicts.

Was there any progress on this front? I'm still seeing the problem in 
latest u-boot.git master branch. I've been hitting it a little more 
often today; not sure if the repro frequency has changed or if I just 
did a few more builds than usual?

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-03-24 15:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-16 19:16 [U-Boot] [PATCH V3 1/3] bcm2835/rpi: add SPDX license tags for some files Stephen Warren
2015-02-16 19:16 ` [U-Boot] [PATCH V3 2/3] bcm2836 SoC support (used in Raspberry Pi 2 model B) Stephen Warren
2015-02-22  2:57   ` Tom Rini
2015-02-16 19:16 ` [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B Stephen Warren
2015-02-17  1:03   ` Tom Rini
2015-02-17  4:09     ` Stephen Warren
2015-02-17  4:15       ` Simon Glass
2015-02-17  4:19         ` Stephen Warren
2015-02-18  2:39           ` Simon Glass
2015-02-17 19:35     ` Stephen Warren
2015-02-17 20:22       ` Tom Rini
2015-02-19  6:00         ` Stephen Warren
2015-02-19  8:50           ` Masahiro Yamada
2015-02-19 12:18             ` Tom Rini
2015-03-24 15:36             ` Stephen Warren
2015-02-22  2:57   ` Tom Rini
2015-02-22  2:57 ` [U-Boot] [PATCH V3 1/3] bcm2835/rpi: add SPDX license tags for some files Tom Rini

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.