SOLVED Re: PC Engines APU2 infinite loop rebooting immediate after kernel loads

2023-04-23 Thread Jonathan Thornburg
My problem was indeed a missing /etc/boot.conf.  Creating that with
contents
  stty com0 115200
  set tty com0
solved my immediate problem, and editing /etc/ttys to have a getty
running on the serial port (at the right baud rate) got me a fully
working system.

Thanks to everyone who responded (both here & by private email)
for reminding me about boot.conf -- I knew about that but had
brain-parity-error overlooked it.

ciao,
-- 
-- "Jonathan Thornburg [remove -color to reply]" 
   on the west coast of Canada
   "Now back when I worked in banking, if someone went to Barclays,
pretended to be me, borrowed UKP10,000 and legged it, that was
`impersonation', and it was the bank's money that had been stolen,
not my identity.  How did things change?" -- Ross Anderson



Re: PC Engines APU2 infinite loop rebooting immediate after kernel loads

2023-04-18 Thread Paulo Mafra
How is  your /etc/boot.conf ? Did you include the output vídeo to com0 Port ?

Best regards,
Paulo. 


> Em 17 de abr. de 2023, à(s) 21:30, Jonathan Thornburg 
>  escreveu:
> 
> *Summary*
> I have a PC Engines APU2 with a wierd problem: on power-on it starts
> executing the PC Engines coreboot as it should, loads the OpenBSD boot
> loader, and the OpenBSD boot loader then loads an OpenBSD kernel (either
> 7.2/amd64 bsd.rd from an SD card *or* 7.3/amd64 bsd.rd from a USB stick).
> But immediately after printing
>  entry point at 0x8100100
> the APU2 reboots.  Memtest86 doesn't find anything wrong with the hardware.
> Has anyone else seen these symptoms and/or have any suggestions for further
> troubleshooting?
> 
> 
> *Details*
> The hardware is a PC Engines apu4d4 (4 ethernet ports, 2 USB, 4GB RAM)
> with a 16GB SD card.  I bought the hardware in mid-2022 but didn't get
> it working them; alas I don't recall just what I did then.  I'm now
> returning to trying to get it operational.
> 
> The PC Engines coreboot BIOS has an option to run memtest86; I did a
> full cycle (about 1.5 hours wall-clock time) and it didn't find any
> problems with the cpu/memory.
> 
> There is a 7.2/amd64 bsd.rd on the SD card.  If I power the apu2 on and
> don't interrupt the startup sequence, it gets as far as the OpenBSD boot
> loader loading that kernel and printing the kernel entry address, but then
> the apu2 reboots (and the cycle repeats forever if I don't interrupt it).
> Here's a transcript of the serial-port output showing the startup and
> first reboot:
> --- begin ---
> ^@PC Engines apu4
> coreboot build 20202905
> BIOS version v4.12.0.1
> 4080 MB ECC DRAM
> 
> ESCcESC[?7lESC[2JESC[0mSeaBIOS (version rel-1.12.1.3-0-g300e8b70)
> 
> Press F10 key now for boot menu
> 
> Booting from Hard Disk...
> Using drive 0, partition 3.
> Loading..
> probing: pc0 com0 com1 com2 com3 mem[639KKESC[08;42H 3325M 752M a20=on] 
> disk: hd0+
>>> OpenBSD/amd64 BOOT 3.55
> boot> 
> cannot open hd0a:/etc/random.seed: No such file or directory
> booting hd0a:/7.2/amd64/bsd.rd: 3916484+1639424+3884040+0+704512 
> [109+438912+292
> 606]=0xa61d70
> entry point at 0x8100100PC Engines apu4
> coreboot build 20202905
> BIOS version v4.12.0.1
> 4080 MB ECC DRAM
> 
> ESCcESC[?7lESC[2JESC[0mSeaBIOS (version rel-1.12.1.3-0-g300e8b70)
> --- end ---
> 
> If this were the only problem, I could easily write it off as the
> kernel on the SD card being corrupted, and/or the SD card being faulty.
> But I get an almost-identical result if I follow
>  https://www.openbsd.org/faq/faq4.html#MkInsMedia
> and try to boot from a 7.3/amd64 install73.img on a USB stick:
> --- begin ---
> ^@PC Engines apu4
> coreboot build 20202905
> BIOS version v4.12.0.1
> 4080 MB ECC DRAM
> 
> ESCcESC[?7lESC[2JESC[0mSeaBIOS (version rel-1.12.1.3-0-g300e8b70)
> 
> Press F10 key now for boot menu
> 
> Select boot device:
> 
> 1. USB MSC Drive Lexar USB Flash Drive 8.07
> 2. SD card SE16G 15193MiB
> 3. Payload [setup]
> 4. Payload [memtest]
> 
> Booting from Hard Disk...
> Using drive 0, partition 3.
> Loading..
> probing: pc0 com0 com1 com2 com3 mem[639K 3325M 752M a20=on] 
> disk: hd0+ hd1+
>>> OpenBSD/amd64 BOOT 3.55
> boot> 
> cannot open hd0a:/etc/random.seed::ESC[19;35H No such file or directory
> booting hd0a:/7.3/amd64/bsd.rd: 3924676+1647616+3886216+0+704512 
> [109+440424+293
> 778]=0xa667f0
> entry point at 0x8100100PC Engines apu4
> coreboot build 20202905
> BIOS version v4.12.0.1
> 4080 MB ECC DRAM
> 
> ESCcESC[?7lESC[2JESC[0mSeaBIOS (version rel-1.12.1.3-0-g300e8b70)
> --- end ---
> 
> Since two different kernels and boot devices result in the same
> infinite-reboot loop, with the reboot happening at the same place
> in the boot sequence (immediately after the kernel entry point address
> is printed), I don't think my problem is a corrupted kernel file.
> I've also tried swapping power supplies, with no change in the outcome.
> 
> Has anyone seen this sort of problem (infinite reboot loop, rebooting
> immediately after kernel entry point address is printed) before?  Should
> I be looking at reflashing the BIOS with a newer (or older) version?
> 
> Thanks for any insights,
> --
> -- "Jonathan Thornburg [remove color- to reply]" 
> 
>   on the west coast of Canada, eh?
>   "!07/11 PDP a ni deppart m'I !pleH" -- slashdot.org page footer, 2022-10-16
>   "eHpl !'I mrtpaep dnia P PD1 /107" -- slightly more plausible message
> given PDP-11 little-endian byte order
> 



Re: PC Engines APU2 infinite loop rebooting immediate after kernel loads

2023-04-18 Thread Stefan Sperling
On Mon, Apr 17, 2023 at 05:23:05PM -0700, Jonathan Thornburg wrote:
> *Summary*
> I have a PC Engines APU2 with a wierd problem: on power-on it starts
> executing the PC Engines coreboot as it should, loads the OpenBSD boot
> loader, and the OpenBSD boot loader then loads an OpenBSD kernel (either
> 7.2/amd64 bsd.rd from an SD card *or* 7.3/amd64 bsd.rd from a USB stick).
> But immediately after printing
>   entry point at 0x8100100
> the APU2 reboots.  Memtest86 doesn't find anything wrong with the hardware.
> Has anyone else seen these symptoms and/or have any suggestions for further
> troubleshooting?

> Loading..
> probing: pc0 com0 com1 com2 com3 mem[639KKESC[08;42H 3325M 752M a20=on] 
> disk: hd0+
> >> OpenBSD/amd64 BOOT 3.55
> boot> 
> cannot open hd0a:/etc/random.seed: No such file or directory
> booting hd0a:/7.2/amd64/bsd.rd: 3916484+1639424+3884040+0+704512 
> [109+438912+292
> 606]=0xa61d70
> entry point at 0x8100100PC Engines apu4
> coreboot build 20202905
> BIOS version v4.12.0.1
> 4080 MB ECC DRAM

You forgot about setting up the serial console in the boot loader:

boot> stty com0 115200
boot> set tty com0
boot> boot bsd.rd



Re: PC Engines APU2 infinite loop rebooting immediate after kernel loads

2023-04-17 Thread Brian Conway
On Mon, Apr 17, 2023, at 7:23 PM, Jonathan Thornburg wrote:
> Since two different kernels and boot devices result in the same
> infinite-reboot loop, with the reboot happening at the same place
> in the boot sequence (immediately after the kernel entry point address
> is printed), I don't think my problem is a corrupted kernel file.
> I've also tried swapping power supplies, with no change in the outcome.
>
> Has anyone seen this sort of problem (infinite reboot loop, rebooting
> immediately after kernel entry point address is printed) before?  Should
> I be looking at reflashing the BIOS with a newer (or older) version?

My first thought was bad power supply, but it looks like you've tried that. 
Your BIOS isn't *that* old, but you might consider trying a newer one 
(https://pcengines.github.io/). I'm using 4.17.0.3 successfully on a couple 
different apu2 configurations.

You could also try booting from a USB stick, I've run these devices with mSATA, 
SD card, or USB flash.

Brian Conway



PC Engines APU2 infinite loop rebooting immediate after kernel loads

2023-04-17 Thread Jonathan Thornburg
*Summary*
I have a PC Engines APU2 with a wierd problem: on power-on it starts
executing the PC Engines coreboot as it should, loads the OpenBSD boot
loader, and the OpenBSD boot loader then loads an OpenBSD kernel (either
7.2/amd64 bsd.rd from an SD card *or* 7.3/amd64 bsd.rd from a USB stick).
But immediately after printing
  entry point at 0x8100100
the APU2 reboots.  Memtest86 doesn't find anything wrong with the hardware.
Has anyone else seen these symptoms and/or have any suggestions for further
troubleshooting?


*Details*
The hardware is a PC Engines apu4d4 (4 ethernet ports, 2 USB, 4GB RAM)
with a 16GB SD card.  I bought the hardware in mid-2022 but didn't get
it working them; alas I don't recall just what I did then.  I'm now
returning to trying to get it operational.

The PC Engines coreboot BIOS has an option to run memtest86; I did a
full cycle (about 1.5 hours wall-clock time) and it didn't find any
problems with the cpu/memory.

There is a 7.2/amd64 bsd.rd on the SD card.  If I power the apu2 on and
don't interrupt the startup sequence, it gets as far as the OpenBSD boot
loader loading that kernel and printing the kernel entry address, but then
the apu2 reboots (and the cycle repeats forever if I don't interrupt it).
Here's a transcript of the serial-port output showing the startup and
first reboot:
--- begin ---
^@PC Engines apu4
coreboot build 20202905
BIOS version v4.12.0.1
4080 MB ECC DRAM

ESCcESC[?7lESC[2JESC[0mSeaBIOS (version rel-1.12.1.3-0-g300e8b70)

Press F10 key now for boot menu

Booting from Hard Disk...
Using drive 0, partition 3.
Loading..
probing: pc0 com0 com1 com2 com3 mem[639KKESC[08;42H 3325M 752M a20=on] 
disk: hd0+
>> OpenBSD/amd64 BOOT 3.55
boot> 
cannot open hd0a:/etc/random.seed: No such file or directory
booting hd0a:/7.2/amd64/bsd.rd: 3916484+1639424+3884040+0+704512 [109+438912+292
606]=0xa61d70
entry point at 0x8100100PC Engines apu4
coreboot build 20202905
BIOS version v4.12.0.1
4080 MB ECC DRAM

ESCcESC[?7lESC[2JESC[0mSeaBIOS (version rel-1.12.1.3-0-g300e8b70)
--- end ---

If this were the only problem, I could easily write it off as the
kernel on the SD card being corrupted, and/or the SD card being faulty.
But I get an almost-identical result if I follow
  https://www.openbsd.org/faq/faq4.html#MkInsMedia
and try to boot from a 7.3/amd64 install73.img on a USB stick:
--- begin ---
^@PC Engines apu4
coreboot build 20202905
BIOS version v4.12.0.1
4080 MB ECC DRAM

ESCcESC[?7lESC[2JESC[0mSeaBIOS (version rel-1.12.1.3-0-g300e8b70)

Press F10 key now for boot menu

Select boot device:

1. USB MSC Drive Lexar USB Flash Drive 8.07
2. SD card SE16G 15193MiB
3. Payload [setup]
4. Payload [memtest]

Booting from Hard Disk...
Using drive 0, partition 3.
Loading..
probing: pc0 com0 com1 com2 com3 mem[639K 3325M 752M a20=on] 
disk: hd0+ hd1+
>> OpenBSD/amd64 BOOT 3.55
boot> 
cannot open hd0a:/etc/random.seed::ESC[19;35H No such file or directory
booting hd0a:/7.3/amd64/bsd.rd: 3924676+1647616+3886216+0+704512 [109+440424+293
778]=0xa667f0
entry point at 0x8100100PC Engines apu4
coreboot build 20202905
BIOS version v4.12.0.1
4080 MB ECC DRAM

ESCcESC[?7lESC[2JESC[0mSeaBIOS (version rel-1.12.1.3-0-g300e8b70)
--- end ---

Since two different kernels and boot devices result in the same
infinite-reboot loop, with the reboot happening at the same place
in the boot sequence (immediately after the kernel entry point address
is printed), I don't think my problem is a corrupted kernel file.
I've also tried swapping power supplies, with no change in the outcome.

Has anyone seen this sort of problem (infinite reboot loop, rebooting
immediately after kernel entry point address is printed) before?  Should
I be looking at reflashing the BIOS with a newer (or older) version?

Thanks for any insights,
--
-- "Jonathan Thornburg [remove color- to reply]" 
   on the west coast of Canada, eh?
   "!07/11 PDP a ni deppart m'I !pleH" -- slashdot.org page footer, 2022-10-16
   "eHpl !'I mrtpaep dnia P PD1 /107" -- slightly more plausible message
 given PDP-11 little-endian byte order