From 4c4ccc5a0499cf2abdca95415caf7443c760a26d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:15:12 -0600 Subject: usb: Return -ENOENT when no devices are found When USB finds no devices it currently returns -EPERM which bootstd does not understand. This causes other bootdevs of the same priority to be skipped. Fix this by returning the correct error code. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- drivers/usb/host/usb-uclass.c | 2 +- include/usb.h | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c index 02c0138..7a03435 100644 --- a/drivers/usb/host/usb-uclass.c +++ b/drivers/usb/host/usb-uclass.c @@ -346,7 +346,7 @@ int usb_init(void) if (controllers_initialized == 0) printf("No working controllers found\n"); - return usb_started ? 0 : -1; + return usb_started ? 0 : -ENOENT; } int usb_setup_ehci_gadget(struct ehci_ctrl **ctlrp) diff --git a/include/usb.h b/include/usb.h index 42b001c..09e3f0c 100644 --- a/include/usb.h +++ b/include/usb.h @@ -257,7 +257,14 @@ int usb_kbd_deregister(int force); #endif /* routines */ -int usb_init(void); /* initialize the USB Controller */ + +/* + * usb_init() - initialize the USB Controllers + * + * Returns: 0 if OK, -ENOENT if there are no USB devices + */ +int usb_init(void); + int usb_stop(void); /* stop the USB Controller */ int usb_detect_change(void); /* detect if a USB device has been (un)plugged */ -- cgit v1.1 From 3a3543db519478cd174e4554691f3d4828902c79 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:15:13 -0600 Subject: lib: Suppress E when writing error-string output When CONFIG_ERRNO_STR is not enabled this shows a spurious 'E' from the format string. Fix this. Fixes: 7f331941321 ("lib: Support printing an error string") Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- lib/vsprintf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index e87503e..e14c6ca 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -680,8 +680,10 @@ repeat: break; case 'd': - if (fmt[1] == 'E') + if (fmt[1] == 'E') { flags |= ERRSTR; + fmt++; + } /* fallthrough */ case 'i': flags |= SIGN; @@ -725,7 +727,6 @@ repeat: ADDCH(str, ' '); for (p = errno_str(num); *p; p++) ADDCH(str, *p); - fmt++; } } -- cgit v1.1 From d7d78576bbfddd52b258771c9e926bd51b50d91e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:15:14 -0600 Subject: bootstd: Rename bootdev_setup_sibling_blk() This name is a little confusing since it suggests that it sets up the sibling block device. In fact it sets up a bootdev for it. Rename the function to make this clearer. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Mattijs Korpershoek --- boot/bootdev-uclass.c | 8 +++++--- common/usb_storage.c | 2 +- doc/develop/bootstd.rst | 4 ++-- drivers/mmc/mmc-uclass.c | 2 +- drivers/nvme/nvme.c | 2 +- drivers/scsi/scsi.c | 2 +- drivers/virtio/virtio-uclass.c | 2 +- include/bootdev.h | 10 +++++----- 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 3f2c8d7..1c16ca1 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -262,7 +262,7 @@ static int bootdev_get_suffix_start(struct udevice *dev, const char *suffix) return len; } -int bootdev_setup_sibling_blk(struct udevice *blk, const char *drv_name) +int bootdev_setup_for_sibling_blk(struct udevice *blk, const char *drv_name) { struct udevice *parent, *dev; char dev_name[50]; @@ -305,7 +305,9 @@ int bootdev_get_sibling_blk(struct udevice *dev, struct udevice **blkp) if (device_get_uclass_id(dev) != UCLASS_BOOTDEV) return -EINVAL; - /* This should always work if bootdev_setup_sibling_blk() was used */ + /* + * This should always work if bootdev_setup_for_sibling_blk() was used + */ len = bootdev_get_suffix_start(dev, ".bootdev"); ret = device_find_child_by_namelen(parent, dev->name, len, &blk); if (ret) { @@ -335,7 +337,7 @@ static int bootdev_get_from_blk(struct udevice *blk, struct udevice **bootdevp) if (device_get_uclass_id(blk) != UCLASS_BLK) return -EINVAL; - /* This should always work if bootdev_setup_sibling_blk() was used */ + /* This should always work if bootdev_setup_for_sibling_blk() was used */ len = bootdev_get_suffix_start(blk, ".blk"); snprintf(dev_name, sizeof(dev_name), "%.*s.%s", len, blk->name, "bootdev"); diff --git a/common/usb_storage.c b/common/usb_storage.c index ac64275..8577422 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -246,7 +246,7 @@ static int usb_stor_probe_device(struct usb_device *udev) if (ret) return ret; - ret = bootdev_setup_sibling_blk(dev, "usb_bootdev"); + ret = bootdev_setup_for_sibling_blk(dev, "usb_bootdev"); if (ret) { int ret2; diff --git a/doc/develop/bootstd.rst b/doc/develop/bootstd.rst index 7a2a69f..ec31365 100644 --- a/doc/develop/bootstd.rst +++ b/doc/develop/bootstd.rst @@ -306,7 +306,7 @@ media device:: The bootdev device is typically created automatically in the media uclass' `post_bind()` method by calling `bootdev_setup_for_dev()` or -`bootdev_setup_sibling_blk()`. The code typically something like this:: +`bootdev_setup_for_sibling_blk()`. The code typically something like this:: /* dev is the Ethernet device */ ret = bootdev_setup_for_dev(dev, "eth_bootdev"); @@ -316,7 +316,7 @@ The bootdev device is typically created automatically in the media uclass' or:: /* blk is the block device (child of MMC device) - ret = bootdev_setup_sibling_blk(blk, "mmc_bootdev"); + ret = bootdev_setup_for_sibling_blk(blk, "mmc_bootdev"); if (ret) return log_msg_ret("bootdev", ret); diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index 01d9b02..0e15767 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -421,7 +421,7 @@ int mmc_bind(struct udevice *dev, struct mmc *mmc, const struct mmc_config *cfg) mmc->cfg = cfg; mmc->priv = dev; - ret = bootdev_setup_sibling_blk(bdev, "mmc_bootdev"); + ret = bootdev_setup_for_sibling_blk(bdev, "mmc_bootdev"); if (ret) return log_msg_ret("bootdev", ret); diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index a7add66..20dc910 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -910,7 +910,7 @@ int nvme_init(struct udevice *udev) if (ret) goto free_id; - ret = bootdev_setup_sibling_blk(ns_udev, "nvme_bootdev"); + ret = bootdev_setup_for_sibling_blk(ns_udev, "nvme_bootdev"); if (ret) return log_msg_ret("bootdev", ret); diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 6caeb3f..0a3420b 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -607,7 +607,7 @@ static int do_scsi_scan_one(struct udevice *dev, int id, int lun, bool verbose) /* TODO: undo create */ return log_msg_ret("pro", ret); - ret = bootdev_setup_sibling_blk(bdev, "scsi_bootdev"); + ret = bootdev_setup_for_sibling_blk(bdev, "scsi_bootdev"); if (ret) return log_msg_ret("bd", ret); diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c index f2b3ef1..c542016 100644 --- a/drivers/virtio/virtio-uclass.c +++ b/drivers/virtio/virtio-uclass.c @@ -248,7 +248,7 @@ static int virtio_uclass_post_probe(struct udevice *udev) device_set_name_alloced(vdev); if (uc_priv->device == VIRTIO_ID_BLOCK && !IS_ENABLED(CONFIG_SANDBOX)) { - ret = bootdev_setup_sibling_blk(vdev, "virtio_bootdev"); + ret = bootdev_setup_for_sibling_blk(vdev, "virtio_bootdev"); if (ret) return log_msg_ret("bootdev", ret); } diff --git a/include/bootdev.h b/include/bootdev.h index 1533adf..8482331 100644 --- a/include/bootdev.h +++ b/include/bootdev.h @@ -371,7 +371,7 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp); /** * bootdev_setup_for_dev() - Bind a new bootdev device (deprecated) * - * Please use bootdev_setup_sibling_blk() instead since it supports multiple + * Please use bootdev_setup_for_sibling_blk() instead since it supports multiple * (child) block devices for each media device. * * Creates a bootdev device as a child of @parent. This should be called from @@ -386,7 +386,7 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp); int bootdev_setup_for_dev(struct udevice *parent, const char *drv_name); /** - * bootdev_setup_for_blk() - Bind a new bootdev device for a blk device + * bootdev_setup_for_sibling_blk() - Bind a new bootdev device for a blk device * * Creates a bootdev device as a sibling of @blk. This should be called from * the driver's bind() method or its uclass' post_bind() method, at the same @@ -398,7 +398,7 @@ int bootdev_setup_for_dev(struct udevice *parent, const char *drv_name); * @drv_name: Name of bootdev driver to bind * Return: 0 if OK, -ve on error */ -int bootdev_setup_sibling_blk(struct udevice *blk, const char *drv_name); +int bootdev_setup_for_sibling_blk(struct udevice *blk, const char *drv_name); /** * bootdev_get_sibling_blk() - Locate the block device for a bootdev @@ -428,8 +428,8 @@ static inline int bootdev_setup_for_dev(struct udevice *parent, return 0; } -static inline int bootdev_setup_sibling_blk(struct udevice *blk, - const char *drv_name) +static inline int bootdev_setup_for_sibling_blk(struct udevice *blk, + const char *drv_name) { return 0; } -- cgit v1.1 From 2d5b5a9cdb7dc0646ca51206dde509f724bf6403 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:15:15 -0600 Subject: bootstd: Correct creating of bootdev sibling Use the correct function here, since there may be multiple IDE devices available. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Mattijs Korpershoek --- drivers/block/ide.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/ide.c b/drivers/block/ide.c index 89201dd..c698f9c 100644 --- a/drivers/block/ide.c +++ b/drivers/block/ide.c @@ -1059,9 +1059,9 @@ static int ide_probe(struct udevice *udev) desc->lba48 = pdesc.lba48; desc->type = pdesc.type; - ret = bootdev_setup_for_dev(udev, "ide_bootdev"); + ret = bootdev_setup_for_sibling_blk(blk, "ide_bootdev"); if (ret) - return log_msg_ret("bootdev", ret); + return log_msg_ret("bd", ret); } return 0; -- cgit v1.1 From 3500ae13c6c17c6702f0efcd8ce9beeb9503ce6a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:15:16 -0600 Subject: bootstd: Add some more debugging in the bootdev uclass Add some more output to make it easier to see what is going wrong when a bootdev hunter fails. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- boot/bootdev-uclass.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 1c16ca1..fa52bc3 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -537,6 +537,8 @@ static int default_get_bootflow(struct udevice *dev, struct bootflow_iter *iter, int ret; ret = bootdev_get_sibling_blk(dev, &blk); + log_debug("sibling_blk ret=%d, blk=%s\n", ret, + ret ? "(none)" : blk->name); /* * If there is no media, indicate that no more partitions should be * checked @@ -662,7 +664,8 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp) ret = bootdev_hunt_prio(iter->cur_prio, iter->flags & BOOTFLOWIF_SHOW); - log_debug("- hunt ret %d\n", ret); + log_debug("- bootdev_hunt_prio() ret %d\n", + ret); if (ret) return log_msg_ret("hun", ret); } @@ -698,6 +701,7 @@ int bootdev_setup_iter(struct bootflow_iter *iter, const char *label, /* hunt for any pre-scan devices */ if (iter->flags & BOOTFLOWIF_HUNT) { ret = bootdev_hunt_prio(BOOTDEVP_1_PRE_SCAN, show); + log_debug("- bootdev_hunt_prio() ret %d\n", ret); if (ret) return log_msg_ret("pre", ret); } @@ -768,6 +772,7 @@ static int bootdev_hunt_drv(struct bootdev_hunter *info, uint seq, bool show) log_debug("Hunting with: %s\n", name); if (info->hunt) { ret = info->hunt(info, show); + log_debug(" - hunt result %d\n", ret); if (ret) return ret; } @@ -833,9 +838,11 @@ int bootdev_hunt_prio(enum bootdev_prio_t prio, bool show) if (prio != info->prio) continue; ret = bootdev_hunt_drv(info, i, show); + log_debug("bootdev_hunt_drv() return %d\n", ret); if (ret && ret != -ENOENT) result = ret; } + log_debug("exit %d\n", result); return result; } -- cgit v1.1 From d60fb7a958780dc6215258430501d4c221b1ea0c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:15:19 -0600 Subject: x86: coreboot: Update doc for CBFS access Add an example to show how cbfs is used. Signed-off-by: Simon Glass Reviewed-by: Bin Meng [Removed CONFIG_CMD_CBFS from defconfig files] Signed-off-by: Bin Meng --- doc/board/coreboot/coreboot.rst | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/doc/board/coreboot/coreboot.rst b/doc/board/coreboot/coreboot.rst index 0fe95af..21801a8 100644 --- a/doc/board/coreboot/coreboot.rst +++ b/doc/board/coreboot/coreboot.rst @@ -51,6 +51,40 @@ can be useful for running UEFI applications, for example. This has only been lightly tested. +CBFS access +----------- + +You can use the 'cbfs' commands to access the Coreboot filesystem:: + + => cbfsinit + => cbfsinfo + + CBFS version: 0x31313132 + ROM size: 0x100000 + Boot block size: 0x4 + CBFS size: 0xffdfc + Alignment: 64 + Offset: 0x200 + + => cbfsls + size type name + ------------------------------------------ + 32 cbfs header cbfs master header + 16720 17 fallback/romstage + 53052 17 fallback/ramstage + 398 raw config + 715 raw revision + 117 raw build_info + 4044 raw fallback/dsdt.aml + 640 cmos layout cmos_layout.bin + 17804 17 fallback/postcar + 335797 payload fallback/payload + 607000 null (empty) + 10752 bootblock bootblock + + 12 file(s) + + => Memory map ---------- -- cgit v1.1 From 22080e05fc4bcfd8c25474ca3ecfce4814fa486d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:15:59 -0600 Subject: x86: spl: Drop unwanted debug() This was left over from some previous debugging. Drop it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/lib/spl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index b6812bb..55c0615 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -137,7 +137,6 @@ static int x86_spl_init(void) } #ifndef CONFIG_SYS_COREBOOT - log_debug("bss\n"); debug("BSS clear from %lx to %lx len %lx\n", (ulong)&__bss_start, (ulong)&__bss_end, (ulong)&__bss_end - (ulong)&__bss_start); memset(&__bss_start, 0, (ulong)&__bss_end - (ulong)&__bss_start); -- cgit v1.1 From d5a3f14c23edb124babeb9a01f543f2ab3a7e14f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:16:00 -0600 Subject: video: Tidy up Makefile rule for video Drop the duplication and add a single rule which can handle SPL as well. Signed-off-by: Simon Glass Reviewed-by: Nikhil M Jain Reviewed-by: Bin Meng --- drivers/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/Makefile b/drivers/Makefile index 2e38c75..efc2a4a 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -39,6 +39,8 @@ obj-$(CONFIG_$(SPL_TPL_)TPM) += tpm/ obj-$(CONFIG_$(SPL_)NVME) += nvme/ obj-$(CONFIG_XEN) += xen/ obj-$(CONFIG_$(SPL_)FPGA) += fpga/ +obj-$(CONFIG_$(SPL_)VIDEO) += video/ + obj-y += bus/ ifndef CONFIG_TPL_BUILD @@ -64,7 +66,6 @@ obj-$(CONFIG_SPL_USB_HOST) += usb/host/ obj-$(CONFIG_SPL_SATA) += ata/ scsi/ obj-$(CONFIG_SPL_LEGACY_BLOCK) += block/ obj-$(CONFIG_SPL_THERMAL) += thermal/ -obj-$(CONFIG_SPL_VIDEO) +=video/ endif endif @@ -99,7 +100,6 @@ obj-y += rtc/ obj-y += scsi/ obj-y += sound/ obj-y += spmi/ -obj-y += video/ obj-y += watchdog/ obj-$(CONFIG_QE) += qe/ obj-$(CONFIG_U_QE) += qe/ -- cgit v1.1 From ea6eef27caba27f8b92b13dda123623d59947ece Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:16:01 -0600 Subject: x86: Run QEMU machine setup in SPL Call the hardware-init function from QEMU from SPL. This allows the video BIOS to operate correctly. Create an x86-wide qemu.h header to avoid having to #ifdef the header in spl.c Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Bin Meng # qemu-x86_64 --- arch/x86/cpu/qemu/qemu.c | 2 +- arch/x86/include/asm/qemu.h | 14 ++++++++++++++ arch/x86/lib/spl.c | 3 +++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 arch/x86/include/asm/qemu.h diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c index 274978c0..7041455 100644 --- a/arch/x86/cpu/qemu/qemu.c +++ b/arch/x86/cpu/qemu/qemu.c @@ -48,7 +48,7 @@ static void enable_pm_ich9(void) pci_write_config32(ICH9_PM, PMBA, CONFIG_ACPI_PM1_BASE | 1); } -static void qemu_chipset_init(void) +void qemu_chipset_init(void) { u16 device, xbcs; int pam, i; diff --git a/arch/x86/include/asm/qemu.h b/arch/x86/include/asm/qemu.h new file mode 100644 index 0000000..f1e95ff --- /dev/null +++ b/arch/x86/include/asm/qemu.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Generic QEMU header + * + * Copyright 2023 Google LLC + */ + +#ifndef __QEMU_H +#define __QEMU_H + +/* set up the chipset for QEMU so that video can be used */ +void qemu_chipset_init(void); + +#endif diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 55c0615..f99df08 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -291,6 +292,8 @@ void spl_board_init(void) #ifndef CONFIG_TPL preloader_console_init(); #endif + if (IS_ENABLED(CONFIG_QEMU)) + qemu_chipset_init(); if (CONFIG_IS_ENABLED(VIDEO)) { struct udevice *dev; -- cgit v1.1 From 1fa64e155d93a9e8a44b34e22390db61bfb24afd Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:16:02 -0600 Subject: Revert "x86: Switch QEMU over to use the bochs driver" Unfortunately the bochs driver does not currently work with distros. It causes a hang between grub menu selection and the OS displaying something. Preliminary investigation shows that GRUB does not jump to the kernel at all. This reproduces reliably. This reverts commit b8956425d525c3c25fd218f252f89a5e44df6a9f. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Bin Meng # qemu-x86_64 [Slightly modify the commit message about preliminary investigation] Signed-off-by: Bin Meng --- arch/x86/cpu/qemu/Kconfig | 2 +- configs/qemu-x86_64_defconfig | 4 ++++ configs/qemu-x86_defconfig | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/x86/cpu/qemu/Kconfig b/arch/x86/cpu/qemu/Kconfig index aa329b0..f8f2f64 100644 --- a/arch/x86/cpu/qemu/Kconfig +++ b/arch/x86/cpu/qemu/Kconfig @@ -12,7 +12,7 @@ config QEMU imply SYS_NS16550 imply USB imply USB_EHCI_HCD - imply VIDEO_BOCHS + imply VIDEO_VESA if QEMU diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig index 9cf38a5..c6f3067 100644 --- a/configs/qemu-x86_64_defconfig +++ b/configs/qemu-x86_64_defconfig @@ -84,6 +84,10 @@ CONFIG_SPL_DM_RTC=y CONFIG_SYS_NS16550_PORT_MAPPED=y CONFIG_SPI=y CONFIG_USB_KEYBOARD=y +CONFIG_SPL_VIDEO=y +CONFIG_FRAMEBUFFER_SET_VESA_MODE=y +CONFIG_FRAMEBUFFER_VESA_MODE_USER=y +CONFIG_FRAMEBUFFER_VESA_MODE=0x144 CONFIG_CONSOLE_SCROLL_LINES=5 # CONFIG_SPL_USE_TINY_PRINTF is not set CONFIG_GENERATE_ACPI_TABLE=y diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig index 95a6ff9..56788cd 100644 --- a/configs/qemu-x86_defconfig +++ b/configs/qemu-x86_defconfig @@ -53,6 +53,9 @@ CONFIG_NVME_PCI=y CONFIG_SYS_NS16550_PORT_MAPPED=y CONFIG_SPI=y CONFIG_USB_KEYBOARD=y +CONFIG_FRAMEBUFFER_SET_VESA_MODE=y +CONFIG_FRAMEBUFFER_VESA_MODE_USER=y +CONFIG_FRAMEBUFFER_VESA_MODE=0x144 CONFIG_CONSOLE_SCROLL_LINES=5 CONFIG_GENERATE_ACPI_TABLE=y # CONFIG_GZIP is not set -- cgit v1.1 From 4099df48a68fdfdc4b1d57a503679b35e724de4e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:16:04 -0600 Subject: x86: Correct copying of BIOS mode information This is copying beyond the end of the destination buffer. Correct the code by using the size of the vesa_mode_info struct. We don't need to copy the rest of the bytes in the buffer. This long-standing bug prevents virtio bootdevs working correctly on qemu-x86 at present. Fixes: 0ca2426beae ("x86: Add support for running option ROMs natively") Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Bin Meng # qemu-x86_64 --- arch/x86/lib/bios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c index e29cae7..f146bbd 100644 --- a/arch/x86/lib/bios.c +++ b/arch/x86/lib/bios.c @@ -204,7 +204,7 @@ static u8 vbe_get_mode_info(struct vesa_state *mi) realmode_interrupt(0x10, VESA_GET_MODE_INFO, 0x0000, mi->video_mode, 0x0000, buffer_seg, buffer_adr); - memcpy(mi->mode_info_block, buffer, sizeof(struct vesa_state)); + memcpy(mi->mode_info_block, buffer, sizeof(struct vesa_mode_info)); mi->valid = true; return 0; -- cgit v1.1 From b7080bfceb35cba3a460decb04a9fc3d6dbba511 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:16:05 -0600 Subject: video: Add a Kconfig option for SPL video handoff At present this feature is enabled in SPL if a bloblist is available. Some platforms may not want to use this, so add an option to allow the feature to be disabled. Note that the feature unfortunately only fills in part of the video-handoff information, so causes failures on x86 platforms. For now, disable it there. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Bin Meng # qemu-x86_64 --- common/board_f.c | 3 +-- drivers/video/Kconfig | 10 ++++++++++ drivers/video/video-uclass.c | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 7d2c380..791c1e6 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -411,8 +411,7 @@ __weak int arch_reserve_mmu(void) static int reserve_video(void) { - if (IS_ENABLED(CONFIG_SPL_VIDEO) && spl_phase() > PHASE_SPL && - CONFIG_IS_ENABLED(BLOBLIST)) { + if (IS_ENABLED(CONFIG_SPL_VIDEO_HANDOFF) && spl_phase() > PHASE_SPL) { struct video_handoff *ho; ho = bloblist_find(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho)); diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index e32ce13..2a37d02 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -1011,6 +1011,16 @@ config SPL_VIDEO if SPL_VIDEO source "drivers/video/tidss/Kconfig" +config SPL_VIDEO_HANDOFF + bool "Pass the video frame-buffer through to U-Boot proper" + depends on SPL_BLOBLIST + default y if !X86 + help + Enable this to set up video-handoff information in SPL which can be + picked up in U-Boot proper. This includes the frame buffer and + various other pieces of information. With this enabled, SPL can set + up video and avoid re-initing it later. + config SPL_VIDEO_LOGO bool "Show the U-Boot logo on the display at SPL" default y if !SPL_SPLASH_SCREEN diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 8f268fc..f743ed7 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -141,7 +141,7 @@ int video_reserve(ulong *addrp) debug("Video frame buffers from %lx to %lx\n", gd->video_bottom, gd->video_top); - if (spl_phase() == PHASE_SPL && CONFIG_IS_ENABLED(BLOBLIST)) { + if (spl_phase() == PHASE_SPL && CONFIG_IS_ENABLED(VIDEO_HANDOFF)) { struct video_handoff *ho; ho = bloblist_add(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho), 0); -- cgit v1.1 From cfa5934979dcb3f2f3edce8af040f1465a2367b7 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:16:06 -0600 Subject: x86: Enable useful options for qemu-86 This build can be used to boot 32-bit standard-distro builds. Enable some more options, so that all possible EFI UUIDs are decoded, we can search memory for tables, support the full set of standard-boot features, have full logging along with debug UART and can boot from CDROM media. This mirrors a similar patch for qemu-x86_64 Signed-off-by: Simon Glass Reviewed-by: Bin Meng [Drop the unknown option from defconfig] Signed-off-by: Bin Meng --- configs/qemu-x86_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig index 56788cd..24682a5 100644 --- a/configs/qemu-x86_defconfig +++ b/configs/qemu-x86_defconfig @@ -5,10 +5,14 @@ CONFIG_NR_DRAM_BANKS=8 CONFIG_ENV_SIZE=0x40000 CONFIG_MAX_CPUS=2 CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx" +CONFIG_DEBUG_UART_BASE=0x3f8 +CONFIG_DEBUG_UART_CLOCK=1843200 +CONFIG_DEBUG_UART=y CONFIG_SMP=y CONFIG_GENERATE_PIRQ_TABLE=y CONFIG_GENERATE_MP_TABLE=y CONFIG_FIT=y +CONFIG_BOOTSTD_FULL=y CONFIG_BOOTSTD_DEFAULTS=y CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE_REPORT=y @@ -16,6 +20,8 @@ CONFIG_SHOW_BOOT_PROGRESS=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="root=/dev/sdb3 init=/sbin/init rootwait ro" CONFIG_SYS_CONSOLE_INFO_QUIET=y +CONFIG_LOG=y +CONFIG_LOGF_FUNC=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_LAST_STAGE_INIT=y CONFIG_PCI_INIT_R=y @@ -23,11 +29,13 @@ CONFIG_SYS_PBSIZE=532 CONFIG_CMD_CPU=y CONFIG_CMD_BOOTEFI_SELFTEST=y CONFIG_CMD_NVEDIT_EFI=y +CONFIG_CMD_MEM_SEARCH=y CONFIG_CMD_IDE=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_BOOTP_BOOTFILESIZE=y +CONFIG_CMD_EFIDEBUG=y CONFIG_CMD_TIME=y CONFIG_CMD_QFW=y CONFIG_CMD_BOOTSTAGE=y -- cgit v1.1 From b985760b7eac0b0294c24347c1c21a6ea0675da2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 11:16:07 -0600 Subject: x86: Update qemu documentation Add some hints and observations related to booting distros on QEMU on x86. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- doc/board/emulation/qemu-x86.rst | 88 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 84 insertions(+), 4 deletions(-) diff --git a/doc/board/emulation/qemu-x86.rst b/doc/board/emulation/qemu-x86.rst index e7dd4e9..15f56b6 100644 --- a/doc/board/emulation/qemu-x86.rst +++ b/doc/board/emulation/qemu-x86.rst @@ -113,7 +113,87 @@ sure the specified CPU supports 64-bit like '-cpu core2duo'. Conversely '-cpu pentium' won't work for obvious reasons that the processor only supports 32-bit. -Note 64-bit support is very preliminary at this point. Lots of features -are missing in the 64-bit world. One notable feature is the VGA console -support which is currently missing, so that you must specify '-nographic' -to get 64-bit U-Boot up and running. +Booting distros +--------------- + +It is possible to install and boot a standard Linux distribution using +qemu-x86_64 by setting up a root disk:: + + qemu-img create root.img 10G + +then using the installer to install. For example, with Ubuntu 2023.04:: + + qemu-system-x86_64 -m 8G -smp 4 -bios /tmp/b/qemu-x86_64/u-boot.rom \ + -drive file=root.img,if=virtio,driver=raw \ + -drive file=ubuntu-23.04-desktop-amd64.iso,if=virtio,driver=raw + +You can also add `-serial mon:stdio` if you want the serial console to show as +well as the video. + +The output will be something like this:: + + U-Boot SPL 2023.07 (Jul 23 2023 - 08:00:12 -0600) + Trying to boot from SPI + Jumping to 64-bit U-Boot: Note many features are missing + + + U-Boot 2023.07 (Jul 23 2023 - 08:00:12 -0600) + + CPU: QEMU Virtual CPU version 2.5+ + DRAM: 8 GiB + Core: 20 devices, 13 uclasses, devicetree: separate + Loading Environment from nowhere... OK + Model: QEMU x86 (I440FX) + Net: e1000: 52:54:00:12:34:56 + eth0: e1000#0 + Hit any key to stop autoboot: 0 + Scanning for bootflows in all bootdevs + Seq Method State Uclass Part Name Filename + --- ----------- ------ -------- ---- ------------------------ ---------------- + Scanning global bootmeth 'efi_mgr': + Hunting with: nvme + Hunting with: qfw + Hunting with: scsi + scanning bus for devices... + Hunting with: virtio + Scanning bootdev 'qfw_pio.bootdev': + fatal: no kernel available + Scanning bootdev 'virtio-blk#0.bootdev': + Scanning bootdev 'virtio-blk#1.bootdev': + 0 efi ready virtio 2 virtio-blk#1.bootdev.part efi/boot/bootx64.efi + ** Booting bootflow 'virtio-blk#1.bootdev.part_2' with efi + EFI using ACPI tables at f0060 + efi_install_fdt() WARNING: Can't have ACPI table and device tree - ignoring DT. + efi_run_image() Booting /efi\boot\bootx64.efi + error: file `/boot/' not found. + +Standard boot looks through various available devices and finds the virtio +disks, then boots from the first one. After a second or so the grub menu appears +and you can work through the installer flow normally. + +Note that standard boot will not find 32-bit distros, since it looks for a +different filename. + +Current limitations +------------------- + +Only qemu-x86-64 can be used for booting distros, since qemu-x86 (the 32-bit +version of U-Boot) seems to have an EFI bug leading to the boot handing after +Linux is selected from grub, e.g. with `debian-12.1.0-i386-netinst.iso`:: + + ** Booting bootflow 'virtio-blk#1.bootdev.part_2' with efi + EFI using ACPI tables at f0180 + efi_install_fdt() WARNING: Can't have ACPI table and device tree - ignoring DT. + efi_run_image() Booting /efi\boot\bootia32.efi + Failed to open efi\boot\root=/dev/sdb3 - Not Found + Failed to load image 큀緃: Not Found + start_image() returned Not Found, falling back to default loader + Welcome to GRUB! + +The bochs video driver also seems to cause problems before the OS is able to +show a display. + +Finally, the use of `-M accel=kvm` is intended to use the native CPU's +virtual-machine features to accelerate operation, but this causes U-Boot to hang +when jumping 64-bit mode, at least on AMD machines. This may be a bug in U-Boot +or something else. -- cgit v1.1 From f26a966b2ed06ab1ba86ebce16b96b73bc3f283f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:44 -0600 Subject: doc: Explain how to avoid the distro-boot scripts Now that standard boot is available, mention this in the environment documentation. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- doc/usage/environment.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/usage/environment.rst b/doc/usage/environment.rst index 2c44e5d..91dc07b 100644 --- a/doc/usage/environment.rst +++ b/doc/usage/environment.rst @@ -94,7 +94,7 @@ to add environment variables. Board maintainers are encouraged to migrate to the text-based environment as it is easier to maintain. The distro-board script still requires the old-style -environment but work is underway to address this. +environments, so use :doc:`../develop/bootstd` instead. List of environment variables -- cgit v1.1 From 5e541a05f70296dbad07fc1f4e8678ad207bb476 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:45 -0600 Subject: env: Use include/env for text-environment includes The 'environment' word is too long. We mostly use 'env' in U-Boot, so use that as the name of the include directory too. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- board/keymile/km83xx/km83xx.env | 4 +- board/keymile/kmcent2/kmcent2.env | 2 +- board/keymile/pg-wcom-ls102xa/pg-wcom-expu1.env | 2 +- board/keymile/pg-wcom-ls102xa/pg-wcom-seli8.env | 2 +- board/siemens/iot2050/iot2050.env | 2 +- board/ti/am62ax/am62ax.env | 4 +- board/ti/am62x/am62x.env | 4 +- board/ti/am64x/am64x.env | 6 +- board/ti/am65x/am65x.env | 8 +-- board/ti/j721e/j721e.env | 10 +-- board/ti/j721s2/j721s2.env | 10 +-- board/ti/ks2_evm/k2e_evm.env | 4 +- board/ti/ks2_evm/k2g_evm.env | 6 +- board/ti/ks2_evm/k2hk_evm.env | 4 +- board/ti/ks2_evm/k2l_evm.env | 4 +- include/configs/am335x_evm.h | 2 +- include/configs/am43xx_evm.h | 2 +- include/configs/am57xx_evm.h | 2 +- include/configs/am62ax_evm.h | 4 +- include/configs/am62x_evm.h | 2 +- include/configs/am64x_evm.h | 4 +- include/configs/am65x_evm.h | 6 +- include/configs/da850evm.h | 2 +- include/configs/dra7xx_evm.h | 2 +- include/configs/omap3_evm.h | 2 +- include/configs/omapl138_lcdk.h | 2 +- include/configs/phycore_am335x_r2.h | 4 +- include/configs/sifive-unleashed.h | 2 +- include/configs/ti_omap4_common.h | 2 +- include/configs/ti_omap5_common.h | 4 +- include/env/distro/sf.h | 41 +++++++++++++ include/env/pg-wcom/common.env | 68 +++++++++++++++++++++ include/env/pg-wcom/ls102xa.env | 29 +++++++++ include/env/pg-wcom/powerpc.env | 16 +++++ include/env/ti/dfu.h | 81 +++++++++++++++++++++++++ include/env/ti/k3_dfu.env | 30 +++++++++ include/env/ti/k3_dfu.h | 46 ++++++++++++++ include/env/ti/k3_rproc.env | 26 ++++++++ include/env/ti/k3_rproc.h | 52 ++++++++++++++++ include/env/ti/mmc.env | 76 +++++++++++++++++++++++ include/env/ti/mmc.h | 73 ++++++++++++++++++++++ include/env/ti/nand.env | 14 +++++ include/env/ti/nand.h | 25 ++++++++ include/env/ti/ti_armv7_common.env | 34 +++++++++++ include/env/ti/ti_armv7_keystone2.env | 61 +++++++++++++++++++ include/env/ti/ufs.env | 22 +++++++ include/env/ti/ufs.h | 33 ++++++++++ include/environment/distro/sf.h | 41 ------------- include/environment/pg-wcom/common.env | 68 --------------------- include/environment/pg-wcom/ls102xa.env | 29 --------- include/environment/pg-wcom/powerpc.env | 16 ----- include/environment/ti/dfu.h | 81 ------------------------- include/environment/ti/k3_dfu.env | 30 --------- include/environment/ti/k3_dfu.h | 46 -------------- include/environment/ti/k3_rproc.env | 26 -------- include/environment/ti/k3_rproc.h | 52 ---------------- include/environment/ti/mmc.env | 76 ----------------------- include/environment/ti/mmc.h | 73 ---------------------- include/environment/ti/nand.env | 14 ----- include/environment/ti/nand.h | 25 -------- include/environment/ti/ti_armv7_common.env | 34 ----------- include/environment/ti/ti_armv7_keystone2.env | 61 ------------------- include/environment/ti/ufs.env | 22 ------- include/environment/ti/ufs.h | 33 ---------- 64 files changed, 784 insertions(+), 784 deletions(-) create mode 100644 include/env/distro/sf.h create mode 100644 include/env/pg-wcom/common.env create mode 100644 include/env/pg-wcom/ls102xa.env create mode 100644 include/env/pg-wcom/powerpc.env create mode 100644 include/env/ti/dfu.h create mode 100644 include/env/ti/k3_dfu.env create mode 100644 include/env/ti/k3_dfu.h create mode 100644 include/env/ti/k3_rproc.env create mode 100644 include/env/ti/k3_rproc.h create mode 100644 include/env/ti/mmc.env create mode 100644 include/env/ti/mmc.h create mode 100644 include/env/ti/nand.env create mode 100644 include/env/ti/nand.h create mode 100644 include/env/ti/ti_armv7_common.env create mode 100644 include/env/ti/ti_armv7_keystone2.env create mode 100644 include/env/ti/ufs.env create mode 100644 include/env/ti/ufs.h delete mode 100644 include/environment/distro/sf.h delete mode 100644 include/environment/pg-wcom/common.env delete mode 100644 include/environment/pg-wcom/ls102xa.env delete mode 100644 include/environment/pg-wcom/powerpc.env delete mode 100644 include/environment/ti/dfu.h delete mode 100644 include/environment/ti/k3_dfu.env delete mode 100644 include/environment/ti/k3_dfu.h delete mode 100644 include/environment/ti/k3_rproc.env delete mode 100644 include/environment/ti/k3_rproc.h delete mode 100644 include/environment/ti/mmc.env delete mode 100644 include/environment/ti/mmc.h delete mode 100644 include/environment/ti/nand.env delete mode 100644 include/environment/ti/nand.h delete mode 100644 include/environment/ti/ti_armv7_common.env delete mode 100644 include/environment/ti/ti_armv7_keystone2.env delete mode 100644 include/environment/ti/ufs.env delete mode 100644 include/environment/ti/ufs.h diff --git a/board/keymile/km83xx/km83xx.env b/board/keymile/km83xx/km83xx.env index ed2487c..1f13aaa 100644 --- a/board/keymile/km83xx/km83xx.env +++ b/board/keymile/km83xx/km83xx.env @@ -13,8 +13,8 @@ netdev=eth0 uimage=uImage #endif -#include -#include +#include +#include #if CONFIG_TARGET_KMCOGE5NE add_default+= eccmode=bch diff --git a/board/keymile/kmcent2/kmcent2.env b/board/keymile/kmcent2/kmcent2.env index 6b676a4..efa762e 100644 --- a/board/keymile/kmcent2/kmcent2.env +++ b/board/keymile/kmcent2/kmcent2.env @@ -1,4 +1,4 @@ -#include +#include EEprom_ivm=pca9547:70:9 arch=ppc_82xx diff --git a/board/keymile/pg-wcom-ls102xa/pg-wcom-expu1.env b/board/keymile/pg-wcom-ls102xa/pg-wcom-expu1.env index d960de6..1054dbf 100644 --- a/board/keymile/pg-wcom-ls102xa/pg-wcom-expu1.env +++ b/board/keymile/pg-wcom-ls102xa/pg-wcom-expu1.env @@ -1,3 +1,3 @@ -#include +#include hostname=EXPU1 diff --git a/board/keymile/pg-wcom-ls102xa/pg-wcom-seli8.env b/board/keymile/pg-wcom-ls102xa/pg-wcom-seli8.env index 4031f8b..1232fe9 100644 --- a/board/keymile/pg-wcom-ls102xa/pg-wcom-seli8.env +++ b/board/keymile/pg-wcom-ls102xa/pg-wcom-seli8.env @@ -1,3 +1,3 @@ -#include +#include hostname=SELI8 diff --git a/board/siemens/iot2050/iot2050.env b/board/siemens/iot2050/iot2050.env index 7fd836e..caa9f80 100644 --- a/board/siemens/iot2050/iot2050.env +++ b/board/siemens/iot2050/iot2050.env @@ -6,7 +6,7 @@ * Jan Kiszka */ -#include +#include usb_pgood_delay=900 diff --git a/board/ti/am62ax/am62ax.env b/board/ti/am62ax/am62ax.env index 491ec97..3f7c333 100644 --- a/board/ti/am62ax/am62ax.env +++ b/board/ti/am62ax/am62ax.env @@ -1,5 +1,5 @@ -#include -#include +#include +#include default_device_tree=ti/k3-am62a7-sk.dtb findfdt= diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env index bb37d21..f2dc878 100644 --- a/board/ti/am62x/am62x.env +++ b/board/ti/am62x/am62x.env @@ -1,5 +1,5 @@ -#include -#include +#include +#include default_device_tree=ti/k3-am625-sk.dtb findfdt= diff --git a/board/ti/am64x/am64x.env b/board/ti/am64x/am64x.env index ecb0736..1567907 100644 --- a/board/ti/am64x/am64x.env +++ b/board/ti/am64x/am64x.env @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include findfdt= if test $board_name = am64x_gpevm; then diff --git a/board/ti/am65x/am65x.env b/board/ti/am65x/am65x.env index 036f475..755bff2 100644 --- a/board/ti/am65x/am65x.env +++ b/board/ti/am65x/am65x.env @@ -1,8 +1,8 @@ -#include -#include -#include +#include +#include +#include #if CONFIG_CMD_REMOTEPROC -#include +#include #endif findfdt= diff --git a/board/ti/j721e/j721e.env b/board/ti/j721e/j721e.env index f7a4880..2f2fb05 100644 --- a/board/ti/j721e/j721e.env +++ b/board/ti/j721e/j721e.env @@ -1,10 +1,10 @@ -#include -#include -#include -#include +#include +#include +#include +#include #if CONFIG_CMD_REMOTEPROC -#include +#include #endif default_device_tree=ti/k3-j721e-common-proc-board.dtb diff --git a/board/ti/j721s2/j721s2.env b/board/ti/j721s2/j721s2.env index 2ec652d..6825b14 100644 --- a/board/ti/j721s2/j721s2.env +++ b/board/ti/j721s2/j721s2.env @@ -1,10 +1,10 @@ -#include -#include -#include -#include +#include +#include +#include +#include #if CONFIG_CMD_REMOTEPROC -#include +#include #endif default_device_tree=ti/k3-j721s2-common-proc-board.dtb diff --git a/board/ti/ks2_evm/k2e_evm.env b/board/ti/ks2_evm/k2e_evm.env index 746e406..a145db5 100644 --- a/board/ti/ks2_evm/k2e_evm.env +++ b/board/ti/ks2_evm/k2e_evm.env @@ -1,5 +1,5 @@ -#include -#include +#include +#include findfdt=setenv fdtfile ${name_fdt} boot=ubi diff --git a/board/ti/ks2_evm/k2g_evm.env b/board/ti/ks2_evm/k2g_evm.env index 72807ac..4f4941d 100644 --- a/board/ti/ks2_evm/k2g_evm.env +++ b/board/ti/ks2_evm/k2g_evm.env @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include set_name_pmmc=setenv name_pmmc ti-sci-firmware-k2g.bin dev_pmmc=0 diff --git a/board/ti/ks2_evm/k2hk_evm.env b/board/ti/ks2_evm/k2hk_evm.env index f1cdc70..0714a51 100644 --- a/board/ti/ks2_evm/k2hk_evm.env +++ b/board/ti/ks2_evm/k2hk_evm.env @@ -1,5 +1,5 @@ -#include -#include +#include +#include findfdt=setenv fdtfile ${name_fdt} boot=ubi diff --git a/board/ti/ks2_evm/k2l_evm.env b/board/ti/ks2_evm/k2l_evm.env index ddb5cd4..e8a803a 100644 --- a/board/ti/ks2_evm/k2l_evm.env +++ b/board/ti/ks2_evm/k2l_evm.env @@ -1,5 +1,5 @@ -#include -#include +#include +#include findfdt=setenv fdtfile ${name_fdt} boot=ubi diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 5b47778..504b1f0 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -76,7 +76,7 @@ #include #ifndef CONFIG_SPL_BUILD -#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index a2f73c4..7ee7b7e 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -64,7 +64,7 @@ #include #ifndef CONFIG_SPL_BUILD -#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index ba91f2b..06edde6 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -11,7 +11,7 @@ #ifndef __CONFIG_AM57XX_EVM_H #define __CONFIG_AM57XX_EVM_H -#include +#include #include #define CFG_SYS_NS16550_COM1 UART1_BASE /* Base EVM has UART0 */ diff --git a/include/configs/am62ax_evm.h b/include/configs/am62ax_evm.h index 3997ce5..57003f1 100644 --- a/include/configs/am62ax_evm.h +++ b/include/configs/am62ax_evm.h @@ -9,8 +9,8 @@ #define __CONFIG_AM62AX_EVM_H #include -#include -#include +#include +#include /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000 diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h index 6b2a6ee..44180dc 100644 --- a/include/configs/am62x_evm.h +++ b/include/configs/am62x_evm.h @@ -10,7 +10,7 @@ #define __CONFIG_AM625_EVM_H #include -#include +#include /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000 diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h index 1e37ab4..062102a 100644 --- a/include/configs/am64x_evm.h +++ b/include/configs/am64x_evm.h @@ -11,9 +11,9 @@ #include #include -#include +#include #include -#include +#include /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000 diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h index 2fa658d..9e90239 100644 --- a/include/configs/am65x_evm.h +++ b/include/configs/am65x_evm.h @@ -10,9 +10,9 @@ #define __CONFIG_AM654_EVM_H #include -#include -#include -#include +#include +#include +#include /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000 diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index 736af88..cef4042 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -143,7 +143,7 @@ "fdtaddr=0xc0600000\0" \ "scriptaddr=0xc0600000\0" -#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index ef1d5a1..633ec1f 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -11,7 +11,7 @@ #ifndef __CONFIG_DRA7XX_EVM_H #define __CONFIG_DRA7XX_EVM_H -#include +#include #define CFG_MAX_MEM_MAPPED 0x80000000 diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index adb25a6..f449677 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -67,7 +67,7 @@ #include -#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index af00935..fc2655a 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -135,7 +135,7 @@ "fdtaddr=0xc0600000\0" \ "scriptaddr=0xc0600000\0" -#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/configs/phycore_am335x_r2.h b/include/configs/phycore_am335x_r2.h index 4e6dc79..8668da6 100644 --- a/include/configs/phycore_am335x_r2.h +++ b/include/configs/phycore_am335x_r2.h @@ -59,8 +59,8 @@ func(NAND, nand, 0) #include -#include -#include +#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_MMC_TI_ARGS \ diff --git a/include/configs/sifive-unleashed.h b/include/configs/sifive-unleashed.h index f208f5e..2996b37 100644 --- a/include/configs/sifive-unleashed.h +++ b/include/configs/sifive-unleashed.h @@ -26,7 +26,7 @@ func(DHCP, dhcp, na) #include -#include +#include #define TYPE_GUID_LOADER1 "5B193300-FC78-40CD-8002-E86C45580B47" #define TYPE_GUID_LOADER2 "2E54B353-1271-4842-806F-E436D6AF6985" diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h index 9e312ac..c4f116a 100644 --- a/include/configs/ti_omap4_common.h +++ b/include/configs/ti_omap4_common.h @@ -56,7 +56,7 @@ func(DHCP, dhcp, na) #include -#include +#include #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index 74a39c4..4e5aa74 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -39,8 +39,8 @@ #define DFUARGS #endif -#include -#include +#include +#include #ifndef CONSOLEDEV #define CONSOLEDEV "ttyS2" diff --git a/include/env/distro/sf.h b/include/env/distro/sf.h new file mode 100644 index 0000000..ee48a8a --- /dev/null +++ b/include/env/distro/sf.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2020 Amarula Solutions(India) + * + * SF distro configurations. + */ + +#ifndef __DISTRO_SF_CONFIG_H +#define __DISTRO_SF_CONFIG_H + +#if IS_ENABLED(CONFIG_CMD_SF) +#define BOOTENV_SHARED_SF(devtypel) \ + #devtypel "_boot=" \ + "if " #devtypel " probe ${busnum}; then " \ + "devtype=" #devtypel "; " \ + "run scan_sf_for_scripts; " \ + "fi\0" +#define BOOTENV_DEV_SF(devtypeu, devtypel, instance) \ + "bootcmd_" #devtypel #instance "=" \ + "busnum=" #instance "; " \ + "run " #devtypel "_boot\0" +#define BOOTENV_DEV_NAME_SF(devtypeu, devtypel, instance) \ + #devtypel #instance " " +#else +#define BOOTENV_SHARED_SF(devtypel) +#define BOOTENV_DEV_SF \ + BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF +#define BOOTENV_DEV_NAME_SF \ + BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF + +#endif /* CONFIG_CMD_SF */ + +#define BOOTENV_SF \ + BOOTENV_SHARED_SF(sf) \ + "scan_sf_for_scripts=" \ + "${devtype} read ${scriptaddr} " \ + "${script_offset_f} ${script_size_f}; " \ + "source ${scriptaddr}; " \ + "echo SCRIPT FAILED: continuing...\0" + +#endif /* __DISTRO_SF_CONFIG_H */ diff --git a/include/env/pg-wcom/common.env b/include/env/pg-wcom/common.env new file mode 100644 index 0000000..4b660ce --- /dev/null +++ b/include/env/pg-wcom/common.env @@ -0,0 +1,68 @@ + +#ifndef WCOM_UBI_PARTITION_APP +/* one flash chip only called boot */ +# define WCOM_UBI_LINUX_MTD ubi.mtd=ubi0 +ubiattach=ubi part ubi0 +#else /* WCOM_UBI_PARTITION_APP */ +/* two flash chips called boot and app */ +# define WCOM_UBI_LINUX_MTD ubi.mtd=ubi0 ubi.mtd=ubi1 +ubiattach=if test ${boot_bank} -eq 0; + then; + ubi part ubi0; + else; + ubi part ubi1; + fi +#endif /* WCOMC_UBI_PARTITION_APP */ + +actual_bank=0 + +add_default=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off: + console=ttyS0,${baudrate} mem=${kernelmem} init=${init} + phram.phram=phvar,${varaddr},CONFIG_KM_PHRAM + WCOM_UBI_LINUX_MTD + +addpanic=setenv bootargs ${bootargs} panic=1 panic_on_oops=1 +altbootcmd=run bootcmd +backup_bank=0 +boot=bootm ${load_addr_r} - ${fdt_addr_r} + +bootcmd=km_checkbidhwk && + setenv bootcmd 'if km_checktestboot; + then; + setenv boot_bank ${test_bank}; + else; + setenv boot_bank ${actual_bank}; + fi; + run ${subbootcmds}; reset' && + setenv altbootcmd 'setenv boot_bank ${backup_bank}; + run ${subbootcmds}; + reset' && + saveenv && + saveenv && + boot + +cramfsaddr=CONFIG_KM_CRAMFS_ADDR +cramfsloadfdt=cramfsload ${fdt_addr_r} fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb +cramfsloadkernel=cramfsload ${load_addr_r} ${uimage} + +develop=tftp ${load_addr_r} scripts/develop-${arch}.txt && + env import -t ${load_addr_r} ${filesize} && + run setup_debug_env + +env_version=1 +fdt_addr_r=CONFIG_KM_FDT_ADDR +flashargs=setenv bootargs root=mtdblock:rootfs${boot_bank} rootfstype=squashfs ro +init=/sbin/init-overlay.sh +load=tftpboot ${load_addr_r} ${hostname}/u-boot.bin +load_addr_r=CONFIG_KM_KERNEL_ADDR +pnvramsize=CONFIG_KM_PNVRAM + +ramfs=tftp ${load_addr_r} scripts/ramfs-${arch}.txt && + env import -t ${load_addr_r} ${filesize} && + run setup_debug_env + +release=run newenv; reset +subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt set_fdthigh + cramfsloadkernel flashargs add_default addpanic boot +testbootcmd=setenv boot_bank ${test_bank}; run ${subbootcmds}; reset +ubicopy=ubi read ${cramfsaddr} bootfs${boot_bank} diff --git a/include/env/pg-wcom/ls102xa.env b/include/env/pg-wcom/ls102xa.env new file mode 100644 index 0000000..abbec42 --- /dev/null +++ b/include/env/pg-wcom/ls102xa.env @@ -0,0 +1,29 @@ +#define WCOM_UBI_PARTITION_APP + +#include + +EEprom_ivm=pca9547:70:9 +boot=bootm $load_addr_r - $fdt_addr_r +checkfdt=true +cramfsloadfdt=cramfsload $fdt_addr_r fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb +ethrotate=no +hwconfig=devdis:esdhc,usb3,usb2,sata,sec,dcu,duart2,qspi,can1,can2_4,ftm2_8,i2c2_3,sai1_4,lpuart2_6,asrc,spdif,lpuart1,ftm1 +netdev=eth2 + +newenv=protect off CONFIG_ENV_ADDR_REDUND +0x40000 && + erase CONFIG_ENV_ADDR_REDUND +0x40000 && + protect on CONFIG_ENV_ADDR_REDUND +0x40000 + +set_fdthigh=true + +update=protect off CONFIG_SYS_MONITOR_BASE +${filesize} && + erase CONFIG_SYS_MONITOR_BASE +${filesize} && + cp.b ${load_addr_r} CONFIG_SYS_MONITOR_BASE ${filesize} && + protect on CONFIG_SYS_MONITOR_BASE +${filesize} + +update-nor=protect off CONFIG_SYS_FLASH_BASE +${filesize} && + erase CONFIG_SYS_FLASH_BASE +${filesize} && + cp.b ${load_addr_r} CONFIG_SYS_FLASH_BASE ${filesize} && + protect on CONFIG_SYS_MONITOR_BASE +0x100000 + +uimage=uImage diff --git a/include/env/pg-wcom/powerpc.env b/include/env/pg-wcom/powerpc.env new file mode 100644 index 0000000..744c073 --- /dev/null +++ b/include/env/pg-wcom/powerpc.env @@ -0,0 +1,16 @@ +#define BOOTFLASH_START 0xF0000000 + +arch=ppc_82xx +bootm_mapsize=CONFIG_SYS_BOOTM_LEN +checkfdt=true +set_fdthigh=true + +update=protect off BOOTFLASH_START +${filesize} && + erase BOOTFLASH_START +${filesize} && + cp.b ${load_addr_r} BOOTFLASH_START ${filesize} && + protect on BOOTFLASH_START +${filesize} + +newenv=prot off CONFIG_ENV_ADDR +0x40000 && + era CONFIG_ENV_ADDR +0x40000 + +unlock=yes diff --git a/include/env/ti/dfu.h b/include/env/ti/dfu.h new file mode 100644 index 0000000..3c90570 --- /dev/null +++ b/include/env/ti/dfu.h @@ -0,0 +1,81 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for DFU on TI boards. + */ + +#ifndef __TI_DFU_H +#define __TI_DFU_H + +#define DFU_ALT_INFO_MMC \ + "dfu_alt_info_mmc=" \ + "boot part 0 1;" \ + "rootfs part 0 2;" \ + "MLO fat 0 1;" \ + "MLO.raw raw 0x100 0x200;" \ + "u-boot.img.raw raw 0x300 0x1000;" \ + "u-env.raw raw 0x1300 0x200;" \ + "spl-os-args.raw raw 0x1500 0x200;" \ + "spl-os-image.raw raw 0x1700 0x6900;" \ + "spl-os-args fat 0 1;" \ + "spl-os-image fat 0 1;" \ + "u-boot.img fat 0 1;" \ + "uEnv.txt fat 0 1\0" + +#define DFU_ALT_INFO_EMMC \ + "dfu_alt_info_emmc=" \ + "rawemmc raw 0 3751936;" \ + "boot part 1 1;" \ + "rootfs part 1 2;" \ + "MLO fat 1 1;" \ + "MLO.raw raw 0x100 0x200;" \ + "u-boot.img.raw raw 0x300 0x1000;" \ + "u-env.raw raw 0x1300 0x200;" \ + "spl-os-args.raw raw 0x1500 0x200;" \ + "spl-os-image.raw raw 0x1700 0x6900;" \ + "spl-os-args fat 1 1;" \ + "spl-os-image fat 1 1;" \ + "u-boot.img fat 1 1;" \ + "uEnv.txt fat 1 1\0" + +#ifdef CONFIG_MTD_RAW_NAND +#define DFU_ALT_INFO_NAND \ + "dfu_alt_info_nand=" \ + "SPL part 0 1;" \ + "SPL.backup1 part 0 2;" \ + "SPL.backup2 part 0 3;" \ + "SPL.backup3 part 0 4;" \ + "u-boot part 0 5;" \ + "u-boot-spl-os part 0 6;" \ + "kernel part 0 8;" \ + "rootfs part 0 9\0" +#else +#define DFU_ALT_INFO_NAND "" +#endif + +#define DFU_ALT_INFO_RAM \ + "dfu_alt_info_ram=" \ + "kernel ram 0x80200000 0x4000000;" \ + "fdt ram 0x80f80000 0x80000;" \ + "ramdisk ram 0x81000000 0x4000000\0" + +#define DFU_ALT_INFO_QSPI_XIP \ + "dfu_alt_info_qspi=" \ + "u-boot.bin raw 0x0 0x080000;" \ + "u-boot.backup raw 0x080000 0x080000;" \ + "u-boot-spl-os raw 0x100000 0x010000;" \ + "u-boot-env raw 0x110000 0x010000;" \ + "u-boot-env.backup raw 0x120000 0x010000;" \ + "kernel raw 0x130000 0x800000\0" + +#define DFU_ALT_INFO_QSPI \ + "dfu_alt_info_qspi=" \ + "MLO raw 0x0 0x040000;" \ + "u-boot.img raw 0x040000 0x0100000;" \ + "u-boot-spl-os raw 0x140000 0x080000;" \ + "u-boot-env raw 0x1C0000 0x010000;" \ + "u-boot-env.backup raw 0x1D0000 0x010000;" \ + "kernel raw 0x1E0000 0x800000\0" + +#endif /* __TI_DFU_H */ diff --git a/include/env/ti/k3_dfu.env b/include/env/ti/k3_dfu.env new file mode 100644 index 0000000..2015296 --- /dev/null +++ b/include/env/ti/k3_dfu.env @@ -0,0 +1,30 @@ +dfu_alt_info_mmc= + boot part 1 1; + rootfs part 1 2; + tiboot3.bin fat 1 1; + tispl.bin fat 1 1; + u-boot.img fat 1 1; + uEnv.txt fat 1 1; + sysfw.itb fat 1 1 + +dfu_alt_info_emmc= + rawemmc raw 0 0x800000 mmcpart 1; + rootfs part 0 1 mmcpart 0; + tiboot3.bin.raw raw 0x0 0x400 mmcpart 1; + tispl.bin.raw raw 0x400 0x1000 mmcpart 1; + u-boot.img.raw raw 0x1400 0x2000 mmcpart 1; + u-env.raw raw 0x3400 0x100 mmcpart 1; + sysfw.itb.raw raw 0x3600 0x800 mmcpart 1 + +dfu_alt_info_ospi= + tiboot3.bin raw 0x0 0x080000; + tispl.bin raw 0x080000 0x200000; + u-boot.img raw 0x280000 0x400000; + u-boot-env raw 0x680000 0x020000; + sysfw.itb raw 0x6c0000 0x100000; + rootfs raw 0x800000 0x3800000 + +dfu_alt_info_ram= + tispl.bin ram 0x80080000 0x200000; + u-boot.img ram 0x81000000 0x400000 + diff --git a/include/env/ti/k3_dfu.h b/include/env/ti/k3_dfu.h new file mode 100644 index 0000000..a16a3ad --- /dev/null +++ b/include/env/ti/k3_dfu.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for DFU on TI K3 SoCs. + * + */ + +#ifndef __TI_DFU_H +#define __TI_DFU_H + +#define DFU_ALT_INFO_MMC \ + "dfu_alt_info_mmc=" \ + "boot part 1 1;" \ + "rootfs part 1 2;" \ + "tiboot3.bin fat 1 1;" \ + "tispl.bin fat 1 1;" \ + "u-boot.img fat 1 1;" \ + "uEnv.txt fat 1 1;" \ + "sysfw.itb fat 1 1\0" + +#define DFU_ALT_INFO_EMMC \ + "dfu_alt_info_emmc=" \ + "rawemmc raw 0 0x800000 mmcpart 1;" \ + "rootfs part 0 1 mmcpart 0;" \ + "tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;" \ + "tispl.bin.raw raw 0x400 0x1000 mmcpart 1;" \ + "u-boot.img.raw raw 0x1400 0x2000 mmcpart 1;" \ + "u-env.raw raw 0x3400 0x100 mmcpart 1;" \ + "sysfw.itb.raw raw 0x3600 0x800 mmcpart 1\0" + +#define DFU_ALT_INFO_OSPI \ + "dfu_alt_info_ospi=" \ + "tiboot3.bin raw 0x0 0x080000;" \ + "tispl.bin raw 0x080000 0x200000;" \ + "u-boot.img raw 0x280000 0x400000;" \ + "u-boot-env raw 0x680000 0x020000;" \ + "sysfw.itb raw 0x6c0000 0x100000;" \ + "rootfs raw 0x800000 0x3800000\0" + +#define DFU_ALT_INFO_RAM \ + "dfu_alt_info_ram=" \ + "tispl.bin ram 0x80080000 0x200000;" \ + "u-boot.img ram 0x81000000 0x400000\0" \ + +#endif /* __TI_DFU_H */ diff --git a/include/env/ti/k3_rproc.env b/include/env/ti/k3_rproc.env new file mode 100644 index 0000000..87d9d76 --- /dev/null +++ b/include/env/ti/k3_rproc.env @@ -0,0 +1,26 @@ +dorprocboot=0 +boot_rprocs= + if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then + rproc init; + run boot_rprocs_mmc; + fi; +rproc_load_and_boot_one= + if load mmc ${bootpart} $loadaddr ${rproc_fw}; then + if rproc load ${rproc_id} ${loadaddr} ${filesize}; then + rproc start ${rproc_id}; + fi; + fi +boot_rprocs_mmc= + env set rproc_id; + env set rproc_fw; + for i in ${rproc_fw_binaries} ; do + if test -z "${rproc_id}" ; then + env set rproc_id $i; + else + env set rproc_fw $i; + run rproc_load_and_boot_one; + env set rproc_id; + env set rproc_fw; + fi; + done + diff --git a/include/env/ti/k3_rproc.h b/include/env/ti/k3_rproc.h new file mode 100644 index 0000000..3418cb4 --- /dev/null +++ b/include/env/ti/k3_rproc.h @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * rproc environment variable definitions for various TI K3 SoCs. + */ + +#ifndef __TI_RPROC_H +#define __TI_RPROC_H + +/* + * should contain a list of tuplies, + * override in board config files with the actual list + */ +#define DEFAULT_RPROCS "" + +#ifdef CONFIG_CMD_REMOTEPROC +#define EXTRA_ENV_RPROC_SETTINGS \ + "dorprocboot=0\0" \ + "boot_rprocs=" \ + "if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then "\ + "rproc init;" \ + "run boot_rprocs_mmc;" \ + "fi;\0" \ + "rproc_load_and_boot_one=" \ + "if load mmc ${bootpart} $loadaddr ${rproc_fw}; then " \ + "if rproc load ${rproc_id} ${loadaddr} ${filesize}; then "\ + "rproc start ${rproc_id};" \ + "fi;" \ + "fi\0" \ + "boot_rprocs_mmc=" \ + "env set rproc_id;" \ + "env set rproc_fw;" \ + "for i in ${rproc_fw_binaries} ; do " \ + "if test -z \"${rproc_id}\" ; then " \ + "env set rproc_id $i;" \ + "else " \ + "env set rproc_fw $i;" \ + "run rproc_load_and_boot_one;" \ + "env set rproc_id;" \ + "env set rproc_fw;" \ + "fi;" \ + "done\0" \ + "rproc_fw_binaries=" \ + DEFAULT_RPROCS \ + "\0" +#else +#define EXTRA_ENV_RPROC_SETTINGS \ + "boot_rprocs= \0" +#endif /* CONFIG_CMD_REMOTEPROC */ + +#endif /* __TI_RPROC_H */ diff --git a/include/env/ti/mmc.env b/include/env/ti/mmc.env new file mode 100644 index 0000000..6fb47fb --- /dev/null +++ b/include/env/ti/mmc.env @@ -0,0 +1,76 @@ +mmcdev=0 +mmcrootfstype=ext4 rootwait +finduuid=part uuid ${boot} ${bootpart} uuid +args_mmc=run finduuid;setenv bootargs console=${console} + ${optargs} + root=PARTUUID=${uuid} rw + rootfstype=${mmcrootfstype} +loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr +bootscript=echo Running bootscript from mmc${mmcdev} ...; + source ${loadaddr} +bootenvfile=uEnv.txt +importbootenv=echo Importing environment from mmc${mmcdev} ...; + env import -t ${loadaddr} ${filesize} +loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile} +loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile} +loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile} +get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt} +envboot=mmc dev ${mmcdev}; + if mmc rescan; then + echo SD/MMC found on device ${mmcdev}; + if run loadbootscript; then + run bootscript; + else + if run loadbootenv; then + echo Loaded env from ${bootenvfile}; + run importbootenv; + fi; + if test -n $uenvcmd; then + echo Running uenvcmd ...; + run uenvcmd; + fi; + fi; + fi; +mmcloados= + if test ${boot_fdt} = yes || test ${boot_fdt} = try; then + if run get_fdt_mmc; then + bootz ${loadaddr} - ${fdtaddr}; + else + if test ${boot_fdt} = try; then + bootz; + else + echo WARN: Cannot load the DT; + fi; + fi; + else + bootz; + fi; +mmcboot=mmc dev ${mmcdev}; + devnum=${mmcdev}; + devtype=mmc; + if mmc rescan; then + echo SD/MMC found on device ${mmcdev}; + if run loadimage; then + run args_mmc; + if test ${boot_fit} -eq 1; then + run run_fit; + else + run mmcloados; + fi; + fi; +fi; + +init_mmc=run args_all args_mmc +get_overlay_mmc= + fdt address ${fdtaddr}; + fdt resize 0x100000; + for overlay in $name_overlays; + do; + load mmc ${bootpart} ${dtboaddr} ${bootdir}/dtb/${overlay} && + fdt apply ${dtboaddr}; + done; +get_kern_mmc=load mmc ${bootpart} ${loadaddr} + ${bootdir}/${name_kern} +get_fit_mmc=load mmc ${bootpart} ${addr_fit} + ${bootdir}/${name_fit} +partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs} diff --git a/include/env/ti/mmc.h b/include/env/ti/mmc.h new file mode 100644 index 0000000..769ea9d --- /dev/null +++ b/include/env/ti/mmc.h @@ -0,0 +1,73 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for MMC/SD on TI boards. + */ + +#ifndef __TI_MMC_H +#define __TI_MMC_H + +#define DEFAULT_MMC_TI_ARGS \ + "mmcdev=0\0" \ + "mmcrootfstype=ext4 rootwait\0" \ + "finduuid=part uuid ${boot} ${bootpart} uuid\0" \ + "args_mmc=run finduuid;setenv bootargs console=${console} " \ + "${optargs} " \ + "root=PARTUUID=${uuid} rw " \ + "rootfstype=${mmcrootfstype}\0" \ + "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ + "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ + "source ${loadaddr}\0" \ + "bootenvfile=uEnv.txt\0" \ + "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ + "env import -t ${loadaddr} ${filesize}\0" \ + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \ + "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ + "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "envboot=mmc dev ${mmcdev}; " \ + "if mmc rescan; then " \ + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadbootscript; then " \ + "run bootscript;" \ + "else " \ + "if run loadbootenv; then " \ + "echo Loaded env from ${bootenvfile};" \ + "run importbootenv;" \ + "fi;" \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "fi;" \ + "fi;\0" \ + "mmcloados=" \ + "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ + "if run loadfdt; then " \ + "bootz ${loadaddr} - ${fdtaddr}; " \ + "else " \ + "if test ${boot_fdt} = try; then " \ + "bootz; " \ + "else " \ + "echo WARN: Cannot load the DT; " \ + "fi; " \ + "fi; " \ + "else " \ + "bootz; " \ + "fi;\0" \ + "mmcboot=mmc dev ${mmcdev}; " \ + "devnum=${mmcdev}; " \ + "devtype=mmc; " \ + "if mmc rescan; then " \ + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadimage; then " \ + "run args_mmc; " \ + "if test ${boot_fit} -eq 1; then " \ + "run run_fit; " \ + "else " \ + "run mmcloados;" \ + "fi;" \ + "fi;" \ + "fi;\0" + +#endif /* __TI_MMC_H */ diff --git a/include/env/ti/nand.env b/include/env/ti/nand.env new file mode 100644 index 0000000..4e185c1 --- /dev/null +++ b/include/env/ti/nand.env @@ -0,0 +1,14 @@ +mtdids=nor0=47040000.spi.0,nor0=47034000.hyperbus +mtdparts=mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k(ospi.phypattern);47034000.hyperbus:512k(hbmc.tiboot3),2m(hbmc.tispl),4m(hbmc.u-boot),256k(hbmc.env),-@8m(hbmc.rootfs) +nandargs=setenv bootargs console=${console} + ${optargs} + root=${nandroot} + rootfstype=${nandrootfstype} +nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048 +nandrootfstype=ubifs rootwait +nandboot=echo Booting from nand ...; + run nandargs; + nand read ${fdtaddr} NAND.u-boot-spl-os; + nand read ${loadaddr} NAND.kernel; + bootz ${loadaddr} - ${fdtaddr} + diff --git a/include/env/ti/nand.h b/include/env/ti/nand.h new file mode 100644 index 0000000..7d00afa --- /dev/null +++ b/include/env/ti/nand.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for NAND on TI boards. + */ + +#ifdef CONFIG_MTD_RAW_NAND +#define NANDARGS \ + "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ + "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ + "nandargs=setenv bootargs console=${console} " \ + "${optargs} " \ + "root=${nandroot} " \ + "rootfstype=${nandrootfstype}\0" \ + "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \ + "nandrootfstype=ubifs rootwait\0" \ + "nandboot=echo Booting from nand ...; " \ + "run nandargs; " \ + "nand read ${fdtaddr} NAND.u-boot-spl-os; " \ + "nand read ${loadaddr} NAND.kernel; " \ + "bootz ${loadaddr} - ${fdtaddr}\0" +#else +#define NANDARGS "" +#endif diff --git a/include/env/ti/ti_armv7_common.env b/include/env/ti/ti_armv7_common.env new file mode 100644 index 0000000..e87a41a --- /dev/null +++ b/include/env/ti/ti_armv7_common.env @@ -0,0 +1,34 @@ +loadaddr=0x82000000 +kernel_addr_r=0x82000000 +fdtaddr=0x88000000 +dtboaddr=0x89000000 +fdt_addr_r=0x88000000 +fdtoverlay_addr_r=0x89000000 +rdaddr=0x88080000 +ramdisk_addr_r=0x88080000 +scriptaddr=0x80000000 +pxefile_addr_r=0x80100000 +bootm_size=0x10000000 +boot_fdt=try + +boot_fit=0 +addr_fit=0x90000000 +name_fit=fitImage +update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit} +get_overlaystring= + for overlay in $name_overlays; + do; + setenv overlaystring ${overlaystring}'#'${overlay}; + done; +get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile} +run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring} +bootcmd_ti_mmc= + run findfdt; run init_${boot}; +#if CONFIG_CMD_REMOTEPROC + run main_cpsw0_qsgmii_phyinit; run boot_rprocs; +#endif + if test ${boot_fit} -eq 1; + then run get_fit_${boot}; run get_overlaystring; run run_fit; + else; + run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; + fi; diff --git a/include/env/ti/ti_armv7_keystone2.env b/include/env/ti/ti_armv7_keystone2.env new file mode 100644 index 0000000..e0395d3 --- /dev/null +++ b/include/env/ti/ti_armv7_keystone2.env @@ -0,0 +1,61 @@ +name_fw_rd=k2-fw-initrd.cpio.gz +set_rd_spec=setenv rd_spec ${rdaddr}:${filesize} +init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; run set_rd_spec +init_fw_rd_nfs=nfs ${rdaddr} ${nfs_root}/boot/${name_fw_rd}; run set_rd_spec +init_fw_rd_ramfs=setenv rd_spec - +init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; run set_rd_spec + +dfu_bufsiz=0x10000 +dfu_alt_info_mmc= + MLO fat 0 1; + u-boot.img fat 0 1; + uEnv.txt fat 0 1 + +bootdir=/boot +tftp_root=/ +nfs_root=/export +mem_lpae=1 +uinitrd_fixup=1 +addr_ubi=0x82000000 +addr_secdb_key=0xc000000 +name_kern=zImage +addr_mon=0x87000000 +addr_non_sec_mon=0x0c097fc0 +addr_load_sec_bm=0x0c09c000 +run_mon=mon_install ${addr_mon} +run_mon_hs=mon_install ${addr_non_sec_mon} ${addr_load_sec_bm} +run_kern=bootz ${loadaddr} ${rd_spec} ${fdtaddr} +init_net=run args_all args_net +init_nfs=setenv autoload no; dhcp; run args_all args_net +init_ubi=run args_all args_ubi; ubi part ubifs; ubifsmount ubi:rootfs; +get_fdt_net=dhcp ${fdtaddr} ${tftp_root}/${name_fdt} +get_fdt_nfs=nfs ${fdtaddr} ${nfs_root}/boot/${name_fdt} +get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt} +get_kern_net=dhcp ${loadaddr} ${tftp_root}/${name_kern} +get_kern_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_kern} +get_kern_ubi=ubifsload ${loadaddr} ${bootdir}/${name_kern} +get_mon_net=dhcp ${addr_mon} ${tftp_root}/${name_mon} +get_mon_nfs=nfs ${addr_mon} ${nfs_root}/boot/${name_mon} +get_mon_ubi=ubifsload ${addr_mon} ${bootdir}/${name_mon} +get_fit_net=dhcp ${addr_fit} ${tftp_root}/${name_fit} +get_fit_nfs=nfs ${addr_fit} ${nfs_root}/boot/${name_fit} +get_fit_ubi=ubifsload ${addr_fit} ${bootdir}/${name_fit} +get_fit_mmc=load mmc ${bootpart} ${addr_fit} ${bootdir}/${name_fit} +get_uboot_net=dhcp ${loadaddr} ${tftp_root}/${name_uboot} +get_uboot_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_uboot} +burn_uboot_spi=sf probe; sf erase 0 0x100000; sf write ${loadaddr} 0 ${filesize} +burn_uboot_nand=nand erase 0 0x100000; nand write ${loadaddr} 0 ${filesize} +args_all=setenv bootargs console=ttyS0,115200n8 rootwait +args_net=setenv bootargs ${bootargs} rootfstype=nfs root=/dev/nfs rw nfsroot=${serverip}:${nfs_root},${nfs_options} ip=dhcp +nfs_options=v3,tcp,rsize=4096,wsize=4096 +get_fdt_ramfs=dhcp ${fdtaddr} ${tftp_root}/${name_fdt} +get_kern_ramfs=dhcp ${loadaddr} ${tftp_root}/${name_kern} +get_mon_ramfs=dhcp ${addr_mon} ${tftp_root}/${name_mon} +get_fit_ramfs=dhcp ${addr_fit} ${tftp_root}/${name_fit} +get_fs_ramfs=dhcp ${rdaddr} ${tftp_root}/${name_fs} +get_ubi_net=dhcp ${addr_ubi} ${tftp_root}/${name_ubi} +get_ubi_nfs=nfs ${addr_ubi} ${nfs_root}/boot/${name_ubi} +burn_ubi=nand erase.part ubifs; nand write ${addr_ubi} ubifs ${filesize} +init_ramfs=run args_all args_ramfs get_fs_ramfs +args_ramfs=setenv bootargs ${bootargs} rdinit=/sbin/init rw root=/dev/ram0 initrd=0x808080000,80M +no_post=1 diff --git a/include/env/ti/ufs.env b/include/env/ti/ufs.env new file mode 100644 index 0000000..509a87b --- /dev/null +++ b/include/env/ti/ufs.env @@ -0,0 +1,22 @@ +scsirootfstype=ext4 rootwait +ufs_finduuid=part uuid scsi ${bootpart} uuid +args_ufs=setenv devtype scsi;setenv bootpart 1:1; + run ufs_finduuid; + setenv bootargs console = ${console} + ${optargs} + root=PARTUUID=${uuid} rw + rootfstype=${scsirootfstype}; + setenv devtype scsi; + setenv bootpart 1:1 +init_ufs=ufs init; scsi scan; run args_ufs +get_kern_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern} +get_fdt_ufs=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} +get_overlay_ufs= + fdt address ${fdtaddr}; + fdt resize 0x100000; + for overlay in $name_overlays; + do; + load scsi ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && + fdt apply ${dtboaddr}; + done; + diff --git a/include/env/ti/ufs.h b/include/env/ti/ufs.h new file mode 100644 index 0000000..6619ec9 --- /dev/null +++ b/include/env/ti/ufs.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for UFS on TI boards. + */ + +#ifndef __TI_UFS_H +#define __TI_UFS_H + +#define DEFAULT_UFS_TI_ARGS \ + "scsirootfstype=ext4 rootwait\0" \ + "ufs_finduuid=part uuid scsi ${bootpart} uuid\0" \ + "args_ufs=setenv devtype scsi;setenv bootpart 1:1;" \ + "run ufs_finduuid;setenv bootargs console = ${console} " \ + "${optargs}" \ + "root=PARTUUID=${uuid} rw " \ + "rootfstype=${scsirootfstype};" \ + "setenv devtype scsi;" \ + "setenv bootpart 1:1\0" \ + "init_ufs=ufs init; scsi scan; run args_ufs\0" \ + "get_kern_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern}\0" \ + "get_fdt_ufs=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "get_overlay_ufs=" \ + "fdt address ${fdtaddr};" \ + "fdt resize 0x100000;" \ + "for overlay in $name_overlays;" \ + "do;" \ + "load scsi ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \ + "fdt apply ${dtboaddr};" \ + "done;\0" + +#endif diff --git a/include/environment/distro/sf.h b/include/environment/distro/sf.h deleted file mode 100644 index ee48a8a..0000000 --- a/include/environment/distro/sf.h +++ /dev/null @@ -1,41 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2020 Amarula Solutions(India) - * - * SF distro configurations. - */ - -#ifndef __DISTRO_SF_CONFIG_H -#define __DISTRO_SF_CONFIG_H - -#if IS_ENABLED(CONFIG_CMD_SF) -#define BOOTENV_SHARED_SF(devtypel) \ - #devtypel "_boot=" \ - "if " #devtypel " probe ${busnum}; then " \ - "devtype=" #devtypel "; " \ - "run scan_sf_for_scripts; " \ - "fi\0" -#define BOOTENV_DEV_SF(devtypeu, devtypel, instance) \ - "bootcmd_" #devtypel #instance "=" \ - "busnum=" #instance "; " \ - "run " #devtypel "_boot\0" -#define BOOTENV_DEV_NAME_SF(devtypeu, devtypel, instance) \ - #devtypel #instance " " -#else -#define BOOTENV_SHARED_SF(devtypel) -#define BOOTENV_DEV_SF \ - BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF -#define BOOTENV_DEV_NAME_SF \ - BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF - -#endif /* CONFIG_CMD_SF */ - -#define BOOTENV_SF \ - BOOTENV_SHARED_SF(sf) \ - "scan_sf_for_scripts=" \ - "${devtype} read ${scriptaddr} " \ - "${script_offset_f} ${script_size_f}; " \ - "source ${scriptaddr}; " \ - "echo SCRIPT FAILED: continuing...\0" - -#endif /* __DISTRO_SF_CONFIG_H */ diff --git a/include/environment/pg-wcom/common.env b/include/environment/pg-wcom/common.env deleted file mode 100644 index 4b660ce..0000000 --- a/include/environment/pg-wcom/common.env +++ /dev/null @@ -1,68 +0,0 @@ - -#ifndef WCOM_UBI_PARTITION_APP -/* one flash chip only called boot */ -# define WCOM_UBI_LINUX_MTD ubi.mtd=ubi0 -ubiattach=ubi part ubi0 -#else /* WCOM_UBI_PARTITION_APP */ -/* two flash chips called boot and app */ -# define WCOM_UBI_LINUX_MTD ubi.mtd=ubi0 ubi.mtd=ubi1 -ubiattach=if test ${boot_bank} -eq 0; - then; - ubi part ubi0; - else; - ubi part ubi1; - fi -#endif /* WCOMC_UBI_PARTITION_APP */ - -actual_bank=0 - -add_default=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off: - console=ttyS0,${baudrate} mem=${kernelmem} init=${init} - phram.phram=phvar,${varaddr},CONFIG_KM_PHRAM - WCOM_UBI_LINUX_MTD - -addpanic=setenv bootargs ${bootargs} panic=1 panic_on_oops=1 -altbootcmd=run bootcmd -backup_bank=0 -boot=bootm ${load_addr_r} - ${fdt_addr_r} - -bootcmd=km_checkbidhwk && - setenv bootcmd 'if km_checktestboot; - then; - setenv boot_bank ${test_bank}; - else; - setenv boot_bank ${actual_bank}; - fi; - run ${subbootcmds}; reset' && - setenv altbootcmd 'setenv boot_bank ${backup_bank}; - run ${subbootcmds}; - reset' && - saveenv && - saveenv && - boot - -cramfsaddr=CONFIG_KM_CRAMFS_ADDR -cramfsloadfdt=cramfsload ${fdt_addr_r} fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb -cramfsloadkernel=cramfsload ${load_addr_r} ${uimage} - -develop=tftp ${load_addr_r} scripts/develop-${arch}.txt && - env import -t ${load_addr_r} ${filesize} && - run setup_debug_env - -env_version=1 -fdt_addr_r=CONFIG_KM_FDT_ADDR -flashargs=setenv bootargs root=mtdblock:rootfs${boot_bank} rootfstype=squashfs ro -init=/sbin/init-overlay.sh -load=tftpboot ${load_addr_r} ${hostname}/u-boot.bin -load_addr_r=CONFIG_KM_KERNEL_ADDR -pnvramsize=CONFIG_KM_PNVRAM - -ramfs=tftp ${load_addr_r} scripts/ramfs-${arch}.txt && - env import -t ${load_addr_r} ${filesize} && - run setup_debug_env - -release=run newenv; reset -subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt set_fdthigh - cramfsloadkernel flashargs add_default addpanic boot -testbootcmd=setenv boot_bank ${test_bank}; run ${subbootcmds}; reset -ubicopy=ubi read ${cramfsaddr} bootfs${boot_bank} diff --git a/include/environment/pg-wcom/ls102xa.env b/include/environment/pg-wcom/ls102xa.env deleted file mode 100644 index 5b5bda9..0000000 --- a/include/environment/pg-wcom/ls102xa.env +++ /dev/null @@ -1,29 +0,0 @@ -#define WCOM_UBI_PARTITION_APP - -#include - -EEprom_ivm=pca9547:70:9 -boot=bootm $load_addr_r - $fdt_addr_r -checkfdt=true -cramfsloadfdt=cramfsload $fdt_addr_r fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb -ethrotate=no -hwconfig=devdis:esdhc,usb3,usb2,sata,sec,dcu,duart2,qspi,can1,can2_4,ftm2_8,i2c2_3,sai1_4,lpuart2_6,asrc,spdif,lpuart1,ftm1 -netdev=eth2 - -newenv=protect off CONFIG_ENV_ADDR_REDUND +0x40000 && - erase CONFIG_ENV_ADDR_REDUND +0x40000 && - protect on CONFIG_ENV_ADDR_REDUND +0x40000 - -set_fdthigh=true - -update=protect off CONFIG_SYS_MONITOR_BASE +${filesize} && - erase CONFIG_SYS_MONITOR_BASE +${filesize} && - cp.b ${load_addr_r} CONFIG_SYS_MONITOR_BASE ${filesize} && - protect on CONFIG_SYS_MONITOR_BASE +${filesize} - -update-nor=protect off CONFIG_SYS_FLASH_BASE +${filesize} && - erase CONFIG_SYS_FLASH_BASE +${filesize} && - cp.b ${load_addr_r} CONFIG_SYS_FLASH_BASE ${filesize} && - protect on CONFIG_SYS_MONITOR_BASE +0x100000 - -uimage=uImage diff --git a/include/environment/pg-wcom/powerpc.env b/include/environment/pg-wcom/powerpc.env deleted file mode 100644 index 744c073..0000000 --- a/include/environment/pg-wcom/powerpc.env +++ /dev/null @@ -1,16 +0,0 @@ -#define BOOTFLASH_START 0xF0000000 - -arch=ppc_82xx -bootm_mapsize=CONFIG_SYS_BOOTM_LEN -checkfdt=true -set_fdthigh=true - -update=protect off BOOTFLASH_START +${filesize} && - erase BOOTFLASH_START +${filesize} && - cp.b ${load_addr_r} BOOTFLASH_START ${filesize} && - protect on BOOTFLASH_START +${filesize} - -newenv=prot off CONFIG_ENV_ADDR +0x40000 && - era CONFIG_ENV_ADDR +0x40000 - -unlock=yes diff --git a/include/environment/ti/dfu.h b/include/environment/ti/dfu.h deleted file mode 100644 index 3c90570..0000000 --- a/include/environment/ti/dfu.h +++ /dev/null @@ -1,81 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com - * - * Environment variable definitions for DFU on TI boards. - */ - -#ifndef __TI_DFU_H -#define __TI_DFU_H - -#define DFU_ALT_INFO_MMC \ - "dfu_alt_info_mmc=" \ - "boot part 0 1;" \ - "rootfs part 0 2;" \ - "MLO fat 0 1;" \ - "MLO.raw raw 0x100 0x200;" \ - "u-boot.img.raw raw 0x300 0x1000;" \ - "u-env.raw raw 0x1300 0x200;" \ - "spl-os-args.raw raw 0x1500 0x200;" \ - "spl-os-image.raw raw 0x1700 0x6900;" \ - "spl-os-args fat 0 1;" \ - "spl-os-image fat 0 1;" \ - "u-boot.img fat 0 1;" \ - "uEnv.txt fat 0 1\0" - -#define DFU_ALT_INFO_EMMC \ - "dfu_alt_info_emmc=" \ - "rawemmc raw 0 3751936;" \ - "boot part 1 1;" \ - "rootfs part 1 2;" \ - "MLO fat 1 1;" \ - "MLO.raw raw 0x100 0x200;" \ - "u-boot.img.raw raw 0x300 0x1000;" \ - "u-env.raw raw 0x1300 0x200;" \ - "spl-os-args.raw raw 0x1500 0x200;" \ - "spl-os-image.raw raw 0x1700 0x6900;" \ - "spl-os-args fat 1 1;" \ - "spl-os-image fat 1 1;" \ - "u-boot.img fat 1 1;" \ - "uEnv.txt fat 1 1\0" - -#ifdef CONFIG_MTD_RAW_NAND -#define DFU_ALT_INFO_NAND \ - "dfu_alt_info_nand=" \ - "SPL part 0 1;" \ - "SPL.backup1 part 0 2;" \ - "SPL.backup2 part 0 3;" \ - "SPL.backup3 part 0 4;" \ - "u-boot part 0 5;" \ - "u-boot-spl-os part 0 6;" \ - "kernel part 0 8;" \ - "rootfs part 0 9\0" -#else -#define DFU_ALT_INFO_NAND "" -#endif - -#define DFU_ALT_INFO_RAM \ - "dfu_alt_info_ram=" \ - "kernel ram 0x80200000 0x4000000;" \ - "fdt ram 0x80f80000 0x80000;" \ - "ramdisk ram 0x81000000 0x4000000\0" - -#define DFU_ALT_INFO_QSPI_XIP \ - "dfu_alt_info_qspi=" \ - "u-boot.bin raw 0x0 0x080000;" \ - "u-boot.backup raw 0x080000 0x080000;" \ - "u-boot-spl-os raw 0x100000 0x010000;" \ - "u-boot-env raw 0x110000 0x010000;" \ - "u-boot-env.backup raw 0x120000 0x010000;" \ - "kernel raw 0x130000 0x800000\0" - -#define DFU_ALT_INFO_QSPI \ - "dfu_alt_info_qspi=" \ - "MLO raw 0x0 0x040000;" \ - "u-boot.img raw 0x040000 0x0100000;" \ - "u-boot-spl-os raw 0x140000 0x080000;" \ - "u-boot-env raw 0x1C0000 0x010000;" \ - "u-boot-env.backup raw 0x1D0000 0x010000;" \ - "kernel raw 0x1E0000 0x800000\0" - -#endif /* __TI_DFU_H */ diff --git a/include/environment/ti/k3_dfu.env b/include/environment/ti/k3_dfu.env deleted file mode 100644 index 2015296..0000000 --- a/include/environment/ti/k3_dfu.env +++ /dev/null @@ -1,30 +0,0 @@ -dfu_alt_info_mmc= - boot part 1 1; - rootfs part 1 2; - tiboot3.bin fat 1 1; - tispl.bin fat 1 1; - u-boot.img fat 1 1; - uEnv.txt fat 1 1; - sysfw.itb fat 1 1 - -dfu_alt_info_emmc= - rawemmc raw 0 0x800000 mmcpart 1; - rootfs part 0 1 mmcpart 0; - tiboot3.bin.raw raw 0x0 0x400 mmcpart 1; - tispl.bin.raw raw 0x400 0x1000 mmcpart 1; - u-boot.img.raw raw 0x1400 0x2000 mmcpart 1; - u-env.raw raw 0x3400 0x100 mmcpart 1; - sysfw.itb.raw raw 0x3600 0x800 mmcpart 1 - -dfu_alt_info_ospi= - tiboot3.bin raw 0x0 0x080000; - tispl.bin raw 0x080000 0x200000; - u-boot.img raw 0x280000 0x400000; - u-boot-env raw 0x680000 0x020000; - sysfw.itb raw 0x6c0000 0x100000; - rootfs raw 0x800000 0x3800000 - -dfu_alt_info_ram= - tispl.bin ram 0x80080000 0x200000; - u-boot.img ram 0x81000000 0x400000 - diff --git a/include/environment/ti/k3_dfu.h b/include/environment/ti/k3_dfu.h deleted file mode 100644 index a16a3ad..0000000 --- a/include/environment/ti/k3_dfu.h +++ /dev/null @@ -1,46 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com - * - * Environment variable definitions for DFU on TI K3 SoCs. - * - */ - -#ifndef __TI_DFU_H -#define __TI_DFU_H - -#define DFU_ALT_INFO_MMC \ - "dfu_alt_info_mmc=" \ - "boot part 1 1;" \ - "rootfs part 1 2;" \ - "tiboot3.bin fat 1 1;" \ - "tispl.bin fat 1 1;" \ - "u-boot.img fat 1 1;" \ - "uEnv.txt fat 1 1;" \ - "sysfw.itb fat 1 1\0" - -#define DFU_ALT_INFO_EMMC \ - "dfu_alt_info_emmc=" \ - "rawemmc raw 0 0x800000 mmcpart 1;" \ - "rootfs part 0 1 mmcpart 0;" \ - "tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;" \ - "tispl.bin.raw raw 0x400 0x1000 mmcpart 1;" \ - "u-boot.img.raw raw 0x1400 0x2000 mmcpart 1;" \ - "u-env.raw raw 0x3400 0x100 mmcpart 1;" \ - "sysfw.itb.raw raw 0x3600 0x800 mmcpart 1\0" - -#define DFU_ALT_INFO_OSPI \ - "dfu_alt_info_ospi=" \ - "tiboot3.bin raw 0x0 0x080000;" \ - "tispl.bin raw 0x080000 0x200000;" \ - "u-boot.img raw 0x280000 0x400000;" \ - "u-boot-env raw 0x680000 0x020000;" \ - "sysfw.itb raw 0x6c0000 0x100000;" \ - "rootfs raw 0x800000 0x3800000\0" - -#define DFU_ALT_INFO_RAM \ - "dfu_alt_info_ram=" \ - "tispl.bin ram 0x80080000 0x200000;" \ - "u-boot.img ram 0x81000000 0x400000\0" \ - -#endif /* __TI_DFU_H */ diff --git a/include/environment/ti/k3_rproc.env b/include/environment/ti/k3_rproc.env deleted file mode 100644 index 87d9d76..0000000 --- a/include/environment/ti/k3_rproc.env +++ /dev/null @@ -1,26 +0,0 @@ -dorprocboot=0 -boot_rprocs= - if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then - rproc init; - run boot_rprocs_mmc; - fi; -rproc_load_and_boot_one= - if load mmc ${bootpart} $loadaddr ${rproc_fw}; then - if rproc load ${rproc_id} ${loadaddr} ${filesize}; then - rproc start ${rproc_id}; - fi; - fi -boot_rprocs_mmc= - env set rproc_id; - env set rproc_fw; - for i in ${rproc_fw_binaries} ; do - if test -z "${rproc_id}" ; then - env set rproc_id $i; - else - env set rproc_fw $i; - run rproc_load_and_boot_one; - env set rproc_id; - env set rproc_fw; - fi; - done - diff --git a/include/environment/ti/k3_rproc.h b/include/environment/ti/k3_rproc.h deleted file mode 100644 index 3418cb4..0000000 --- a/include/environment/ti/k3_rproc.h +++ /dev/null @@ -1,52 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com - * - * rproc environment variable definitions for various TI K3 SoCs. - */ - -#ifndef __TI_RPROC_H -#define __TI_RPROC_H - -/* - * should contain a list of tuplies, - * override in board config files with the actual list - */ -#define DEFAULT_RPROCS "" - -#ifdef CONFIG_CMD_REMOTEPROC -#define EXTRA_ENV_RPROC_SETTINGS \ - "dorprocboot=0\0" \ - "boot_rprocs=" \ - "if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then "\ - "rproc init;" \ - "run boot_rprocs_mmc;" \ - "fi;\0" \ - "rproc_load_and_boot_one=" \ - "if load mmc ${bootpart} $loadaddr ${rproc_fw}; then " \ - "if rproc load ${rproc_id} ${loadaddr} ${filesize}; then "\ - "rproc start ${rproc_id};" \ - "fi;" \ - "fi\0" \ - "boot_rprocs_mmc=" \ - "env set rproc_id;" \ - "env set rproc_fw;" \ - "for i in ${rproc_fw_binaries} ; do " \ - "if test -z \"${rproc_id}\" ; then " \ - "env set rproc_id $i;" \ - "else " \ - "env set rproc_fw $i;" \ - "run rproc_load_and_boot_one;" \ - "env set rproc_id;" \ - "env set rproc_fw;" \ - "fi;" \ - "done\0" \ - "rproc_fw_binaries=" \ - DEFAULT_RPROCS \ - "\0" -#else -#define EXTRA_ENV_RPROC_SETTINGS \ - "boot_rprocs= \0" -#endif /* CONFIG_CMD_REMOTEPROC */ - -#endif /* __TI_RPROC_H */ diff --git a/include/environment/ti/mmc.env b/include/environment/ti/mmc.env deleted file mode 100644 index 6fb47fb..0000000 --- a/include/environment/ti/mmc.env +++ /dev/null @@ -1,76 +0,0 @@ -mmcdev=0 -mmcrootfstype=ext4 rootwait -finduuid=part uuid ${boot} ${bootpart} uuid -args_mmc=run finduuid;setenv bootargs console=${console} - ${optargs} - root=PARTUUID=${uuid} rw - rootfstype=${mmcrootfstype} -loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr -bootscript=echo Running bootscript from mmc${mmcdev} ...; - source ${loadaddr} -bootenvfile=uEnv.txt -importbootenv=echo Importing environment from mmc${mmcdev} ...; - env import -t ${loadaddr} ${filesize} -loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile} -loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile} -loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile} -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt} -envboot=mmc dev ${mmcdev}; - if mmc rescan; then - echo SD/MMC found on device ${mmcdev}; - if run loadbootscript; then - run bootscript; - else - if run loadbootenv; then - echo Loaded env from ${bootenvfile}; - run importbootenv; - fi; - if test -n $uenvcmd; then - echo Running uenvcmd ...; - run uenvcmd; - fi; - fi; - fi; -mmcloados= - if test ${boot_fdt} = yes || test ${boot_fdt} = try; then - if run get_fdt_mmc; then - bootz ${loadaddr} - ${fdtaddr}; - else - if test ${boot_fdt} = try; then - bootz; - else - echo WARN: Cannot load the DT; - fi; - fi; - else - bootz; - fi; -mmcboot=mmc dev ${mmcdev}; - devnum=${mmcdev}; - devtype=mmc; - if mmc rescan; then - echo SD/MMC found on device ${mmcdev}; - if run loadimage; then - run args_mmc; - if test ${boot_fit} -eq 1; then - run run_fit; - else - run mmcloados; - fi; - fi; -fi; - -init_mmc=run args_all args_mmc -get_overlay_mmc= - fdt address ${fdtaddr}; - fdt resize 0x100000; - for overlay in $name_overlays; - do; - load mmc ${bootpart} ${dtboaddr} ${bootdir}/dtb/${overlay} && - fdt apply ${dtboaddr}; - done; -get_kern_mmc=load mmc ${bootpart} ${loadaddr} - ${bootdir}/${name_kern} -get_fit_mmc=load mmc ${bootpart} ${addr_fit} - ${bootdir}/${name_fit} -partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs} diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h deleted file mode 100644 index 769ea9d..0000000 --- a/include/environment/ti/mmc.h +++ /dev/null @@ -1,73 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com - * - * Environment variable definitions for MMC/SD on TI boards. - */ - -#ifndef __TI_MMC_H -#define __TI_MMC_H - -#define DEFAULT_MMC_TI_ARGS \ - "mmcdev=0\0" \ - "mmcrootfstype=ext4 rootwait\0" \ - "finduuid=part uuid ${boot} ${bootpart} uuid\0" \ - "args_mmc=run finduuid;setenv bootargs console=${console} " \ - "${optargs} " \ - "root=PARTUUID=${uuid} rw " \ - "rootfstype=${mmcrootfstype}\0" \ - "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ - "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ - "source ${loadaddr}\0" \ - "bootenvfile=uEnv.txt\0" \ - "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ - "env import -t ${loadaddr} ${filesize}\0" \ - "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \ - "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ - "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ - "envboot=mmc dev ${mmcdev}; " \ - "if mmc rescan; then " \ - "echo SD/MMC found on device ${mmcdev};" \ - "if run loadbootscript; then " \ - "run bootscript;" \ - "else " \ - "if run loadbootenv; then " \ - "echo Loaded env from ${bootenvfile};" \ - "run importbootenv;" \ - "fi;" \ - "if test -n $uenvcmd; then " \ - "echo Running uenvcmd ...;" \ - "run uenvcmd;" \ - "fi;" \ - "fi;" \ - "fi;\0" \ - "mmcloados=" \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if run loadfdt; then " \ - "bootz ${loadaddr} - ${fdtaddr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootz; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootz; " \ - "fi;\0" \ - "mmcboot=mmc dev ${mmcdev}; " \ - "devnum=${mmcdev}; " \ - "devtype=mmc; " \ - "if mmc rescan; then " \ - "echo SD/MMC found on device ${mmcdev};" \ - "if run loadimage; then " \ - "run args_mmc; " \ - "if test ${boot_fit} -eq 1; then " \ - "run run_fit; " \ - "else " \ - "run mmcloados;" \ - "fi;" \ - "fi;" \ - "fi;\0" - -#endif /* __TI_MMC_H */ diff --git a/include/environment/ti/nand.env b/include/environment/ti/nand.env deleted file mode 100644 index 4e185c1..0000000 --- a/include/environment/ti/nand.env +++ /dev/null @@ -1,14 +0,0 @@ -mtdids=nor0=47040000.spi.0,nor0=47034000.hyperbus -mtdparts=mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k(ospi.phypattern);47034000.hyperbus:512k(hbmc.tiboot3),2m(hbmc.tispl),4m(hbmc.u-boot),256k(hbmc.env),-@8m(hbmc.rootfs) -nandargs=setenv bootargs console=${console} - ${optargs} - root=${nandroot} - rootfstype=${nandrootfstype} -nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048 -nandrootfstype=ubifs rootwait -nandboot=echo Booting from nand ...; - run nandargs; - nand read ${fdtaddr} NAND.u-boot-spl-os; - nand read ${loadaddr} NAND.kernel; - bootz ${loadaddr} - ${fdtaddr} - diff --git a/include/environment/ti/nand.h b/include/environment/ti/nand.h deleted file mode 100644 index 7d00afa..0000000 --- a/include/environment/ti/nand.h +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com - * - * Environment variable definitions for NAND on TI boards. - */ - -#ifdef CONFIG_MTD_RAW_NAND -#define NANDARGS \ - "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ - "nandargs=setenv bootargs console=${console} " \ - "${optargs} " \ - "root=${nandroot} " \ - "rootfstype=${nandrootfstype}\0" \ - "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \ - "nandrootfstype=ubifs rootwait\0" \ - "nandboot=echo Booting from nand ...; " \ - "run nandargs; " \ - "nand read ${fdtaddr} NAND.u-boot-spl-os; " \ - "nand read ${loadaddr} NAND.kernel; " \ - "bootz ${loadaddr} - ${fdtaddr}\0" -#else -#define NANDARGS "" -#endif diff --git a/include/environment/ti/ti_armv7_common.env b/include/environment/ti/ti_armv7_common.env deleted file mode 100644 index e87a41a..0000000 --- a/include/environment/ti/ti_armv7_common.env +++ /dev/null @@ -1,34 +0,0 @@ -loadaddr=0x82000000 -kernel_addr_r=0x82000000 -fdtaddr=0x88000000 -dtboaddr=0x89000000 -fdt_addr_r=0x88000000 -fdtoverlay_addr_r=0x89000000 -rdaddr=0x88080000 -ramdisk_addr_r=0x88080000 -scriptaddr=0x80000000 -pxefile_addr_r=0x80100000 -bootm_size=0x10000000 -boot_fdt=try - -boot_fit=0 -addr_fit=0x90000000 -name_fit=fitImage -update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit} -get_overlaystring= - for overlay in $name_overlays; - do; - setenv overlaystring ${overlaystring}'#'${overlay}; - done; -get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile} -run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring} -bootcmd_ti_mmc= - run findfdt; run init_${boot}; -#if CONFIG_CMD_REMOTEPROC - run main_cpsw0_qsgmii_phyinit; run boot_rprocs; -#endif - if test ${boot_fit} -eq 1; - then run get_fit_${boot}; run get_overlaystring; run run_fit; - else; - run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; - fi; diff --git a/include/environment/ti/ti_armv7_keystone2.env b/include/environment/ti/ti_armv7_keystone2.env deleted file mode 100644 index e0395d3..0000000 --- a/include/environment/ti/ti_armv7_keystone2.env +++ /dev/null @@ -1,61 +0,0 @@ -name_fw_rd=k2-fw-initrd.cpio.gz -set_rd_spec=setenv rd_spec ${rdaddr}:${filesize} -init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; run set_rd_spec -init_fw_rd_nfs=nfs ${rdaddr} ${nfs_root}/boot/${name_fw_rd}; run set_rd_spec -init_fw_rd_ramfs=setenv rd_spec - -init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; run set_rd_spec - -dfu_bufsiz=0x10000 -dfu_alt_info_mmc= - MLO fat 0 1; - u-boot.img fat 0 1; - uEnv.txt fat 0 1 - -bootdir=/boot -tftp_root=/ -nfs_root=/export -mem_lpae=1 -uinitrd_fixup=1 -addr_ubi=0x82000000 -addr_secdb_key=0xc000000 -name_kern=zImage -addr_mon=0x87000000 -addr_non_sec_mon=0x0c097fc0 -addr_load_sec_bm=0x0c09c000 -run_mon=mon_install ${addr_mon} -run_mon_hs=mon_install ${addr_non_sec_mon} ${addr_load_sec_bm} -run_kern=bootz ${loadaddr} ${rd_spec} ${fdtaddr} -init_net=run args_all args_net -init_nfs=setenv autoload no; dhcp; run args_all args_net -init_ubi=run args_all args_ubi; ubi part ubifs; ubifsmount ubi:rootfs; -get_fdt_net=dhcp ${fdtaddr} ${tftp_root}/${name_fdt} -get_fdt_nfs=nfs ${fdtaddr} ${nfs_root}/boot/${name_fdt} -get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt} -get_kern_net=dhcp ${loadaddr} ${tftp_root}/${name_kern} -get_kern_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_kern} -get_kern_ubi=ubifsload ${loadaddr} ${bootdir}/${name_kern} -get_mon_net=dhcp ${addr_mon} ${tftp_root}/${name_mon} -get_mon_nfs=nfs ${addr_mon} ${nfs_root}/boot/${name_mon} -get_mon_ubi=ubifsload ${addr_mon} ${bootdir}/${name_mon} -get_fit_net=dhcp ${addr_fit} ${tftp_root}/${name_fit} -get_fit_nfs=nfs ${addr_fit} ${nfs_root}/boot/${name_fit} -get_fit_ubi=ubifsload ${addr_fit} ${bootdir}/${name_fit} -get_fit_mmc=load mmc ${bootpart} ${addr_fit} ${bootdir}/${name_fit} -get_uboot_net=dhcp ${loadaddr} ${tftp_root}/${name_uboot} -get_uboot_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_uboot} -burn_uboot_spi=sf probe; sf erase 0 0x100000; sf write ${loadaddr} 0 ${filesize} -burn_uboot_nand=nand erase 0 0x100000; nand write ${loadaddr} 0 ${filesize} -args_all=setenv bootargs console=ttyS0,115200n8 rootwait -args_net=setenv bootargs ${bootargs} rootfstype=nfs root=/dev/nfs rw nfsroot=${serverip}:${nfs_root},${nfs_options} ip=dhcp -nfs_options=v3,tcp,rsize=4096,wsize=4096 -get_fdt_ramfs=dhcp ${fdtaddr} ${tftp_root}/${name_fdt} -get_kern_ramfs=dhcp ${loadaddr} ${tftp_root}/${name_kern} -get_mon_ramfs=dhcp ${addr_mon} ${tftp_root}/${name_mon} -get_fit_ramfs=dhcp ${addr_fit} ${tftp_root}/${name_fit} -get_fs_ramfs=dhcp ${rdaddr} ${tftp_root}/${name_fs} -get_ubi_net=dhcp ${addr_ubi} ${tftp_root}/${name_ubi} -get_ubi_nfs=nfs ${addr_ubi} ${nfs_root}/boot/${name_ubi} -burn_ubi=nand erase.part ubifs; nand write ${addr_ubi} ubifs ${filesize} -init_ramfs=run args_all args_ramfs get_fs_ramfs -args_ramfs=setenv bootargs ${bootargs} rdinit=/sbin/init rw root=/dev/ram0 initrd=0x808080000,80M -no_post=1 diff --git a/include/environment/ti/ufs.env b/include/environment/ti/ufs.env deleted file mode 100644 index 509a87b..0000000 --- a/include/environment/ti/ufs.env +++ /dev/null @@ -1,22 +0,0 @@ -scsirootfstype=ext4 rootwait -ufs_finduuid=part uuid scsi ${bootpart} uuid -args_ufs=setenv devtype scsi;setenv bootpart 1:1; - run ufs_finduuid; - setenv bootargs console = ${console} - ${optargs} - root=PARTUUID=${uuid} rw - rootfstype=${scsirootfstype}; - setenv devtype scsi; - setenv bootpart 1:1 -init_ufs=ufs init; scsi scan; run args_ufs -get_kern_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern} -get_fdt_ufs=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} -get_overlay_ufs= - fdt address ${fdtaddr}; - fdt resize 0x100000; - for overlay in $name_overlays; - do; - load scsi ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && - fdt apply ${dtboaddr}; - done; - diff --git a/include/environment/ti/ufs.h b/include/environment/ti/ufs.h deleted file mode 100644 index 6619ec9..0000000 --- a/include/environment/ti/ufs.h +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com - * - * Environment variable definitions for UFS on TI boards. - */ - -#ifndef __TI_UFS_H -#define __TI_UFS_H - -#define DEFAULT_UFS_TI_ARGS \ - "scsirootfstype=ext4 rootwait\0" \ - "ufs_finduuid=part uuid scsi ${bootpart} uuid\0" \ - "args_ufs=setenv devtype scsi;setenv bootpart 1:1;" \ - "run ufs_finduuid;setenv bootargs console = ${console} " \ - "${optargs}" \ - "root=PARTUUID=${uuid} rw " \ - "rootfstype=${scsirootfstype};" \ - "setenv devtype scsi;" \ - "setenv bootpart 1:1\0" \ - "init_ufs=ufs init; scsi scan; run args_ufs\0" \ - "get_kern_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern}\0" \ - "get_fdt_ufs=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ - "get_overlay_ufs=" \ - "fdt address ${fdtaddr};" \ - "fdt resize 0x100000;" \ - "for overlay in $name_overlays;" \ - "do;" \ - "load scsi ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \ - "fdt apply ${dtboaddr};" \ - "done;\0" - -#endif -- cgit v1.1 From 63af90e7f0cab3b5197c19744f5e807ebc325c81 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:46 -0600 Subject: env: Explain how to use #include files in text environment Provide documentation on how to share common settings among boards. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- doc/usage/environment.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/usage/environment.rst b/doc/usage/environment.rst index 91dc07b..c6439dd 100644 --- a/doc/usage/environment.rst +++ b/doc/usage/environment.rst @@ -81,6 +81,12 @@ Example:: echo CONFIG_SYS_BOARD boot failed - please check your image echo Load address is CONFIG_SYS_LOAD_ADDR +Settings which are common to a group of boards can use #include to bring in +a common file in the `include/env` directory, containing environment +settings. For example:: + + #include + If CONFIG_ENV_SOURCE_FILE is empty and the default filename is not present, then the old-style C environment is used instead. See below. -- cgit v1.1 From edd53bda53b9489aafe6b728b2b71044bb92f248 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:47 -0600 Subject: x86: Drop CFG_SYS_STACK_SIZE This is only used in one file and the value is the same for both boards which define it. Use the fixed value of 32KB and drop the CFG. This will allow removal of the config.h files. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- arch/x86/lib/physmem.c | 3 ++- include/configs/edison.h | 4 ---- include/configs/x86-common.h | 10 ---------- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/arch/x86/lib/physmem.c b/arch/x86/lib/physmem.c index 1eb97ac..382f768 100644 --- a/arch/x86/lib/physmem.c +++ b/arch/x86/lib/physmem.c @@ -14,6 +14,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -144,7 +145,7 @@ static void x86_phys_memset_page(phys_addr_t map_addr, uintptr_t offset, int c, /* Make sure the window is below U-Boot. */ assert(window + LARGE_PAGE_SIZE < - gd->relocaddr - CONFIG_SYS_MALLOC_LEN - CFG_SYS_STACK_SIZE); + gd->relocaddr - CONFIG_SYS_MALLOC_LEN - SZ_32K); /* Map the page into the window and then memset the appropriate part. */ x86_phys_map_page(window, map_addr, 1); memset((void *)(window + offset), c, size); diff --git a/include/configs/edison.h b/include/configs/edison.h index 455a889..558c74d 100644 --- a/include/configs/edison.h +++ b/include/configs/edison.h @@ -8,8 +8,4 @@ #include -/* Miscellaneous configurable options */ - -#define CFG_SYS_STACK_SIZE (32 * 1024) - #endif diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index c1c5a09..608c5ba 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -11,16 +11,6 @@ #define __CONFIG_X86_COMMON_H /*----------------------------------------------------------------------- - * CPU Features - */ - -#define CFG_SYS_STACK_SIZE (32 * 1024) - -/*----------------------------------------------------------------------- - * Environment configuration - */ - -/*----------------------------------------------------------------------- * USB configuration */ -- cgit v1.1 From dbfb6c096ed1088b3fa2eb9a140393089a3bd731 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:48 -0600 Subject: x86: i8254: Include required ibmpc.h header This is needed for this file, so include it here explicitly. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- arch/x86/lib/i8254.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/lib/i8254.c b/arch/x86/lib/i8254.c index 0f97538..a8d1db1 100644 --- a/arch/x86/lib/i8254.c +++ b/arch/x86/lib/i8254.c @@ -7,6 +7,7 @@ #include #include #include +#include #define TIMER1_VALUE 18 /* 15.6us */ #define BEEP_FREQUENCY_HZ 440 -- cgit v1.1 From c0def3207db502e2fab6dec90c035d0f067efdac Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:49 -0600 Subject: x86: edison: Drop inclusion of ibmpc.h This should be included by files that need it, not the config.h file. Drop it. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/edison.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/include/configs/edison.h b/include/configs/edison.h index 558c74d..127c2c4 100644 --- a/include/configs/edison.h +++ b/include/configs/edison.h @@ -2,10 +2,3 @@ /* * Copyright (c) 2017 Intel Corp. */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#endif -- cgit v1.1 From 8c0090b0690c292cb46e690a33489ecbb1396975 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:50 -0600 Subject: x86: Drop inclusion of ibmpc.h This is not needed in this file anymore. Drop it. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/x86-common.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index 608c5ba..e05f667 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -5,8 +5,6 @@ * Graeme Russ, graeme.russ@gmail.com. */ -#include - #ifndef __CONFIG_X86_COMMON_H #define __CONFIG_X86_COMMON_H -- cgit v1.1 From f726545a62aba1e56f33afc8d95cb76e55720896 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:51 -0600 Subject: x86: Drop unused distro settings No x86 board uses distro boot, so drop these settings. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/configs/x86-common.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index e05f667..8bd0716 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -20,18 +20,11 @@ #define CFG_OTHBOOTARGS "othbootargs=acpi=off\0" #endif -#if defined(CONFIG_DISTRO_DEFAULTS) -#define DISTRO_BOOTENV BOOTENV -#else -#define DISTRO_BOOTENV -#endif - #ifndef SPLASH_SETTINGS #define SPLASH_SETTINGS #endif #define CFG_EXTRA_ENV_SETTINGS \ - DISTRO_BOOTENV \ CFG_STD_DEVICES_SETTINGS \ SPLASH_SETTINGS \ "pciconfighost=1\0" \ -- cgit v1.1 From 876bc404bdcdce8b1a16837a940ae36dc4425e5f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:52 -0600 Subject: x86: Add a common include for environment settings Create a text-file version of x86-common.h which can be used by x86 boards. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- include/env/x86.env | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 include/env/x86.env diff --git a/include/env/x86.env b/include/env/x86.env new file mode 100644 index 0000000..d00d98f --- /dev/null +++ b/include/env/x86.env @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +/* + * Copyright (c) 2011 The Chromium OS Authors. + * (C) Copyright 2008 + * Graeme Russ, graeme.russ@gmail.com + */ + +pciconfighost=1 +netdev=eth0 +consoledev=ttyS0 +scriptaddr=0x7000000 +kernel_addr_r=0x1000000 +ramdisk_addr_r=0x4000000 +ramdiskfile=initramfs.gz + +/* common console settings */ +stdin=serial,i8042-kbd,usbkbd +stdout=serial,vidconsole +stderr=serial,vidconsole -- cgit v1.1 From c49a767a6a9f02eeacadd91c5352fa848c9ec668 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:53 -0600 Subject: x86: coreboot: Convert to text environment Use the common include and add some options specific to this board. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- board/coreboot/coreboot/coreboot.env | 9 +++++++++ include/configs/coreboot.h | 20 -------------------- 2 files changed, 9 insertions(+), 20 deletions(-) create mode 100644 board/coreboot/coreboot/coreboot.env diff --git a/board/coreboot/coreboot/coreboot.env b/board/coreboot/coreboot/coreboot.env new file mode 100644 index 0000000..0f5bb6f --- /dev/null +++ b/board/coreboot/coreboot/coreboot.env @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2018, Bin Meng + */ + +#include + +splashsource=virtio_fs +splashimage=0x1000000 diff --git a/include/configs/coreboot.h b/include/configs/coreboot.h index b4f49bf..e00c408 100644 --- a/include/configs/coreboot.h +++ b/include/configs/coreboot.h @@ -2,23 +2,3 @@ /* * Copyright (C) 2018, Bin Meng */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#define SPLASH_SETTINGS "splashsource=virtio_fs\0" \ - "splashimage=0x1000000\0" - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd,usbkbd\0" \ - "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" - -/* ATA/IDE support */ - -#endif /* __CONFIG_H */ -- cgit v1.1 From f1e7abf4b9f06e64734dc74909fd47d1c935ec9e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:54 -0600 Subject: x86: crownbay: Convert to text environment Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- board/intel/crownbay/crownbay.env | 6 ++++++ include/configs/crownbay.h | 17 ----------------- 2 files changed, 6 insertions(+), 17 deletions(-) create mode 100644 board/intel/crownbay/crownbay.env diff --git a/board/intel/crownbay/crownbay.env b/board/intel/crownbay/crownbay.env new file mode 100644 index 0000000..9e95414 --- /dev/null +++ b/board/intel/crownbay/crownbay.env @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2014, Bin Meng + */ + +#include diff --git a/include/configs/crownbay.h b/include/configs/crownbay.h index 387bb88..0c842dd 100644 --- a/include/configs/crownbay.h +++ b/include/configs/crownbay.h @@ -2,20 +2,3 @@ /* * Copyright (C) 2014, Bin Meng */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd,usbkbd\0" \ - "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" - -/* Environment configuration */ - -#endif /* __CONFIG_H */ -- cgit v1.1 From df827efecdda09b0e947e350a2e9d5388166fe36 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:55 -0600 Subject: x86: bayleybay: Convert to text environment Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- board/intel/bayleybay/bayleybay.env | 9 +++++++++ include/configs/bayleybay.h | 17 ----------------- 2 files changed, 9 insertions(+), 17 deletions(-) create mode 100644 board/intel/bayleybay/bayleybay.env diff --git a/board/intel/bayleybay/bayleybay.env b/board/intel/bayleybay/bayleybay.env new file mode 100644 index 0000000..89e1849 --- /dev/null +++ b/board/intel/bayleybay/bayleybay.env @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2015, Bin Meng + */ + +#include + +/* don't use i8042-kbd */ +stdin=serial,usbkbd diff --git a/include/configs/bayleybay.h b/include/configs/bayleybay.h index b0df328..9b0f5ce 100644 --- a/include/configs/bayleybay.h +++ b/include/configs/bayleybay.h @@ -2,20 +2,3 @@ /* * Copyright (C) 2015, Bin Meng */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial,usbkbd\0" \ - "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" - -/* Environment configuration */ - -#endif /* __CONFIG_H */ -- cgit v1.1 From b5948c5d39fba007c8f4b10ea0007747db479e37 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:56 -0600 Subject: x86: galileo: Convert to text environment Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- board/intel/galileo/galileo.env | 11 +++++++++++ include/configs/galileo.h | 19 ------------------- 2 files changed, 11 insertions(+), 19 deletions(-) create mode 100644 board/intel/galileo/galileo.env diff --git a/board/intel/galileo/galileo.env b/board/intel/galileo/galileo.env new file mode 100644 index 0000000..83e77bb --- /dev/null +++ b/board/intel/galileo/galileo.env @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2015, Bin Meng + */ + +#include + +/* use just serial */ +stdin=serial +stdout=serial +stderr=serial diff --git a/include/configs/galileo.h b/include/configs/galileo.h index 0380ac2..9b0f5ce 100644 --- a/include/configs/galileo.h +++ b/include/configs/galileo.h @@ -2,22 +2,3 @@ /* * Copyright (C) 2015, Bin Meng */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -/* ns16550 UART is memory-mapped in Quark SoC */ - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial\0" \ - "stdout=serial\0" \ - "stderr=serial\0" - -/* Environment configuration */ - -#endif /* __CONFIG_H */ -- cgit v1.1 From a68a7abc3da15a6e441faed1c7dad2f57e66e259 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:57 -0600 Subject: x86: edison: Convert to text environment Don't use the common include since Edison's environment is empty. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- board/intel/edison/edison.env | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 board/intel/edison/edison.env diff --git a/board/intel/edison/edison.env b/board/intel/edison/edison.env new file mode 100644 index 0000000..c7d4de7 --- /dev/null +++ b/board/intel/edison/edison.env @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (c) 2017 Intel Corp. + */ + +/* empty environment */ -- cgit v1.1 From 5ccb18a75210c4f6a09255c430cd01466d1dd85d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:58 -0600 Subject: x86: cherryhill: Convert to text environment Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- board/intel/cherryhill/cherryhill.env | 9 +++++++++ include/configs/cherryhill.h | 13 ------------- 2 files changed, 9 insertions(+), 13 deletions(-) create mode 100644 board/intel/cherryhill/cherryhill.env diff --git a/board/intel/cherryhill/cherryhill.env b/board/intel/cherryhill/cherryhill.env new file mode 100644 index 0000000..929b6a1 --- /dev/null +++ b/board/intel/cherryhill/cherryhill.env @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2017, Bin Meng + */ + +#include + +/* don't use i8042-kbd */ +stdin=serial,usbkbd diff --git a/include/configs/cherryhill.h b/include/configs/cherryhill.h index d6ce70a..a300957 100644 --- a/include/configs/cherryhill.h +++ b/include/configs/cherryhill.h @@ -2,16 +2,3 @@ /* * Copyright (C) 2017, Bin Meng */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=usbkbd,serial\0" \ - "stdout=vidconsole,serial\0" \ - "stderr=vidconsole,serial\0" - -/* Environment configuration */ - -#endif /* __CONFIG_H */ -- cgit v1.1 From c166298ed238f2d654b0bbaafa354541a2de317a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:01:59 -0600 Subject: x86: cougarcanyon2: Convert to text environment Use the common include. The existing environment includes "vga" but that is not valid anymore, so let it use vidconsole Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- board/intel/cougarcanyon2/cougarcanyon2.env | 6 ++++++ include/configs/cougarcanyon2.h | 13 ------------- 2 files changed, 6 insertions(+), 13 deletions(-) create mode 100644 board/intel/cougarcanyon2/cougarcanyon2.env diff --git a/board/intel/cougarcanyon2/cougarcanyon2.env b/board/intel/cougarcanyon2/cougarcanyon2.env new file mode 100644 index 0000000..6329b0f --- /dev/null +++ b/board/intel/cougarcanyon2/cougarcanyon2.env @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2016, Bin Meng + */ + +#include diff --git a/include/configs/cougarcanyon2.h b/include/configs/cougarcanyon2.h index 31639e4..0406786 100644 --- a/include/configs/cougarcanyon2.h +++ b/include/configs/cougarcanyon2.h @@ -2,16 +2,3 @@ /* * Copyright (C) 2016, Bin Meng */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd,usbkbd\0" \ - "stdout=serial,vga\0" \ - "stderr=serial,vga\0" - -/* Environment configuration */ - -#endif /* __CONFIG_H */ -- cgit v1.1 From d9e6318ce9018e3116d1240ffe8b278016c30c83 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:02:00 -0600 Subject: x86: minnowmax: Convert to text environment Use the common include along with some additions. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- board/intel/minnowmax/minnowmax.env | 11 +++++++++++ include/configs/minnowmax.h | 16 ---------------- 2 files changed, 11 insertions(+), 16 deletions(-) create mode 100644 board/intel/minnowmax/minnowmax.env diff --git a/board/intel/minnowmax/minnowmax.env b/board/intel/minnowmax/minnowmax.env new file mode 100644 index 0000000..71f3607 --- /dev/null +++ b/board/intel/minnowmax/minnowmax.env @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2015 Google, Inc + */ + +#include + +/* don't use i8042-kbd */ +stdin=usbkbd,serial + +usb_pgood_delay=40 diff --git a/include/configs/minnowmax.h b/include/configs/minnowmax.h index 842672d..068a2af 100644 --- a/include/configs/minnowmax.h +++ b/include/configs/minnowmax.h @@ -2,19 +2,3 @@ /* * Copyright (C) 2015 Google, Inc */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=usbkbd,serial\0" \ - "stdout=vidconsole,serial\0" \ - "stderr=vidconsole,serial\0" \ - "usb_pgood_delay=40\0" - -#endif /* __CONFIG_H */ -- cgit v1.1 From 2d6ebda7560b29bcc8044b01627eb3d3267806c0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:02:01 -0600 Subject: x86: slimbootloader: Convert to text environment Use the common include along with some additions. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng [Drop common env from slimbootloader.env] Signed-off-by: Bin Meng --- board/intel/slimbootloader/slimbootloader.env | 23 ++++++++++++++++++ include/configs/slimbootloader.h | 35 --------------------------- 2 files changed, 23 insertions(+), 35 deletions(-) create mode 100644 board/intel/slimbootloader/slimbootloader.env diff --git a/board/intel/slimbootloader/slimbootloader.env b/board/intel/slimbootloader/slimbootloader.env new file mode 100644 index 0000000..3fce487 --- /dev/null +++ b/board/intel/slimbootloader/slimbootloader.env @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Intel Corporation + */ + +#include + +/* don't use video */ +stdout=serial +stderr=serial + +usb_pgood_delay=40 + +ramdiskaddr=0x4000000 +ramdiskfile=initrd +bootdev=usb +bootdevnum=0 +bootdevpart=0 +bootfsload=fatload +bootusb=setenv bootdev usb; boot +bootscsi=setenv bootdev scsi; boot +bootmmc=setenv bootdev mmc; boot +bootargs=console=ttyS0,115200 console=tty0 diff --git a/include/configs/slimbootloader.h b/include/configs/slimbootloader.h index 20b99a1..85f6a96 100644 --- a/include/configs/slimbootloader.h +++ b/include/configs/slimbootloader.h @@ -2,38 +2,3 @@ /* * Copyright (C) 2019 Intel Corporation */ - -#ifndef __SLIMBOOTLOADER_CONFIG_H__ -#define __SLIMBOOTLOADER_CONFIG_H__ - -#include - -#define CFG_STD_DEVICES_SETTINGS \ - "stdin=serial,i8042-kbd,usbkbd\0" \ - "stdout=serial\0" \ - "stderr=serial\0" - -/* - * Override CFG_EXTRA_ENV_SETTINGS in x86-common.h - */ -#undef CFG_EXTRA_ENV_SETTINGS -#define CFG_EXTRA_ENV_SETTINGS \ - CFG_STD_DEVICES_SETTINGS \ - "netdev=eth0\0" \ - "consoledev=ttyS0\0" \ - "ramdiskaddr=0x4000000\0" \ - "ramdiskfile=initrd\0" \ - "bootdev=usb\0" \ - "bootdevnum=0\0" \ - "bootdevpart=0\0" \ - "bootfsload=fatload\0" \ - "bootusb=setenv bootdev usb; boot\0" \ - "bootscsi=setenv bootdev scsi; boot\0" \ - "bootmmc=setenv bootdev mmc; boot\0" \ - "bootargs=console=ttyS0,115200 console=tty0\0" - -/* - * Override CONFIG_BOOTCOMMAND in x86-common.h - */ - -#endif /* __SLIMBOOTLOADER_CONFIG_H__ */ -- cgit v1.1 From 6ed1cb3552c0d590f681176878bd625373ea0c6b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:02:02 -0600 Subject: x86: efi-x86_app: Convert to text environment Use the common include. Drop the unnecessary changes, since missing stdio drivers will be ignored. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- board/efi/efi-x86_app/efi-x86_app.env | 6 ++++++ include/configs/efi-x86_app.h | 11 ----------- 2 files changed, 6 insertions(+), 11 deletions(-) create mode 100644 board/efi/efi-x86_app/efi-x86_app.env diff --git a/board/efi/efi-x86_app/efi-x86_app.env b/board/efi/efi-x86_app/efi-x86_app.env new file mode 100644 index 0000000..106836a --- /dev/null +++ b/board/efi/efi-x86_app/efi-x86_app.env @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (c) 2015 Google, Inc + */ + +#include diff --git a/include/configs/efi-x86_app.h b/include/configs/efi-x86_app.h index 843ed8b..d582404 100644 --- a/include/configs/efi-x86_app.h +++ b/include/configs/efi-x86_app.h @@ -2,14 +2,3 @@ /* * Copyright (c) 2015 Google, Inc */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial\0" \ - "stdout=vidconsole\0" \ - "stderr=vidconsole\0" - -#endif -- cgit v1.1 From 17b2398534c5212dd3b32db7d965e813c8a31e59 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:02:03 -0600 Subject: x86: efi-x86_payload: Convert to text environment Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- board/efi/efi-x86_payload/efi-x86_payload.env | 6 ++++++ include/configs/efi-x86_payload.h | 17 ----------------- 2 files changed, 6 insertions(+), 17 deletions(-) create mode 100644 board/efi/efi-x86_payload/efi-x86_payload.env diff --git a/board/efi/efi-x86_payload/efi-x86_payload.env b/board/efi/efi-x86_payload/efi-x86_payload.env new file mode 100644 index 0000000..6a65628 --- /dev/null +++ b/board/efi/efi-x86_payload/efi-x86_payload.env @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2018, Bin Meng + */ + +#include diff --git a/include/configs/efi-x86_payload.h b/include/configs/efi-x86_payload.h index c72b067..e00c408 100644 --- a/include/configs/efi-x86_payload.h +++ b/include/configs/efi-x86_payload.h @@ -2,20 +2,3 @@ /* * Copyright (C) 2018, Bin Meng */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd,usbkbd\0" \ - "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" - -/* ATA/IDE support */ - -#endif /* __CONFIG_H */ -- cgit v1.1 From 3cc409536232017cb69a2339c3d9c7e7a3d3d096 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:02:04 -0600 Subject: x86: qemu: Add required linux/sizes.h include These files rely on the config.h file provided this include. Add it explictily so we can move to a text environment. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- arch/x86/cpu/qemu/dram.c | 1 + arch/x86/cpu/qemu/e820.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/x86/cpu/qemu/dram.c b/arch/x86/cpu/qemu/dram.c index 595c397..1a52d1d 100644 --- a/arch/x86/cpu/qemu/dram.c +++ b/arch/x86/cpu/qemu/dram.c @@ -8,6 +8,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/x86/cpu/qemu/e820.c b/arch/x86/cpu/qemu/e820.c index 19e54c5..ebfe595 100644 --- a/arch/x86/cpu/qemu/e820.c +++ b/arch/x86/cpu/qemu/e820.c @@ -12,6 +12,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; -- cgit v1.1 From 9234b77b9d42ebd77585091a072b4ab958ba83ed Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 30 Jul 2023 21:02:05 -0600 Subject: x86: qemu-x86: Convert to text environment Use the common include. Drop everything from the config.h file. Signed-off-by: Simon Glass Reviewed-by: Andy Shevchenko # Intel Edison Reviewed-by: Bin Meng --- board/emulation/qemu-x86/qemu-x86.env | 6 ++++++ include/configs/qemu-x86.h | 23 ----------------------- 2 files changed, 6 insertions(+), 23 deletions(-) create mode 100644 board/emulation/qemu-x86/qemu-x86.env diff --git a/board/emulation/qemu-x86/qemu-x86.env b/board/emulation/qemu-x86/qemu-x86.env new file mode 100644 index 0000000..adcc1c5 --- /dev/null +++ b/board/emulation/qemu-x86/qemu-x86.env @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2015, Bin Meng + */ + +#include diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h index 3e52352..9b0f5ce 100644 --- a/include/configs/qemu-x86.h +++ b/include/configs/qemu-x86.h @@ -2,26 +2,3 @@ /* * Copyright (C) 2015, Bin Meng */ - -/* - * board/config.h - configuration options, board specific - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#include - -#define CFG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd\0" \ - "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" - -/* - * ATA/SATA support for QEMU x86 targets - * - Only legacy IDE controller is supported for QEMU '-M pc' target - * - AHCI controller is supported for QEMU '-M q35' target - */ - -#endif /* __CONFIG_H */ -- cgit v1.1