9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Brian L. Stuart" <blstuart@bellsouth.net>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] cmdline.txt for RPi 4 with QHD screen
Date: Sat, 6 Apr 2024 19:18:25 +0000 (UTC)	[thread overview]
Message-ID: <1606148132.6736522.1712431105201@mail.yahoo.com> (raw)
In-Reply-To: <17123876620.8C6e.76734@composer.9fans.topicbox.com>

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

 I wouldn't call it obvious.  :)  It looks like there's at least a difference in where the firmware blobs are kept.  I don't really know how much difference there is in the driver code, but I would expect that there would be a file in /sys/src/9/bcm that is analogous to ether4330.c.  But I'll have to leave it to others who are more knoledgable about the 9front internals to follow up with more details.
In the absence of a more definitive direction, I'd grep the source files in /sys/src/9/bcm for the string 4345.  As a hex number, that is the chip ID for the 802.11 interface on the 4s.  The revision number on the original 4s was 6, but the revision on my 400 is 9.  In the 9legacy version that I use, the different IDs are listed in an array of structures:
struct {
    int chipid;
    int chiprev;
    char *fwfile;
    char *cfgfile;
    char *regufile;
} firmware[] = {
    { 0x4330, 3,    "fw_bcm40183b1.bin", config40183, 0 },
    { 0x4330, 4,    "fw_bcm40183b2.bin", config40183, 0 },
    { 43362, 0,    "fw_bcm40181a0.bin", config40181, 0 },
    { 43362, 1,    "fw_bcm40181a2.bin", config40181, 0 },
    { 43430, 1,    "brcmfmac43430-sdio.bin", "brcmfmac43430-sdio.txt", 0 },
    { 43430, 2,    "brcmfmac43436-sdio.bin", "brcmfmac43436-sdio.txt",  "brcmfmac43436-sdio.clm_blob" },
    { 0x4345, 6, "brcmfmac43455-sdio.bin", "brcmfmac43455-sdio.txt", "brcmfmac43455-sdio.clm_blob" },
    { 0x4345, 9, "brcmfmac43456-sdio.bin", "brcmfmac43456-sdio.txt", "brcmfmac43456-sdio.clm_blob" },
};

The code then runs through the array comparing the ID and rev read from the controller.  When it finds a match, it sends over the various blobs.  The code that looks for the blobs in the 9legacy driver is:

    if(!waserror()){
        snprint(nbuf, sizeof nbuf, "/boot/%s", file);
        c = namec(nbuf, Aopen, OREAD, 0);
        poperror();
    }else if(!waserror()){
        snprint(nbuf, sizeof nbuf, "/sys/lib/firmware/%s", file);
        c = namec(nbuf, Aopen, OREAD, 0);
        poperror();

If it's the same in 9front, then the blobs you have might be /boot which would be necessary if you were going to take the root from a file server over wifi.  I don't ever run mine that way, so it's more convenient for me to put them in /sys/lib/firmware.
As before, I'll need to leave it to a 9front expert to point out any of my suppositions that are wrong.

Sorry for the delay.  I took a couple of hours out to take advantage of a break in the clouds here to test my setup for the eclipse on Monday.  And btw, the computer I'll have there will be my 400 running Plan 9 with the file system I'll be talking about at IWP9 next weekend.

BLS


    On Saturday, April 6, 2024 at 07:15:16 AM UTC, taylor.garry@gmail.com <taylor.garry@gmail.com> wrote:  
 
 Hi Brian, 
Thanks for your help, does it make a difference that I'm using 9front? I don't even seem to have a /sys/lib/firmware directory, and I'm not sure I have a ether4330.c either. 

I'm sure it's obvious, but I'm a newcomer to Plan 9 and I apologise in advance if I'm missing obvious things.

Thanks

Garry9fans / 9fans / seediscussions +participants +delivery optionsPermalink  
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T42a55b55ffb81417-M21bff740cfc3be6ecf936bdb
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

  reply	other threads:[~2024-04-06 19:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05  3:23 taylor.garry
2024-04-05  3:34 ` Oliver Lowe
2024-04-05  4:36   ` taylor.garry
2024-04-05  5:15     ` adventures in9
2024-04-05  5:33       ` taylor.garry
2024-04-05  5:57         ` taylor.garry
2024-04-05 14:04           ` Alyssa M via 9fans
2024-04-06  1:32             ` taylor.garry
2024-04-06  4:04               ` Brian L. Stuart
2024-04-06  7:14                 ` taylor.garry
2024-04-06 19:18                   ` Brian L. Stuart [this message]
2024-04-07  0:13                     ` taylor.garry
2024-04-07  0:42                       ` moody
2024-04-07  8:21                         ` taylor.garry
2024-04-08 16:05                         ` Richard Miller
2024-04-09  7:52                           ` taylor.garry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1606148132.6736522.1712431105201@mail.yahoo.com \
    --to=blstuart@bellsouth.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).