Skip to contentSkip to conversation

bcm2835/rpi: add SPDX license tags for some files

PATCH New Stephen Warren 5 participants 17 messages Feb 16, 2015 – Mar 24, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/3 bcm2835/rpi: add SPDX license tags for some files

---
 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(-)
arch/arm/cpu/arm1176/bcm2835/Makefile +2 -10
index 0ad36906dfc5..7e5dbe1fdeaf 100644
@@ -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
arch/arm/include/asm/arch-bcm2835/sdhci.h +1 -11
index a4f867b2e9a4..da4d5cd5a88f 100644
@@ -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_
arch/arm/include/asm/arch-bcm2835/timer.h +1 -11
index c2001b6f932a..2d7cfe5c56f8 100644
@@ -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
arch/arm/include/asm/arch-bcm2835/wdog.h +1 -11
index 303a65f32e08..f369ab589c9a 100644
@@ -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
board/raspberrypi/rpi/Makefile +2 -10
index c53c92b1ddb7..4ce2c983b382 100644
@@ -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
board/raspberrypi/rpi/rpi.c +1 -11
index 948078b958f7..fdbf87d6fa79 100644
@@ -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>
include/configs/rpi.h +1 -11
index 7ad8d080215d..9b32149b0ea3 100644
@@ -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
Signature · 1 line
1.9.1
#1 lore raw

PATCH v3 2/3 bcm2836 SoC support (used in Raspberry Pi 2 model B)

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.

---
 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
arch/arm/cpu/armv7/Makefile +1 -0
index 409e6f5651b6..7f77c729a191 100644
@@ -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/
arch/arm/cpu/armv7/bcm2835/Makefile new file +13 -0
new file mode 100644
index 000000000000..ed1ee4753d49
@@ -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
arch/arm/include/asm/arch-bcm2835/gpio.h +5 -0
index db42896201b3..c8ef8f528a21 100644
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2012 Vikram Narayananan
  * <[email protected]>
+ * (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
arch/arm/include/asm/arch-bcm2835/mbox.h +5 -1
index 88d2ec11a7c2..c4bbacaf3c3f 100644
@@ -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;
arch/arm/include/asm/arch-bcm2835/sdhci.h +5 -1
index da4d5cd5a88f..2a21ccbf66ba 100644
@@ -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);
 
arch/arm/include/asm/arch-bcm2835/timer.h +5 -1
index 2d7cfe5c56f8..fc7aec7b7c59 100644
@@ -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;
arch/arm/include/asm/arch-bcm2835/wdog.h +5 -1
index f369ab589c9a..beb6a0820601 100644
@@ -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];
Signature · 1 line
1.9.1
#2 lore raw

PATCH v3 2/3 bcm2836 SoC support (used in Raspberry Pi 2 model B)

Quoted 9 lines · Stephen Warren

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.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#3 lore raw

PATCH v3 3/3 rpi: add support for Raspberry Pi 2 model B

In reply to Stephen Warren

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.

---
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
arch/arm/Kconfig +5 -0
index 41f322058038..f62b38912daa 100644
@@ -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"
arch/arm/cpu/arm1176/bcm2835/Kconfig +1 -1
index 94f57d732fe3..162f973f6cce 100644
@@ -1,4 +1,4 @@
-if TARGET_RPI
+if TARGET_RPI || TARGET_RPI_2
 
 config DM
 	default y if !SPL_BUILD
arch/arm/include/asm/arch-bcm2835/mbox.h +4 -0
index c4bbacaf3c3f..04bf480a5493 100644
@@ -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;
board/raspberrypi/rpi/rpi.c +26 -2
index fdbf87d6fa79..50a699bb9e0c 100644
@@ -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)
board/raspberrypi/rpi_2/Kconfig new file +15 -0
new file mode 100644
index 000000000000..032184d5ad54
@@ -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
board/raspberrypi/rpi_2/MAINTAINERS new file +6 -0
new file mode 100644
index 000000000000..85a480c9d1b0
@@ -0,0 +1,6 @@
+RPI_2 BOARD
+M:	Stephen Warren <[email protected]>
+S:	Maintained
+F:	board/raspberrypi/rpi_2/
+F:	include/configs/rpi_2.h
+F:	configs/rpi_2_defconfig
board/raspberrypi/rpi_2/Makefile new file +7 -0
new file mode 100644
index 000000000000..d82cd21f4cf7
@@ -0,0 +1,7 @@
+#
+# (C) Copyright 2012,2015 Stephen Warren
+#
+# SPDX-License-Identifier:	GPL-2.0
+#
+
+obj-y	:= ../rpi/rpi.o
configs/rpi_2_defconfig new file +4 -0
new file mode 100644
index 000000000000..b539d4a689e5
@@ -0,0 +1,4 @@
+CONFIG_ARM=y
+CONFIG_TARGET_RPI_2=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
include/configs/rpi-common.h new file +186 -0

186 lines not on this page · raw message

include/configs/rpi.h +2 -166

177 lines not on this page · raw message

include/configs/rpi_2.h new file +15 -0
new file mode 100644
index 000000000000..2e7e74fd563b
@@ -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
Signature · 1 line
1.9.1
#4 lore raw

PATCH v3 3/3 rpi: add support for Raspberry Pi 2 model B

Quoted 9 lines · Stephen Warren

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.

