9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Plan9 on Raspberry Pi 400?
@ 2021-01-16 17:12 Richard Miller
  2021-01-16 21:24 ` Skip Tavakkolian
  0 siblings, 1 reply; 29+ messages in thread
From: Richard Miller @ 2021-01-16 17:12 UTC (permalink / raw)
  To: 9fans

> I didn't realise the 9pi image was not up to date.
> I'll put a new one on 9p.io today.

I've done that. Sorry for letting it get out of sync with the kernel source.

The new contrib/miller/9pi.img.gz has
- the latest firmware files from the raspberry pi github
- the update to initialise xhci firmware for pi400 and recent pi4 boards
- a tweak to the pi4 gigabit ethernet driver to allow jumbo packets
- a new /dev/serial device from which you can read the board serial number (I forget why)

Nothing outside the kernel has changed from the previous image.




------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tfcf12cca3a14dc8a-M6d02f52b317dd7989854d801
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-16 17:12 [9fans] Plan9 on Raspberry Pi 400? Richard Miller
@ 2021-01-16 21:24 ` Skip Tavakkolian
  2021-01-16 22:14   ` Bakul Shah
  0 siblings, 1 reply; 29+ messages in thread
From: Skip Tavakkolian @ 2021-01-16 21:24 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1392 bytes --]

regarding /dev/serial, this should be helpful for anyone wanting to set up
netboot.

If you have a number of RPI's that netboot, the way that the common
config.txt is segmented for each board is by using the '[serial number in
hex]' section headers. Unfortunately, netboot also requires changing the
BOOT_ORDER parameter in EEPROM, which requires access to /dev/mmcblk* and
some way of generating the proper .bin format. So Linux is still needed for
the initial setup.

On Sat, Jan 16, 2021 at 9:13 AM Richard Miller <9fans@hamnavoe.com> wrote:

> > I didn't realise the 9pi image was not up to date.
> > I'll put a new one on 9p.io today.
> 
> I've done that. Sorry for letting it get out of sync with the kernel
> source.
> 
> The new contrib/miller/9pi.img.gz has
> - the latest firmware files from the raspberry pi github
> - the update to initialise xhci firmware for pi400 and recent pi4 boards
> - a tweak to the pi4 gigabit ethernet driver to allow jumbo packets
> - a new /dev/serial device from which you can read the board serial number
> (I forget why)
> 
> Nothing outside the kernel has changed from the previous image.
> 

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tfcf12cca3a14dc8a-Mc3da71e0e76edae80cc21b17
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 2745 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-16 21:24 ` Skip Tavakkolian
@ 2021-01-16 22:14   ` Bakul Shah
  2021-01-17  7:11     ` Skip Tavakkolian
  0 siblings, 1 reply; 29+ messages in thread
From: Bakul Shah @ 2021-01-16 22:14 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 2521 bytes --]

I believe all it takes is the presence of recover.bin file on the dos partition.
You still need an updated eeprom image for it to flash the real eeprom with
 but preparing this image doesn't require any h/w access. Unless things
have changed in the last year.

> On Jan 16, 2021, at 1:24 PM, Skip Tavakkolian <skip.tavakkolian@gmail.com> wrote:
> 
> regarding /dev/serial, this should be helpful for anyone wanting to set up netboot.
> 
> If you have a number of RPI's that netboot, the way that the common config.txt is segmented for each board is by using the '[serial number in hex]' section headers. Unfortunately, netboot also requires changing the BOOT_ORDER parameter in EEPROM, which requires access to /dev/mmcblk* and some way of generating the proper .bin format. So Linux is still needed for the initial setup.
> 
> On Sat, Jan 16, 2021 at 9:13 AM Richard Miller <9fans@hamnavoe.com <mailto:9fans@hamnavoe.com>> wrote:
> > I didn't realise the 9pi image was not up to date.
> > I'll put a new one on 9p.io <http://9p.io/> today.
> 
> I've done that. Sorry for letting it get out of sync with the kernel source.
> 
> The new contrib/miller/9pi.img.gz has
> - the latest firmware files from the raspberry pi github
> - the update to initialise xhci firmware for pi400 and recent pi4 boards
> - a tweak to the pi4 gigabit ethernet driver to allow jumbo packets
> - a new /dev/serial device from which you can read the board serial number (I forget why)
> 
> Nothing outside the kernel has changed from the previous image.
> 
> 
> 
> 
> ------------------------------------------
> 9fans: 9fans
> Permalink: https://9fans.topicbox.com/groups/9fans/Tfcf12cca3a14dc8a-M6d02f52b317dd7989854d801 <https://9fans.topicbox.com/groups/9fans/Tfcf12cca3a14dc8a-M6d02f52b317dd7989854d801>
> Delivery options: https://9fans.topicbox.com/groups/9fans/subscription <https://9fans.topicbox.com/groups/9fans/subscription>
> 9fans <https://9fans.topicbox.com/latest> / 9fans / see discussions <https://9fans.topicbox.com/groups/9fans> + participants <https://9fans.topicbox.com/groups/9fans/members> + delivery options <https://9fans.topicbox.com/groups/9fans/subscription>Permalink <https://9fans.topicbox.com/groups/9fans/Tfcf12cca3a14dc8a-Mc3da71e0e76edae80cc21b17>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tfcf12cca3a14dc8a-M4df905923fb217a0834ea1f0
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 3880 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-16 22:14   ` Bakul Shah
@ 2021-01-17  7:11     ` Skip Tavakkolian
  0 siblings, 0 replies; 29+ messages in thread
From: Skip Tavakkolian @ 2021-01-17  7:11 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 2681 bytes --]

I went down the eeprom rabbithole a bit. To access and manipulate RPI4's
eeprom directly,
Plan 9 would need to support a device like /dev/vchiq (VideoCore interface)
on Linux:

https://github.com/raspberrypi/linux/blob/rpi-3.2.27/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c#L334

The rest of the tools (e.g. rpi-eeprom-update) eventually use vcgencmd
which ioctl into /dev/vchiq.
My /dev/mmcblk comment was wrong.

On Sat, Jan 16, 2021 at 2:15 PM Bakul Shah <bakul@iitbombay.org> wrote:

> I believe all it takes is the presence of recover.bin file on the dos
> partition.
> You still need an updated eeprom image for it to flash the real eeprom with
>  but preparing this image doesn't require any h/w access. Unless things
> have changed in the last year.
>
> On Jan 16, 2021, at 1:24 PM, Skip Tavakkolian <skip.tavakkolian@gmail.com>
> wrote:
>
> regarding /dev/serial, this should be helpful for anyone wanting to set up
> netboot.
>
> If you have a number of RPI's that netboot, the way that the common
> config.txt is segmented for each board is by using the '[serial number in
> hex]' section headers. Unfortunately, netboot also requires changing the
> BOOT_ORDER parameter in EEPROM, which requires access to /dev/mmcblk* and
> some way of generating the proper .bin format. So Linux is still needed for
> the initial setup.
>
> On Sat, Jan 16, 2021 at 9:13 AM Richard Miller <9fans@hamnavoe.com> wrote:
>
>> > I didn't realise the 9pi image was not up to date.
>> > I'll put a new one on 9p.io today.
>> 
>> I've done that. Sorry for letting it get out of sync with the kernel
>> source.
>> 
>> The new contrib/miller/9pi.img.gz has
>> - the latest firmware files from the raspberry pi github
>> - the update to initialise xhci firmware for pi400 and recent pi4 boards
>> - a tweak to the pi4 gigabit ethernet driver to allow jumbo packets
>> - a new /dev/serial device from which you can read the board serial
>> number (I forget why)
>> 
>> Nothing outside the kernel has changed from the previous image.
>> 
>
> *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions
> <https://9fans.topicbox.com/groups/9fans> + participants
> <https://9fans.topicbox.com/groups/9fans/members> + delivery options
> <https://9fans.topicbox.com/groups/9fans/subscription> Permalink
> <https://9fans.topicbox.com/groups/9fans/Tfcf12cca3a14dc8a-M4df905923fb217a0834ea1f0>
>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tfcf12cca3a14dc8a-M9568b0b0d78c08e1ec367e5c
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 4364 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-19  9:52                           ` Richard Miller
@ 2021-01-20 15:25                             ` Mack Wallace
  0 siblings, 0 replies; 29+ messages in thread
From: Mack Wallace @ 2021-01-20 15:25 UTC (permalink / raw)
  To: 9fans

Just wanted to update. I was able to download the new main.c and compile a new kernel. 4GB of ram is now recognized.

Thank you!

> On Jan 19, 2021, at 4:52 AM, Richard Miller <9fans@hamnavoe.com> wrote:
> 
>> Sometimes I wish we'd stuck to the clunky original IBM 3270-style keyboard...
> 
> My raspberry pi terminal is connected to an IBM Model M keyboard
> (the compact version without a separate number pad), which I expect will
> outlast me.  I've never seen a pi400 but I don't imagine I would like it.
> 

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M50f339cd4bd3f36a32bb32c2
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-19  4:13                         ` Lucio De Re
@ 2021-01-19  9:52                           ` Richard Miller
  2021-01-20 15:25                             ` Mack Wallace
  0 siblings, 1 reply; 29+ messages in thread
From: Richard Miller @ 2021-01-19  9:52 UTC (permalink / raw)
  To: 9fans

> Sometimes I wish we'd stuck to the clunky original IBM 3270-style keyboard...

My raspberry pi terminal is connected to an IBM Model M keyboard
(the compact version without a separate number pad), which I expect will
outlast me.  I've never seen a pi400 but I don't imagine I would like it.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M2c8a128437507b8aa9d1155c
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-18 16:54                       ` ori
@ 2021-01-19  8:20                         ` hiro
  0 siblings, 0 replies; 29+ messages in thread
From: hiro @ 2021-01-19  8:20 UTC (permalink / raw)
  To: 9fans

> fwiw, you're likely to get better results with
> 9front help on 9front@9front.org.

as long as rpi400 is involved this should be the best place, cause i
don't think anybody has managed to send cinap a rpi400 yet

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M6c055c0ddcc625b5cd1a6aea
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-19  0:54                       ` Stuart Morrow
@ 2021-01-19  4:13                         ` Lucio De Re
  2021-01-19  9:52                           ` Richard Miller
  0 siblings, 1 reply; 29+ messages in thread
From: Lucio De Re @ 2021-01-19  4:13 UTC (permalink / raw)
  To: 9fans

You'll be amazed how quickly you get used to not having the Caps Lock
key causing you grief, as it then starts doing on every other
platform.

Except that Ctrl-A (well, Caps-Lock-A) then becomes a bit of a
nightmare. And the Insert key as Expand is not my favourite, either.

Erik Quanstrom long ago suggested that a redesign of the Plan 9
keyboard interface is overdue.

Coincidentally, I note that the RPi-400 has a UK keyboard, like my
Chromebook. The curious coincidence is that Google chose to abandon
Caps-Lock on the Chromebook. I can't get used to the UK layout, nor
the narrow Enter key or the tiny backspace, so that isn't quite the
keyboard layout I would choose.

Sometimes I wish we'd stuck to the clunky original IBM 3270-style keyboard...

Lucio.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M70602bfb525ad836cb055548
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-18 15:42                     ` Mack Wallace
  2021-01-18 16:54                       ` ori
@ 2021-01-19  0:54                       ` Stuart Morrow
  2021-01-19  4:13                         ` Lucio De Re
  1 sibling, 1 reply; 29+ messages in thread
From: Stuart Morrow @ 2021-01-19  0:54 UTC (permalink / raw)
  To: 9fans

On 18/01/2021, Mack Wallace <mackbw@mapinternet.com> wrote:
> the Caps Lock and Num Lock keys not functioning. (The caps lock acts like a
> control key, num-lock does nothing - I presume it’s a mapping issue).

Yeah, they're not supposed to work; see keyboard(6). I don't know the reason;
either someone just didn't like lock keys, or it's autistically doing
portability by
supporting only the intersection of features across machine types.

Caps lock is apparently a future possibility for 9front, as the PC and
SGI kernels
have #b/leds, and the USB driver seems to have something to do with LEDs, too,
though that function isn't called by anything.

On 18/01/2021, ori@eigenstate.org <ori@eigenstate.org> wrote:
> fwiw, you're likely to get better results with
> 9front help on 9front@9front.org.

Why? I would imagine 9boomers subscribership is a proper superset of 9front,
plus there's no cost to being subscribed.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-Mff77bfb26496650e35064341
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-18 15:42                     ` Mack Wallace
@ 2021-01-18 16:54                       ` ori
  2021-01-19  8:20                         ` hiro
  2021-01-19  0:54                       ` Stuart Morrow
  1 sibling, 1 reply; 29+ messages in thread
From: ori @ 2021-01-18 16:54 UTC (permalink / raw)
  To: 9fans

Quoth Mack Wallace <mackbw@mapinternet.com>:
> I have a 9front server - I had tried compiling a new kernel (of the 9front variety) there, but with lackluster results (i.e. kernel panic) on the Pi. 

fwiw, you're likely to get better results with
9front help on 9front@9front.org.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M3eab6c0ba9e9fff2783dd0a0
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-18 14:51                   ` Richard Miller
@ 2021-01-18 15:42                     ` Mack Wallace
  2021-01-18 16:54                       ` ori
  2021-01-19  0:54                       ` Stuart Morrow
  0 siblings, 2 replies; 29+ messages in thread
From: Mack Wallace @ 2021-01-18 15:42 UTC (permalink / raw)
  To: 9fans

Thank you Michael for the kernel, it worked well. Skip for your config.txt, and certainly Richard for all your efforts porting 9 to the pi, and trying to keep it up to date. 

I have a 9front server - I had tried compiling a new kernel (of the 9front variety) there, but with lackluster results (i.e. kernel panic) on the Pi. 

Anyway, once I got the Pi usable between Michael's and Skip’s contributions, I was able to get the latest files from Richard’s contrib to update the source on the Pi and then build a new kernel. I found it interesting that the kernel size was different from what Michael had provided. But of course, there are so many variables that may affect such things. 

The two issues I saw were the aforementioned only recognizing 1GB of ram and the Caps Lock and Num Lock keys not functioning. (The caps lock acts like a control key, num-lock does nothing - I presume it’s a mapping issue). Neither issue I was particularly concerned with, I was happy just to have my Pi working with 9. 

I will certainly download the updated main.c and make a new kernel and get let you know the results.

So thank you!





> On Jan 18, 2021, at 9:51 AM, Richard Miller <9fans@hamnavoe.com> wrote:
> 
>> I did notice, that Richards image that I have, seems to only recognize 1GB of ram.
> 
> I put a new contrib/miller/9/bcm/main.c on 9p.io which should correct that.
> 

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M645899f15e112c44444b1314
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-16  0:31                 ` Mack Wallace
  2021-01-16  1:01                   ` Michael Engel
@ 2021-01-18 14:51                   ` Richard Miller
  2021-01-18 15:42                     ` Mack Wallace
  1 sibling, 1 reply; 29+ messages in thread
From: Richard Miller @ 2021-01-18 14:51 UTC (permalink / raw)
  To: 9fans

> I did notice, that Richards image that I have, seems to only recognize 1GB of ram.

I put a new contrib/miller/9/bcm/main.c on 9p.io which should correct that.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M07359f41b8293129e06eb2b7
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-15  1:15     ` Skip Tavakkolian
  2021-01-15 18:44       ` Mack Wallace
@ 2021-01-16 16:15       ` Skip Tavakkolian
  1 sibling, 0 replies; 29+ messages in thread
From: Skip Tavakkolian @ 2021-01-16 16:15 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 3051 bytes --]

To clarify, I build 9pi locally from the latest version of sources.

On Thu, Jan 14, 2021, 5:15 PM Skip Tavakkolian <skip.tavakkolian@gmail.com>
wrote:

> I'm using a RPi400 with Richard's port. I'm netbooting without issues and
> up for days.  The only issue I had was forgetting to set 'enable_gic=1' as
> Richard instructed in the sources. Pi4 works ok without it, pi400 doesn't.
>
>
> On Thu, Jan 14, 2021, 3:39 PM Mack Wallace <mackbw@mapinternet.com> wrote:
>
>> Thank you for the reply Stuart, but no luck.
>> 
>> I did download Mr. Miller’s image. It would not boot at all until I
>> replaced the files that you mention, but the kernel in that image locks up
>> after detecting the fourth core of the CPU. However, from that failure I
>> learned that those files, (start_cd.elf, start4cd.elf, fixup_cd.dat,
>> fixup4cd.dat) are necessary for the Pi to boot, and that those with the
>> bootcode.bin and presumably, but it doesn’t seem to matter whether I use
>> bcm2711-rpi-4-b.dtb or bcm2711-rpi-400.dtb - the dtbs are vital to the
>> process. - and that all those files simply need to be copied into the fat
>> partition/boot directory.
>> 
>> So I burned another image (actually many, trying different SD cards, and
>> different configurations, older kernels, etc) and replaced all the files
>> I’ve mentioned with the ones from
>> https://github.com/raspberrypi/firmware/tree/master/boot (hopefully
>> that’s where I should get them). My most recent iteration just has the
>> single error repeated:
>> 
>> sdhc: read error intr 2008002 stat 1fff0000
>> 
>> This occurs many times. In the middle of these errors is
>> 
>> /dev/sdM0: BCM SD Host Controller 02 Version 10
>> 
>> then the error repeats itself over 50 times before printing out the lines
>> /dev/sdM0/data
>> bootargs is (tcp, tls, il, local!device)[]
>> 
>> At no time during this process is the keyboard or mouse responsive.
>> Though the mouse icon did become visible during the boot process.
>> 
>> I am hoping I am wrong, but I am thinking there is some sort of driver
>> issue. At the very least, checking what media there is to mount, or reading
>> the SD card. And then possibly for other things, but the former could be
>> gumming up the works for everything else.
>> 
>> On Jan 14, 2021, at 6:05 PM, Stuart Morrow <morrow.stuart@gmail.com>
>> wrote:
>> 
>> Try copying the .dtb *and* the start4 and fixup4.
>> 
>> *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions
>> <https://9fans.topicbox.com/groups/9fans> + participants
>> <https://9fans.topicbox.com/groups/9fans/members> + delivery options
>> <https://9fans.topicbox.com/groups/9fans/subscription> Permalink
>> <https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M63bd5d3f548dbbf61c8f5402>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M1e4e003d008a726d01e49d4a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 4848 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-16 10:24                     ` Richard Miller
@ 2021-01-16 11:28                       ` Michael Engel
  0 siblings, 0 replies; 29+ messages in thread
From: Michael Engel @ 2021-01-16 11:28 UTC (permalink / raw)
  To: Richard Miller; +Cc: 9fans

> On 16 Jan 2021, at 11:24, Richard Miller <9fans@hamnavoe.com> wrote:
> 
>> I built the 9pi4 kernel from Richard's sources and it works on my Pi400 (and Pi4B 8GB) 
> 
> Thanks Michael, I didn't realise the 9pi image was not up to date.

I think that's the reason for the USB problems on the Pi 400 - the kernels and image on 9p.io 
have a modification date of May 20/22 2020, whereas the usbxhci.c and vcore.c files in the 
bcm sources are from early June.

> I'll put a new one on 9p.io today.

Thanks a lot!

Best,
    Michael



------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-Mcb1bffcd60a84bcaee5bd947
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-16  1:01                   ` Michael Engel
@ 2021-01-16 10:24                     ` Richard Miller
  2021-01-16 11:28                       ` Michael Engel
  0 siblings, 1 reply; 29+ messages in thread
From: Richard Miller @ 2021-01-16 10:24 UTC (permalink / raw)
  To: michael.engel, 9fans

> I built the 9pi4 kernel from Richard's sources and it works on my Pi400 (and Pi4B 8GB) 

Thanks Michael, I didn't realise the 9pi image was not up to date.
I'll put a new one on 9p.io today.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M84b859e7234a33a3ce8ceaea
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-15 18:44       ` Mack Wallace
  2021-01-15 19:54         ` Mack Wallace
@ 2021-01-16  7:19         ` Skip Tavakkolian
  1 sibling, 0 replies; 29+ messages in thread
From: Skip Tavakkolian @ 2021-01-16  7:19 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 4383 bytes --]

Here's the config.txt that I use for my rpi400 (it's on the file server and
handed to rpi via tftp):

start_file=start4cd.elf
fixup_file=fixup4cd.dat
cmdline=xxxxxxx/cmdline.txt
kernel=arm/9pi4
gpu_mem=16
hdmi_group=2
hdmi_mode=82
core_freq=250
enable_gic=1
device_tree=


On Fri, Jan 15, 2021 at 10:45 AM Mack Wallace <mackbw@mapinternet.com>
wrote:

> Dear Skip,
>
> That pushed the ball forward significantly, but I still have issues. (But
> thank you, every little advancement helps.) So with that flag, I was able
> to get Richard’s port to boot into Glenda’s account (showing acme, faces,
> stats, etc). However, I do not seem to have any USB; no mouse; nor
> keyboard. Stats is moving on the screen, so things are not too locked up. I
> did try rebooting with an external keyboard and another mouse. Still
> nothing. The external keyboard doesn’t respond to anything (no caps lock
> nor num lock.) One mouse is in the USB 2.0 port, another and the external
> keyboard are in the USB 3.0 ports.
>
> on boot, I see the following:
> usbxhci: 0x1106 0x3483 port 600000000 size 0x1000 irq0
> #u/usb/ep1.0: xhci port 0x0 irq 0
>
> The line before is #l for the network,
> The line after is the detection of the other three cores.
>
> The changing of the enable_gic=1 on the 9front image seemed to have to
> effect.
>
> Thanks again!
>
> Mack
>
>
> On Jan 14, 2021, at 8:15 PM, Skip Tavakkolian <skip.tavakkolian@gmail.com>
> wrote:
>
>
> I'm using a RPi400 with Richard's port. I'm netbooting without issues and
> up for days.  The only issue I had was forgetting to set 'enable_gic=1' as
> Richard instructed in the sources. Pi4 works ok without it, pi400 doesn't.
>
>
> On Thu, Jan 14, 2021, 3:39 PM Mack Wallace <mackbw@mapinternet.com> wrote:
>
>> Thank you for the reply Stuart, but no luck.
>> 
>> I did download Mr. Miller’s image. It would not boot at all until I
>> replaced the files that you mention, but the kernel in that image locks up
>> after detecting the fourth core of the CPU. However, from that failure I
>> learned that those files, (start_cd.elf, start4cd.elf, fixup_cd.dat,
>> fixup4cd.dat) are necessary for the Pi to boot, and that those with the
>> bootcode.bin and presumably, but it doesn’t seem to matter whether I use
>> bcm2711-rpi-4-b.dtb or bcm2711-rpi-400.dtb - the dtbs are vital to the
>> process. - and that all those files simply need to be copied into the fat
>> partition/boot directory.
>> 
>> So I burned another image (actually many, trying different SD cards, and
>> different configurations, older kernels, etc) and replaced all the files
>> I’ve mentioned with the ones from
>> https://github.com/raspberrypi/firmware/tree/master/boot (hopefully
>> that’s where I should get them). My most recent iteration just has the
>> single error repeated:
>> 
>> sdhc: read error intr 2008002 stat 1fff0000
>> 
>> This occurs many times. In the middle of these errors is
>> 
>> /dev/sdM0: BCM SD Host Controller 02 Version 10
>> 
>> then the error repeats itself over 50 times before printing out the lines
>> /dev/sdM0/data
>> bootargs is (tcp, tls, il, local!device)[]
>> 
>> At no time during this process is the keyboard or mouse responsive.
>> Though the mouse icon did become visible during the boot process.
>> 
>> I am hoping I am wrong, but I am thinking there is some sort of driver
>> issue. At the very least, checking what media there is to mount, or reading
>> the SD card. And then possibly for other things, but the former could be
>> gumming up the works for everything else.
>> 
>> On Jan 14, 2021, at 6:05 PM, Stuart Morrow <morrow.stuart@gmail.com>
>> wrote:
>> 
>> Try copying the .dtb *and* the start4 and fixup4.
>> 
> *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions
> <https://9fans.topicbox.com/groups/9fans> + participants
> <https://9fans.topicbox.com/groups/9fans/members> + delivery options
> <https://9fans.topicbox.com/groups/9fans/subscription> Permalink
> <https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M3e4eaa51003d3faf4b21f271>
>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M635cb4e04d6c4b764cab5ea2
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 6566 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-15 22:52               ` Michael Engel
  2021-01-16  0:31                 ` Mack Wallace
@ 2021-01-16  3:03                 ` Bakul Shah
  1 sibling, 0 replies; 29+ messages in thread
From: Bakul Shah @ 2021-01-16  3:03 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 7015 bytes --]

USB boot is supposed to work on pi400 as well so I thought there would be no need for any firmware loading....

> On Jan 15, 2021, at 2:52 PM, Michael Engel <michael.engel@ntnu.no> wrote:
> 
> I assume loading the firmware via Linux first won't help since a PCIe reset probably also 
> resets the USB controller.
> 
> However, I just checked Richard's kernel source and it seems the firmware loading functionality
> is already included, there is a call to
> 
>        xhcireset(BUSBNO(hp->tbdf)<<20 | BUSDNO(hp->tbdf)<<15 | BUSFNO(hp->tbdf)<<12);
> 
> in http://9p.io/sources/contrib/miller/9/bcm/usbxhci.c <http://9p.io/sources/contrib/miller/9/bcm/usbxhci.c>
> 
> The comment for xhcireset in http://9p.io/sources/contrib/miller/9/bcm/vcore.c <http://9p.io/sources/contrib/miller/9/bcm/vcore.c> confirms this:
> /*
> * Notify gpu that xhci firmware might need loading. This is for some
> * pi4 board versions which are missing the eeprom chip for the vl805,
> * requiring its firmware to come from the boot eeprom instead.
> */
> 
> It seems that this source code is more recent than the images for the SD card and kernel in 
> http://9p.io/sources/contrib/miller/ <http://9p.io/sources/contrib/miller/> - I'll try building a kernel based on the updated sources.
> 
> - Michael
> 
> 
>> On 15 Jan 2021, at 23:32, Bakul Shah <bakul@iitbombay.org> wrote:
>> 
>> Can you netboot Linux followed by netbooting Paln9 and have a working USB?
>> 
>>> On Jan 15, 2021, at 1:17 PM, Michael Engel <michael.engel@ntnu.no> wrote:
>>> 
>>> Hi,
>>> 
>>> I didn't test Plan 9 on my RPi 400 so far, but I think the reason for the USB problems 
>>> is the following:
>>> 
>>> The Raspberry Pi 400 (along with the Compute Module 4 and the 8 GB RAM version 
>>> of the RPI4) uses a new stepping C0 of the BCM2711. This version does not have a 
>>> dedicated EEPROM for the firmware of the xHCI USB controller and needs an 
>>> additional property mailbox call for loading the xHCI firmware after PCIe reset. 
>>> 
>>> Some code to load the firmware can be found in the circle bare-metal library (l. 88ff):
>>> https://github.com/rsta2/circle/blob/Step42.1/lib/usb/xhcidevice.cpp
>>> 
>>> -- Michael
>>> 
>>> 
>>>> On 15 Jan 2021, at 20:54, Mack Wallace <mackbw@mapinternet.com> wrote:
>>>> 
>>>> I took that microSD card that has the bootable image without USB and put it into a traditional Pi4. It boots on that without a problem and has mouse and keyboard. I notices that after the additional CPU cores are detected, that is mentions usb/hub… usb/kbd….  The image when booting on the Pi 400 never provides those messages.
>>>> 
>>>> Regards,
>>>> 
>>>> Mack 
>>>> 
>>>>> On Jan 15, 2021, at 1:44 PM, Mack Wallace <mackbw@mapinternet.com> wrote:
>>>>> 
>>>>> Dear Skip,
>>>>> 
>>>>> That pushed the ball forward significantly, but I still have issues. (But thank you, every little advancement helps.) So with that flag, I was able to get Richard’s port to boot into Glenda’s account (showing acme, faces, stats, etc). However, I do not seem to have any USB; no mouse; nor keyboard. Stats is moving on the screen, so things are not too locked up. I did try rebooting with an external keyboard and another mouse. Still nothing. The external keyboard doesn’t respond to anything (no caps lock nor num lock.) One mouse is in the USB 2.0 port, another and the external keyboard are in the USB 3.0 ports. 
>>>>> 
>>>>> on boot, I see the following:
>>>>> usbxhci: 0x1106 0x3483 port 600000000 size 0x1000 irq0
>>>>> #u/usb/ep1.0: xhci port 0x0 irq 0
>>>>> 
>>>>> The line before is #l for the network,
>>>>> The line after is the detection of the other three cores.
>>>>> 
>>>>> The changing of the enable_gic=1 on the 9front image seemed to have to effect.
>>>>> 
>>>>> Thanks again!
>>>>> 
>>>>> Mack
>>>>> 
>>>>> 
>>>>> On Jan 14, 2021, at 8:15 PM, Skip Tavakkolian <skip.tavakkolian@gmail.com> wrote:
>>>>>> 
>>>>>> I'm using a RPi400 with Richard's port. I'm netbooting without issues and up for days.  The only issue I had was forgetting to set 'enable_gic=1' as Richard instructed in the sources. Pi4 works ok without it, pi400 doesn't.
>>>>>> 
>>>>>> 
>>>>>> On Thu, Jan 14, 2021, 3:39 PM Mack Wallace <mackbw@mapinternet.com> wrote:
>>>>>> Thank you for the reply Stuart, but no luck.
>>>>>> 
>>>>>> I did download Mr. Miller’s image. It would not boot at all until I replaced the files that you mention, but the kernel in that image locks up after detecting the fourth core of the CPU. However, from that failure I learned that those files, (start_cd.elf, start4cd.elf, fixup_cd.dat, fixup4cd.dat) are necessary for the Pi to boot, and that those with the bootcode.bin and presumably, but it doesn’t seem to matter whether I use bcm2711-rpi-4-b.dtb or bcm2711-rpi-400.dtb - the dtbs are vital to the process. - and that all those files simply need to be copied into the fat partition/boot directory.
>>>>>> 
>>>>>> So I burned another image (actually many, trying different SD cards, and different configurations, older kernels, etc) and replaced all the files I’ve mentioned with the ones from https://github.com/raspberrypi/firmware/tree/master/boot (hopefully that’s where I should get them). My most recent iteration just has the single error repeated:
>>>>>> 
>>>>>> sdhc: read error intr 2008002 stat 1fff0000
>>>>>> 
>>>>>> This occurs many times. In the middle of these errors is 
>>>>>> 
>>>>>> /dev/sdM0: BCM SD Host Controller 02 Version 10
>>>>>> 
>>>>>> then the error repeats itself over 50 times before printing out the lines
>>>>>> /dev/sdM0/data
>>>>>> bootargs is (tcp, tls, il, local!device)[]
>>>>>> 
>>>>>> At no time during this process is the keyboard or mouse responsive. Though the mouse icon did become visible during the boot process. 
>>>>>> 
>>>>>> I am hoping I am wrong, but I am thinking there is some sort of driver issue. At the very least, checking what media there is to mount, or reading the SD card. And then possibly for other things, but the former could be gumming up the works for everything else.
>>>>>> 
>>>>>> 
>>>>>>> On Jan 14, 2021, at 6:05 PM, Stuart Morrow <morrow.stuart@gmail.com> wrote:
>>>>>>> 
>>>>>>> Try copying the .dtb *and* the start4 and fixup4.
>>>> 
>>>> 9fans / 9fans / see discussions + participants + delivery options Permalink
> 
> ------------------------------------------
> 9fans: 9fans
> Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M4ea16344e3a69dd362d2644c <https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M4ea16344e3a69dd362d2644c>
> Delivery options: https://9fans.topicbox.com/groups/9fans/subscription <https://9fans.topicbox.com/groups/9fans/subscription>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-Meeebf6e95b6234082af60b40
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 29013 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-16  0:31                 ` Mack Wallace
@ 2021-01-16  1:01                   ` Michael Engel
  2021-01-16 10:24                     ` Richard Miller
  2021-01-18 14:51                   ` Richard Miller
  1 sibling, 1 reply; 29+ messages in thread
