[U-Boot] POST in u-boot for P2020 process

Hi,
I am interested in performing POST (Power On Self Test ) operation in u-boot. As soon as the system starts booting , it should perform some basic functionality Testing,
- Cache test - Memory Test - RAM test - I2C test - SPI Test - Ethernet Test - UART test - Watch Dog Timer Test
Please let me know the changes required in U-boot Code to perform POST operation while System bootup.
Thanks & Regards Pradeep S
-- View this message in context: http://u-boot.10912.n7.nabble.com/POST-in-u-boot-for-P2020-process-tp172115.... Sent from the U-Boot mailing list archive at Nabble.com.

Dear pshambhu,
In message 1390469712091-172115.post@n7.nabble.com you wrote:
I am interested in performing POST (Power On Self Test ) operation in u-boot. As soon as the system starts booting , it should perform some basic functionality Testing,
- Cache test
- Memory Test
- RAM test
- I2C test
- SPI Test
- Ethernet Test
- UART test
- Watch Dog Timer Test
Please let me know the changes required in U-boot Code to perform POST operation while System bootup.
You have to implement the required tests for your hardware (unless these already exist) and then enable them in your board config file; please see doc/README.POST for details.
BTW: running these tests always for each and every boot is probably a very bad idea, as some of these testes are pretty expensive in terms of time needed. Also, some may have specific requirements to the hardware configuration (like there must [or nust not] be network cable attached, etc.).
Best regards,
Wolfgang Denk

Hi Denx,
Thanks for replying, I have read the document, i have to enable the POST as well with the macro "CONFIG_POST" and "CONFIG_CMD_DIAG", but i am getting lot of compilation errors. Am i missing something while configuring ?? And post.h is also getting generated, which describes the different types POST operation ( cache test, memory test... etc). All macros are there in post.h , is there anything which i need to include in configuration file ??
Thanks Pradeep
-- View this message in context: http://u-boot.10912.n7.nabble.com/POST-in-u-boot-for-P2020-process-tp172115p... Sent from the U-Boot mailing list archive at Nabble.com.

Dear Pradeep,
In message 1390803626357-172426.post@n7.nabble.com you wrote:
Thanks for replying, I have read the document, i have to enable
the POST as well with the macro "CONFIG_POST" and "CONFIG_CMD_DIAG", but i am getting lot of compilation errors. Am i missing something while
It's difficult to tell when you do not mention what exactly you selected / enabled, and when you do not tell us what these "lot of compilation errors" are exactly (include a log?).
configuring ?? And post.h is also getting generated, which describes the different types POST operation ( cache test, memory test... etc). All macros are there in post.h , is there anything which i need to include in configuration file ??
There are completely generic tests, there are SoC specific tests, and there are board specific tests. Depending on what you enabled, some of these tests may ned to be implemented for your configuration.
Best regards,
Wolfgang Denk

