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

Ability to use fully automated tests on all platforms #666

Open
DaniilKl opened this issue Jan 15, 2025 · 7 comments
Open

Ability to use fully automated tests on all platforms #666

DaniilKl opened this issue Jan 15, 2025 · 7 comments
Labels
enhancement New feature or request

Comments

@DaniilKl
Copy link
Contributor

DaniilKl commented Jan 15, 2025

The problem you're addressing (if any)

Our tests mostly use serial interface and for some platforms it is difficult to get access to serial (NovaCustom platforms for example). Therefore, we have to do some complex steps to prepare for testing, like disassembling a platform, soldering wires to UART etc..

Describe the solution you'd like

Maybe we could find another way to get access to Firmware/Linux shell, e.g. redirecting the shells to USB port and then reading it directly via USB or via UART using USB/UART converter?

Where is the value to a user, and who might that user be?

Fully automated, both DST and Dasharo tests an all platforms, reducing developing and release time.

Describe alternatives you've considered

No response

Additional context

No response

@DaniilKl DaniilKl added the enhancement New feature or request label Jan 15, 2025
@DaniilKl
Copy link
Contributor Author

@m-iwanicki, @filipleple.

@macpijan
Copy link
Contributor

macpijan commented Jan 15, 2025

If it was that simple, we would have done it already. Unless you have a very concrete proposal, which are always welcome. It's not like you can print early UART messages to USB stack when it's not initialized yet.

There have been many attempts so far, mostly from @mkopec
From time to time @mkopec has some new crazy ideas of using edk2 drivers, some have not been exercised yet.

On laptops specifically, we even had some I2C-UART converter on STM32 board running Zephyr: https://github.com/Dasharo/zephyr-i2c-to-uart. But that still requires soldering.

@filipleple
Copy link
Member

@macpijan I think the idea here is not obtaining early coreboot console logs, but only being able to navigate the EDK2 menus to switch options - which is after the USB stack has been initialized, so I'm guessing we could come up with an efi driver that would bridge the console to one of the USB ports.

The question remains if this would really help the testing so much that it would be worth the effort. It would probably cut down time spent maintaining dcu and the osfv library for it, and the extra effort spent setting up a laptop testing stand

@mkopec
Copy link
Member

mkopec commented Jan 15, 2025

I mentioned somewhere that edk2-platforms has a driver for a USB-UART adapter: https://github.com/tianocore/edk2-platforms/tree/master/Drivers/OptionRomPkg/Bus/Usb/FtdiUsbSerialDxe

In theory you can just plop that onto the ESP and enable it in edk2's driver options, it can load DXE drivers from disk just fine. Not sure if the default edk2 build without serial console enabled by default will work well with it, might need some changes in firmware.

@DaniilKl
Copy link
Contributor Author

DaniilKl commented Jan 22, 2025

@macpijan, so, considering @filipleple and @mkopec answers, wouldn't it be worthy to try to use USB2UART inside firmware for menu navigation and tests automation? It will definitely help DTS testing and, IIUC, Dasharo firmware too.

@macpijan
Copy link
Contributor

Yes always worth to explore new ideas as we come up with them.

@macpijan
Copy link
Contributor

The question remains if this would really help the testing so much that it would be worth the effort. It

I think it is, we have done even more in the past.

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

No branches or pull requests

4 participants