Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
On 02/19/2015 01:50 AM, Masahiro Yamada wrote: On Wed, 18 Feb 2015 23:00:36 -0700 Stephen Warren swar...@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 swar...@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 directoryarch/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? ___ U-Boot mailing list U-Boot@lists.denx.de
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
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 swar...@wwwdotorg.org Applied to u-boot/master, thanks! -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
Hi. On Wed, 18 Feb 2015 23:00:36 -0700 Stephen Warren swar...@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 swar...@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 directoryarch/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 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
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 swar...@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 swar...@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 directoryarch/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
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
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 swar...@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. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
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 swar...@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 signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
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 swar...@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. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
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 swar...@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 = 300, }; @@ -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=63t=99293p=690282 +* (a few posts down) +*/ rpi_board_rev = msg-get_board_rev.body.resp.rev; + if (rpi_board_rev 0x80) + rpi_board_rev = (rpi_board_rev 4) 0xff; if
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
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 swar...@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 signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
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 swar...@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 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
On 02/16/2015 09:15 PM, Simon Glass wrote: Hi Stephen, On 16 February 2015 at 21:09, Stephen Warren swar...@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 swar...@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@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. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
Hi Stephen, On 16 February 2015 at 21:09, Stephen Warren swar...@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 swar...@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 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot