Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BBB - error: ‘RTC_OSC’ undeclared (first use in this function) #12

Open
bbros-dev opened this issue Jun 14, 2020 · 3 comments
Open

Comments

@bbros-dev
Copy link

bbros-dev commented Jun 14, 2020

I'm following:
https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black

I've patched successfuly (a git library command peculiarity meant git was checking out master instead of 2019.04 when I reported issue #11).

However, I now encounter the following error:

$ make ARCH=arm CROSS_COMPILE=${CC}

<snip>

scripts/Makefile.build:278: recipe for target 'board/ti/am335x/board.o' failed
Makefile:1531: recipe for target 'board/ti/am335x' failed
STDERR: In file included from include/post.h:15:0,
                 from include/serial.h:4,
                 from board/ti/am335x/board.c:14:
 board/ti/am335x/board.c: In function ‘board_init’:
board/ti/am335x/board.c:756:22: error: ‘RTC_OSC’ undeclared (first use in this function)
  sys_rtc_osc = readl(RTC_OSC);
@bbros-dev
Copy link
Author

The following patch appears to workaround this issue.

I have no idea if this is the most appropriate place to move this definition.

HTH?

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 0834ff5021..ef999b2225 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -30,6 +30,7 @@
 /* Clock Defines */
 #define V_OSCK                         24000000  /* Clock output from T2 */
 #define V_SCLK                         (V_OSCK)
+#define RTC_OSC                                (RTC_BASE + 0x0054)
 
 /* Custom script for NOR */
 #define CONFIG_SYS_LDSCRIPT            "board/ti/am335x/u-boot.lds"

@RobertCNelson
Copy link
Member

@bbros-dev
Copy link
Author

Yes, I left that there, and copied it to ./include/configs/am335x_evm.h. After that I've been able to build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants