We’re building a custom board based on the Beaglebone and I’m in the process of testing all of the features we hope to eventually implement on our own board through various hacks to the BeagleBone.
What I’m struggling to figure out is how to compile the kernel to use UART1 as the debug output. The options ‘CONFIG_DEBUG_LL’ and ‘CONFIG_EARLY_PRINTK’ are both set to ‘y’, which seems to be a good start, but there doesn’t seem to be an option for ‘CONFIG_OMAP_LL_DEBUG_UART1’, and in fact ‘CONFIG_DEBUG_LL_UART_NONE’ is set to ‘y’, explicitly indicating the absence of a UART debug port.
Does this mean UART1 cannot be used for debugging - especially for getting the early boot/kernel messages?
I understand I will need to make some changes to ‘board-am335xevm.c’ to set the correct mux options for the UART pins in order to be able to use this port once everything has booted, but at this stage I’m just concerned with getting the earlier information (assuming I’m going to have trouble getting things to boot once I have my custom board).
Any help would be much appreciated.
Turns out I was barking up the wrong tree. Andrew Bradford has put significant effort into implementing u-boot build options specifically allowing any of the UARTs on the AM335x to be used as the debug output. Following his sage advice I have been able to successfully clone the u-boot repo, set the build options to enable UART1 as the debug output and get some debug output from this UART on our custom beaglebone-esque board.
The steps taken are as follows:
- A Ubuntu 12.04 build machine with the basic Angstrom build environment set up, cross-compilers compiled, full system-d image built, etc… (roughly following steps here: http://cwraig.id.au/?p=507)
- Making sure a call to ‘. ~/.oe/environment-angstromv2012.05’ has been made to set up $PATH to point to the location of the cross-compilers…
Cloning u-boot, configuring for UART1 and building (roughly following these steps: http://bharath.lohray.com/weblog/compiling-and-using-u-boot-for-beaglebone/):
From a convenient location in your file system, plug the following commands into the terminal:
git clone http://git.denx.de/u-boot.git
make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- distclean
make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- am335x_evm_uart1_config
make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi-
Once finished the current (u-boot) path will contain fresh ‘MLO’ and ‘u-boot.img’ files. Copy these to the boot partition of your u-SD card, plug it in and power it up…
On my custom beaglebone-esque but eeprom-less board I get the following response out of UART1:
U-Boot SPL 2013.04-rc1-00043-gcb466c0 (Mar 15 2013 - 11:40:08)
Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
Could not get board ID.
Unknown board, cannot configure pinmux.### ERROR ### Please RESET the board ###
Andrew Bradford gains +100 Mana.
I faced a similar problem, you probably just need to be a bit more creative with your commenting out. Below is a description of what I did. You should be able to duplicate it within your own source and recompile:
Add the following to the start of the function ‘static int read_eeprom(void)’, at around line 92:
strncpy(header.name, “A335BONE”, 8);
strncpy(header.version, “1.5”, 3);
puts(“Booting Custom Board.\n”);
I think it was easier to just fudge the header information than to touch every part of the code where it is referenced.