From: Michael Engel @ 2021-01-16  1:01 UTC (permalink / raw)
  To: 9fans

I built the 9pi4 kernel from Richard's sources and it works on my Pi400 (and Pi4B 8GB) 
with Richard's SD card image (didn't test 9front). 

Please feel free to test it, I uploaded the kernel to:
https://multicores.org/9/9pi4
(simply copy the file to the FAT partition of the SD card)

The md5sum is
dcd9c0bcf662fed7e4bb1966a79fe46d  9pi4

As Skip already mentioned, you also need to add
enable_gic=1
to config.txt to enable correct interrupt routing.

-- Michael


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-Mbb5bc53bcf8514d3645368be
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-15 22:52               ` Michael Engel
@ 2021-01-16  0:31                 ` Mack Wallace
  2021-01-16  1:01                   ` Michael Engel
  2021-01-18 14:51                   ` Richard Miller
  2021-01-16  3:03                 ` Bakul Shah
  1 sibling, 2 replies; 29+ messages in thread
From: Mack Wallace @ 2021-01-16  0:31 UTC (permalink / raw)
  To: 9fans

I did try to boot into Linux and then d a soft reset into Plan9. Still the same thing, no USB. I tried booting from the on-board card slot, and then as I soft rebooted, swapped out the card. As well as booted Raspian off of a microSD adapter and after booting, put the plan 9 card in the on-board slot. No luck.

As those that have been looking (Thank you btw). I started searching when Michael mentioned that the xhci firmware is not resident on the Pi 400. Of course there was talk about the Compute module, and then about memory offsets depending on how much memory is on the Pi… a bit over my head at this point.

I did notice, that Richards image that I have, seems to only recognize 1GB of ram. I am not terribly worried about that unless it’s a symptom of something else.

Thanks,

Mack

> On Jan 15, 2021, at 5:52 PM, Michael Engel <michael.engel@ntnu.no> wrote:
> 
> I assume loading the firmware via Linux first won't help since a PCIe reset probably also 
> resets the USB controller.
> 
> However, I just checked Richard's kernel source and it seems the firmware loading functionality
> is already included, there is a call to
> 
>        xhcireset(BUSBNO(hp->tbdf)<<20 | BUSDNO(hp->tbdf)<<15 | BUSFNO(hp->tbdf)<<12);
> 
> in http://9p.io/sources/contrib/miller/9/bcm/usbxhci.c
> 
> The comment for xhcireset in http://9p.io/sources/contrib/miller/9/bcm/vcore.c confirms this:
> /*
> * Notify gpu that xhci firmware might need loading. This is for some
> * pi4 board versions which are missing the eeprom chip for the vl805,
> * requiring its firmware to come from the boot eeprom instead.
> */
> 
> It seems that this source code is more recent than the images for the SD card and kernel in 
> http://9p.io/sources/contrib/miller/ - I'll try building a kernel based on the updated sources.
> 
> - Michael
> 
> 
>> On 15 Jan 2021, at 23:32, Bakul Shah <bakul@iitbombay.org> wrote:
>> 
>> Can you netboot Linux followed by netbooting Paln9 and have a working USB?
>> 
>>> On Jan 15, 2021, at 1:17 PM, Michael Engel <michael.engel@ntnu.no> wrote:
>>> 
>>> Hi,
>>> 
>>> I didn't test Plan 9 on my RPi 400 so far, but I think the reason for the USB problems 
>>> is the following:
>>> 
>>> The Raspberry Pi 400 (along with the Compute Module 4 and the 8 GB RAM version 
>>> of the RPI4) uses a new stepping C0 of the BCM2711. This version does not have a 
>>> dedicated EEPROM for the firmware of the xHCI USB controller and needs an 
>>> additional property mailbox call for loading the xHCI firmware after PCIe reset. 
>>> 
>>> Some code to load the firmware can be found in the circle bare-metal library (l. 88ff):
>>> https://github.com/rsta2/circle/blob/Step42.1/lib/usb/xhcidevice.cpp
>>> 
>>> -- Michael
>>> 
>>> 
>>>> On 15 Jan 2021, at 20:54, Mack Wallace <mackbw@mapinternet.com> wrote:
>>>> 
>>>> I took that microSD card that has the bootable image without USB and put it into a traditional Pi4. It boots on that without a problem and has mouse and keyboard. I notices that after the additional CPU cores are detected, that is mentions usb/hub… usb/kbd….  The image when booting on the Pi 400 never provides those messages.
>>>> 
>>>> Regards,
>>>> 
>>>> Mack 
>>>> 
>>>>> On Jan 15, 2021, at 1:44 PM, Mack Wallace <mackbw@mapinternet.com> wrote:
>>>>> 
>>>>> Dear Skip,
>>>>> 
>>>>> That pushed the ball forward significantly, but I still have issues. (But thank you, every little advancement helps.) So with that flag, I was able to get Richard’s port to boot into Glenda’s account (showing acme, faces, stats, etc). However, I do not seem to have any USB; no mouse; nor keyboard. Stats is moving on the screen, so things are not too locked up. I did try rebooting with an external keyboard and another mouse. Still nothing. The external keyboard doesn’t respond to anything (no caps lock nor num lock.) One mouse is in the USB 2.0 port, another and the external keyboard are in the USB 3.0 ports. 
>>>>> 
>>>>> on boot, I see the following:
>>>>> usbxhci: 0x1106 0x3483 port 600000000 size 0x1000 irq0
>>>>> #u/usb/ep1.0: xhci port 0x0 irq 0
>>>>> 
>>>>> The line before is #l for the network,
>>>>> The line after is the detection of the other three cores.
>>>>> 
>>>>> The changing of the enable_gic=1 on the 9front image seemed to have to effect.
>>>>> 
>>>>> Thanks again!
>>>>> 
>>>>> Mack
>>>>> 
>>>>> 
>>>>> On Jan 14, 2021, at 8:15 PM, Skip Tavakkolian <skip.tavakkolian@gmail.com> wrote:
>>>>>> 
>>>>>> I'm using a RPi400 with Richard's port. I'm netbooting without issues and up for days.  The only issue I had was forgetting to set 'enable_gic=1' as Richard instructed in the sources. Pi4 works ok without it, pi400 doesn't.
>>>>>> 
>>>>>> 
>>>>>> On Thu, Jan 14, 2021, 3:39 PM Mack Wallace <mackbw@mapinternet.com> wrote:
>>>>>> Thank you for the reply Stuart, but no luck.
>>>>>> 
>>>>>> I did download Mr. Miller’s image. It would not boot at all until I replaced the files that you mention, but the kernel in that image locks up after detecting the fourth core of the CPU. However, from that failure I learned that those files, (start_cd.elf, start4cd.elf, fixup_cd.dat, fixup4cd.dat) are necessary for the Pi to boot, and that those with the bootcode.bin and presumably, but it doesn’t seem to matter whether I use bcm2711-rpi-4-b.dtb or bcm2711-rpi-400.dtb - the dtbs are vital to the process. - and that all those files simply need to be copied into the fat partition/boot directory.
>>>>>> 
>>>>>> So I burned another image (actually many, trying different SD cards, and different configurations, older kernels, etc) and replaced all the files I’ve mentioned with the ones from https://github.com/raspberrypi/firmware/tree/master/boot (hopefully that’s where I should get them). My most recent iteration just has the single error repeated:
>>>>>> 
>>>>>> sdhc: read error intr 2008002 stat 1fff0000
>>>>>> 
>>>>>> This occurs many times. In the middle of these errors is 
>>>>>> 
>>>>>> /dev/sdM0: BCM SD Host Controller 02 Version 10
>>>>>> 
>>>>>> then the error repeats itself over 50 times before printing out the lines
>>>>>> /dev/sdM0/data
>>>>>> bootargs is (tcp, tls, il, local!device)[]
>>>>>> 
>>>>>> At no time during this process is the keyboard or mouse responsive. Though the mouse icon did become visible during the boot process. 
>>>>>> 
>>>>>> I am hoping I am wrong, but I am thinking there is some sort of driver issue. At the very least, checking what media there is to mount, or reading the SD card. And then possibly for other things, but the former could be gumming up the works for everything else.
>>>>>> 
>>>>>> 
>>>>>>> On Jan 14, 2021, at 6:05 PM, Stuart Morrow <morrow.stuart@gmail.com> wrote:
>>>>>>> 
>>>>>>> Try copying the .dtb *and* the start4 and fixup4.
>>>> 
>>>> 9fans / 9fans / see discussions + participants + delivery options Permalink

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M3622aa098d3909dba1f462c6
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-15 22:32             ` Bakul Shah
@ 2021-01-15 22:52               ` Michael Engel
  2021-01-16  0:31                 ` Mack Wallace
  2021-01-16  3:03                 ` Bakul Shah
  0 siblings, 2 replies; 29+ messages in thread
From: Michael Engel @ 2021-01-15 22:52 UTC (permalink / raw)
  To: 9fans

I assume loading the firmware via Linux first won't help since a PCIe reset probably also 
resets the USB controller.

However, I just checked Richard's kernel source and it seems the firmware loading functionality
is already included, there is a call to

        xhcireset(BUSBNO(hp->tbdf)<<20 | BUSDNO(hp->tbdf)<<15 | BUSFNO(hp->tbdf)<<12);

in http://9p.io/sources/contrib/miller/9/bcm/usbxhci.c

The comment for xhcireset in http://9p.io/sources/contrib/miller/9/bcm/vcore.c confirms this:
/*
 * Notify gpu that xhci firmware might need loading. This is for some
 * pi4 board versions which are missing the eeprom chip for the vl805,
 * requiring its firmware to come from the boot eeprom instead.
 */

It seems that this source code is more recent than the images for the SD card and kernel in 
http://9p.io/sources/contrib/miller/ - I'll try building a kernel based on the updated sources.

- Michael


> On 15 Jan 2021, at 23:32, Bakul Shah <bakul@iitbombay.org> wrote:
> 
> Can you netboot Linux followed by netbooting Paln9 and have a working USB?
> 
>> On Jan 15, 2021, at 1:17 PM, Michael Engel <michael.engel@ntnu.no> wrote:
>> 
>> Hi,
>> 
>> I didn't test Plan 9 on my RPi 400 so far, but I think the reason for the USB problems 
>> is the following:
>> 
>> The Raspberry Pi 400 (along with the Compute Module 4 and the 8 GB RAM version 
>> of the RPI4) uses a new stepping C0 of the BCM2711. This version does not have a 
>> dedicated EEPROM for the firmware of the xHCI USB controller and needs an 
>> additional property mailbox call for loading the xHCI firmware after PCIe reset. 
>> 
>> Some code to load the firmware can be found in the circle bare-metal library (l. 88ff):
>> https://github.com/rsta2/circle/blob/Step42.1/lib/usb/xhcidevice.cpp
>> 
>> -- Michael
>> 
>> 
>>> On 15 Jan 2021, at 20:54, Mack Wallace <mackbw@mapinternet.com> wrote:
>>> 
>>> I took that microSD card that has the bootable image without USB and put it into a traditional Pi4. It boots on that without a problem and has mouse and keyboard. I notices that after the additional CPU cores are detected, that is mentions usb/hub… usb/kbd….  The image when booting on the Pi 400 never provides those messages.
>>> 
>>> Regards,
>>> 
>>> Mack 
>>> 
>>>> On Jan 15, 2021, at 1:44 PM, Mack Wallace <mackbw@mapinternet.com> wrote:
>>>> 
>>>> Dear Skip,
>>>> 
>>>> That pushed the ball forward significantly, but I still have issues. (But thank you, every little advancement helps.) So with that flag, I was able to get Richard’s port to boot into Glenda’s account (showing acme, faces, stats, etc). However, I do not seem to have any USB; no mouse; nor keyboard. Stats is moving on the screen, so things are not too locked up. I did try rebooting with an external keyboard and another mouse. Still nothing. The external keyboard doesn’t respond to anything (no caps lock nor num lock.) One mouse is in the USB 2.0 port, another and the external keyboard are in the USB 3.0 ports. 
>>>> 
>>>> on boot, I see the following:
>>>> usbxhci: 0x1106 0x3483 port 600000000 size 0x1000 irq0
>>>> #u/usb/ep1.0: xhci port 0x0 irq 0
>>>> 
>>>> The line before is #l for the network,
>>>> The line after is the detection of the other three cores.
>>>> 
>>>> The changing of the enable_gic=1 on the 9front image seemed to have to effect.
>>>> 
>>>> Thanks again!
>>>> 
>>>> Mack
>>>> 
>>>> 
>>>> On Jan 14, 2021, at 8:15 PM, Skip Tavakkolian <skip.tavakkolian@gmail.com> wrote:
>>>>> 
>>>>> I'm using a RPi400 with Richard's port. I'm netbooting without issues and up for days.  The only issue I had was forgetting to set 'enable_gic=1' as Richard instructed in the sources. Pi4 works ok without it, pi400 doesn't.
>>>>> 
>>>>> 
>>>>> On Thu, Jan 14, 2021, 3:39 PM Mack Wallace <mackbw@mapinternet.com> wrote:
>>>>> Thank you for the reply Stuart, but no luck.
>>>>> 
>>>>> I did download Mr. Miller’s image. It would not boot at all until I replaced the files that you mention, but the kernel in that image locks up after detecting the fourth core of the CPU. However, from that failure I learned that those files, (start_cd.elf, start4cd.elf, fixup_cd.dat, fixup4cd.dat) are necessary for the Pi to boot, and that those with the bootcode.bin and presumably, but it doesn’t seem to matter whether I use bcm2711-rpi-4-b.dtb or bcm2711-rpi-400.dtb - the dtbs are vital to the process. - and that all those files simply need to be copied into the fat partition/boot directory.
>>>>> 
>>>>> So I burned another image (actually many, trying different SD cards, and different configurations, older kernels, etc) and replaced all the files I’ve mentioned with the ones from https://github.com/raspberrypi/firmware/tree/master/boot (hopefully that’s where I should get them). My most recent iteration just has the single error repeated:
>>>>> 
>>>>> sdhc: read error intr 2008002 stat 1fff0000
>>>>> 
>>>>> This occurs many times. In the middle of these errors is 
>>>>> 
>>>>> /dev/sdM0: BCM SD Host Controller 02 Version 10
>>>>> 
>>>>> then the error repeats itself over 50 times before printing out the lines
>>>>> /dev/sdM0/data
>>>>> bootargs is (tcp, tls, il, local!device)[]
>>>>> 
>>>>> At no time during this process is the keyboard or mouse responsive. Though the mouse icon did become visible during the boot process. 
>>>>> 
>>>>> I am hoping I am wrong, but I am thinking there is some sort of driver issue. At the very least, checking what media there is to mount, or reading the SD card. And then possibly for other things, but the former could be gumming up the works for everything else.
>>>>> 
>>>>> 
>>>>>> On Jan 14, 2021, at 6:05 PM, Stuart Morrow <morrow.stuart@gmail.com> wrote:
>>>>>> 
>>>>>> Try copying the .dtb *and* the start4 and fixup4.
>>> 
>>> 9fans / 9fans / see discussions + participants + delivery options Permalink

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M4ea16344e3a69dd362d2644c
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-15 21:17           ` Michael Engel
  2021-01-15 21:58             ` Stuart Morrow
@ 2021-01-15 22:32             ` Bakul Shah
  2021-01-15 22:52               ` Michael Engel
  1 sibling, 1 reply; 29+ messages in thread
From: Bakul Shah @ 2021-01-15 22:32 UTC (permalink / raw)
  To: 9fans

Can you netboot Linux followed by netbooting Paln9 and have a working USB?

> On Jan 15, 2021, at 1:17 PM, Michael Engel <michael.engel@ntnu.no> wrote:
> 
> Hi,
> 
> I didn't test Plan 9 on my RPi 400 so far, but I think the reason for the USB problems 
> is the following:
> 
> The Raspberry Pi 400 (along with the Compute Module 4 and the 8 GB RAM version 
> of the RPI4) uses a new stepping C0 of the BCM2711. This version does not have a 
> dedicated EEPROM for the firmware of the xHCI USB controller and needs an 
> additional property mailbox call for loading the xHCI firmware after PCIe reset. 
> 
> Some code to load the firmware can be found in the circle bare-metal library (l. 88ff):
> https://github.com/rsta2/circle/blob/Step42.1/lib/usb/xhcidevice.cpp
> 
> -- Michael
> 
> 
>> On 15 Jan 2021, at 20:54, Mack Wallace <mackbw@mapinternet.com> wrote:
>> 
>> I took that microSD card that has the bootable image without USB and put it into a traditional Pi4. It boots on that without a problem and has mouse and keyboard. I notices that after the additional CPU cores are detected, that is mentions usb/hub… usb/kbd….  The image when booting on the Pi 400 never provides those messages.
>> 
>> Regards,
>> 
>> Mack 
>> 
>>> On Jan 15, 2021, at 1:44 PM, Mack Wallace <mackbw@mapinternet.com> wrote:
>>> 
>>> Dear Skip,
>>> 
>>> That pushed the ball forward significantly, but I still have issues. (But thank you, every little advancement helps.) So with that flag, I was able to get Richard’s port to boot into Glenda’s account (showing acme, faces, stats, etc). However, I do not seem to have any USB; no mouse; nor keyboard. Stats is moving on the screen, so things are not too locked up. I did try rebooting with an external keyboard and another mouse. Still nothing. The external keyboard doesn’t respond to anything (no caps lock nor num lock.) One mouse is in the USB 2.0 port, another and the external keyboard are in the USB 3.0 ports. 
>>> 
>>> on boot, I see the following:
>>> usbxhci: 0x1106 0x3483 port 600000000 size 0x1000 irq0
>>> #u/usb/ep1.0: xhci port 0x0 irq 0
>>> 
>>> The line before is #l for the network,
>>> The line after is the detection of the other three cores.
>>> 
>>> The changing of the enable_gic=1 on the 9front image seemed to have to effect.
>>> 
>>> Thanks again!
>>> 
>>> Mack
>>> 
>>> 
>>> On Jan 14, 2021, at 8:15 PM, Skip Tavakkolian <skip.tavakkolian@gmail.com> wrote:
>>>> 
>>>> I'm using a RPi400 with Richard's port. I'm netbooting without issues and up for days.  The only issue I had was forgetting to set 'enable_gic=1' as Richard instructed in the sources. Pi4 works ok without it, pi400 doesn't.
>>>> 
>>>> 
>>>> On Thu, Jan 14, 2021, 3:39 PM Mack Wallace <mackbw@mapinternet.com> wrote:
>>>> Thank you for the reply Stuart, but no luck.
>>>> 
>>>> I did download Mr. Miller’s image. It would not boot at all until I replaced the files that you mention, but the kernel in that image locks up after detecting the fourth core of the CPU. However, from that failure I learned that those files, (start_cd.elf, start4cd.elf, fixup_cd.dat, fixup4cd.dat) are necessary for the Pi to boot, and that those with the bootcode.bin and presumably, but it doesn’t seem to matter whether I use bcm2711-rpi-4-b.dtb or bcm2711-rpi-400.dtb - the dtbs are vital to the process. - and that all those files simply need to be copied into the fat partition/boot directory.
>>>> 
>>>> So I burned another image (actually many, trying different SD cards, and different configurations, older kernels, etc) and replaced all the files I’ve mentioned with the ones from https://github.com/raspberrypi/firmware/tree/master/boot (hopefully that’s where I should get them). My most recent iteration just has the single error repeated:
>>>> 
>>>> sdhc: read error intr 2008002 stat 1fff0000
>>>> 
>>>> This occurs many times. In the middle of these errors is 
>>>> 
>>>> /dev/sdM0: BCM SD Host Controller 02 Version 10
>>>> 
>>>> then the error repeats itself over 50 times before printing out the lines
>>>> /dev/sdM0/data
>>>> bootargs is (tcp, tls, il, local!device)[]
>>>> 
>>>> At no time during this process is the keyboard or mouse responsive. Though the mouse icon did become visible during the boot process. 
>>>> 
>>>> I am hoping I am wrong, but I am thinking there is some sort of driver issue. At the very least, checking what media there is to mount, or reading the SD card. And then possibly for other things, but the former could be gumming up the works for everything else.
>>>> 
>>>> 
>>>>> On Jan 14, 2021, at 6:05 PM, Stuart Morrow <morrow.stuart@gmail.com> wrote:
>>>>> 
>>>>> Try copying the .dtb *and* the start4 and fixup4.
>> 
>> 9fans / 9fans / see discussions + participants + delivery options Permalink

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-Mc6cc9a0f86241492f9879a53
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-15 21:17           ` Michael Engel
@ 2021-01-15 21:58             ` Stuart Morrow
  2021-01-15 22:32             ` Bakul Shah
  1 sibling, 0 replies; 29+ messages in thread
