Petitboot on UART?

Post Reply
monnier
Posts: 15
Joined: Mon Jul 04, 2022 8:11 am
languages_spoken: english
ODROIDs: None yet
Has thanked: 6 times
Been thanked: 1 time
Contact:

Petitboot on UART?

Post by monnier »

I just received my M1, connected its UART to my USB port and booted it.
It started nicely with SPL and U-Boot [ tho both of them refer to U-Boot version 2017.09; really guys? When are you going to feed this back upstream? ].
But in the end it just gives me:

Code: Select all

** Bad device mmc 1 **
### CRAMFS load complete: 4895535 bytes loaded to 0x280000
### CRAMFS load complete: 3256396 bytes loaded to 0xa200000
Fdt Ramdisk skip relocation
No misc partition
## Booting kernel from Legacy Image at 00280000 ...
   Image Name:   
   Image Type:   AArch64 Linux Kernel Image (gzip compressed)
   Data Size:    4895471 Bytes = 4.7 MiB
   Load Address: 01080000
   Entry Point:  01080000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 0a200000 ...
   Image Name:   
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    3256332 Bytes = 3.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 0x0a100000
   Booting using the fdt blob at 0x0a100000
   Uncompressing GZIP Kernel Image from 0x00280040 to 0x01080000 ... with 00a66008 bytes OK
   kernel loaded at 0x01080000, end = 0x01ae6008
  'reserved-memory' ramoops@110000: addr=110000 size=f0000
  'reserved-memory' pcie3x2@80900000: addr=80900000 size=100000
   Using Device Tree in place at 000000000a100000, end 000000000a122117
No resource partition
No file: logo_kernel.bmp
vp0, plane_mask:0x3f, primary-id:4, curser-id:-1
vp1, plane_mask:0x0, primary-id:0, curser-id:-1
vp2, plane_mask:0x0, primary-id:0, curser-id:-1
Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
Adding bank: 0x09400000 - 0xf0000000 (size: 0xe6c00000)
Adding bank: 0x1f0000000 - 0x200000000 (size: 0x10000000)
Total: 1938.385 ms

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x412fd050]
[    0.000000] Linux version 4.19.206 (odroid@943431a2eaa2) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02), GNU ld (Linaro_Binutils-2017.02) 2.27.0.20161019) #1 SMP Sun Mar 6 16:31:28 UTC 2022
[    0.000000] Machine model: Hardkernel ODROID-M1
[    0.000000] earlycon: uart8250 at MMIO32 0x00000000fe660000 (options '')
[    0.000000] bootconsole [uart8250] enabled
and hangs there. I don't have any HDMI cable for to connect this board to a screen. How do I convince Petitboot to interact via the UART?

User avatar
tobetter
Posts: 10982
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 741 times
Been thanked: 1873 times
Contact:

Re: Petitboot on UART?

Post by tobetter »

Current version of Petitboot does not have UART access yet, it's just first version for ODROiD-M1 and there are not much things to do through UART.

User avatar
mad_ady
Posts: 10970
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 999 times
Contact:

Re: Petitboot on UART?

Post by mad_ady »

On N2 petitboot returns a console shell. If you're quick enough you can kill petitboot (and stop autoboot) and start it from console. It worked great - I used it a while ago.

monnier
Posts: 15
Joined: Mon Jul 04, 2022 8:11 am
languages_spoken: english
ODROIDs: None yet
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: Petitboot on UART?

Post by monnier »

I don't understand how "Current version of Petitboot does not have UART access yet": both the old 4.19 and the new mainline kernels have support for the UART, so what makes it hard to build a Petitboot kernel with access to the UART on the M1? The Petitboot UI itself is an ncurses application, AFAICT, so it should work just as well via a UART than in the framebuffer console.

mitchw
Posts: 3
Joined: Tue Sep 26, 2017 5:19 pm
languages_spoken: english
ODROIDs: XU4, C1, C2, M1
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Petitboot on UART?

Post by mitchw »

I wouldn't mind an update on this if possible? I naturally expected to be able to setup my devices via UART as is the default with every odroid device I've used for years.... but it seems I'm forced to plug in a keyboard and HDMI to access the Petitboot interface?

not ideal, and not very compatible with remote administration of the hardware (serial port via USB is a lot easier to interface with and expose remotely, than combined HDMI for init/boot text which needs to be streamed graphically & USB for input - which I'd just consider too much effort - I guess the remote relays on their own to constantly reboot should be enough though if we assume there will never be petitboot related problems once configured...)

Is there any documentation about the firmware flashed onto the m1 / a repo of the firmware I can use to reproduce, investigate (and potentially modify), and re-flash the first or second stage boot loader/s firmware? (assuming JTAG is even exposed anywhere... a quick squiz looks like 2wire SWJ-DP is at least accessible via con9/microsd or the emmc potentially? seems similar to older odroids...) - I'm not terribly interested in taking this path, I'm just curious how open the M1 device is & how much is a closed source black box.
These users thanked the author mitchw for the post:
monnier (Tue Nov 15, 2022 12:41 pm)

User avatar
mad_ady
Posts: 10970
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 999 times
Contact:

Re: Petitboot on UART?

Post by mad_ady »

Petitboot modifications and the custom partition scanning script are not open, but I'm sure it would be easy for @tobetter to spawn a shell over serial when petitboot starts, and you can take over from there. The N2/C4 variant has it.

SuperQ
Posts: 18
Joined: Fri Aug 19, 2022 11:40 pm
languages_spoken: english
ODROIDs: HC4, M1
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Petitboot on UART?

Post by SuperQ »

There actually is a shell on the uart serial. You can start petitboot-nc on the serial and use it from there. But the problem is the other one is still running and will attempt to autoboot.

Modifying the image should be possible, but it would be easier if the source was available.

Come to think of it, the current situation may be a GPL violation.
These users thanked the author SuperQ for the post:
monnier (Tue Nov 15, 2022 12:42 pm)

User avatar
mad_ady
Posts: 10970
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 999 times
Contact:

Re: Petitboot on UART?

Post by mad_ady »

But the problem is the other one is still running and will attempt to autoboot.
You can kill it and autoboot stops. But you have to do it in 10s.

monnier
Posts: 15
Joined: Mon Jul 04, 2022 8:11 am
languages_spoken: english
ODROIDs: None yet
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: Petitboot on UART?

Post by monnier »

Any hope we can fix this misfeature? Why isn't the source code available? That seems completely backward!

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: kenfox and 1 guest