1
votes

We are using beaglebone black based custom board,

I am trying to check possibility wherein we can prepand kernel log with u-boot bootlog.
This is required because during manufacturing and programming of the board we run some tests and we need to capture the u-boot bootlog for testlog and test results which goes on serial port. As serial port is not populated on the customer board its not possible to collect the bootlog,

I found CONFIG_LOGBUFFER option for u-boot in google but i don't understand how do i use the same.

I found following links but "how to use" is not clear
http://lists.denx.de/pipermail/u-boot/2004-August/006511.html
https://lkml.org/lkml/2009/1/21/250

can someone help understand if i am on right path or not ? Any easy explanation of the options ?

Thank you in advance!

3

3 Answers

1
votes

As I recall, the U-Boot logbuffer interface only worked with the DENX linux kernel tree, 5 to 10 years back. It may have been limited to a couple of platforms, you have some links above. Patches for linux kernel side did not make it into mainline, so even back then it was hard to get working.

Then around 3.5 kernel, the printk interfaces were redesigned to record-oriented output. It looks to me that makes CONFIG_LOGBUFFER completely dead, absent large total redesign.

For the goal you describe, there should be better options. If your target has ethernet, U-Boot NETCONSOLE works. If your target has JTAG, manufacturing test could use that (you can blame the hardware design), that may open a lot of hacky but effective options such as U-Boot MEMCONSOLE. U-Boot POST gets no love, but you could add some code to save its results to environment variable, that has worked for me.

0
votes

Warning !!!

I didn't use this feature.

CONFIG_LOGBUFFER is a kernel configuration flag. So compile your kernel with CONFIG_LOGBUFFER=y. This external logging support will be enabled in your kernel.

Make sure that the kernel has that configuration. If not, apply this patch to your kernel and try.

0
votes

Well, i couldn't achieve what i have asked in question but i could extract the log(the test log and not full SPL log).

The test log was important for us to find out test results of failed HW units during manufacturing tests.

So Solution i adopted is as follows,

  1. Along with printing results on terminal i wrote them on specific RAM locatione.g.0x80900000 from SPL.(obviously it should be done after RAM initialization.)
  2. Then from u-boot this RAM location values read and sent using tftpput. see tftpput command's usage.
  3. For uniqueness of the logfile name i used mac-id as filename set in u-boot environment variable.

I believe that we can achieve what i asked in my question but currently we are satisfied with short-term solution I have achieved :)