Re: Debian Installer support for Chromebooks

2023-06-29 Thread Luna Jernberg
Swedish for this is now translated :)

Den mån 26 juni 2023 kl 19:15 skrev Holger Wansing :
>
> Hi,
>
> Holger Wansing  wrote (Wed, 14 Dec 2022 22:21:42 +0100):
> > Hi,
> >
> > Am 14. Dezember 2022 16:50:58 MEZ schrieb Alper Nebi Yasak 
> > :
> > >So if I understand it right, things will go mostly in this flow:
> > >
> > >- depthcharge-tools-installer and partman-cross pass NEW review
> > >- Holger uploads version 2 for both, with note for translators (Thanks!)
> > >- No translation work is done for the two packages for now
> > >- Bookworm releases
> > >- The templates' original texts get reviewed for English
> > >- The packages are integrated to d-i l10n workflow
> > >- Translators start working on the packages for Trixie within d-i
> >
> > That would be my plan, yes.
>
> I have now added them to the l10n-machinery.
> Translation material should appear for translators then shortly.
>
>
> Holger
>
>
> --
> Holger Wansing 
> PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076
>



Re: Debian Installer support for Chromebooks

2023-06-26 Thread Holger Wansing
Hi,

Am 26. Juni 2023 20:57:36 MESZ schrieb Alper Nebi Yasak 
:
>On 26/06/2023 20:14, Holger Wansing wrote:
>> I have now added them to the l10n-machinery.
>> Translation material should appear for translators then shortly.
>
>Thank you. I have already received some translations as bug reports, how
>should I process them?

Those bugreports are a bit problematic.
Ideally translators should not work on d-i packages directly, but 
that seems difficult to communicate.
Now we have those translations nevertheless.
Processing them is a bit of by-hand work.
I will take care of them tomorrow.


Holger



-- 
Sent from /e/ OS on Fairphone3



Re: Debian Installer support for Chromebooks

2023-06-26 Thread Alper Nebi Yasak
Hi,

On 26/06/2023 20:14, Holger Wansing wrote:
> Holger Wansing  wrote (Wed, 14 Dec 2022 22:21:42 +0100):
>> Am 14. Dezember 2022 16:50:58 MEZ schrieb Alper Nebi Yasak 
>> :
>>> So if I understand it right, things will go mostly in this flow:
>>>
>>> - depthcharge-tools-installer and partman-cross pass NEW review
>>> - Holger uploads version 2 for both, with note for translators (Thanks!)
>>> - No translation work is done for the two packages for now
>>> - Bookworm releases
>>> - The templates' original texts get reviewed for English
>>> - The packages are integrated to d-i l10n workflow
>>> - Translators start working on the packages for Trixie within d-i
>>
>> That would be my plan, yes.
> 
> I have now added them to the l10n-machinery.
> Translation material should appear for translators then shortly.

Thank you. I have already received some translations as bug reports, how
should I process them?



Re: Debian Installer support for Chromebooks

2023-06-26 Thread Holger Wansing
Hi,

Holger Wansing  wrote (Wed, 14 Dec 2022 22:21:42 +0100):
> Hi,
> 
> Am 14. Dezember 2022 16:50:58 MEZ schrieb Alper Nebi Yasak 
> :
> >So if I understand it right, things will go mostly in this flow:
> >
> >- depthcharge-tools-installer and partman-cross pass NEW review
> >- Holger uploads version 2 for both, with note for translators (Thanks!)
> >- No translation work is done for the two packages for now
> >- Bookworm releases
> >- The templates' original texts get reviewed for English
> >- The packages are integrated to d-i l10n workflow
> >- Translators start working on the packages for Trixie within d-i
> 
> That would be my plan, yes.

I have now added them to the l10n-machinery.
Translation material should appear for translators then shortly.


Holger


-- 
Holger Wansing 
PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076



Re: Debian Installer support for Chromebooks

2023-01-14 Thread Alper Nebi Yasak
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.



Re: Debian Installer support for Chromebooks

2023-01-08 Thread Holger Wansing
Hi,

Alper Nebi Yasak  wrote (Mon, 9 Jan 2023 00:24:53 
+0300):
> On 15/12/2022 00:21, Holger Wansing wrote:
> > Am 14. Dezember 2022 16:50:58 MEZ schrieb Alper Nebi Yasak 
> > :
> >> So if I understand it right, things will go mostly in this flow:
> >>
> >> - depthcharge-tools-installer and partman-cross pass NEW review
> >> - Holger uploads version 2 for both, with note for translators (Thanks!)
> >> - No translation work is done for the two packages for now
> >> - Bookworm releases
> >> - The templates' original texts get reviewed for English
> >> - The packages are integrated to d-i l10n workflow
> >> - Translators start working on the packages for Trixie within d-i
> > 
> > That would be my plan, yes.
> 
> depthcharge-tools-installer is in unstable now, I guess you should be
> able to upload version 2?

Done.


Holger


-- 
Holger Wansing 
PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076



Re: Debian Installer support for Chromebooks

2023-01-08 Thread Alper Nebi Yasak
On 15/12/2022 00:21, Holger Wansing wrote:
> Am 14. Dezember 2022 16:50:58 MEZ schrieb Alper Nebi Yasak 
> :
>> So if I understand it right, things will go mostly in this flow:
>>
>> - depthcharge-tools-installer and partman-cross pass NEW review
>> - Holger uploads version 2 for both, with note for translators (Thanks!)
>> - No translation work is done for the two packages for now
>> - Bookworm releases
>> - The templates' original texts get reviewed for English
>> - The packages are integrated to d-i l10n workflow
>> - Translators start working on the packages for Trixie within d-i
> 
> That would be my plan, yes.

depthcharge-tools-installer is in unstable now, I guess you should be
able to upload version 2?

(partman-cros is still waiting in NEW.)



Re: Debian Installer support for Chromebooks

2022-12-14 Thread Holger Wansing
Hi,

Am 14. Dezember 2022 16:50:58 MEZ schrieb Alper Nebi Yasak 
:
>So if I understand it right, things will go mostly in this flow:
>
>- depthcharge-tools-installer and partman-cross pass NEW review
>- Holger uploads version 2 for both, with note for translators (Thanks!)
>- No translation work is done for the two packages for now
>- Bookworm releases
>- The templates' original texts get reviewed for English
>- The packages are integrated to d-i l10n workflow
>- Translators start working on the packages for Trixie within d-i

That would be my plan, yes.

Holger


-- 
Sent from /e/ OS on Fairphone3



Re: Debian Installer support for Chromebooks

2022-12-14 Thread Cyril Brulebois
Alper Nebi Yasak  (2022-12-14):
> Thanks for the upload, and for the tracker subscription tip. I filter
> debian-boot@ into a folder that I do try to read, but a way that could
> notify me more prominently could be better.

ACK. :)

> It's only created if depthcharge-tools-installer/board is set. That
> template is not asked as a user-visible question, but can be set via a
> preseed file or in the kernel command line [1]. I do the latter for
> testing things in a VM, and meant that by 'preseed'.
> 
> [1] Using boot parameters to preseed questions
> https://www.debian.org/releases/testing/amd64/apbs02.en.html#preseed-bootparms

Alright then, that's totally fine!

> I tried to match what base-installer does [2]. In general, I think it's
> better to prefer config.d mechanisms over modifying the config files, to
> avoid conffile conflicts if/when the defaults change later on.
> 
> [2] base-installer initramfs-tools driver inclusion policy handling
> https://salsa.debian.org/installer-team/base-installer/-/blob/master/library.sh#L571-592

OK, that's totally fair. I don't think I've ever toyed with that option
in d-i, let alone looked at the implementation. Fine then!

> Outdated comment that I missed. There's also cros_efi and cros_legacy,
> but they are included in some (apparently broken) GRUB/syslinux .cfg
> files to tell ChromeOS that we're not using its verified boot method. I
> used to check for them until I figured out it doesn't make sense to.

OK. That was really minor/uninteresting anyway.


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- Freelance Consultant


signature.asc
Description: PGP signature


Re: Debian Installer support for Chromebooks

2022-12-14 Thread Alper Nebi Yasak
On 13/12/2022 22:36, Holger Wansing wrote:
> Ah, yes, you are right.
> I mixed things up here:
> those packages will come into unstable, if they are processed by ftpmaster in 
> NEW queue.
> But they will then not migrate to testing automatically.
> For that, a source-only upload is needed.
> 
> Ok, so we have some time here...

So if I understand it right, things will go mostly in this flow:

- depthcharge-tools-installer and partman-cross pass NEW review
- Holger uploads version 2 for both, with note for translators (Thanks!)
- No translation work is done for the two packages for now
- Bookworm releases
- The templates' original texts get reviewed for English
- The packages are integrated to d-i l10n workflow
- Translators start working on the packages for Trixie within d-i

>>> Kibi, could you provide me with the needed upload rights?
>>
>> I've added both packages to your UID's ACL via the right commands file
>> but I'm not sure that's going to be successful since those are unknown
>> packages at the moment. We'll see.
> 
> Ok, thanks.

FWIW, the packages show up on https://ftp-master.debian.org/dm.txt



Re: Debian Installer support for Chromebooks

2022-12-14 Thread Alper Nebi Yasak
On 12/12/2022 03:15, Cyril Brulebois wrote:
> I've glanced at depthcharge-tools-installer and while I'm no debconf
> expert and I can't assess the postinst with high certainty, the overall
> impression was good enough for me to sign and upload; I did change the
> Maintainer to debian-boot@ (same as other packages under installer-team/)
> and moved you to Uploaders, so you might want to subscribe via tracker
> once the package is accepted if you don't follow debian-boot@.

Thanks for the upload, and for the tracker subscription tip. I filter
debian-boot@ into a folder that I do try to read, but a way that could
notify me more prominently could be better.

> [...]
> 
> A couple of nitpicks/questions anyway:
> 
>  - depthcharge_tools_set_board():
> 
>The generated comment mentions preseed while I don't think preseed is
>involved at all, and I suppose the comment should just mention
>debian-installer instead?

It's only created if depthcharge-tools-installer/board is set. That
template is not asked as a user-visible question, but can be set via a
preseed file or in the kernel command line [1]. I do the latter for
testing things in a VM, and meant that by 'preseed'.

[1] Using boot parameters to preseed questions
https://www.debian.org/releases/testing/amd64/apbs02.en.html#preseed-bootparms

>  - initramfs_tools_conf():
> 
>Having MODULES overriden in a separate config file might be surprising
>to admins. Did you consider adjusting this variable directly in the
>main initramfs-tools config file instead?

I tried to match what base-installer does [2]. In general, I think it's
better to prefer config.d mechanisms over modifying the config files, to
avoid conffile conflicts if/when the defaults change later on.

[2] base-installer initramfs-tools driver inclusion policy handling
https://salsa.debian.org/installer-team/base-installer/-/blob/master/library.sh#L571-592

>  - isinstallable:
> 
>It mentions “these values” but only checks for one. Should there other
>patterns in that grep?

Outdated comment that I missed. There's also cros_efi and cros_legacy,
but they are included in some (apparently broken) GRUB/syslinux .cfg
files to tell ChromeOS that we're not using its verified boot method. I
used to check for them until I figured out it doesn't make sense to.



Re: Debian Installer support for Chromebooks

2022-12-13 Thread Holger Wansing



Am 13. Dezember 2022 20:25:35 MEZ schrieb Cyril Brulebois :
>> 
>> And since a source-only upload is needed anyway to get them migrated
>> to unstable, I wanted to upload that change, but I forgot that I have
>> no upload rights for these new packages currently.
>
>I don't think you should do that before they've been accepted from NEW?

Ah, yes, you are right.
I mixed things up here:
those packages will come into unstable, if they are processed by ftpmaster in 
NEW queue.
But they will then not migrate to testing automatically.
For that, a source-only upload is needed.

Ok, so we have some time here...

>> Kibi, could you provide me with the needed upload rights?
>
>I've added both packages to your UID's ACL via the right commands file
>but I'm not sure that's going to be successful since those are unknown
>packages at the moment. We'll see.

Ok, thanks.


Holger

-- 
Sent from /e/ OS on Fairphone3



Re: Debian Installer support for Chromebooks

2022-12-13 Thread Cyril Brulebois
Hallo Holger,

Holger Wansing  (2022-12-13):
> I have added a hint into the templates.pot file for these packages, to
> make translators, who get the file, aware of the special situation and
> uncommon workflow.
> 
> And since a source-only upload is needed anyway to get them migrated
> to unstable, I wanted to upload that change, but I forgot that I have
> no upload rights for these new packages currently.

I don't think you should do that before they've been accepted from NEW?

> Kibi, could you provide me with the needed upload rights?

I've added both packages to your UID's ACL via the right commands file
but I'm not sure that's going to be successful since those are unknown
packages at the moment. We'll see.


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- Freelance Consultant


signature.asc
Description: PGP signature


Re: Debian Installer support for Chromebooks

2022-12-13 Thread Holger Wansing
Hi,

Holger Wansing  wrote (Mon, 12 Dec 2022 12:53:34 +0100):
> Therefore, I will sent a notice to debian-i18n, to warn translators from
> working directly on depthcharge-tools-installer and partman-cros.

I have added a hint into the templates.pot file for these packages, to make 
translators, who get the file, aware of the special situation and uncommon 
workflow.

And since a source-only upload is needed anyway to get them migrated to
unstable, I wanted to upload that change, but I forgot that I have no upload
rights for these new packages currently.

Kibi, could you provide me with the needed upload rights?

Thanks

Holger



-- 
Holger Wansing 
PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076



Re: Debian Installer support for Chromebooks

2022-12-12 Thread Holger Wansing
Hi,

Cyril Brulebois  wrote (Mon, 12 Dec 2022 01:15:49 +0100):
> It might make sense to have some kind of review of the translatable
> material before hooking it up with the l10n sync machinery, so that
> translators don't have to submit an initial translation that might get
> outdated if some strings get marked fuzzy shortly afterwards. I think
> debian-l10n-english@ might have been put in the loop in the past, but it's
> been a while since I was involved with l10n efforts.
> 
> Regarding adding that package to the l10n sync mechanism, I suppose it
> could be done as soon as such a review has happened, we only need to make
> sure we don't add the package to the list of packages that count for the
> l10n stats (and the resulting translation-status file that helps d-i
> display a warning if a translation isn't complete enough). But I'll defer
> to Holger Wansing entirely, who knows about that much more than I do.

Personally, I would prefer to not introduce new strings to the l10n-sync 
machinery at all that late in the development cycle (1 month until the first
freeze step).
So releasing bookworm with depthcharge-tools-installer and partman-cros
as english-only would be the way to go (as I have already mentioned some
days ago).



Another aspect:
partman-hfs has shown, that the addition of a new package (which has 
translatable material) to the archive leads to translators starting their
work immediately.
At least for some languages, the translation teams are very active and 
they see the new package coming in and appearing on their l10n statistics
page (like https://www.debian.org/international/l10n/po-debconf/fr#i18n),
so work starts.

For d-i packages however, that's not good, since it leads to unnecessary
work for translators (that's because we have a significant amount of
strings which are shared between packages like the partman-xyz ones,
therefore those strings will not have to be translated for every single
package separately. That's what the l10n-sync machinery does: sharing
the translations over the several packages.)

Therefore, I will sent a notice to debian-i18n, to warn translators from
working directly on depthcharge-tools-installer and partman-cros.



Holger



-- 
Holger Wansing 
PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076



Re: Debian Installer support for Chromebooks

2022-12-11 Thread Cyril Brulebois
Hi again,

Cyril Brulebois  (2022-12-12):
> I've glanced at depthcharge-tools-installer and while I'm no debconf
> expert and I can't assess the postinst with high certainty, the overall
> impression was good enough for me to sign and upload; I did change the
> Maintainer to debian-boot@ (same as other packages under installer-team/)
> and moved you to Uploaders, so you might want to subscribe via tracker
> once the package is accepted if you don't follow debian-boot@.

Same story with partman-cros under the “I'm no partman expert” proviso.

It's a little sad to see that huge disk_from_partdev() function that's
similar to other functions in other packages, and I think we could just
look at the right place in sysfs or some such to access that information,
but let's get the ball rolling first; hopefully we'll end up cleaning up
such things at some point.

Tagged and uploaded.

> It might make sense to have some kind of review of the translatable
> material before hooking it up with the l10n sync machinery, so that
> translators don't have to submit an initial translation that might get
> outdated if some strings get marked fuzzy shortly afterwards. I think
> debian-l10n-english@ might have been put in the loop in the past, but it's
> been a while since I was involved with l10n efforts.
> 
> Regarding adding that package to the l10n sync mechanism, I suppose it
> could be done as soon as such a review has happened, we only need to make
> sure we don't add the package to the list of packages that count for the
> l10n stats (and the resulting translation-status file that helps d-i
> display a warning if a translation isn't complete enough). But I'll defer
> to Holger Wansing entirely, who knows about that much more than I do.

Ditto.


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- Freelance Consultant


signature.asc
Description: PGP signature


Re: Debian Installer support for Chromebooks

2022-12-11 Thread Cyril Brulebois
Hi,

Cyril Brulebois  (2022-12-03):
> I'm happy to have those moved under installer-team/ whenever is most
> convenient for you and your potential sponsor.

I've done that a few days ago.

> I can't promise to do the reviewing/uploading right away (I'd like to
> tie up some loose ends first), but hopefully I can try and have a look
> once I'm done with updating crowdsec and its huge bunch of new
> dependencies. :)
> 
> Feel free to hit me up next week-end if you haven't seen anything
> move.

I've glanced at depthcharge-tools-installer and while I'm no debconf
expert and I can't assess the postinst with high certainty, the overall
impression was good enough for me to sign and upload; I did change the
Maintainer to debian-boot@ (same as other packages under installer-team/)
and moved you to Uploaders, so you might want to subscribe via tracker
once the package is accepted if you don't follow debian-boot@.

It might make sense to have some kind of review of the translatable
material before hooking it up with the l10n sync machinery, so that
translators don't have to submit an initial translation that might get
outdated if some strings get marked fuzzy shortly afterwards. I think
debian-l10n-english@ might have been put in the loop in the past, but it's
been a while since I was involved with l10n efforts.

Regarding adding that package to the l10n sync mechanism, I suppose it
could be done as soon as such a review has happened, we only need to make
sure we don't add the package to the list of packages that count for the
l10n stats (and the resulting translation-status file that helps d-i
display a warning if a translation isn't complete enough). But I'll defer
to Holger Wansing entirely, who knows about that much more than I do.

A couple of nitpicks/questions anyway:

 - depthcharge_tools_set_board():

   The generated comment mentions preseed while I don't think preseed is
   involved at all, and I suppose the comment should just mention
   debian-installer instead?

 - initramfs_tools_conf():

   Having MODULES overriden in a separate config file might be surprising
   to admins. Did you consider adjusting this variable directly in the
   main initramfs-tools config file instead?

 - isinstallable:

   It mentions “these values” but only checks for one. Should there other
   patterns in that grep?


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- Freelance Consultant


signature.asc
Description: PGP signature


Re: Debian Installer support for Chromebooks

2022-12-05 Thread Alper Nebi Yasak
On 04/12/2022 14:49, Holger Wansing wrote:
> Since the packages contain translatable material, my 2 cents here:
> I would propose to *not* add the new packages to the l10n machinery
> before the release of bookworm, given were are late in the development
> cycle. 
> Means, the new packages would be english-only (at least for the initial
> release of bookworm).
> I guess that's ok by you?

That's definitely OK. I don't know the actual distribution, but my best
guess is the vast majority of users would be in English-speaking countries.



Re: Debian Installer support for Chromebooks

2022-12-05 Thread Alper Nebi Yasak
On 04/12/2022 00:08, Cyril Brulebois wrote:
> Alper Nebi Yasak  (2022-12-03):
>> I'd like these two udebs to be sponsored. [...]
> 
> I don't think that's going to be an issue timing-wise. To be fair, if they
> aren't perfect yet by the time the release happens, we could always fix
> stuff in unstable and backport a few things to stable.
> 
> The only thing I'll probably want to make extra sure of is that
> introducing those packages doesn't have any nasty side effects for other
> machines.

I'll try to test UEFI installations with my custom images on actual
hardware this week. Saw no problems on a QEMU VM so far.

>> [...]
> 
> All of this is very interesting, I'm not sure where it would be best to
> keep all relevant documentation. Maybe some dedicated wiki page?

I want to eventually write an InstallingDebianOn/Chromebooks page, but
have been delaying that because my aim is to make it conceptually as
small as "Enable 'Developer Mode', write this image to a USB disk, press
CTRL + U to boot from it, follow the installer". Maybe as an appendix to
that, or something like DebianInstaller/Chromebooks? I don't know.



Re: Debian Installer support for Chromebooks

2022-12-04 Thread Holger Wansing
Hi Alper,

Am 3. Dezember 2022 22:08:50 MEZ schrieb Cyril Brulebois :
>> I'd like these two udebs to be sponsored. I know I'm quite late with
>> these, but hoping it's not too late for bookworm installer changes. They
>> are somewhat small, `cat **/* | wc -l` gives around 400-600 lines each.
>> I tested them on the two Chromebooks I have (one arm64, one x86).
>
>I don't think that's going to be an issue timing-wise. To be fair, if they
>aren't perfect yet by the time the release happens, we could always fix
>stuff in unstable and backport a few things to stable.

Since the packages contain translatable material, my 2 cents here:
I would propose to *not* add the new packages to the l10n machinery
before the release of bookworm, given were are late in the development
cycle. 
Means, the new packages would be english-only (at least for the initial
release of bookworm).
I guess that's ok by you?


Holger



-- 
Sent from /e/ OS on Fairphone3



Re: Debian Installer support for Chromebooks

2022-12-03 Thread Cyril Brulebois
Hi!

Alper Nebi Yasak  (2022-12-03):
> I've been trying to make Debian easier to install and use on Chromebooks
> by adding integration to support their stock firmware/bootloader. The
> major part of that work is 'depthcharge-tools' which manages
> bootloader-specific stuff and kernel/initramfs upgrade hooks, recently
> sponsored and now in the archive.

That's great! I've only discovered this recently and haven't managed to
catch up with your talk just yet. I'm hoping to be spending more time on
Debian work in the next few weeks/months, don't hesitate to ping me if you
need help/input.

> Another part of this is making d-i install a bootable system, where we
> need to create a custom partition and then write a special image to it.
> For these I have two udeb packages: 'partman-cros' [1] that does partman
> integration and 'depthcharge-tools-installer' [2] which installs and
> runs depthcharge-tools in-target.
> 
> I'd like these two udebs to be sponsored. I know I'm quite late with
> these, but hoping it's not too late for bookworm installer changes. They
> are somewhat small, `cat **/* | wc -l` gives around 400-600 lines each.
> I tested them on the two Chromebooks I have (one arm64, one x86).

I don't think that's going to be an issue timing-wise. To be fair, if they
aren't perfect yet by the time the release happens, we could always fix
stuff in unstable and backport a few things to stable.

The only thing I'll probably want to make extra sure of is that
introducing those packages doesn't have any nasty side effects for other
machines.

> Here are the salsa links for the packages (I'd welcome moving them to
> the installer-team namespace), they are on mentors.debian.net as well if
> anyone prefers a dsc + tarball:
> 
> [1] https://salsa.debian.org/alpernebbi/partman-cros
> [2] https://salsa.debian.org/alpernebbi/depthcharge-tools-installer

I'm happy to have those moved under installer-team/ whenever is most
convenient for you and your potential sponsor.

I can't promise to do the reviewing/uploading right away (I'd like to tie
up some loose ends first), but hopefully I can try and have a look once
I'm done with updating crowdsec and its huge bunch of new dependencies. :)

Feel free to hit me up next week-end if you haven't seen anything move.

> They can be tested on non-ChromeOS devices as well (a VM or actual UEFI
> hardware), by roughly doing:
> 
> - Build both my packages above and save the two resulting udeb files
> - Clone https://salsa.debian.org/installer-team/debian-installer
> - Place the newly built udebs in build/localudebs
> - Create a build/pkg-lists/local file with contents:
> partman-cros
> depthcharge-tools-installer
> live-installer -
> - (without indents, and the '-' on the last line is intentional)
> - Build that as a Debian package (or see its README for build details)
>   - Check the resulting debian-installer-images tar.gz file for images
>   - Extract netboot/gtk/mini.iso
> - Boot a QEMU VM with it as cdrom, and a disk image to install to
> - Prepend "cros_secure" to the kernel cmdline in the GRUB menu
> - Follow the installer prompts (ideally everything should be obvious)
>   - There's a warning if you don't create ChromeOS Kernel partitions
>   - Create one big enough (512MB is great) or get error at the very end
> - (The GRUB installation step will be skipped, manually run it
> afterwards if you want to UEFI boot into the resulting system)
> 
> That should go through the most likely case. There's custom logic to ask
> to make initramfs smaller if it doesn't fit the board's size limit, but
> never triggered on x86 due to arch differences. If you do an arm64 build
> you can test that by adding "depthcharge-tools-installer/board=kevin" to
> the kernel cmdline.
> 
> It's harder to test on chromebooks the native way. On the boards I have,
> the d-i netboot builds either doesn't fit the board's size limit (arm64)
> or doesn't show any graphics (x86). But using a secondary bootloader and
> adding the 'cros_secure' via GRUB works well to bootstrap their native
> boot flow. (I can try to provide instructions if anyone wants, but this
> email's already rather long.)

All of this is very interesting, I'm not sure where it would be best to
keep all relevant documentation. Maybe some dedicated wiki page?

> There are some more details and screenshots of the whole thing at my
> DebConf22 talk [3], though I've changed some things a bit since then.
> 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...
> 
> [3] Solving "How Can I Run Debian on My Chromebook?" For Good
> https://debconf22.debconf.org/talks/87-solving-how-can-i-run-debian-on-my-chromebook-for-good/

I'll definitely catch up with it at some point!


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- 

Debian Installer support for Chromebooks

2022-12-03 Thread Alper Nebi Yasak
Hi,

I've been trying to make Debian easier to install and use on Chromebooks
by adding integration to support their stock firmware/bootloader. The
major part of that work is 'depthcharge-tools' which manages
bootloader-specific stuff and kernel/initramfs upgrade hooks, recently
sponsored and now in the archive.

Another part of this is making d-i install a bootable system, where we
need to create a custom partition and then write a special image to it.
For these I have two udeb packages: 'partman-cros' [1] that does partman
integration and 'depthcharge-tools-installer' [2] which installs and
runs depthcharge-tools in-target.

I'd like these two udebs to be sponsored. I know I'm quite late with
these, but hoping it's not too late for bookworm installer changes. They
are somewhat small, `cat **/* | wc -l` gives around 400-600 lines each.
I tested them on the two Chromebooks I have (one arm64, one x86).

Here are the salsa links for the packages (I'd welcome moving them to
the installer-team namespace), they are on mentors.debian.net as well if
anyone prefers a dsc + tarball:

[1] https://salsa.debian.org/alpernebbi/partman-cros
[2] https://salsa.debian.org/alpernebbi/depthcharge-tools-installer


They can be tested on non-ChromeOS devices as well (a VM or actual UEFI
hardware), by roughly doing:

- Build both my packages above and save the two resulting udeb files
- Clone https://salsa.debian.org/installer-team/debian-installer
- Place the newly built udebs in build/localudebs
- Create a build/pkg-lists/local file with contents:
partman-cros
depthcharge-tools-installer
live-installer -
- (without indents, and the '-' on the last line is intentional)
- Build that as a Debian package (or see its README for build details)
  - Check the resulting debian-installer-images tar.gz file for images
  - Extract netboot/gtk/mini.iso
- Boot a QEMU VM with it as cdrom, and a disk image to install to
- Prepend "cros_secure" to the kernel cmdline in the GRUB menu
- Follow the installer prompts (ideally everything should be obvious)
  - There's a warning if you don't create ChromeOS Kernel partitions
  - Create one big enough (512MB is great) or get error at the very end
- (The GRUB installation step will be skipped, manually run it
afterwards if you want to UEFI boot into the resulting system)

That should go through the most likely case. There's custom logic to ask
to make initramfs smaller if it doesn't fit the board's size limit, but
never triggered on x86 due to arch differences. If you do an arm64 build
you can test that by adding "depthcharge-tools-installer/board=kevin" to
the kernel cmdline.

It's harder to test on chromebooks the native way. On the boards I have,
the d-i netboot builds either doesn't fit the board's size limit (arm64)
or doesn't show any graphics (x86). But using a secondary bootloader and
adding the 'cros_secure' via GRUB works well to bootstrap their native
boot flow. (I can try to provide instructions if anyone wants, but this
email's already rather long.)


There are some more details and screenshots of the whole thing at my
DebConf22 talk [3], though I've changed some things a bit since then.
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...

[3] Solving "How Can I Run Debian on My Chromebook?" For Good
https://debconf22.debconf.org/talks/87-solving-how-can-i-run-debian-on-my-chromebook-for-good/