Enable MMC and PXE boot on meson-gxbb systems.
cover Enable MMC and PXE boot on meson-gxbb systems.
The first patch enables MMC boot support, and the second enables PXE boot support.
Vagrant Cascadian (2):
Enable MMC boot on meson-gxbb.
Enable PXE boot on meson-gxbb.
include/configs/meson-gxbb-common.h | 3 +++ 1 file changed, 3 insertions(+)
Signature · 1 line
2.11.0
PATCH 1/2 Enable MMC boot on meson-gxbb.
This enables booting from microSD and eMMC on odroid-c2 by using the distro_bootcmd MMC functions.
---
include/configs/meson-gxbb-common.h | 2 ++ 1 file changed, 2 insertions(+)
include/configs/meson-gxbb-common.h +2 -0
@@ -39,6 +39,8 @@#include <config_distro_defaults.h> #define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(MMC, mmc, 1) \ func(DHCP, dhcp, na)#include <config_distro_bootcmd.h>
Signature · 1 line
2.11.0
PATCH 1/2 Enable MMC boot on meson-gxbb.
Am 17.04.2017 um 00:01 schrieb Vagrant Cascadian:
Quoted 14 lines
This enables booting from microSD and eMMC on odroid-c2 by using the
distro_bootcmdMMC functions.Signed-off-by Vagrant Cascadian <[email protected]>---
include/configs/meson-gxbb-common.h | 2 ++ 1 file changed, 2 insertions(+)include/configs/meson-gxbb-common.h +0
-0
include/configs/meson-gxbb-common.h line 46
Quoted 8 lines
include/configs/meson-gxbb-common.h +2
-0@@ -39,6 +39,8 @@#include <config_distro_defaults.h> #define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(MMC, mmc, 1) \ func(DHCP, dhcp, na)#include <config_distro_bootcmd.h>
There is already a different patch doing this, and by now adds mmc2 as well. Please review the pending patches.
Thanks,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)
PATCH 2/2 Enable PXE boot on meson-gxbb.
In reply to Vagrant CascadianEnable distro_bootcmd PXE functions on meson-gxbb systems.
While DHCP boot is already supported, the format is fairly u-boot specific, while PXE boot supports the widely used syslinux style boot configuration format.
---
include/configs/meson-gxbb-common.h | 1 + 1 file changed, 1 insertion(+)
include/configs/meson-gxbb-common.h +1 -0
@@ -41,6 +41,7 @@#define BOOT_TARGET_DEVICES (func) \ func(MMC, mmc, 0) \ func(MMC, mmc, 1) \ + func(PXE, pxe, na) \ func(DHCP, dhcp, na)#include <config_distro_bootcmd.h>
Signature · 1 line
2.11.0
PATCH 2/2 Enable PXE boot on meson-gxbb.
Am 17.04.2017 um 00:01 schrieb Vagrant Cascadian:
Quoted 17 lines
Enable
distro_bootcmdPXE functions on meson-gxbb systems.While DHCP boot is already supported, the format is fairly u-boot specific, while PXE boot supports the widely used syslinux style boot configuration format.
Signed-off-by Vagrant Cascadian <[email protected]>---
include/configs/meson-gxbb-common.h | 1 + 1 file changed, 1 insertion(+)include/configs/meson-gxbb-common.h +0
-0
include/configs/meson-gxbb-common.h line 47
Quoted 7 lines
include/configs/meson-gxbb-common.h +1
-0@@ -41,6 +41,7 @@#define BOOT_TARGET_DEVICES (func) \ func(MMC, mmc, 0) \ func(MMC, mmc, 1) \ + func(PXE, pxe, na) \ func(DHCP, dhcp, na)#include <config_distro_bootcmd.h>
This should go after DHCP as discussed a while ago.
PXE has a lengthy list of fallbacks and I fail to see what is U-Boot specific about DHCP.
Regards,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)
PATCH 2/2 Enable PXE boot on meson-gxbb.
Quoted 6 lines · Andreas Färber
Am 17.04.2017 um 00:01 schrieb Vagrant Cascadian:
Quoted 5 lines
Enable
distro_bootcmdPXE functions on meson-gxbb systems.While DHCP boot is already supported, the format is fairly u-boot specific, while PXE boot supports the widely used syslinux style boot configuration format.
...
Quoted 11 lines
Quoted 11 lines
include/configs/meson-gxbb-common.h +1
-0@@ -41,6 +41,7 @@#define BOOT_TARGET_DEVICES (func) \ func(MMC, mmc, 0) \ func(MMC, mmc, 1) \ + func(PXE, pxe, na) \ func(DHCP, dhcp, na)
Quoted 3 lines
include/configs/meson-gxbb-common.h line 47
Quoted 1 line
include/configs/meson-gxbb-common.h +0
-0#include <config_distro_bootcmd.h> This should go after DHCP as discussed a while ago.
Apologies, I'm not subscribed to the list and must have missed that discussion.
Quoted 2 lines
PXE has a lengthy list of fallbacks and I fail to see what is U-Boot specific about DHCP.
DHCP the protocol is not at all u-boot specific, sure, but the boot method:
#define BOOTENV_DEV_DHCP(devtypeu, devtypel, instance) \
"bootcmd_dhcp=" \
BOOTENV_RUN_NET_USB_START \
BOOTENV_RUN_NET_PCI_ENUM \
"if dhcp ${scriptaddr} ${boot_script_dhcp}; then " \
"source ${scriptaddr}; " \
"fi;" \
BOOTENV_EFI_RUN_DHCP \
"\0"I guess I was referring to "source ${scriptaddr}; " line, which is quite u-boot specific. I didn't realize that "DHCP" also had support for EFI loaded over the network.
It seems unforunate that the EFI network boot is only a fallback to loading a boot script over the network, as boot scripts and EFI boot seem to me like two unrelated features.
When loading from MMC, I think the order goes something like EFI, extlinux, u-boot boot scripts. With the current implementation, it appears a similar ordering is not possible with general cases of network boot. Which kind of reduces the consistancy for config_distro_bootcmd for different boot methods. Hrm.
That said, I'm fine to resubmit the patch to put PXE boot after DHCP boot...
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170417/57366bd5/attachment.sig>
PATCH 2/2 Enable PXE boot on meson-gxbb.
Am 18.04.2017 um 00:26 schrieb Vagrant Cascadian:
Quoted 13 lines
DHCP the protocol is not at all u-boot specific, sure, but the boot method:
#define BOOTENV_DEV_DHCP(devtypeu, devtypel, instance) \ "bootcmd_dhcp=" \ BOOTENV_RUN_NET_USB_START \ BOOTENV_RUN_NET_PCI_ENUM \ "if dhcp ${scriptaddr} ${boot_script_dhcp}; then " \ "source ${scriptaddr}; " \ "fi;" \ BOOTENV_EFI_RUN_DHCP \ "\0"
Quoted 3 lines
I guess I was referring to "source ${scriptaddr}; " line, which is quite u-boot specific. I didn't realize that "DHCP" also had support for EFI loaded over the network.
DHCP just sets a filename that we can then load. What differs is where it gets loaded and what gets done with it next.
Quoted 6 lines
It seems unforunate that the EFI network boot is only a fallback to loading a boot script over the network, as boot scripts and EFI boot seem to me like two unrelated features.
When loading from MMC, I think the order goes something like EFI, extlinux, u-boot boot scripts.
Nope, boot.scr goes before EFI also in the MMC case. That way I can have a boot.scr script on SD that applies overlays with fdt apply and then calls bootefi manually. And if anything goes wrong with the overlay, a simple exit from the GRUB prompt still boots me into a working system via the default EFI boot.
Cheers,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)
PATCH 2/2 Enable PXE boot on meson-gxbb.
Quoted 7 lines · Andreas Färber
Am 18.04.2017 um 00:26 schrieb Vagrant Cascadian:
Quoted 3 lines
I guess I was referring to "source ${scriptaddr}; " line, which is quite u-boot specific. I didn't realize that "DHCP" also had support for EFI loaded over the network.
DHCP just sets a filename that we can then load. What differs is where it gets loaded and what gets done with it next.
Sure, I see that.
Quoted 4 lines
Quoted 4 lines
It seems unforunate that the EFI network boot is only a fallback to loading a boot script over the network, as boot scripts and EFI boot seem to me like two unrelated features.
Quoted 8 lines
Quoted 2 lines
When loading from MMC, I think the order goes something like EFI, extlinux, u-boot boot scripts.
Nope, boot.scr goes before EFI also in the MMC case. That way I can have a boot.scr script on SD that applies overlays with fdt apply and then calls bootefi manually. And if anything goes wrong with the overlay, a simple exit from the GRUB prompt still boots me into a working system via the default EFI boot.
But not before the exlinux configuration in config_distro_bootcmd.h:
"scan_dev_for_boot=" \
"echo Scanning ${devtype} " \
"${devnum}:${distro_bootpart}...; " \
"for prefix in ${boot_prefixes}; do " \
"run scan_dev_for_extlinux; " \
"run scan_dev_for_scripts; " \
"done;" \
SCAN_DEV_FOR_EFI \This loads the extlinux configuration before the boot scripts, and I'm fairly sure that was intentional.
To me, the PXE boot is similar to the extlinux support; it loads the same style configuration file, only one is over the network and one over local media. To me, this looks like an inconsistancy in network boot vs. local media boot with the order of which type of files are used to boot.
Admittedly, the PXE boot method loads from so many fallback locations it can be quite annoying.
Maybe I'm rehashing arguments already decided, and if so, perhaps these should be documented in README.distro so there's a reference to point to?
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170417/5a468569/attachment.sig>
PATCH 2/2 Enable PXE boot on meson-gxbb.
In reply to Andreas FärberAm 17.04.2017 um 00:04 schrieb Andreas Färber:
Quoted 24 lines
Am 17.04.2017 um 00:01 schrieb Vagrant Cascadian:
Quoted 23 lines
Enable
distro_bootcmdPXE functions on meson-gxbb systems.While DHCP boot is already supported, the format is fairly u-boot specific, while PXE boot supports the widely used syslinux style boot configuration format.
Signed-off-by Vagrant Cascadian <[email protected]>---
include/configs/meson-gxbb-common.h | 1 + 1 file changed, 1 insertion(+)include/configs/meson-gxbb-common.h +1
-0@@ -41,6 +41,7 @@#define BOOT_TARGET_DEVICES (func) \ func(MMC, mmc, 0) \ func(MMC, mmc, 1) \ + func(PXE, pxe, na) \ func(DHCP, dhcp, na)
Quoted 3 lines
include/configs/meson-gxbb-common.h line 47
Quoted 1 line
include/configs/meson-gxbb-common.h +0
-0#include <config_distro_bootcmd.h> This should go after DHCP as discussed a while ago.
MMC distro boot has now been merged, so you could rebase.
Somehow I do not see replies to your previous suggestion in January, where I thought Alex and others had commented on it (we did discuss that somewhere...), and checking
git grep -C 1 "func(PXE" -- include/configs/
indeed all boards that do enable PXE have it before DHCP, although there are quite a few that have DHCP only:
git grep -C 1 "func(DHCP" -- include/configs/
So I won't object to you adding it here, but my concerns about the timeouts incurred by the per-byte config fallbacks still remain.
Regards,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)