-
Notifications
You must be signed in to change notification settings - Fork 5.2k
configs: Enable ATA and AHCI for SATA drive support. #4256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'd support adding the modules for these SATA boards, but you seem to have gained more options than I was expecting. Do you really believe the other options are necessary? Were they generated by
so whilst it will be =y, that is automagic to the build system. Several of the others seem to fall into the same category of being the defaults selected by the system. For reference, the modules CONFIG_ATA and CONFIG_SATA_AHCI added on 5.9.1 were There's absolutely no point in adding them to the other variants, and a call needs to be made as to whether we start to allow PCIe device drivers to be merged for all BCM2711 kernel builds, even though it is only the CM4 that can make use of them. |
Not necessarily; they were generated by I'd be happy to whittle it down to just two though... I think I tested at least one of my cards by just adding those two and not using
It's my secret hope that some future model B variant exposes an M.2 slot and has at least 2 lanes (ideally 4 or more) of PCIe bandwidth available... might add too much expense, but I can dream! In any case, yes, I think the key would be to be extremely selective about what to add, since only CM4 users would really benefit from added support. My main point is that it would greatly expand the pool of users who would be comfortable using CM4 in specific use cases, like for NAS builds with SATA controllers. I know of the Wiretrustee SATA board coming, and a couple other hobby boards (no commercial run intended), but it would be neat to see more options open up where someone buys a board, pops on a CM4, and plugs in 2-4 drives and has a perfectly adequate Pi-based NAS. For a lot of the other cards I'm testing, I think the use case is more exotic and/or the current Pi generation is not a great fit (e.g. for networking there are too many different controllers that would need to be added, and the Pi needs extra tuning to handle more than 1 Gbps of network throughput). |
The defconfigs only take things that aren't the default or are automatically selected by other things. As above, my NAS is still running 5.9.1 as I set it up a fair while ago possibly when CM4 wasn't actually released(!), and I haven't updated it yet. I won't make any comment about future boards. |
Heh, can't stop me from trying to extract information ;) I'll update the config then later, thanks! |
Maybe the best option would be a separate image just for the CM4, because only this device has the flexibility & need for the large list of PCIe devices to be supported |
@6by9 as outsiders we are unaware of the Foundation's decision making process for strategic decisions. |
It'll be a conversation with the 3-4 main developers involved at PiTowers, with @pelwell being the main decision-maker (although I believe he's meant to be on holiday this week). Building and maintaining a separate list of modules for CM4 is a pain. For a few sensible PCIe cards it is probably reasonable to add them, but for example adding all the PCIe based DVB tuners would be excessive. |
@mi-hol The process for making a config change into an rpi kernel is to open an Issue or PR here. Being pro-active with gathering and presenting information about the benefits and costs of doing so will speed up the process, but ultimately it comes down to weighing up the benefits to some users against the costs to all in terms of storage space or (worse) free memory. Adding a dedicated CM4 build would make the situation worse. The core kernel is likely to be near-identical to the regular Pi 4 build, just with a larger set of modules. As the kernel apt package and rpi-update releases contain all kernels it would greatly increase the size, especially with the 64-bit variant as well, unless you are suggesting an independent, parallel installation channel just for CM4 - that's not going to happen. As @6by9 says, the expectation is that industrial users will do their own builds, likely using buildroot and with custom DTBs, and change them infrequently. Kernel building is so easy (https://www.raspberrypi.org/documentation/linux/kernel/building.md) that it shouldn't be a barrier to hobbyists moving on to CMs. |
Unfortunately I can't confirm this view :( Back to the open PR, was a decision already taken? |
I still haven't taken the time to update the PR, but hope to do so next week (busy week wrapping up a few projects). My hope is that this particular change is deemed as low-impact/high-reward, since there are more and more people gaining interest in projects where SATA is involved (for example, mebs_t just finished off his nice custom NAS: https://github.com/mebs/CM4-NAS/ And it's such a widely-used and low-cost solution for storage that pairs nicely with Pi (since the SATA bus is not bottlenecked quite so much as NVMe on the current-gen Pis). At least that's my argument for inclusion. I will try to update this PR soon though, and it should only have the essential modules added at that point. (The main reason it takes me a little while is I have my linux checkout on a separate drive that's not with me, since my main drive is case-insensitive, which leads to issues working with the Linux kernel, which has some identically-named files :(). |
Changes have been requested, or at least require justification. I've just checked my (5.9) NAS and it has all the changes listed bar one as defaults from having enabled just CONFIG_ATA and CONFIG_SATA_AHCI. They therefore shouldn't be present in the defconfig. CONFIG_SATA_MV=m is the exception. That is listed as
Do we actually have devices working using one of those chips? If so then it would be reasonable to enable it. On 5.10.25 the module sizes are
so again a not unreasonable hit for all users IMHO. |
@geerlingguy as a friendly follow up. |
@6by9 / @mi-hol - Just rebased and updated using The change only requires adding:
I didn't try rebuilding without the Marvel support... that may work—I just realized all the chipsets I'm using are in the 9xxx range... so just judging by the listing it doesn't seem like that module would be needed? |
TBH I'm OK with this as is - the overall hit of ~500kB. SATA_AHCI, same as the USB3 XHCI, adds support for the majority of basic controllers through the standardised interface, so I'd say it's worth adding. That means anyone using CM4 for a NAS can continue using standard kernels instead of custom builds. |
I'm OK with the new version. |
kernel: gpio-poweroff: Remember the old poweroff handler See: raspberrypi/linux#4309 kernel: staging/bcm2835-codec: Do not update crop from S_FMT after res change See: raspberrypi/linux#4285 kernel: V4L2 Codec and camera patches See: raspberrypi/linux#4238 kernel: clk: requests: Dereference the request pointer after the check See: raspberrypi/linux#4305 kernel: configs: Enable ATA and AHCI for SATA drive support. See: raspberrypi/linux#4256 kernel: Fix for Full-KMS VEC on Pi4 See: raspberrypi/linux#4240 kernel: DSI updates to use the DSI0 and JDI LT070ME05000 panel See: raspberrypi/linux#4244
kernel: gpio-poweroff: Remember the old poweroff handler See: raspberrypi/linux#4309 kernel: staging/bcm2835-codec: Do not update crop from S_FMT after res change See: raspberrypi/linux#4285 kernel: V4L2 Codec and camera patches See: raspberrypi/linux#4238 kernel: clk: requests: Dereference the request pointer after the check See: raspberrypi/linux#4305 kernel: configs: Enable ATA and AHCI for SATA drive support. See: raspberrypi/linux#4256 kernel: Fix for Full-KMS VEC on Pi4 See: raspberrypi/linux#4240 kernel: DSI updates to use the DSI0 and JDI LT070ME05000 panel See: raspberrypi/linux#4244
finally thanks for sata support! |
As I've been testing more configurations for Raspberry Pi-based storage, including NASes and storage servers, it seems like the common thread with any SATA-based storage is enabling ATA and AHCI support. This allows almost any of the Marvell-based controllers which seem to be most common on commodity SATA PCIe cards to work out of the box on the Compute Module 4.
I have added the config parameters I set in my cross-compiled kernel to both the 32-bit and 64-bit Pi OS builds for the BCM2711 chip. I don't know if there's any value adding them for other platforms though, since at this time only the BCM2711 has hardware that can easily interface with PCIe cards (e.g. the Compute Module 4 + IO Board).