Hi Denx,
Logs for your Reference -----------------------
post/libpost.a(post.o): In function `post_bootmode_get': /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:91: undefined reference to `post_word_load' post/libpost.a(post.o): In function `post_bootmode_init': /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:66: undefined reference to `post_hotkeys_pressed' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:74: undefined reference to `post_word_load' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:83: undefined reference to `post_word_store' post/libpost.a(post.o): In function `post_bootmode_test_on': /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:138: undefined reference to `post_word_load' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:144: undefined reference to `post_word_store' post/libpost.a(post.o): In function `post_bootmode_test_off': /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:149: undefined reference to `post_word_load' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:153: undefined reference to `post_word_store' drivers/mtd/spi/libspi_flash.a(stmicro.o): In function `stmicro_wait_ready': /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/drivers/mtd/spi/stmicro.c:140: undefined reference to `spi_xfer' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/drivers/mtd/spi/stmicro.c:162: undefined reference to `spi_xfer' drivers/mtd/spi/libspi_flash.a(winbond.o): In function `winbond_wait_ready': /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/drivers/mtd/spi/winbond.c:99: undefined reference to `spi_xfer' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/drivers/mtd/spi/winbond.c:111: undefined reference to `spi_xfer' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/drivers/mtd/spi/winbond.c:126: undefined reference to `spi_xfer'
Thanks Pradeep
-- View this message in context: http://u-boot.10912.n7.nabble.com/POST-in-u-boot-for-P2020-process-tp172115p... Sent from the U-Boot mailing list archive at Nabble.com.

Hi Denx,
If possoble can you please send me some example/sample code for writing the POST scenarios.
Thanks Pradeep
-- View this message in context: http://u-boot.10912.n7.nabble.com/POST-in-u-boot-for-P2020-process-tp172115p... Sent from the U-Boot mailing list archive at Nabble.com.

Dear pshambhu,
In message 1390818248806-172450.post@n7.nabble.com you wrote:
If possoble can you please send me some example/sample code for
writing the POST scenarios.
You have it all at your hands. Check for example the lwmon / lwmon5 board configurations.
Best regards,
Wolfgang Denk

Dear pshambhu,
In message 1390806073574-172435.post@n7.nabble.com you wrote:
post/libpost.a(post.o): In function `post_bootmode_get': /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:91: undefined reference to `post_word_load' post/libpost.a(post.o): In function `post_bootmode_init': /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:66: undefined reference to `post_hotkeys_pressed' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:74: undefined reference to `post_word_load' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:83: undefined reference to `post_word_store' post/libpost.a(post.o): In function `post_bootmode_test_on': /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:138: undefined reference to `post_word_load' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:144: undefined reference to `post_word_store' post/libpost.a(post.o): In function `post_bootmode_test_off': /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:149: undefined reference to `post_word_load' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/post/post.c:153: undefined reference to `post_word_store'
It appears you failed to define post_word_load(), post_word_store(), post_hotkeys_pressed(), post_bootmode_get() and post_bootmode_init() in your board specific code.
Did you read doc/README.POST ?
drivers/mtd/spi/libspi_flash.a(stmicro.o): In function `stmicro_wait_ready': /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/drivers/mtd/spi/stmicro.c:140: undefined reference to `spi_xfer' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/drivers/mtd/spi/stmicro.c:162: undefined reference to `spi_xfer' drivers/mtd/spi/libspi_flash.a(winbond.o): In function `winbond_wait_ready': /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/drivers/mtd/spi/winbond.c:99: undefined reference to `spi_xfer' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/drivers/mtd/spi/winbond.c:111: undefined reference to `spi_xfer' /home/raghu/Emerson_BSP/p2020/u-boot/u-boot-2009.11/drivers/mtd/spi/winbond.c:126: undefined reference to `spi_xfer'
These appear to be unrelated to me.
By the way: you are aware that v2009.11 is totally outdated? It makes not much sense to invest efforts in extending such old code. Please do yourself (and us) a favour and update first to recent code.
Best regards,
Wolfgang Denk

Hi Denx,
If possible can you please send me some example/sample code for writing the POST scenarios.
Thanks Pradeep
-- View this message in context: http://u-boot.10912.n7.nabble.com/POST-in-u-boot-for-P2020-process-tp172115p... Sent from the U-Boot mailing list archive at Nabble.com.

Hi Denx,
Thanks for replying, I have read the document, i have to enable the POST as well with the macro "CONFIG_POST" and "CONFIG_CMD_DIAG", but i am getting lot of compilation errors. Am i missing something while configuring ?? And post.h is also getting generated, which describes the different types POST operation ( cache test, memory test... etc). All macros are there in post.h , is there anything which i need to include in configuration file ??
Thanks Pradeep
-- View this message in context: http://u-boot.10912.n7.nabble.com/POST-in-u-boot-for-P2020-process-tp172115p... Sent from the U-Boot mailing list archive at Nabble.com.
participants (2)
-
pshambhu
-
Wolfgang Denk