From: Stuart Morrow @ 2021-01-15 21:58 UTC (permalink / raw)
  To: 9fans

Might as well note here that the USB on the CM4 is the USB-C on the
4B.  A found (just now) forum thread confirms that the CM4 actually
has an XHCI and just doesn't expose it at all. Nothing on this in the
datasheet.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-Ma74f0f27728f0fd560e1f775
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-15 19:54         ` Mack Wallace
@ 2021-01-15 21:17           ` Michael Engel
  2021-01-15 21:58             ` Stuart Morrow
  2021-01-15 22:32             ` Bakul Shah
  0 siblings, 2 replies; 29+ messages in thread
From: Michael Engel @ 2021-01-15 21:17 UTC (permalink / raw)
  To: 9fans

Hi,

I didn't test Plan 9 on my RPi 400 so far, but I think the reason for the USB problems 
is the following:

The Raspberry Pi 400 (along with the Compute Module 4 and the 8 GB RAM version 
of the RPI4) uses a new stepping C0 of the BCM2711. This version does not have a 
dedicated EEPROM for the firmware of the xHCI USB controller and needs an 
additional property mailbox call for loading the xHCI firmware after PCIe reset. 

Some code to load the firmware can be found in the circle bare-metal library (l. 88ff):
https://github.com/rsta2/circle/blob/Step42.1/lib/usb/xhcidevice.cpp

