[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian Installer support for Chromebooks



Hi again,

On 03/12/2022 23:45, Alper Nebi Yasak wrote:
> I've been trying to make Debian easier to install and use on Chromebooks
> by adding integration to support their stock firmware/bootloader. 
> 
> [...]
> 
> AFAICT the next steps after this are modifying the debian-installer repo
> to build custom images bootable this way and
> kernel/initramfs/modules-udebs changes for more boards as needed...

I have filed a merge request [1] to debian-installer as an initial
attempt to provide netboot images for Chromebooks, but it won't work on
older chromebooks (like my arm64 one) due to hard-coded size limits.
Below the link are some ramblings on how to handle it, comments welcome.

[1] Build AMD64/ARM64 netboot images for ChromeOS devices
https://salsa.debian.org/installer-team/debian-installer/-/merge_requests/30


The size limit issue is a bit complicated. But in short, the sum of a
compressed kernel, initramfs and device-tree files has to fit into
8MiB/16MiB on armhf, ~15MiB on older x86, and 32MiB on older arm64.

I can get armhf/arm64 cdrom builds to fit 16MiB/32MiB if I recompress
d-i initrd with `xz -9`, but then I guess we would need to generate the
final disk images in debian-cd. i386/amd64 builds are too big for that.
It might be possible to make these fit by removing unneeded modules, but
that's not feasible here because of the way modules are grouped into udebs.

My initial plan was to use U-Boot as an intermediate bootloader to
overcome the size limit. I have a proof-of-concept working on the one
arm64 Chromebook I have, it may work on others depending on upstream
support. That result would look something like the concatenable sdcard
images. It would need changes to src:u-boot first to enable board
builds. Also depthcharge-tools-installer doesn't prepare the installed
system like this (yet?), and I don't know how to make this work on x86.

Another solution I liked very much is what postmarketOS does. They track
essential modules per-board, then build a bare-minimum initramfs which
loads the actual initramfs from disk. Very cool, but not really
adaptable to Debian at this stage I think.

Debian aside, I'm thinking the best way forward is to replace the stock
firmware altogether, then just use them as ordinary laptops. Prebuilt
TianoCore is available for most x86 ones, and I'll also be trying to do
that with U-Boot for arm ones.


Reply to: