Re: Graphical installer on arm64 (netboot and cdrom)

2020-07-07 Thread Steve McIntyre
Hey Alper,

Apologies, I've been swamped with a lot of other things lately, both
in Debian and in starting up with a new day job. I'll try and review
your more recent changes shortly...

On Wed, Jul 01, 2020 at 07:46:39PM +0300, Alper Nebi Yasak wrote:
>Hi, I just wanted to remind you of some patches I sent a while back. Do you
>(or anyone else) have time to comment on / review / merge them?
>
>On 19/05/2020 17:17, Alper Nebi Yasak wrote:
>> So I tested my earlier patch, and did a bit more. I've attached three
>> patches, first two for debian-installer and the third for rootskel.
>> 
>> The first patch fixes arm64 netboot and netboot-gtk mini.iso images
>> which now have 'Graphical install' GRUB entries using /gtk/initrd.gz
>> files which don't exist, by making that file identical to /initrd.gz.
>
>Also, instead of this, would it be fine to merge netboot-gtk into netboot in
>general? I think that would solve this issue better.
>
>> The second patch adds "console=tty0" to GRUB entries marked as
>> "Graphical" in grub-gencfg. Without this, "Graphical automated install"
>> runs on the serial console (since that may be the "preferred" console
>> due to stdout-path or SPCR on arm64). The console=tty0 cmdline argument
>> also ends up in the installed system's /etc/default/grub.cfg, which is
>> correct IMO.
>> 
>> The third patch considers tty0 a possible console even if it's not in
>> /proc/consoles (the patch I sent earlier). The text-mode installer
>> already launches on the display in the stdout-path case, but not on the
>> SPCR case. With this it launches on the display in that case as well.
>> 
>> I've tested on an arm64 QEMU VM. After all the patches:
>> - "Install" launches on serial and display
>> - "Graphical install" launches on display and serial
>> - "Automated install" launches only on serial
>> - "Graphical automated install" launches only on display
>> 
>> On systems where console is set with stdout-path instead, "Graphical
>> install" would launch only on display, but the others would be the same.
>
>The three patches are available at [1] if you haven't received them, or I can
>resend them if you want.
>
>[1] https://lists.debian.org/debian-boot/2020/05/msg00178.html
>
>There's also a small change I posted for bug #961590 [2] that includes
>fb-modules in the netboot pkg-list, I'd be glad if that could be merged as
>well.
>
>[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961590#30
>
-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
  Mature Sporty Personal
  More Innovation More Adult
  A Man in Dandism
  Powered Midship Specialty



Re: Graphical installer on arm64 (netboot and cdrom)

2020-07-01 Thread Alper Nebi Yasak
Hi, I just wanted to remind you of some patches I sent a while back. Do 
you (or anyone else) have time to comment on / review / merge them?


On 19/05/2020 17:17, Alper Nebi Yasak wrote:

So I tested my earlier patch, and did a bit more. I've attached three
patches, first two for debian-installer and the third for rootskel.

The first patch fixes arm64 netboot and netboot-gtk mini.iso images
which now have 'Graphical install' GRUB entries using /gtk/initrd.gz
files which don't exist, by making that file identical to /initrd.gz.


Also, instead of this, would it be fine to merge netboot-gtk into 
netboot in general? I think that would solve this issue better.



The second patch adds "console=tty0" to GRUB entries marked as
"Graphical" in grub-gencfg. Without this, "Graphical automated install"
runs on the serial console (since that may be the "preferred" console
due to stdout-path or SPCR on arm64). The console=tty0 cmdline argument
also ends up in the installed system's /etc/default/grub.cfg, which is
correct IMO.

The third patch considers tty0 a possible console even if it's not in
/proc/consoles (the patch I sent earlier). The text-mode installer
already launches on the display in the stdout-path case, but not on the
SPCR case. With this it launches on the display in that case as well.

I've tested on an arm64 QEMU VM. After all the patches:
- "Install" launches on serial and display
- "Graphical install" launches on display and serial
- "Automated install" launches only on serial
- "Graphical automated install" launches only on display

On systems where console is set with stdout-path instead, "Graphical
install" would launch only on display, but the others would be the same.


The three patches are available at [1] if you haven't received them, or 
I can resend them if you want.


[1] https://lists.debian.org/debian-boot/2020/05/msg00178.html

There's also a small change I posted for bug #961590 [2] that includes 
fb-modules in the netboot pkg-list, I'd be glad if that could be merged 
as well.


[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961590#30



Re: Graphical installer on arm64 (netboot and cdrom)

2020-05-19 Thread Alper Nebi Yasak

On 20/04/2020 19:36, Alper Nebi Yasak wrote:

On 20/04/2020 18:38, Steve McIntyre wrote:

Does /dev/tty0 show up in /proc/consoles in your setup? We might need
to tweak that yet...


Here is a small but untested patch for rootskel's reopen-console for that.


I don't think this (having to set console=tty0 on arm64) is going to 
change on the kernel side, see:

https://lore.kernel.org/linux-serial/20200513143755.GM17734@linux-b0ei/

where Petr Mladek said:

My suggestion is:

   + Fix SPCR setting or device tree of your device when the defaults
 are not as expected.

   + Use command line to force your value when the defaults are not
 as expected and you could not change them.


So I tested my earlier patch, and did a bit more. I've attached three 
patches, first two for debian-installer and the third for rootskel.


The first patch fixes arm64 netboot and netboot-gtk mini.iso images 
which now have 'Graphical install' GRUB entries using /gtk/initrd.gz 
files which don't exist, by making that file identical to /initrd.gz.


The second patch adds "console=tty0" to GRUB entries marked as 
"Graphical" in grub-gencfg. Without this, "Graphical automated install" 
runs on the serial console (since that may be the "preferred" console 
due to stdout-path or SPCR on arm64). The console=tty0 cmdline argument 
also ends up in the installed system's /etc/default/grub.cfg, which is 
correct IMO.


The third patch considers tty0 a possible console even if it's not in 
/proc/consoles (the patch I sent earlier). The text-mode installer 
already launches on the display in the stdout-path case, but not on the 
SPCR case. With this it launches on the display in that case as well.


I've tested on an arm64 QEMU VM. After all the patches:
- "Install" launches on serial and display
- "Graphical install" launches on display and serial
- "Automated install" launches only on serial
- "Graphical automated install" launches only on display

On systems where console is set with stdout-path instead, "Graphical 
install" would launch only on display, but the others would be the same.
>From 2970cde5a6217a76a0b499987c4e9c40485db891 Mon Sep 17 00:00:00 2001
From: Alper Nebi Yasak 
Date: Mon, 18 May 2020 22:35:07 +0300
Subject: [PATCH] Include a /gtk/initrd.gz in graphical arm mini.iso builds

Signed-off-by: Alper Nebi Yasak 
---
 build/config/arm.cfg | 4 
 1 file changed, 4 insertions(+)

diff --git a/build/config/arm.cfg b/build/config/arm.cfg
index 4e12bae63..fcf8858b2 100644
--- a/build/config/arm.cfg
+++ b/build/config/arm.cfg
@@ -46,6 +46,10 @@ arch_miniiso: arm_grub_efi
 
 	ln -f $(TEMP_KERNEL) $(TEMP_CD_TREE)/linux
 	ln -f $(TEMP_INITRD) $(TEMP_CD_TREE)/initrd.gz
+	if [ "$(GRAPHICAL_INSTALLER)" = y ]; then \
+		mkdir -p $(TEMP_CD_TREE)/gtk; \
+		ln -f $(TEMP_INITRD) $(TEMP_CD_TREE)/gtk/initrd.gz; \
+	fi
 
 	mkdir -p $(TEMP_CD_TREE)/.disk
 	echo "Debian GNU/Linux $(DEBIAN_VERSION) $(ARCH) - netboot mini.iso $(BUILD_DATE)"\
-- 
2.26.2

>From f776932c463ed2f921255e395a72373e8ef403b5 Mon Sep 17 00:00:00 2001
From: Alper Nebi Yasak 
Date: Mon, 18 May 2020 22:50:34 +0300
Subject: [PATCH] Explicitly set console=tty0 for graphical GRUB entries

Signed-off-by: Alper Nebi Yasak 
---
 build/util/grub-gencfg | 1 +
 1 file changed, 1 insertion(+)

diff --git a/build/util/grub-gencfg b/build/util/grub-gencfg
index 97fe42432..f4b6adbda 100755
--- a/build/util/grub-gencfg
+++ b/build/util/grub-gencfg
@@ -169,6 +169,7 @@ sub menuentry ($;%)
 push @cmdline, "theme=dark" if $xattr{Dark};
 push @cmdline, "---";
 push @cmdline, "quiet" if $xattr{Quiet};
+push @cmdline, "console=tty0" if $xattr{Graphical};
 
 my $cmdline = join(" ", @cmdline);
 
-- 
2.26.2

>From 1713b6544d4950d2861710b48aff16b4b0a119af Mon Sep 17 00:00:00 2001
From: Alper Nebi Yasak 
Date: Mon, 20 Apr 2020 19:27:18 +0300
Subject: [PATCH] Use /dev/tty0 as a console even if it's not in /proc/consoles

Signed-off-by: Alper Nebi Yasak 
---
 src/sbin/reopen-console-linux | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/sbin/reopen-console-linux b/src/sbin/reopen-console-linux
index 13b15a3..0816be4 100755
--- a/src/sbin/reopen-console-linux
+++ b/src/sbin/reopen-console-linux
@@ -78,6 +78,13 @@ do
 	fi
 done
 
+# /dev/tty0 may not show up in /proc/consoles (at least on QEMU aarch64),
+# debian-installer should run on it anyway if it exists.
+if [ -c /dev/tty0 ] && ! { echo "$consoles" | grep -q "^tty0$"; }; then
+	consoles="${consoles:+$consoles$NL}tty0"
+	log "   Adding tty0 to possible consoles list"
+fi
+
 if [ -z "$consoles" ]; then
 	# Nothing found? Default to /dev/console.
 	log "Found no consoles! Defaulting to /dev/console"
-- 
2.26.2



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-28 Thread Alper Nebi Yasak

On 26/04/2020 05:54, Paul Wise wrote:

ISTR that CCing Andrew Morton  can help get
patches into Linux if the maintainers of the code in question do not
reply. I suggest you try that after you fix the issue pointed out by
the bot.


Thanks! Do you mean CCing at the version with the fix, or at further 
re-sends in case that gets no replies as well?




Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-28 Thread Alper Nebi Yasak

On 21/04/2020 15:42, Wookey wrote:

One thought - can we just perhaps use /dev/console 'anyway' and
that'll get us the right thing even when tty0 has not been properly
enabled when it should have been? (I've forgotten how all this works
and would need to go read the runes again, and most of my test
platforms are currently not easily accessible...)


As I understand it /dev/console is essentially one of the consoles in 
/proc/consoles (one marked with C), so the current solution of launching 
on all consoles in /proc/consoles is better (e.g. wouldn't launch on 
tty0 on my chromebook since ttyS2 ends up being preferred, /dev/console 
would only be the latter while /proc/consoles has both).


I think we can just launch debian-installer on /dev/tty0 regardless of 
it being in /proc/consoles (in addition to those in /proc/consoles), 
since the framebuffer and the virtual terminal parts work just fine 
(sending Ctrl+Alt+F4 switches to the installer log, for example).



[1] 
https://lore.kernel.org/lkml/44156595-0eee-58da-4376-fd25b634d...@gmail.com/T/


Hmm. I have no idea if you are doing this right either, but it all
sounds plausible. I guess a reports with the s/#elif/#else fix is in
order anyway, and that might prompt a response from someone with
console clue.


I'll hopefully manage to fix it and resend this week, want me to CC: you?



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-27 Thread Steve McIntyre
On Mon, Apr 27, 2020 at 06:41:36PM +0300, Alper Nebi Yasak wrote:
>On 21/04/2020 14:14, Alper Nebi Yasak wrote:
>> Since you've already pushed to master, I'll try to do a full
>> installation once daily cdroms are available.
>
>I've tested with today's (2020-04-27) weekly-built
>debian-testing-arm64-xfce-CD-1.iso on my chromebook. Overall rushing through
>the graphical installation went just fine. Just some minor hardware-specific
>problems, and I had to handle chromeos bootloader stuff manually, but nothing
>wrong with the graphical parts from what I can tell.

\o/

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"Because heaters aren't purple!" -- Catherine Pitt



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-27 Thread Alper Nebi Yasak

On 21/04/2020 14:14, Alper Nebi Yasak wrote:

Since you've already pushed to master, I'll try to do a full
installation once daily cdroms are available.


I've tested with today's (2020-04-27) weekly-built 
debian-testing-arm64-xfce-CD-1.iso on my chromebook. Overall rushing 
through the graphical installation went just fine. Just some minor 
hardware-specific problems, and I had to handle chromeos bootloader 
stuff manually, but nothing  wrong with the graphical parts from what I 
can tell.


Thanks a lot!



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-25 Thread Paul Wise
On Tue, Apr 21, 2020 at 11:15 AM Alper Nebi Yasak wrote:

> IMO, the right answer is "tty0 not even being in /proc/consoles in this
> case (where it should've also been the /dev/console) is a kernel bug". I
> tried to write a patchset [1] a while back, but received no feedback
> except from kbuild test bot saying it's broken (s/#elif/#else on the
> last patch). I don't know if I did anything wrong or anything right at all.

ISTR that CCing Andrew Morton  can help get
patches into Linux if the maintainers of the code in question do not
reply. I suggest you try that after you fix the issue pointed out by
the bot.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-21 Thread Wookey
On 2020-04-21 14:14 +0300, Alper Nebi Yasak wrote:
> 
> IMO, the right answer is "tty0 not even being in /proc/consoles in this case
> (where it should've also been the /dev/console) is a kernel bug".

This is my opinion too, although I'm prepared to change it if someone
can given a good reason why this behaviour is reasonable. 

Well done for posting a kernel patch to fix it. I hadn't noticed as I
don't watch kernel stuff.

However even if we get that sorted in due course we may in practice
have to deal with kernels currently getting this wrong for many years
so some bodging and heuristics in D_I may also be experient.

One thought - can we just perhaps use /dev/console 'anyway' and
that'll get us the right thing even when tty0 has not been properly
enabled when it should have been? (I've forgotten how all this works
and would need to go read the runes again, and most of my test
platforms are currently not easily accessible...)

> I tried to
> write a patchset [1] a while back, but received no feedback except from
> kbuild test bot saying it's broken (s/#elif/#else on the last patch). I
> don't know if I did anything wrong or anything right at all.
> 
> [1] 
> https://lore.kernel.org/lkml/44156595-0eee-58da-4376-fd25b634d...@gmail.com/T/

Hmm. I have no idea if you are doing this right either, but it all
sounds plausible. I guess a reports with the s/#elif/#else fix is in
order anyway, and that might prompt a response from someone with
console clue.

Wookey
-- 
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/


signature.asc
Description: PGP signature


Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-21 Thread Alper Nebi Yasak

On 21/04/2020 14:23, Marcin Juszkiewicz wrote:

W dniu 21.04.2020 o 13:14, Alper Nebi Yasak pisze:

An alternative that occurred to me later is putting console=tty0 on
the "Graphical install" grub entries (in grub-gencfg), but that'd
mean debian-installer wouldn't run on serial consoles when launched
from those entries (probably OK, not sure).


D-I runs on each available console. So you would get it on tty0 and
on ttyAMA0.



I'm seeing different behaviour on a QEMU VM and my chromebook when I add 
console=tty0 to the kernel commandline, where the /proc/consoles 
contents end up being:


   |  "console=tty0"  | no console arg |
---+--++
QEMU VM| tty0 and ttyAMA0 |  ttyAMA0 only  |
---+--++
Chromebook |tty0 only | ttyS2 and tty0 |
---+--++

The essential difference between the two devices is:
- the QEMU VM has a ACPI SPCR table for the serial port
- the chromebook has a "chosen stdout-path" dt node for the serial port

I expect the installer will launch on both consoles in the QEMU VM as 
you said, I momentarily forgot that ttyAMA0 persists on the VM even with 
"console=tty0". What I meant is it will only launch on tty0 on the 
chromebook, where ttyS2 might be working but won't be in /proc/consoles 
(if that makes sense).




Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-21 Thread Marcin Juszkiewicz
W dniu 21.04.2020 o 13:14, Alper Nebi Yasak pisze:
> An alternative that occurred to me later is putting console=tty0 on
> the "Graphical install" grub entries (in grub-gencfg), but that'd
> mean debian-installer wouldn't run on serial consoles when launched
> from those entries (probably OK, not sure).

D-I runs on each available console. So you would get it on tty0 and
on ttyAMA0.



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-21 Thread Alper Nebi Yasak

On 20/04/2020 20:22, Steve McIntyre wrote:

On Mon, Apr 20, 2020 at 07:36:42PM +0300, Alper Nebi Yasak wrote:

On 20/04/2020 18:38, Steve McIntyre wrote:

Does /dev/tty0 show up in /proc/consoles in your setup? We might need
to tweak that yet...


Here is a small but untested patch for rootskel's reopen-console for that.


Hmmm. Is this the right answer, though? I've got totally headless
arm64 machines that also have a /dev/tty0. Would we want to run d-i there?
Maybe, I'm genuinely not sure. It might be harmless, I guess...?


Fedora's installer launches a graphical installer just fine on the same 
virtual machine I'm testing Debian installers on, regardless of tty0 not 
being in /proc/consoles. I'm not sure if it launches on a dummy tty0 as 
well, or even if Xorg can run on a dummy tty0 if we try to launch 
debian-installer there.


An alternative that occurred to me later is putting console=tty0 on the 
"Graphical install" grub entries (in grub-gencfg), but that'd mean 
debian-installer wouldn't run on serial consoles when launched from 
those entries (probably OK, not sure).


IMO, the right answer is "tty0 not even being in /proc/consoles in this 
case (where it should've also been the /dev/console) is a kernel bug". I 
tried to write a patchset [1] a while back, but received no feedback 
except from kbuild test bot saying it's broken (s/#elif/#else on the 
last patch). I don't know if I did anything wrong or anything right at all.


[1] 
https://lore.kernel.org/lkml/44156595-0eee-58da-4376-fd25b634d...@gmail.com/T/




Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-21 Thread Alper Nebi Yasak

On 20/04/2020 20:01, Steve McIntyre wrote:

On Mon, Apr 20, 2020 at 03:43:57PM +0100, Steve McIntyre wrote:

Try the image at

http://cdimage.debian.org/cdimage/unofficial/arm64-gi/

please?


OK, so this lot seems to work in a VM at least (thanks Marcin!), so
I've pushed this set of patches to master now. I'm not sure about
adding the graphical installer for armhf right now, but I'm open to
being convinced...

Once we have a working d-i daily build I'll also push my changes for
debian-cd to use it on arm64.


The installer's kernel is 5.5.0-2, but the ones in the cd image's 
archive is 5.5.0-1, so the installer refuses to continue after mounting 
the cdrom saying it can't any find kernel modules to install.


Other than that, boots fine to a graphical installer on the VM (with the 
console=tty0), and on my chromebook (tty0's already in /proc/consoles, 
but I don't know how to boot grub there yet so I'm directly using the 
install.a64/gtk/{kernel,initrd.gz} files).


Since you've already pushed to master, I'll try to do a full 
installation once daily cdroms are available.


I don't particularly care for armhf, but some things to consider:
- netboot-gtk build exists on armhf and might be enough
- non-graphical builds can still run on framebuffers in text mode
- devices may not be able to utilize a cdrom image due to bootloaders
- armhf chromebooks exist (veyron) where graphics would be prettier
- one might want to install armhf Debian on an arm64 device



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Steve McIntyre
On Mon, Apr 20, 2020 at 07:36:42PM +0300, Alper Nebi Yasak wrote:
>On 20/04/2020 18:38, Steve McIntyre wrote:
>> Does /dev/tty0 show up in /proc/consoles in your setup? We might need
>> to tweak that yet...
>
>Here is a small but untested patch for rootskel's reopen-console for that.

Hmmm. Is this the right answer, though? I've got totally headless
arm64 machines that also have a /dev/tty0. Would we want to run d-i there?
Maybe, I'm genuinely not sure. It might be harmless, I guess...?

>(Thanks for the cd image, it'll probably take me until tomorrow to test and
>report back on it)

Cool. :-)

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"... the premise [is] that privacy is about hiding a wrong. It's not.
 Privacy is an inherent human right, and a requirement for maintaining
 the human condition with dignity and respect."
  -- Bruce Schneier



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Steve McIntyre
On Mon, Apr 20, 2020 at 03:43:57PM +0100, Steve McIntyre wrote:
>On Mon, Apr 20, 2020 at 03:21:20PM +0100, Steve McIntyre wrote:
>>On Mon, Apr 20, 2020 at 05:03:02PM +0300, Alper Nebi Yasak wrote:
>>>On 20/04/2020 16:36, Steve McIntyre wrote:
 I'm just going to test again with that change included, then I can
 push a netinst image somewhere for you to test...
>>>
>>>I'd appreciate it. Here's another patch, this time for the armhf graphical
>>>cdrom. I checked that it boots into a graphical installer when run in a QEMU
>>>arm VM (still with 'direct kernel boot') but no further. If you can also make
>>>an armhf netinst image from this I can test that too (at least in a VM, not
>>>sure the configs for my chromebook were enabled on the armhf kernel..).
>>
>>Ah, OK. I wasn't sure if it was worth trying to add this on armhf
>>too... :-)
>>
>>I'm just building with a different local patch to add the setting
>>GRAPHICAL_INSTALLER=y in arm64.cfg and using that to add (or not) the
>>graphical installer to each of the grub-gencfg calls. I'll let that
>>finish first...
>
>Try the image at
>
> http://cdimage.debian.org/cdimage/unofficial/arm64-gi/
>
>please?

OK, so this lot seems to work in a VM at least (thanks Marcin!), so
I've pushed this set of patches to master now. I'm not sure about
adding the graphical installer for armhf right now, but I'm open to
being convinced...

Once we have a working d-i daily build I'll also push my changes for
debian-cd to use it on arm64.

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"I can't ever sleep on planes ... call it irrational if you like, but I'm
 afraid I'll miss my stop" -- Vivek Das Mohapatra



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Alper Nebi Yasak

On 20/04/2020 19:35, Wookey wrote:

On 2020-04-20 17:51 +0200, Marcin Juszkiewicz wrote:

W dniu 20.04.2020 o 17:38, Steve McIntyre pisze:



Does /dev/tty0 show up in /proc/consoles in your setup? We might need
to tweak that yet...


~ # cat /proc/consoles
ttyAMA0  -W- (EC p a)  204:64


What platform is this?

The idea is that the kernel should know (better than DI) what the
valid consoles are so we use that list (every 'enabled' console which
is what the 'E' indicates). But you have a machine with no tty0, but
it does have a framebuffer?

Wookey

It should be an aarch64 QEMU VM, I'm also seeing that behaviour there. 
Long story short, there is an ACPI Serial Port Console Redirection table 
specifying a serial console, Linux registers it as a preferred console 
very early (as a boot console first), and later when VT tries to 
register itself as a less-than-preferred console that request is ignored 
since there is already a preferred one already registered. There's 
nothing wrong with the framebuffer or tty0 at all.




Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Alper Nebi Yasak

On 20/04/2020 18:38, Steve McIntyre wrote:

Does /dev/tty0 show up in /proc/consoles in your setup? We might need
to tweak that yet...


Here is a small but untested patch for rootskel's reopen-console for that.

(Thanks for the cd image, it'll probably take me until tomorrow to test 
and report back on it)
>From 1713b6544d4950d2861710b48aff16b4b0a119af Mon Sep 17 00:00:00 2001
From: Alper Nebi Yasak 
Date: Mon, 20 Apr 2020 19:27:18 +0300
Subject: [PATCH] Use /dev/tty0 as a console even if it's not in /proc/consoles

Signed-off-by: Alper Nebi Yasak 
---
 src/sbin/reopen-console-linux | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/sbin/reopen-console-linux b/src/sbin/reopen-console-linux
index 13b15a3..0816be4 100755
--- a/src/sbin/reopen-console-linux
+++ b/src/sbin/reopen-console-linux
@@ -78,6 +78,13 @@ do
 	fi
 done
 
+# /dev/tty0 may not show up in /proc/consoles (at least on QEMU aarch64),
+# debian-installer should run on it anyway if it exists.
+if [ -c /dev/tty0 ] && ! { echo "$consoles" | grep -q "^tty0$"; }; then
+	consoles="${consoles:+$consoles$NL}tty0"
+	log "   Adding tty0 to possible consoles list"
+fi
+
 if [ -z "$consoles" ]; then
 	# Nothing found? Default to /dev/console.
 	log "Found no consoles! Defaulting to /dev/console"
-- 
2.26.1



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Wookey
On 2020-04-20 17:51 +0200, Marcin Juszkiewicz wrote:
> W dniu 20.04.2020 o 17:38, Steve McIntyre pisze:

> > Does /dev/tty0 show up in /proc/consoles in your setup? We might need
> > to tweak that yet...
> 
> ~ # cat /proc/consoles 
> ttyAMA0  -W- (EC p a)  204:64

What platform is this?

The idea is that the kernel should know (better than DI) what the
valid consoles are so we use that list (every 'enabled' console which
is what the 'E' indicates). But you have a machine with no tty0, but
it does have a framebuffer?

Wookey
-- 
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/


signature.asc
Description: PGP signature


Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Steve McIntyre
On Mon, Apr 20, 2020 at 06:06:55PM +0200, Marcin Juszkiewicz wrote:
>W dniu 20.04.2020 o 17:54, Steve McIntyre pisze:
> 
>> OK. Can you edit the grub command line and add "console=tty0" before
>> starting please?
>
>Now I have two d-i running. One on tty0, one on ttyAMA0:

Yay! Progress - that's what we're aiming for. :-) You should be able
to use either of them now - this is how we support multiple different
hardware configurations.

Can you use the one on tty0 OK? That's what I'm hoping to see here...

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
< Aardvark> I dislike C++ to start with. C++11 just seems to be
handing rope-creating factories for users to hang multiple
instances of themselves.



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Marcin Juszkiewicz
W dniu 20.04.2020 o 17:54, Steve McIntyre pisze:
 
> OK. Can you edit the grub command line and add "console=tty0" before
> starting please?

Now I have two d-i running. One on tty0, one on ttyAMA0:

Apr 20 16:04:09 entropy-source: haveged not needed: rng detected
Apr 20 16:04:10 reopen-console: Looking at console tty0 from /proc/consoles
Apr 20 16:04:10 reopen-console:Adding tty0 to possible consoles list
Apr 20 16:04:10 reopen-console:tty0 is preferred
Apr 20 16:04:10 reopen-console: Looking at console ttyAMA0 from /proc/consoles
Apr 20 16:04:10 reopen-console:Adding ttyAMA0 to possible consoles list
Apr 20 16:04:10 reopen-console: Adding inittab entry for tty0
Apr 20 16:04:10 reopen-console: Adding inittab entry for ttyAMA0
Apr 20 16:04:10 reopen-console: Restarting init to start d-i on the console(s) 
we found
Apr 20 16:04:10 init: reloading /etc/inittab
Apr 20 16:04:10 init: starting pid 271, tty '/dev/tty4': '/usr/bin/tail -f 
/var/log/syslog'
Apr 20 16:04:10 init: starting pid 275, tty '/dev/tty0': 
'/sbin/debian-installer'
Apr 20 16:04:10 init: starting pid 276, tty '/dev/ttyAMA0': 
'/sbin/debian-installer'
Apr 20 16:04:11 debconf: Setting debconf/language to en
Apr 20 16:04:11 main-menu[312]: INFO: Falling back to the package description 
for brltty-udeb
Apr 20 16:04:11 main-menu[312]: INFO: Menu item 'localechooser' selected
Apr 20 16:04:12 init: process '/sbin/debian-installer' (pid 275) exited. 
Scheduling for restart.
Apr 20 16:04:12 init: starting pid 326, tty '/dev/tty0': 
'/sbin/debian-installer'
Apr 20 16:04:13 debconf: Setting debconf/language to en
Apr 20 16:04:14 debconf: Setting debconf/language to en
Apr 20 16:04:14 main-menu[398]: INFO: Falling back to the package description 
for brltty-udeb
Apr 20 16:04:15 main-menu[398]: INFO: Menu item 'localechooser' selected
Apr 20 16:04:22 localechooser: info: Language = 'en'
Apr 20 16:04:22 localechooser: info: line=en;0;US;en_US.UTF-8;;console-setup
Apr 20 16:04:22 localechooser: info: Set debian-installer/language = 'en'
Apr 20 16:04:22 localechooser: info: Default country = 'US'
Apr 20 16:04:22 localechooser: info: Default locale = 'en_US.UTF-8'
Apr 20 16:04:22 localechooser: info: Set debian-installer/consoledisplay = 
'console-setup'
Apr 20 16:04:22 debconf: Setting debconf/language to en
Apr 20 16:04:23 localechooser: info: Set debian-installer/country = 'US'
Apr 20 16:04:23 debconf: Setting debconf/language to en
Apr 20 16:04:24 gtk-set-font: Switching to font 'DejaVu Sans' for 'en'
Apr 20 16:04:25 localechooser: info: Set debian-installer/locale = 'en_US.UTF-8'
Apr 20 16:04:25 localechooser: info: System locale (debian-installer/locale) = 
'en_US.UTF-8'
Apr 20 16:04:26 main-menu[312]: INFO: Falling back to the package description 
for brltty-udeb
Apr 20 16:04:26 main-menu[312]: INFO: Falling back to the package description 
for brltty-udeb
Apr 20 16:04:26 main-menu[312]: INFO: Falling back to the package description 
for brltty-udeb
Apr 20 16:04:26 main-menu[312]: INFO: Menu item 'brltty-udeb' selected
Apr 20 16:04:26 main-menu[312]: WARNING **: Unable to set title for brltty-udeb.
Apr 20 16:04:26 main-menu[312]: INFO: Falling back to the package description 
for brltty-udeb
Apr 20 16:04:26 main-menu[312]: INFO: Falling back to the package description 
for brltty-udeb
Apr 20 16:04:26 main-menu[312]: INFO: Menu item 'console-setup-udeb' selected
Apr 20 16:04:54 main-menu[312]: INFO: Menu item 'console-setup-udeb' succeeded 
but requested to be left unconfigured.
Apr 20 16:04:54 main-menu[312]: INFO: Falling back to the package description 
for brltty-udeb
Apr 20 16:04:56 main-menu[312]: INFO: Falling back to the package description 
for brltty-udeb
Apr 20 16:04:56 main-menu[312]: INFO: Menu item 'di-utils-shell' selected

  168 root 0 IW   [kworker/u4:2]
  205 root  2228 S/sbin/syslogd -m 0 -O /var/log/syslog -S
  207 root  2228 S/sbin/klogd -c 2
  268 root 0 IW<  [kworker/0:1H]
  269 root  2228 S/bin/busybox init
  270 root  2228 S/bin/busybox init
  271 root  2228 S/usr/bin/tail -f /var/log/syslog
  276 root  2228 S{debian-installe} /bin/sh /sbin/debian-installer
  304 root 94160 SXorg -noreset -nolisten tcp
  305 root 11196 Sdebconf -o d-i /usr/bin/main-menu
  312 root  2112 S/usr/bin/main-menu
  326 root  2228 S{debian-installe} /bin/sh /sbin/debian-installer
  391 root  112m Sdebconf -o d-i /usr/bin/main-menu
  398 root  2112 S/usr/bin/main-menu
  405 root  2172 Sudpkg --configure --force-configure localechooser
  406 root  2228 S{localechooser.p} /bin/sh -e /var/lib/dpkg/info/loca
  407 root  2344 S{localechooser} /bin/sh /usr/bin/localechooser
 1610 root  2172 Sudpkg --configure --force-configure di-utils-shell
 1611 root  2228 S{di-utils-shell.} /bin/sh /var/lib/dpkg/info/di-util
 1612 root  2228 S{start-shell} /bin/sh /bin/start-shell di-utils-shel
 1613 

Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Steve McIntyre
On Mon, Apr 20, 2020 at 05:51:03PM +0200, Marcin Juszkiewicz wrote:
>W dniu 20.04.2020 o 17:38, Steve McIntyre pisze:
>> Hey Marcin!
>> 
>> On Mon, Apr 20, 2020 at 05:36:30PM +0200, Marcin Juszkiewicz wrote:
>>> W dniu 20.04.2020 o 16:43, Steve McIntyre pisze:
>>>
 Try the image at

  http://cdimage.debian.org/cdimage/unofficial/arm64-gi/
>>>
>>> Booted VM with it. Debian installer started on serial port still
>>> despite selecting 'graphical install' in grub menu.
>>>
>>> Graphical display in meantime displayed only blinking cursor.
>>>
>>> Maybe it was because on aarch64 framebuffer is available after
>>> 'virtio_gpu' kernel module gets loaded so d-i starts too early
>>> to notice it.
>> 
>> Does /dev/tty0 show up in /proc/consoles in your setup? We might need
>> to tweak that yet...
>
>~ # cat /proc/consoles 
>ttyAMA0  -W- (EC p a)  204:64
>~ # 
>
>Syslog:
>
>Apr 20 15:41:17 entropy-source: haveged not needed: rng detected
>Apr 20 15:41:18 reopen-console: Looking at console ttyAMA0 from /proc/consoles
>Apr 20 15:41:18 reopen-console:Adding ttyAMA0 to possible consoles list
>Apr 20 15:41:18 reopen-console:ttyAMA0 is preferred
>Apr 20 15:41:18 reopen-console: Adding inittab entry for ttyAMA0
>Apr 20 15:41:18 reopen-console: Restarting init to start d-i on the console(s) 
>we found
>Apr 20 15:41:18 init: reloading /etc/inittab
>Apr 20 15:41:18 init: starting pid 261, tty '/dev/tty4': '/usr/bin/tail -f 
>/var/log/syslog'
>Apr 20 15:41:18 init: starting pid 265, tty '/dev/ttyAMA0': 
>'/sbin/debian-installer'
>Apr 20 15:41:19 debconf: Setting debconf/language to en
>Apr 20 15:41:20 main-menu[284]: INFO: Falling back to the package description 
>for brltty-udeb
>Apr 20 15:41:20 main-menu[284]: INFO: Menu item 'localechooser' selected
>Apr 20 15:41:21 debconf: Setting debconf/language to 
>Apr 20 15:41:23 main-menu[284]: INFO: Menu item 'localechooser' succeeded but 
>requested to be left unconfigured.
>Apr 20 15:41:23 main-menu[284]: INFO: Falling back to the package description 
>for brltty-udeb
>Apr 20 15:41:25 main-menu[284]: INFO: Falling back to the package description 
>for brltty-udeb
>Apr 20 15:41:25 main-menu[284]: INFO: Menu item 'di-utils-shell' selected
>
>Just before d-i started on serial line there was some message
>about missing framebuffer.

OK. Can you edit the grub command line and add "console=tty0" before
starting please?

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
Who needs computer imagery when you've got Brian Blessed?



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Marcin Juszkiewicz
W dniu 20.04.2020 o 17:38, Steve McIntyre pisze:
> Hey Marcin!
> 
> On Mon, Apr 20, 2020 at 05:36:30PM +0200, Marcin Juszkiewicz wrote:
>> W dniu 20.04.2020 o 16:43, Steve McIntyre pisze:
>>
>>> Try the image at
>>>
>>>  http://cdimage.debian.org/cdimage/unofficial/arm64-gi/
>>
>> Booted VM with it. Debian installer started on serial port still
>> despite selecting 'graphical install' in grub menu.
>>
>> Graphical display in meantime displayed only blinking cursor.
>>
>> Maybe it was because on aarch64 framebuffer is available after
>> 'virtio_gpu' kernel module gets loaded so d-i starts too early
>> to notice it.
> 
> Does /dev/tty0 show up in /proc/consoles in your setup? We might need
> to tweak that yet...


~ # cat /proc/consoles 
ttyAMA0  -W- (EC p a)  204:64
~ # 

Syslog:

Apr 20 15:41:17 entropy-source: haveged not needed: rng detected
Apr 20 15:41:18 reopen-console: Looking at console ttyAMA0 from /proc/consoles
Apr 20 15:41:18 reopen-console:Adding ttyAMA0 to possible consoles list
Apr 20 15:41:18 reopen-console:ttyAMA0 is preferred
Apr 20 15:41:18 reopen-console: Adding inittab entry for ttyAMA0
Apr 20 15:41:18 reopen-console: Restarting init to start d-i on the console(s) 
we found
Apr 20 15:41:18 init: reloading /etc/inittab
Apr 20 15:41:18 init: starting pid 261, tty '/dev/tty4': '/usr/bin/tail -f 
/var/log/syslog'
Apr 20 15:41:18 init: starting pid 265, tty '/dev/ttyAMA0': 
'/sbin/debian-installer'
Apr 20 15:41:19 debconf: Setting debconf/language to en
Apr 20 15:41:20 main-menu[284]: INFO: Falling back to the package description 
for brltty-udeb
Apr 20 15:41:20 main-menu[284]: INFO: Menu item 'localechooser' selected
Apr 20 15:41:21 debconf: Setting debconf/language to 
Apr 20 15:41:23 main-menu[284]: INFO: Menu item 'localechooser' succeeded but 
requested to be left unconfigured.
Apr 20 15:41:23 main-menu[284]: INFO: Falling back to the package description 
for brltty-udeb
Apr 20 15:41:25 main-menu[284]: INFO: Falling back to the package description 
for brltty-udeb
Apr 20 15:41:25 main-menu[284]: INFO: Menu item 'di-utils-shell' selected


Just before d-i started on serial line there was some message
about missing framebuffer.



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Steve McIntyre
Hey Marcin!

On Mon, Apr 20, 2020 at 05:36:30PM +0200, Marcin Juszkiewicz wrote:
>W dniu 20.04.2020 o 16:43, Steve McIntyre pisze:
>
>> Try the image at
>> 
>>  http://cdimage.debian.org/cdimage/unofficial/arm64-gi/
>
>Booted VM with it. Debian installer started on serial port still
>despite selecting 'graphical install' in grub menu.
>
>Graphical display in meantime displayed only blinking cursor.
>
>Maybe it was because on aarch64 framebuffer is available after
>'virtio_gpu' kernel module gets loaded so d-i starts too early
>to notice it.

Does /dev/tty0 show up in /proc/consoles in your setup? We might need
to tweak that yet...

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
  Armed with "Valor": "Centurion" represents quality of Discipline,
  Honor, Integrity and Loyalty. Now you don't have to be a Caesar to
  concord the digital world while feeling safe and proud.



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Marcin Juszkiewicz
W dniu 20.04.2020 o 16:43, Steve McIntyre pisze:

> Try the image at
> 
>  http://cdimage.debian.org/cdimage/unofficial/arm64-gi/

Booted VM with it. Debian installer started on serial port still
despite selecting 'graphical install' in grub menu.

Graphical display in meantime displayed only blinking cursor.

Maybe it was because on aarch64 framebuffer is available after
'virtio_gpu' kernel module gets loaded so d-i starts too early
to notice it.



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Steve McIntyre
On Mon, Apr 20, 2020 at 03:21:20PM +0100, Steve McIntyre wrote:
>On Mon, Apr 20, 2020 at 05:03:02PM +0300, Alper Nebi Yasak wrote:
>>On 20/04/2020 16:36, Steve McIntyre wrote:
>>> I'm just going to test again with that change included, then I can
>>> push a netinst image somewhere for you to test...
>>
>>I'd appreciate it. Here's another patch, this time for the armhf graphical
>>cdrom. I checked that it boots into a graphical installer when run in a QEMU
>>arm VM (still with 'direct kernel boot') but no further. If you can also make
>>an armhf netinst image from this I can test that too (at least in a VM, not
>>sure the configs for my chromebook were enabled on the armhf kernel..).
>
>Ah, OK. I wasn't sure if it was worth trying to add this on armhf
>too... :-)
>
>I'm just building with a different local patch to add the setting
>GRAPHICAL_INSTALLER=y in arm64.cfg and using that to add (or not) the
>graphical installer to each of the grub-gencfg calls. I'll let that
>finish first...

Try the image at

 http://cdimage.debian.org/cdimage/unofficial/arm64-gi/

please?

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"Because heaters aren't purple!" -- Catherine Pitt



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Steve McIntyre
On Mon, Apr 20, 2020 at 05:03:02PM +0300, Alper Nebi Yasak wrote:
>On 20/04/2020 16:36, Steve McIntyre wrote:
>> I'm just going to test again with that change included, then I can
>> push a netinst image somewhere for you to test...
>
>I'd appreciate it. Here's another patch, this time for the armhf graphical
>cdrom. I checked that it boots into a graphical installer when run in a QEMU
>arm VM (still with 'direct kernel boot') but no further. If you can also make
>an armhf netinst image from this I can test that too (at least in a VM, not
>sure the configs for my chromebook were enabled on the armhf kernel..).

Ah, OK. I wasn't sure if it was worth trying to add this on armhf
too... :-)

I'm just building with a different local patch to add the setting
GRAPHICAL_INSTALLER=y in arm64.cfg and using that to add (or not) the
graphical installer to each of the grub-gencfg calls. I'll let that
finish first...


-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"We're the technical experts.  We were hired so that management could
 ignore our recommendations and tell us how to do our jobs."  -- Mike Andrews



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Alper Nebi Yasak

On 20/04/2020 16:36, Steve McIntyre wrote:

I'm just going to test again with that change included, then I can
push a netinst image somewhere for you to test...


I'd appreciate it. Here's another patch, this time for the armhf 
graphical cdrom. I checked that it boots into a graphical installer when 
run in a QEMU arm VM (still with 'direct kernel boot') but no further. 
If you can also make an armhf netinst image from this I can test that 
too (at least in a VM, not sure the configs for my chromebook were 
enabled on the armhf kernel..).
>From b194a1f9d4619eceb42e355d469c7cd8b54992f7 Mon Sep 17 00:00:00 2001
From: Alper Nebi Yasak 
Date: Mon, 20 Apr 2020 16:50:07 +0300
Subject: [PATCH] Add modules and build files for armhf graphical installer
 cdrom

Signed-off-by: Alper Nebi Yasak 
---
 build/config/armhf/cdrom.cfg |  2 +-
 build/config/armhf/cdrom/gtk.cfg | 19 +++
 build/pkg-lists/cdrom/grub/gtk/armhf.cfg | 11 +++
 3 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 build/config/armhf/cdrom/gtk.cfg
 create mode 100644 build/pkg-lists/cdrom/grub/gtk/armhf.cfg

diff --git a/build/config/armhf/cdrom.cfg b/build/config/armhf/cdrom.cfg
index 2a6fafd77..68cc87078 100644
--- a/build/config/armhf/cdrom.cfg
+++ b/build/config/armhf/cdrom.cfg
@@ -1,4 +1,4 @@
 # el-torito is too large at the moment, so is disabled.
-FLAVOUR_SUPPORTED = grub
+FLAVOUR_SUPPORTED = grub gtk
 
 MEDIA_TYPE = CD-ROM
diff --git a/build/config/armhf/cdrom/gtk.cfg b/build/config/armhf/cdrom/gtk.cfg
new file mode 100644
index 0..76024e2f1
--- /dev/null
+++ b/build/config/armhf/cdrom/gtk.cfg
@@ -0,0 +1,19 @@
+TARGET = $(INITRD) $(KERNEL) $(DEBIAN_CD_INFO)
+
+MANIFEST-KERNEL = "kernel for use with EFI to build a CD (graphical)"
+MANIFEST-INITRD = "initrd for use with EFI to build a CD (graphical)"
+MANIFEST-DEBIAN_CD_INFO = "EFI config files for CD (graphical)"
+
+TYPE = cdrom/grub/gtk
+
+EXTRANAME = gtk/
+
+IS_PURE_GTK = 1
+
+KEEP_GI_LANGS = 1
+
+VIDEO_MODE=$(VIDEO_MODE_GTK)
+
+# All images that include cdebconf should include symbols needed by these
+# plugins.
+EXTRAUDEBS += cdebconf-gtk-entropy
diff --git a/build/pkg-lists/cdrom/grub/gtk/armhf.cfg b/build/pkg-lists/cdrom/grub/gtk/armhf.cfg
new file mode 100644
index 0..bda77cdab
--- /dev/null
+++ b/build/pkg-lists/cdrom/grub/gtk/armhf.cfg
@@ -0,0 +1,11 @@
+#include "gtk-linux"
+
+#mouse-modules-${kernel:Version}
+event-modules-${kernel:Version}
+xserver-xorg-input-evdev-udeb
+xserver-xorg-video-fbdev-udeb
+
+#speakup-modules-${kernel:Version}
+#sound-modules-${kernel:Version}
+#console-setup-linux-fonts-udeb
+#espeakup-udeb
-- 
2.26.1



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-20 Thread Steve McIntyre
On Sun, Apr 19, 2020 at 10:23:06PM +0300, Alper Nebi Yasak wrote:
>On 16/04/2020 15:40, Steve McIntyre wrote:
>> On Tue, Apr 14, 2020 at 05:43:36PM +0100, Steve McIntyre wrote:
>> > 
>> > ACK.
>> > 
>> > Building locally to test here...
>> 
>> And I have a build that looks OK by eye. Unfortunately, my local test
>> machine (Macchiatobin) seems to be dying and I can't test this
>> effectively now. :-(
>
>Ah, OK. Thanks for spending time on this.
>
>> It needs some tiny debian-cd changes and then we'll get
>> netinst, DVD images etc. also including the graphical installer. Final
>> thing missing - the grub.cfg that's generated for the CD/DVD/USB boot
>> doesn't include menu entries for graphical boot.
>Adding INITRD_GTK to build/config/arm.cfg as in:
>
>diff --git a/build/config/arm.cfg b/build/config/arm.cfg
>index fe8cf80f9..898795658 100644
>--- a/build/config/arm.cfg
>+++ b/build/config/arm.cfg
>@@ -23,6 +23,7 @@ arch_cd_info_dir: arm_grub_efi
>   grub-gencfg \
>   KERNEL /%install%/vmlinuz \
>   INITRD /%install%/initrd.gz \
>+  INITRD_GTK /%install%/gtk/initrd.gz \
>   HEADER boot/$(ARCH)/grub/grub-efi.cfg \
>   > $(TEMP_CD_INFO_DIR)/grub/grub.cfg; \
>   cp -a $(GRUB_FONT) $(TEMP_CD_INFO_DIR)/grub/font.pf2; \
>
>seems to be enough for the last part, I'm getting "Graphical install" and
>others in both cdrom{,/gtk}/debian-cd_info.tar.gz files' grub.cfg files.
>
>I expect that change will make the "Graphical" entries appear also on armhf
>where there isn't a cdrom/gtk build yet, so I'll also have a look at that.
>
>Hopefully I can learn enough debian-cd to build and test with proper images
>this time around :)

I'm just going to test again with that change included, then I can
push a netinst image somewhere for you to test...

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"When C++ is your hammer, everything looks like a thumb." -- Steven M. Haflich



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-19 Thread Alper Nebi Yasak

On 16/04/2020 15:40, Steve McIntyre wrote:

On Tue, Apr 14, 2020 at 05:43:36PM +0100, Steve McIntyre wrote:


ACK.

Building locally to test here...


And I have a build that looks OK by eye. Unfortunately, my local test
machine (Macchiatobin) seems to be dying and I can't test this
effectively now. :-(


Ah, OK. Thanks for spending time on this.


It needs some tiny debian-cd changes and then we'll get
netinst, DVD images etc. also including the graphical installer. Final
thing missing - the grub.cfg that's generated for the CD/DVD/USB boot
doesn't include menu entries for graphical boot.

Adding INITRD_GTK to build/config/arm.cfg as in:

diff --git a/build/config/arm.cfg b/build/config/arm.cfg
index fe8cf80f9..898795658 100644
--- a/build/config/arm.cfg
+++ b/build/config/arm.cfg
@@ -23,6 +23,7 @@ arch_cd_info_dir: arm_grub_efi
grub-gencfg \
KERNEL /%install%/vmlinuz \
INITRD /%install%/initrd.gz \
+   INITRD_GTK /%install%/gtk/initrd.gz \
HEADER boot/$(ARCH)/grub/grub-efi.cfg \
> $(TEMP_CD_INFO_DIR)/grub/grub.cfg; \
cp -a $(GRUB_FONT) $(TEMP_CD_INFO_DIR)/grub/font.pf2; \

seems to be enough for the last part, I'm getting "Graphical install" 
and others in both cdrom{,/gtk}/debian-cd_info.tar.gz files' grub.cfg files.


I expect that change will make the "Graphical" entries appear also on 
armhf where there isn't a cdrom/gtk build yet, so I'll also have a look 
at that.


Hopefully I can learn enough debian-cd to build and test with proper 
images this time around :)




Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-16 Thread Steve McIntyre
On Tue, Apr 14, 2020 at 05:43:36PM +0100, Steve McIntyre wrote:
>
>ACK.
>
>Building locally to test here...

And I have a build that looks OK by eye. Unfortunately, my local test
machine (Macchiatobin) seems to be dying and I can't test this
effectively now. :-(

It needs some tiny debian-cd changes and then we'll get
netinst, DVD images etc. also including the graphical installer. Final
thing missing - the grub.cfg that's generated for the CD/DVD/USB boot
doesn't include menu entries for graphical boot.

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
< liw> everything I know about UK hotels I learned from "Fawlty Towers"



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-14 Thread Steve McIntyre
On Mon, Apr 06, 2020 at 10:11:12PM +0300, Alper Nebi Yasak wrote:
>On 06/04/2020 17:48, Steve McIntyre wrote:
>> > Alper Nebi Yasak:
>> > - added event-modules to arm64 netboot-gtk
>> > - commented-out serial-modules from arm64 netboot
>> 
>> So why comment out the serial modules here? Do they cause a problem?
>
>The "serial-modules" udeb isn't built on arm64 yet and including it here
>causes an error while building the "stamps/get_udebs-netboot-stamp" target
>complaining it can't find the udeb (I haven't looked into it any further).

OK, fair enough. :-)

>Instead, we can enable the udeb on the kernel side, but I didn't want to wait
>for another kernel release before I sent these for review.
>
>(The "mouse-modules" udeb isn't built on arm64 either, it depends on
>"event-modules" and if enabled can/should replace that here.)

ACK.

Building locally to test here...

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"Yes, of course duct tape works in a near-vacuum. Duct tape works
 anywhere. Duct tape is magic and should be worshipped."
   -― Andy Weir, "The Martian"



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-06 Thread Alper Nebi Yasak

On 06/04/2020 20:15, Marcin Juszkiewicz wrote:

Wrong. If you want to install it then set firmware to UEFI, attach ISO
and boot. "Direct kernel boot" option is only if you do not have
firmware which handle booting.


Thanks. I know that's how it should be done, but I haven't learned how 
to build a Debian installer cd image yet. I wanted my custom-built 
vmlinuz/initramfs to boot while a Debian-built ISO is attached. I think 
I could've mounted a disk with the two files and made GRUB boot them, 
but I don't know GRUB stuff either. "Direct kernel boot" appeared to be 
an easy way that just works.



Add Video (virtio), Spice screen, keyboard and tablet (virtio or USB
ones). Then start VM.

UEFI will start, initialize graphics, show Tianocore logo and load grub
from install media. Then Debian starts and should load 'virtio_gpu'
module to initialize graphics and start d-i on graphical console.


When I boot properly (with UEFI, virtio, spice as you said) from a 
Debian netboot mini.iso that's exactly what I see happens, except d-i 
only runs on the serial console (unless I use "console=tty0").



If it does not then d-i needs work. Serial console installation is
something to be ashamed of (or 'expert' level option).


D-i tries to run itself on all consoles listed on /proc/consoles, but 
doesn't run on tty0 because in this case tty0 isn't in /proc/consoles 
even though graphics were initialized. "console=tty0" forces it to be 
there, so things work OK with it.


If you have time, please see the commit messages of a patchset [0] where 
I assumed tty0 not being in /proc/consoles is a kernel problem and tried 
to investigate. (I know the #elif/#else typo in the last patch though.)


[0] 
https://lore.kernel.org/lkml/44156595-0eee-58da-4376-fd25b634d...@gmail.com/T/



Fedora, CentOS, RHEL are at this level for a while. Debian should be
too. For me lack of graphical installer on arm64 should be RC bug.


I've just downloaded "Fedora-Server-netinst-aarch64-31-1.9.iso" and it 
does run in the graphical console even when /proc/consoles doesn't list 
tty0 explicitly. Looks nice.




Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-06 Thread Alper Nebi Yasak

On 06/04/2020 17:48, Steve McIntyre wrote:

Alper Nebi Yasak:
- added event-modules to arm64 netboot-gtk
- commented-out serial-modules from arm64 netboot


So why comment out the serial modules here? Do they cause a problem?


The "serial-modules" udeb isn't built on arm64 yet and including it here 
causes an error while building the "stamps/get_udebs-netboot-stamp" 
target complaining it can't find the udeb (I haven't looked into it any 
further).


Instead, we can enable the udeb on the kernel side, but I didn't want to 
wait for another kernel release before I sent these for review.


(The "mouse-modules" udeb isn't built on arm64 either, it depends on 
"event-modules" and if enabled can/should replace that here.)




Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-06 Thread Marcin Juszkiewicz
W dniu 02.04.2020 o 18:46, Alper Nebi Yasak pisze:

> enable graphical cdrom builds, which I tested with the d-i bullseye
> alpha2 arm64 xfce CD-1 image on both a QEMU virtual machine (via
> virt-manager) and my chromebook (rk3399-gru-kevin).
 
> On the VM: I've set the firmware to UEFI, mounted the iso file as a
> CD, and used my patched vmlinuz/initrd files with "Direct kernel
> boot".

Wrong. If you want to install it then set firmware to UEFI, attach ISO
and boot. "Direct kernel boot" option is only if you do not have
firmware which handle booting.

> The installation went fine except I needed to pass "console=tty0" in
> the command line arguments, but that's not a problem in these patches
> (an ACPI SPCR table results in Linux not registering tty0 as a
> console).

Add Video (virtio), Spice screen, keyboard and tablet (virtio or USB
ones). Then start VM.

UEFI will start, initialize graphics, show Tianocore logo and load grub
from install media. Then Debian starts and should load 'virtio_gpu'
module to initialize graphics and start d-i on graphical console.

If it does not then d-i needs work. Serial console installation is
something to be ashamed of (or 'expert' level option).

Fedora, CentOS, RHEL are at this level for a while. Debian should be
too. For me lack of graphical installer on arm64 should be RC bug.



Re: Graphical installer on arm64 (netboot and cdrom)

2020-04-06 Thread Steve McIntyre
Hi!

Great work here! :-) More comments inline...

On Thu, Apr 02, 2020 at 07:46:01PM +0300, Alper Nebi Yasak wrote:
>I posted a while ago about graphical installer on arm64, here's an update.
>The first two patches I've attached are Wookey's patches with two module
>changes (noted in the patch message). The third one is to enable graphical
>cdrom builds, which I tested with the d-i bullseye alpha2 arm64 xfce CD-1
>image on both a QEMU virtual machine (via virt-manager) and my chromebook
>(rk3399-gru-kevin).
>
>On the VM: I've set the firmware to UEFI, mounted the iso file as a CD, and
>used my patched vmlinuz/initrd files with "Direct kernel boot". The
>installation went fine except I needed to pass "console=tty0" in the command
>line arguments, but that's not a problem in these patches (an ACPI SPCR table
>results in Linux not registering tty0 as a console).

ACK.

>On the chromebook: I've written the iso to a partition (/dev/sda1) and used
>my patched (also with chromebook stuff) vmlinuz/initrd/dtb to boot. There, I
>had to manually specify '/dev/sda1' as the cdrom device in the cdrom-detect
>step. It worked for the base-installer step, but not for the apt-setup step,
>but the installation continued anyway with a network mirror and finished with
>success. I don't know if that apt-setup problem is considered a bug, I
>probably wasn't supposed to use a partition as a cdrom.

That'll be exactly it, yes.

>I think these patches will work fine on other hardware as well (but I don't
>have anything else to test on). Thanks in advance if anyone can have a look.

...

>From 1bbfb902cb984d83b2bb1ac40524a526ee13cdcd Mon Sep 17 00:00:00 2001
>From: Wookey 
>Date: Sat, 19 Jan 2019 03:13:40 +
>Subject: [PATCH 2/3] Add missing modules (usb, fat, virtio) to arm64 netboot
> build and xorg modules to netbook-gtk
>
>Alper Nebi Yasak:
>- added event-modules to arm64 netboot-gtk
>- commented-out serial-modules from arm64 netboot

So why comment out the serial modules here? Do they cause a problem?

>Signed-off-by: Alper Nebi Yasak 
>---
> build/pkg-lists/netboot/arm64.cfg | 15 ++-
> build/pkg-lists/netboot/gtk/arm64.cfg | 11 +++
> 2 files changed, 25 insertions(+), 1 deletion(-)
> create mode 100644 build/pkg-lists/netboot/gtk/arm64.cfg
>
>diff --git a/build/pkg-lists/netboot/arm64.cfg 
>b/build/pkg-lists/netboot/arm64.cfg
>index d5635daa9..01fe2b0a5 100644
>--- a/build/pkg-lists/netboot/arm64.cfg
>+++ b/build/pkg-lists/netboot/arm64.cfg
>@@ -11,9 +11,22 @@ nic-modules-${kernel:Version}
> nic-usb-modules-${kernel:Version}
> nic-wireless-modules-${kernel:Version}
> virtio-modules-${kernel:Version} ?
>+usb-modules-${kernel:Version}
> 
> fb-modules-${kernel:Version} ?
> input-modules-${kernel:Version} ?
> 
>-#for all targets
>+# In case they need to load a driver image.
>+mountmedia
>+media-retriever
>+fat-modules-${kernel:Version}
>+usb-storage-modules-${kernel:Version}
>+mmc-modules-${kernel:Version} ?
>+
>+# brltty
>+brltty-udeb
>+# serial-modules-${kernel:Version} ?
>+usb-serial-modules-${kernel:Version} ?
>+uinput-modules-${kernel:Version} ?
> 
>+#for all targets
>diff --git a/build/pkg-lists/netboot/gtk/arm64.cfg 
>b/build/pkg-lists/netboot/gtk/arm64.cfg
>new file mode 100644
>index 0..bda77cdab
>--- /dev/null
>+++ b/build/pkg-lists/netboot/gtk/arm64.cfg
>@@ -0,0 +1,11 @@
>+#include "gtk-linux"
>+
>+#mouse-modules-${kernel:Version}
>+event-modules-${kernel:Version}
>+xserver-xorg-input-evdev-udeb
>+xserver-xorg-video-fbdev-udeb
>+
>+#speakup-modules-${kernel:Version}
>+#sound-modules-${kernel:Version}
>+#console-setup-linux-fonts-udeb
>+#espeakup-udeb
>-- 
>2.26.0
>

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"Further comment on how I feel about IBM will appear once I've worked out
 whether they're being malicious or incompetent. Capital letters are forecast."
 Matthew Garrett, http://www.livejournal.com/users/mjg59/30675.html



Graphical installer on arm64 (netboot and cdrom)

2020-04-02 Thread Alper Nebi Yasak
I posted a while ago about graphical installer on arm64, here's an 
update. The first two patches I've attached are Wookey's patches with 
two module changes (noted in the patch message). The third one is to 
enable graphical cdrom builds, which I tested with the d-i bullseye 
alpha2 arm64 xfce CD-1 image on both a QEMU virtual machine (via 
virt-manager) and my chromebook (rk3399-gru-kevin).


On the VM: I've set the firmware to UEFI, mounted the iso file as a CD, 
and used my patched vmlinuz/initrd files with "Direct kernel boot". The 
installation went fine except I needed to pass "console=tty0" in the 
command line arguments, but that's not a problem in these patches (an 
ACPI SPCR table results in Linux not registering tty0 as a console).


On the chromebook: I've written the iso to a partition (/dev/sda1) and 
used my patched (also with chromebook stuff) vmlinuz/initrd/dtb to boot. 
There, I had to manually specify '/dev/sda1' as the cdrom device in the 
cdrom-detect step. It worked for the base-installer step, but not for 
the apt-setup step, but the installation continued anyway with a network 
mirror and finished with success. I don't know if that apt-setup problem 
is considered a bug, I probably wasn't supposed to use a partition as a 
cdrom.


I think these patches will work fine on other hardware as well (but I 
don't have anything else to test on). Thanks in advance if anyone can 
have a look.
>From 171186b5b88903814ab6b0d4ea94b043d5ba1c73 Mon Sep 17 00:00:00 2001
From: Wookey 
Date: Tue, 8 Jan 2019 18:14:22 +
Subject: [PATCH 1/3] Add support for graphical installer to arm64

---
 build/config/arm64.cfg |  2 +-
 build/config/arm64/netboot-gtk.cfg | 24 
 2 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 build/config/arm64/netboot-gtk.cfg

diff --git a/build/config/arm64.cfg b/build/config/arm64.cfg
index 29f1db8b0..8ada8ba29 100644
--- a/build/config/arm64.cfg
+++ b/build/config/arm64.cfg
@@ -1,4 +1,4 @@
-MEDIUM_SUPPORTED = cdrom netboot device-tree u-boot
+MEDIUM_SUPPORTED = cdrom netboot netboot-gtk device-tree u-boot
 
 KERNELMAJOR = 2.6
 # The version of the kernel to use.
diff --git a/build/config/arm64/netboot-gtk.cfg b/build/config/arm64/netboot-gtk.cfg
new file mode 100644
index 0..0f1d246d1
--- /dev/null
+++ b/build/config/arm64/netboot-gtk.cfg
@@ -0,0 +1,24 @@
+MEDIA_TYPE = netboot image
+
+NETBOOT_DIR_TARGETS = $(TEMP_INITRD) $(TEMP_KERNEL)
+
+TYPE = netboot/gtk
+
+TARGET = $(NETBOOT_DIR) $(NETBOOT_TAR) $(MINIISO)
+EXTRANAME = netboot/gtk/
+
+BOOT_SCREEN_DIR = $(NETBOOT_PATH)/boot-screens/
+
+MANIFEST-NETBOOT_DIR = "PXE boot directory for tftp server (graphical installer)"
+MANIFEST-NETBOOT_TAR = "tarball of PXE boot directory (graphical installer)"
+MANIFEST-MINIISO = "not so tiny CD image that boots the graphical netboot installer"
+
+IS_PURE_GTK = 1
+
+KEEP_GI_LANGS = 1
+
+VIDEO_MODE=$(VIDEO_MODE_GTK)
+
+# All images that include cdebconf should include symbols needed by these
+# plugins.
+EXTRAUDEBS += cdebconf-gtk-entropy
-- 
2.26.0

>From 1bbfb902cb984d83b2bb1ac40524a526ee13cdcd Mon Sep 17 00:00:00 2001
From: Wookey 
Date: Sat, 19 Jan 2019 03:13:40 +
Subject: [PATCH 2/3] Add missing modules (usb, fat, virtio) to arm64 netboot
 build and xorg modules to netbook-gtk

Alper Nebi Yasak:
- added event-modules to arm64 netboot-gtk
- commented-out serial-modules from arm64 netboot
Signed-off-by: Alper Nebi Yasak 
---
 build/pkg-lists/netboot/arm64.cfg | 15 ++-
 build/pkg-lists/netboot/gtk/arm64.cfg | 11 +++
 2 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 build/pkg-lists/netboot/gtk/arm64.cfg

diff --git a/build/pkg-lists/netboot/arm64.cfg b/build/pkg-lists/netboot/arm64.cfg
index d5635daa9..01fe2b0a5 100644
--- a/build/pkg-lists/netboot/arm64.cfg
+++ b/build/pkg-lists/netboot/arm64.cfg
@@ -11,9 +11,22 @@ nic-modules-${kernel:Version}
 nic-usb-modules-${kernel:Version}
 nic-wireless-modules-${kernel:Version}
 virtio-modules-${kernel:Version} ?
+usb-modules-${kernel:Version}
 
 fb-modules-${kernel:Version} ?
 input-modules-${kernel:Version} ?
 
-#for all targets
+# In case they need to load a driver image.
+mountmedia
+media-retriever
+fat-modules-${kernel:Version}
+usb-storage-modules-${kernel:Version}
+mmc-modules-${kernel:Version} ?
+
+# brltty
+brltty-udeb
+# serial-modules-${kernel:Version} ?
+usb-serial-modules-${kernel:Version} ?
+uinput-modules-${kernel:Version} ?
 
+#for all targets
diff --git a/build/pkg-lists/netboot/gtk/arm64.cfg b/build/pkg-lists/netboot/gtk/arm64.cfg
new file mode 100644
index 0..bda77cdab
--- /dev/null
+++ b/build/pkg-lists/netboot/gtk/arm64.cfg
@@ -0,0 +1,11 @@
+#include "gtk-linux"
+
+#mouse-modules-${kernel:Version}
+event-modules-${kernel:Version}
+xserver-xorg-input-evdev-udeb
+xserver-xorg-video-fbdev-udeb
+
+#speakup-modules-${kernel:Version}
+#sound-modules-${kernel:Version}
+#console-setup-linux-fonts-udeb
+#espeakup-udeb