-- Michael


> On 15 Jan 2021, at 20:54, Mack Wallace <mackbw@mapinternet.com> wrote:
> 
> I took that microSD card that has the bootable image without USB and put it into a traditional Pi4. It boots on that without a problem and has mouse and keyboard. I notices that after the additional CPU cores are detected, that is mentions usb/hub… usb/kbd….  The image when booting on the Pi 400 never provides those messages.
> 
> Regards,
> 
> Mack 
> 
>> On Jan 15, 2021, at 1:44 PM, Mack Wallace <mackbw@mapinternet.com> wrote:
>> 
>> Dear Skip,
>> 
>> That pushed the ball forward significantly, but I still have issues. (But thank you, every little advancement helps.) So with that flag, I was able to get Richard’s port to boot into Glenda’s account (showing acme, faces, stats, etc). However, I do not seem to have any USB; no mouse; nor keyboard. Stats is moving on the screen, so things are not too locked up. I did try rebooting with an external keyboard and another mouse. Still nothing. The external keyboard doesn’t respond to anything (no caps lock nor num lock.) One mouse is in the USB 2.0 port, another and the external keyboard are in the USB 3.0 ports. 
>> 
>> on boot, I see the following:
>> usbxhci: 0x1106 0x3483 port 600000000 size 0x1000 irq0
>> #u/usb/ep1.0: xhci port 0x0 irq 0
>> 
>> The line before is #l for the network,
>> The line after is the detection of the other three cores.
>> 
>> The changing of the enable_gic=1 on the 9front image seemed to have to effect.
>> 
>> Thanks again!
>> 
>> Mack
>> 
>> 
>> On Jan 14, 2021, at 8:15 PM, Skip Tavakkolian <skip.tavakkolian@gmail.com> wrote:
>>> 
>>> I'm using a RPi400 with Richard's port. I'm netbooting without issues and up for days.  The only issue I had was forgetting to set 'enable_gic=1' as Richard instructed in the sources. Pi4 works ok without it, pi400 doesn't.
>>> 
>>> 
>>> On Thu, Jan 14, 2021, 3:39 PM Mack Wallace <mackbw@mapinternet.com> wrote:
>>> Thank you for the reply Stuart, but no luck.
>>> 
>>> I did download Mr. Miller’s image. It would not boot at all until I replaced the files that you mention, but the kernel in that image locks up after detecting the fourth core of the CPU. However, from that failure I learned that those files, (start_cd.elf, start4cd.elf, fixup_cd.dat, fixup4cd.dat) are necessary for the Pi to boot, and that those with the bootcode.bin and presumably, but it doesn’t seem to matter whether I use bcm2711-rpi-4-b.dtb or bcm2711-rpi-400.dtb - the dtbs are vital to the process. - and that all those files simply need to be copied into the fat partition/boot directory.
>>> 
>>> So I burned another image (actually many, trying different SD cards, and different configurations, older kernels, etc) and replaced all the files I’ve mentioned with the ones from https://github.com/raspberrypi/firmware/tree/master/boot (hopefully that’s where I should get them). My most recent iteration just has the single error repeated:
>>> 
>>> sdhc: read error intr 2008002 stat 1fff0000
>>> 
>>> This occurs many times. In the middle of these errors is 
>>> 
>>> /dev/sdM0: BCM SD Host Controller 02 Version 10
>>> 
>>> then the error repeats itself over 50 times before printing out the lines
>>> /dev/sdM0/data
>>> bootargs is (tcp, tls, il, local!device)[]
>>> 
>>> At no time during this process is the keyboard or mouse responsive. Though the mouse icon did become visible during the boot process. 
>>> 
>>> I am hoping I am wrong, but I am thinking there is some sort of driver issue. At the very least, checking what media there is to mount, or reading the SD card. And then possibly for other things, but the former could be gumming up the works for everything else.
>>> 
>>> 
>>>> On Jan 14, 2021, at 6:05 PM, Stuart Morrow <morrow.stuart@gmail.com> wrote:
>>>> 
>>>> Try copying the .dtb *and* the start4 and fixup4.
> 
> 9fans / 9fans / see discussions + participants + delivery options Permalink

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M8a5b6225066e788497df1d75
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-15 18:44       ` Mack Wallace
@ 2021-01-15 19:54         ` Mack Wallace
  2021-01-15 21:17           ` Michael Engel
  2021-01-16  7:19         ` Skip Tavakkolian
  1 sibling, 1 reply; 29+ messages in thread
From: Mack Wallace @ 2021-01-15 19:54 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 4899 bytes --]

I took that microSD card that has the bootable image without USB and put it into a traditional Pi4. It boots on that without a problem and has mouse and keyboard. I notices that after the additional CPU cores are detected, that is mentions usb/hub… usb/kbd….  The image when booting on the Pi 400 never provides those messages.

Regards,

Mack 

> On Jan 15, 2021, at 1:44 PM, Mack Wallace <mackbw@mapinternet.com> wrote:
> 
> Dear Skip,
> 
> That pushed the ball forward significantly, but I still have issues. (But thank you, every little advancement helps.) So with that flag, I was able to get Richard’s port to boot into Glenda’s account (showing acme, faces, stats, etc). However, I do not seem to have any USB; no mouse; nor keyboard. Stats is moving on the screen, so things are not too locked up. I did try rebooting with an external keyboard and another mouse. Still nothing. The external keyboard doesn’t respond to anything (no caps lock nor num lock.) One mouse is in the USB 2.0 port, another and the external keyboard are in the USB 3.0 ports. 
> 
> on boot, I see the following:
> usbxhci: 0x1106 0x3483 port 600000000 size 0x1000 irq0
> #u/usb/ep1.0: xhci port 0x0 irq 0
> 
> The line before is #l for the network,
> The line after is the detection of the other three cores.
> 
> The changing of the enable_gic=1 on the 9front image seemed to have to effect.
> 
> Thanks again!
> 
> Mack
> 
> 
> On Jan 14, 2021, at 8:15 PM, Skip Tavakkolian <skip.tavakkolian@gmail.com <mailto:skip.tavakkolian@gmail.com>> wrote:
>> 
>> I'm using a RPi400 with Richard's port. I'm netbooting without issues and up for days.  The only issue I had was forgetting to set 'enable_gic=1' as Richard instructed in the sources. Pi4 works ok without it, pi400 doesn't.
>> 
>> 
>> On Thu, Jan 14, 2021, 3:39 PM Mack Wallace <mackbw@mapinternet.com <mailto:mackbw@mapinternet.com>> wrote:
>> Thank you for the reply Stuart, but no luck.
>> 
>> I did download Mr. Miller’s image. It would not boot at all until I replaced the files that you mention, but the kernel in that image locks up after detecting the fourth core of the CPU. However, from that failure I learned that those files, (start_cd.elf, start4cd.elf, fixup_cd.dat, fixup4cd.dat) are necessary for the Pi to boot, and that those with the bootcode.bin and presumably, but it doesn’t seem to matter whether I use bcm2711-rpi-4-b.dtb or bcm2711-rpi-400.dtb - the dtbs are vital to the process. - and that all those files simply need to be copied into the fat partition/boot directory.
>> 
>> So I burned another image (actually many, trying different SD cards, and different configurations, older kernels, etc) and replaced all the files I’ve mentioned with the ones from https://github.com/raspberrypi/firmware/tree/master/boot <https://github.com/raspberrypi/firmware/tree/master/boot> (hopefully that’s where I should get them). My most recent iteration just has the single error repeated:
>> 
>> sdhc: read error intr 2008002 stat 1fff0000
>> 
>> This occurs many times. In the middle of these errors is 
>> 
>> /dev/sdM0: BCM SD Host Controller 02 Version 10
>> 
>> then the error repeats itself over 50 times before printing out the lines
>> /dev/sdM0/data
>> bootargs is (tcp, tls, il, local!device)[]
>> 
>> At no time during this process is the keyboard or mouse responsive. Though the mouse icon did become visible during the boot process. 
>> 
>> I am hoping I am wrong, but I am thinking there is some sort of driver issue. At the very least, checking what media there is to mount, or reading the SD card. And then possibly for other things, but the former could be gumming up the works for everything else.
>> 
>> 
>>> On Jan 14, 2021, at 6:05 PM, Stuart Morrow <morrow.stuart@gmail.com <mailto:morrow.stuart@gmail.com>> wrote:
>>> 
>>> Try copying the .dtb *and* the start4 and fixup4.
>>> 
>>> ------------------------------------------
>>> 9fans: 9fans
>>> Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M9f2c8a9a58f03931b399b823 <https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M9f2c8a9a58f03931b399b823>
>>> Delivery options: https://9fans.topicbox.com/groups/9fans/subscription <https://9fans.topicbox.com/groups/9fans/subscription>
>>> 
> 
> 9fans <https://9fans.topicbox.com/latest> / 9fans / see discussions <https://9fans.topicbox.com/groups/9fans> + participants <https://9fans.topicbox.com/groups/9fans/members> + delivery options <https://9fans.topicbox.com/groups/9fans/subscription>Permalink <https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M3e4eaa51003d3faf4b21f271>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M7fc239ed3107974a45f2ee07
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 7776 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-15  1:15     ` Skip Tavakkolian
@ 2021-01-15 18:44       ` Mack Wallace
  2021-01-15 19:54         ` Mack Wallace
  2021-01-16  7:19         ` Skip Tavakkolian
  2021-01-16 16:15       ` Skip Tavakkolian
  1 sibling, 2 replies; 29+ messages in thread
From: Mack Wallace @ 2021-01-15 18:44 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 4353 bytes --]

Dear Skip,

That pushed the ball forward significantly, but I still have issues. (But thank you, every little advancement helps.) So with that flag, I was able to get Richard’s port to boot into Glenda’s account (showing acme, faces, stats, etc). However, I do not seem to have any USB; no mouse; nor keyboard. Stats is moving on the screen, so things are not too locked up. I did try rebooting with an external keyboard and another mouse. Still nothing. The external keyboard doesn’t respond to anything (no caps lock nor num lock.) One mouse is in the USB 2.0 port, another and the external keyboard are in the USB 3.0 ports. 

on boot, I see the following:
usbxhci: 0x1106 0x3483 port 600000000 size 0x1000 irq0
#u/usb/ep1.0: xhci port 0x0 irq 0

The line before is #l for the network,
The line after is the detection of the other three cores.

The changing of the enable_gic=1 on the 9front image seemed to have to effect.

Thanks again!

Mack


On Jan 14, 2021, at 8:15 PM, Skip Tavakkolian <skip.tavakkolian@gmail.com> wrote:
> 
> I'm using a RPi400 with Richard's port. I'm netbooting without issues and up for days.  The only issue I had was forgetting to set 'enable_gic=1' as Richard instructed in the sources. Pi4 works ok without it, pi400 doesn't.
> 
> 
> On Thu, Jan 14, 2021, 3:39 PM Mack Wallace <mackbw@mapinternet.com <mailto:mackbw@mapinternet.com>> wrote:
> Thank you for the reply Stuart, but no luck.
> 
> I did download Mr. Miller’s image. It would not boot at all until I replaced the files that you mention, but the kernel in that image locks up after detecting the fourth core of the CPU. However, from that failure I learned that those files, (start_cd.elf, start4cd.elf, fixup_cd.dat, fixup4cd.dat) are necessary for the Pi to boot, and that those with the bootcode.bin and presumably, but it doesn’t seem to matter whether I use bcm2711-rpi-4-b.dtb or bcm2711-rpi-400.dtb - the dtbs are vital to the process. - and that all those files simply need to be copied into the fat partition/boot directory.
> 
> So I burned another image (actually many, trying different SD cards, and different configurations, older kernels, etc) and replaced all the files I’ve mentioned with the ones from https://github.com/raspberrypi/firmware/tree/master/boot <https://github.com/raspberrypi/firmware/tree/master/boot> (hopefully that’s where I should get them). My most recent iteration just has the single error repeated:
> 
> sdhc: read error intr 2008002 stat 1fff0000
> 
> This occurs many times. In the middle of these errors is 
> 
> /dev/sdM0: BCM SD Host Controller 02 Version 10
> 
> then the error repeats itself over 50 times before printing out the lines
> /dev/sdM0/data
> bootargs is (tcp, tls, il, local!device)[]
> 
> At no time during this process is the keyboard or mouse responsive. Though the mouse icon did become visible during the boot process. 
> 
> I am hoping I am wrong, but I am thinking there is some sort of driver issue. At the very least, checking what media there is to mount, or reading the SD card. And then possibly for other things, but the former could be gumming up the works for everything else.
> 
> 
>> On Jan 14, 2021, at 6:05 PM, Stuart Morrow <morrow.stuart@gmail.com <mailto:morrow.stuart@gmail.com>> wrote:
>> 
>> Try copying the .dtb *and* the start4 and fixup4.
>> 
>> ------------------------------------------
>> 9fans: 9fans
>> Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M9f2c8a9a58f03931b399b823 <https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M9f2c8a9a58f03931b399b823>
>> Delivery options: https://9fans.topicbox.com/groups/9fans/subscription <https://9fans.topicbox.com/groups/9fans/subscription>
>> 
> 
> 9fans <https://9fans.topicbox.com/latest> / 9fans / see discussions <https://9fans.topicbox.com/groups/9fans> + participants <https://9fans.topicbox.com/groups/9fans/members> + delivery options <https://9fans.topicbox.com/groups/9fans/subscription>Permalink <https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-Mdb22009f6100a35d3e0184c1>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M3e4eaa51003d3faf4b21f271
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 6793 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-14 23:37   ` Mack Wallace
@ 2021-01-15  1:15     ` Skip Tavakkolian
  2021-01-15 18:44       ` Mack Wallace
  2021-01-16 16:15       ` Skip Tavakkolian
  0 siblings, 2 replies; 29+ messages in thread
From: Skip Tavakkolian @ 2021-01-15  1:15 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 2835 bytes --]

I'm using a RPi400 with Richard's port. I'm netbooting without issues and
up for days.  The only issue I had was forgetting to set 'enable_gic=1' as
Richard instructed in the sources. Pi4 works ok without it, pi400 doesn't.


On Thu, Jan 14, 2021, 3:39 PM Mack Wallace <mackbw@mapinternet.com> wrote:

> Thank you for the reply Stuart, but no luck.
> 
> I did download Mr. Miller’s image. It would not boot at all until I
> replaced the files that you mention, but the kernel in that image locks up
> after detecting the fourth core of the CPU. However, from that failure I
> learned that those files, (start_cd.elf, start4cd.elf, fixup_cd.dat,
> fixup4cd.dat) are necessary for the Pi to boot, and that those with the
> bootcode.bin and presumably, but it doesn’t seem to matter whether I use
> bcm2711-rpi-4-b.dtb or bcm2711-rpi-400.dtb - the dtbs are vital to the
> process. - and that all those files simply need to be copied into the fat
> partition/boot directory.
> 
> So I burned another image (actually many, trying different SD cards, and
> different configurations, older kernels, etc) and replaced all the files
> I’ve mentioned with the ones from
> https://github.com/raspberrypi/firmware/tree/master/boot (hopefully
> that’s where I should get them). My most recent iteration just has the
> single error repeated:
> 
> sdhc: read error intr 2008002 stat 1fff0000
> 
> This occurs many times. In the middle of these errors is
> 
> /dev/sdM0: BCM SD Host Controller 02 Version 10
> 
> then the error repeats itself over 50 times before printing out the lines
> /dev/sdM0/data
> bootargs is (tcp, tls, il, local!device)[]
> 
> At no time during this process is the keyboard or mouse responsive. Though
> the mouse icon did become visible during the boot process.
> 
> I am hoping I am wrong, but I am thinking there is some sort of driver
> issue. At the very least, checking what media there is to mount, or reading
> the SD card. And then possibly for other things, but the former could be
> gumming up the works for everything else.
> 
> On Jan 14, 2021, at 6:05 PM, Stuart Morrow <morrow.stuart@gmail.com>
> wrote:
> 
> Try copying the .dtb *and* the start4 and fixup4.
> 
> *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions
> <https://9fans.topicbox.com/groups/9fans> + participants
> <https://9fans.topicbox.com/groups/9fans/members> + delivery options
> <https://9fans.topicbox.com/groups/9fans/subscription> Permalink
> <https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M63bd5d3f548dbbf61c8f5402>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-Mdb22009f6100a35d3e0184c1
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 4353 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-14 23:05 ` Stuart Morrow
@ 2021-01-14 23:37   ` Mack Wallace
  2021-01-15  1:15     ` Skip Tavakkolian
  0 siblings, 1 reply; 29+ messages in thread
From: Mack Wallace @ 2021-01-14 23:37 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 2129 bytes --]

Thank you for the reply Stuart, but no luck.

I did download Mr. Miller’s image. It would not boot at all until I replaced the files that you mention, but the kernel in that image locks up after detecting the fourth core of the CPU. However, from that failure I learned that those files, (start_cd.elf, start4cd.elf, fixup_cd.dat, fixup4cd.dat) are necessary for the Pi to boot, and that those with the bootcode.bin and presumably, but it doesn’t seem to matter whether I use bcm2711-rpi-4-b.dtb or bcm2711-rpi-400.dtb - the dtbs are vital to the process. - and that all those files simply need to be copied into the fat partition/boot directory.

So I burned another image (actually many, trying different SD cards, and different configurations, older kernels, etc) and replaced all the files I’ve mentioned with the ones from https://github.com/raspberrypi/firmware/tree/master/boot <https://github.com/raspberrypi/firmware/tree/master/boot> (hopefully that’s where I should get them). My most recent iteration just has the single error repeated:

sdhc: read error intr 2008002 stat 1fff0000

This occurs many times. In the middle of these errors is 

/dev/sdM0: BCM SD Host Controller 02 Version 10

then the error repeats itself over 50 times before printing out the lines
/dev/sdM0/data
bootargs is (tcp, tls, il, local!device)[]

At no time during this process is the keyboard or mouse responsive. Though the mouse icon did become visible during the boot process. 

I am hoping I am wrong, but I am thinking there is some sort of driver issue. At the very least, checking what media there is to mount, or reading the SD card. And then possibly for other things, but the former could be gumming up the works for everything else.


> On Jan 14, 2021, at 6:05 PM, Stuart Morrow <morrow.stuart@gmail.com> wrote:
> 
> Try copying the .dtb *and* the start4 and fixup4.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M63bd5d3f548dbbf61c8f5402
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 4054 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [9fans] Plan9 on Raspberry Pi 400?
  2021-01-14 21:34 Mack Wallace
@ 2021-01-14 23:05 ` Stuart Morrow
  2021-01-14 23:37   ` Mack Wallace
  0 siblings, 1 reply; 29+ messages in thread
From: Stuart Morrow @ 2021-01-14 23:05 UTC (permalink / raw)
  To: 9fans

Try copying the .dtb *and* the start4 and fixup4.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M9f2c8a9a58f03931b399b823
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [9fans] Plan9 on Raspberry Pi 400?
@ 2021-01-14 21:34 Mack Wallace
  2021-01-14 23:05 ` Stuart Morrow
  0 siblings, 1 reply; 29+ messages in thread
From: Mack Wallace @ 2021-01-14 21:34 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 2969 bytes --]

I recently purchased a Raspberry Pi 400, which is supposed to be a Raspberry Pi 4 already inside a keyboard. I thought it would be great to get a plan 9 terminal on it. However, I am having some trouble; and I don’t know if it is specific to the Pi 400, myself, or both.

The Pi 400 is the Raspberry Pi keyboard with a ‘Pi 4’ inside. However, the Raspberry Pi 4 is on a different piece of copper. I don’t know how significant this is or not.

Anyway, I downloaded the new 9front image and first used dd to get it onto a 32GB micro SD card. 

On first boot, the Plan 9 kernel appears to start loading, and then I got the following error repeated over and over

sdhc: read error intr 2008002 stat 1fff0000

and then finally /dev/sdM0/data
bootargs is (tcp, tls, il, local!device)

I’ve tried creating images on the Pi itself in Raspian. Tried booting off of a USB to micro SD adapter - all with similar results, possibly different or additional errors. I also tried using balenaEtcher to transfer the image… similar results.

One attempted startup looked like this:

127 holes free
0x004f0000 0x3e600000 1041301504
1041301504 bytes free

Plan 9
cpu0: 1500 MHz ARM Cortex-A72 r0p3
4006M Memory: 998M kernel data, 3008M user, 15011M swap
pcienable PCI.0.0.0: pcr 0->7
pcienable PCI.1.0.0: pcr 0->2
bus dev type     vid  did  intl memory
0   0/0 06 04 00 14e4 2711   0  ioa:00000000-00001000 4096 nema:600000000-600100000 1048576 ->1
1   0/0 0c 03 30 1106 3483   0  0:600000007 4096
#l0: genet: 1000Mbps port 0xFFFFFFFFBD580000 irq 189 ea dca632e63357
usbxhci: 0x1106 0x3483: port 600000000 size 4096 irq 0
cpu3: 1500MHz ARM Cortex-A72 r0p3
cpu2: 1500MHz ARM Cortex-A72 r0p3
cpu1: 1500MHz ARM Cortex-A72 r0p3
#l0: phy1 id 600d84a2 oui 80361

emmc: cmd 371a0000 arg 0 error intr 0 stat 1fff0001
        {repeats 15 times}
/dev/sdM0: BCM SD Host Controller 02 Version 10
emmc: cmd 371a0000 arg 0 error intr 0 stat 1fff0001
        {repeats 10 times}
/dev/sdM0/data
bootargs is (tcp, tls, il, local!device)[]


As mentioned before, where that emmc error is - I’ve seen the previous mentioned error repeated. Or the following two errors.

sdhc: read error intr 2008000 stat 1fff0206
emmccmd: need to reset Datainhibit intr 0 stat 1fff0206

I realize this may be because I need a different firmware for the Pi 400. I see what looks like a file on github for the Pi 400. But I am not sure what to do with it. Is it supposed to be as easy as copying it to the boot partition? (I tried that and didn’t work). Do I need to recompile a kernel? Do I need to update the other files in the boot partition with those for the bootloader firmware for the Pi?

Thanks in advance!

Mack




------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0178132f3d2ed689-M908bcace3647dd9b93065b3f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 8592 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2021-01-20 15:25 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-16 17:12 [9fans] Plan9 on Raspberry Pi 400? Richard Miller
2021-01-16 21:24 ` Skip Tavakkolian
2021-01-16 22:14   ` Bakul Shah
2021-01-17  7:11     ` Skip Tavakkolian
  -- strict thread matches above, loose matches on Subject: below --
2021-01-14 21:34 Mack Wallace
2021-01-14 23:05 ` Stuart Morrow
2021-01-14 23:37   ` Mack Wallace
2021-01-15  1:15     ` Skip Tavakkolian
2021-01-15 18:44       ` Mack Wallace
2021-01-15 19:54         ` Mack Wallace
2021-01-15 21:17           ` Michael Engel
2021-01-15 21:58             ` Stuart Morrow
2021-01-15 22:32             ` Bakul Shah
2021-01-15 22:52               ` Michael Engel
2021-01-16  0:31                 ` Mack Wallace
2021-01-16  1:01                   ` Michael Engel
2021-01-16 10:24                     ` Richard Miller
2021-01-16 11:28                       ` Michael Engel
2021-01-18 14:51                   ` Richard Miller
2021-01-18 15:42                     ` Mack Wallace
2021-01-18 16:54                       ` ori
2021-01-19  8:20                         ` hiro
2021-01-19  0:54                       ` Stuart Morrow
2021-01-19  4:13                         ` Lucio De Re
2021-01-19  9:52                           ` Richard Miller
2021-01-20 15:25                             ` Mack Wallace
2021-01-16  3:03                 ` Bakul Shah
2021-01-16  7:19         ` Skip Tavakkolian
2021-01-16 16:15       ` Skip Tavakkolian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).