---
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!

Signature · 8 lines
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>
#5 lore raw

PATCH v3 3/3 rpi: add support for Raspberry Pi 2 model B

Quoted 11 lines · Tom Rini
Quoted 8 lines · Stephen Warren

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.

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.

Quoted 8 lines

+(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

#6 lore raw

PATCH v3 3/3 rpi: add support for Raspberry Pi 2 model B

Hi Stephen,

Quoted 24 lines · Stephen Warren
Quoted 11 lines · Tom Rini
Quoted 8 lines · Stephen Warren

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.

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.

Quoted 8 lines

+(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:

Quoted 9 lines

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

#7 lore raw

PATCH v3 3/3 rpi: add support for Raspberry Pi 2 model B

Quoted 39 lines · Simon Glass

Hi Stephen,

Quoted 24 lines · Stephen Warren
Quoted 11 lines · Tom Rini
Quoted 8 lines · Stephen Warren

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.

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.

Quoted 8 lines

+(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:

Quoted 9 lines

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 :-)

Quoted 8 lines

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.

#8 lore raw

PATCH v3 3/3 rpi: add support for Raspberry Pi 2 model B

Hi Stephen,

Quoted 93 lines · Stephen Warren
Quoted 39 lines · Simon Glass

Hi Stephen,

Quoted 24 lines · Stephen Warren
Quoted 11 lines · Tom Rini
Quoted 8 lines · Stephen Warren

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.

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.

Quoted 8 lines

+(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:

Quoted 9 lines

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 :-)

Quoted 8 lines

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

Quoted 3 lines

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

#9 lore raw

PATCH v3 3/3 rpi: add support for Raspberry Pi 2 model B

In reply to Tom Rini
Quoted 18 lines · Tom Rini
Quoted 9 lines · Stephen Warren

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.

---
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.

(quoted diff) +2 -0
+(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2
+(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2
Quoted 2 lines

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:

Review

Quoted 3 lines
(quoted diff) +2 -0
+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.

#10 lore raw

PATCH v3 3/3 rpi: add support for Raspberry Pi 2 model B

Quoted 47 lines · Stephen Warren
Quoted 18 lines · Tom Rini
Quoted 9 lines · Stephen Warren

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.

---
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.

(quoted diff) +2 -0
+(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2
+(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2
Quoted 2 lines

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:

Review

Quoted 3 lines
(quoted diff) +2 -0
+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)

Quoted 6 lines

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?

Signature · 8 lines
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>
#11 lore raw

PATCH v3 3/3 rpi: add support for Raspberry Pi 2 model B

Quoted 53 lines · Tom Rini
Quoted 52 lines · Stephen Warren
Quoted 18 lines · Tom Rini
Quoted 8 lines · Stephen Warren

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.

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.

(quoted diff) +2 -0
+(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 
+(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2
Quoted 2 lines

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:

Quoted 6 lines

+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:

Quoted 7 lines
Quoted 4 lines

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.

#12 lore raw

PATCH v3 3/3 rpi: add support for Raspberry Pi 2 model B

Hi.

Quoted 68 lines · On Wed, 18 Feb 2015 23:00:36 -0700 Stephen Warren <[email protected]> wrote:
Quoted 53 lines · Tom Rini
Quoted 52 lines · Stephen Warren
Quoted 18 lines · Tom Rini
Quoted 8 lines · Stephen Warren

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.

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.

(quoted diff) +2 -0
+(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 
+(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2
Quoted 2 lines

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:

Quoted 6 lines

+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:

Quoted 7 lines
Quoted 4 lines

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

Quoted 6 lines

(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

#13 lore raw

PATCH v3 3/3 rpi: add support for Raspberry Pi 2 model B

Quoted 119 lines · Masahiro Yamada

Hi.

Quoted 68 lines · On Wed, 18 Feb 2015 23:00:36 -0700 Stephen Warren <[email protected]> wrote:
Quoted 53 lines · Tom Rini
Quoted 52 lines · Stephen Warren
Quoted 18 lines · Tom Rini
Quoted 8 lines · Stephen Warren

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.

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.

(quoted diff) +2 -0
+(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 
+(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2
Quoted 2 lines

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:

Quoted 6 lines

+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:

Quoted 7 lines
Quoted 4 lines

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

Quoted 6 lines

(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.

Quoted 7 lines

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.

Signature · 8 lines
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>
#14 lore raw

PATCH v3 3/3 rpi: add support for Raspberry Pi 2 model B

In reply to Masahiro Yamada
Quoted 115 lines · Masahiro Yamada
Quoted 68 lines · On Wed, 18 Feb 2015 23:00:36 -0700 Stephen Warren <[email protected]> wrote:
Quoted 53 lines · Tom Rini
Quoted 52 lines · Stephen Warren
Quoted 18 lines · Tom Rini
Quoted 8 lines · Stephen Warren

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.

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.

(quoted diff) +2 -0
+(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2
+(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2
Quoted 2 lines

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:

Quoted 6 lines

+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:

Quoted 7 lines
Quoted 4 lines

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

Quoted 6 lines

(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.

Quoted 7 lines

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?

#15 lore raw

PATCH v3 3/3 rpi: add support for Raspberry Pi 2 model B

In reply to Stephen Warren
Quoted 5 lines · Stephen Warren

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.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom