armv7 efiboot update

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

armv7 efiboot update

Mark Kettenis
I just committed a change to the armv7 bootloader that makes it pass
the EFI memory map to the kernel.  This will be used in the future to
avoid stomping on memory used for the firmware, framebuffers etc.
This change is incompatible with older versions of U-Boot.  U-Boot
2017.03 that shipped with OpenBSD 6.1 is known to work, but if you're
using an older version, you may need to upddate it.

The procedure to update U-Boot can be found in INSTALL.armv7 under
"Install on systems without a supported miniroot".

Cheers,

Mark

Reply | Threaded
Open this post in threaded view
|

Re: armv7 efiboot update

Artturi Alm
On Mon, Aug 21, 2017 at 10:18:04PM +0200, Mark Kettenis wrote:

> I just committed a change to the armv7 bootloader that makes it pass
> the EFI memory map to the kernel.  This will be used in the future to
> avoid stomping on memory used for the firmware, framebuffers etc.
> This change is incompatible with older versions of U-Boot.  U-Boot
> 2017.03 that shipped with OpenBSD 6.1 is known to work, but if you're
> using an older version, you may need to upddate it.
>
> The procedure to update U-Boot can be found in INSTALL.armv7 under
> "Install on systems without a supported miniroot".
>
> Cheers,
>
> Mark
>

Oh, cool, now i guess i'll want to acquire some HDMI switches soon :)


On Sun, Aug 27, 2017 at 06:42:22AM -0600, Mark Kettenis wrote:

> CVSROOT: /cvs
> Module name: src
> Changes by: [hidden email] 2017/08/27 06:42:22
>
> Modified files:
> sys/dev/fdt    : simplefb.c
> sys/arch/arm64/arm64: arm64_machdep.h machdep.c
> sys/arch/arm64/conf: RAMDISK
> sys/arch/arm64/include: fdt.h
> sys/arch/arm/include: fdt.h
> sys/arch/armv7/armv7: armv7_machdep.h
>
> Log message:
> Add glass console support for arm64.  This uses the "stdout-path" property
> of the /chosen node in the device tree to decide whether the framebuffer
> should be used as the console device.  Most, if not all, machines will
> have that set to use a serial console and there is no easy way yet to
> change that.
>
> ok jsg@
>

the rate at u-boot is adopting their "driver model", i'd think it won't
be an issue for long.

i guess the diff below might break something, didn't test w/ports pkg,
as i haven't gotten around to do full upgrade incl. pkgs on my
workstation for some time, and it's just for referencing the CONFIG_
variables here.

-Artturi


diff --git a/include/config_defaults.h b/include/config_defaults.h
index 7ef928b..8a59b74 100644
--- a/include/config_defaults.h
+++ b/include/config_defaults.h
@@ -9,6 +9,9 @@
 #ifndef _CONFIG_DEFAULTS_H_
 #define _CONFIG_DEFAULTS_H_
 
+#define CONFIG_CONSOLE_MUX 1
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
+
 /* Support bootm-ing different OSes */
 #define CONFIG_BOOTM_LINUX 1
 #define CONFIG_BOOTM_NETBSD 1
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 9ed6b98..ec8c35a 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -383,7 +383,9 @@
  "distro_bootcmd=" BOOTENV_SET_SCSI_NEED_INIT                      \
  "for target in ${boot_targets}; do "                      \
  "run bootcmd_${target}; "                         \
- "done\0"
+ "done\0"                                                  \
+ "console=serial,video\0"
+
 
 #ifndef CONFIG_BOOTCOMMAND
 #define CONFIG_BOOTCOMMAND "run distro_bootcmd"

Reply | Threaded
Open this post in threaded view
|

Re: armv7 efiboot update

Artturi Alm
On Sun, Aug 27, 2017 at 07:26:19PM +0300, Artturi Alm wrote:

> On Mon, Aug 21, 2017 at 10:18:04PM +0200, Mark Kettenis wrote:
> > I just committed a change to the armv7 bootloader that makes it pass
> > the EFI memory map to the kernel.  This will be used in the future to
> > avoid stomping on memory used for the firmware, framebuffers etc.
> > This change is incompatible with older versions of U-Boot.  U-Boot
> > 2017.03 that shipped with OpenBSD 6.1 is known to work, but if you're
> > using an older version, you may need to upddate it.
> >
> > The procedure to update U-Boot can be found in INSTALL.armv7 under
> > "Install on systems without a supported miniroot".
> >
> > Cheers,
> >
> > Mark
> >
>
> Oh, cool, now i guess i'll want to acquire some HDMI switches soon :)
>
>
> On Sun, Aug 27, 2017 at 06:42:22AM -0600, Mark Kettenis wrote:
> > CVSROOT: /cvs
> > Module name: src
> > Changes by: [hidden email] 2017/08/27 06:42:22
> >
> > Modified files:
> > sys/dev/fdt    : simplefb.c
> > sys/arch/arm64/arm64: arm64_machdep.h machdep.c
> > sys/arch/arm64/conf: RAMDISK
> > sys/arch/arm64/include: fdt.h
> > sys/arch/arm/include: fdt.h
> > sys/arch/armv7/armv7: armv7_machdep.h
> >
> > Log message:
> > Add glass console support for arm64.  This uses the "stdout-path" property
> > of the /chosen node in the device tree to decide whether the framebuffer
> > should be used as the console device.  Most, if not all, machines will
> > have that set to use a serial console and there is no easy way yet to
> > change that.
> >
> > ok jsg@
> >
>
> the rate at u-boot is adopting their "driver model", i'd think it won't
> be an issue for long.
>
> i guess the diff below might break something, didn't test w/ports pkg,
> as i haven't gotten around to do full upgrade incl. pkgs on my
> workstation for some time, and it's just for referencing the CONFIG_
> variables here.
>
> -Artturi
>

doh, right after sending the mail, i figured i had grepped only in
u-boot/include for these:

config CONSOLE_MUX
        bool "Enable console multiplexing"
        default y if DM_VIDEO || VIDEO || LCD
        help
          This allows multiple devices to be used for each console 'file'.
          For example, stdout can be set to go to serial and video.
          Similarly, stdin can be set to come from serial and keyboard.
          Input can be provided from either source. Console multiplexing
          adds a small amount of size to U-Boot.  Changes to the environment
          variables stdout, stdin and stderr will take effect immediately.

config SYS_CONSOLE_IS_IN_ENV
        bool "Select console devices from the environment"
        default y if CONSOLE_MUX
        help
          This allows multiple input/output devices to be set at boot time.
          For example, if stdout is set to "serial,video" then output will
          be sent to both the serial and video devices on boot. The
          environment variables can be updated after boot to change the
          input/output devices.


while they were in u-boot/common/Kconfig, oh well, now i guess
above does explain better what i was after.

-Artturi

Reply | Threaded
Open this post in threaded view
|

Re: armv7 efiboot update

Mark Kettenis
> Date: Sun, 27 Aug 2017 19:33:11 +0300
> From: Artturi Alm <[hidden email]>
>
> On Sun, Aug 27, 2017 at 07:26:19PM +0300, Artturi Alm wrote:
> > On Mon, Aug 21, 2017 at 10:18:04PM +0200, Mark Kettenis wrote:
> > > I just committed a change to the armv7 bootloader that makes it pass
> > > the EFI memory map to the kernel.  This will be used in the future to
> > > avoid stomping on memory used for the firmware, framebuffers etc.
> > > This change is incompatible with older versions of U-Boot.  U-Boot
> > > 2017.03 that shipped with OpenBSD 6.1 is known to work, but if you're
> > > using an older version, you may need to upddate it.
> > >
> > > The procedure to update U-Boot can be found in INSTALL.armv7 under
> > > "Install on systems without a supported miniroot".
> > >
> > > Cheers,
> > >
> > > Mark
> > >
> >
> > Oh, cool, now i guess i'll want to acquire some HDMI switches soon :)
> >
> >
> > On Sun, Aug 27, 2017 at 06:42:22AM -0600, Mark Kettenis wrote:
> > > CVSROOT: /cvs
> > > Module name: src
> > > Changes by: [hidden email] 2017/08/27 06:42:22
> > >
> > > Modified files:
> > > sys/dev/fdt    : simplefb.c
> > > sys/arch/arm64/arm64: arm64_machdep.h machdep.c
> > > sys/arch/arm64/conf: RAMDISK
> > > sys/arch/arm64/include: fdt.h
> > > sys/arch/arm/include: fdt.h
> > > sys/arch/armv7/armv7: armv7_machdep.h
> > >
> > > Log message:
> > > Add glass console support for arm64.  This uses the "stdout-path" property
> > > of the /chosen node in the device tree to decide whether the framebuffer
> > > should be used as the console device.  Most, if not all, machines will
> > > have that set to use a serial console and there is no easy way yet to
> > > change that.
> > >
> > > ok jsg@
> > >
> >
> > the rate at u-boot is adopting their "driver model", i'd think it won't
> > be an issue for long.
> >
> > i guess the diff below might break something, didn't test w/ports pkg,
> > as i haven't gotten around to do full upgrade incl. pkgs on my
> > workstation for some time, and it's just for referencing the CONFIG_
> > variables here.
> >
> > -Artturi
> >
>
> doh, right after sending the mail, i figured i had grepped only in
> u-boot/include for these:
>
> config CONSOLE_MUX
> bool "Enable console multiplexing"
> default y if DM_VIDEO || VIDEO || LCD
> help
>  This allows multiple devices to be used for each console 'file'.
>  For example, stdout can be set to go to serial and video.
>  Similarly, stdin can be set to come from serial and keyboard.
>  Input can be provided from either source. Console multiplexing
>  adds a small amount of size to U-Boot.  Changes to the environment
>  variables stdout, stdin and stderr will take effect immediately.
>
> config SYS_CONSOLE_IS_IN_ENV
> bool "Select console devices from the environment"
> default y if CONSOLE_MUX
> help
>  This allows multiple input/output devices to be set at boot time.
>  For example, if stdout is set to "serial,video" then output will
>  be sent to both the serial and video devices on boot. The
>  environment variables can be updated after boot to change the
>  input/output devices.
>
>
> while they were in u-boot/common/Kconfig, oh well, now i guess
> above does explain better what i was after.

Yes, the console mux stuff works.  I can interact with U-Boot and
efiboot on both serial and glass console.  The tricky bit is to be
able to find out from within efiboot of a keyboard is plugged in.
Not sure if such a thing is possible.