Patch u-boot targets to use "distro_bootcmd" so a u-boot script does not
have to be provided to load EFI payloads. omap4/cubox-i/sunxi and many
others already default to this. Only compile tested due to lack of hardware.
utilite
http://pkgs.fedoraproject.org/cgit/rpms/uboot-tools.git/plain/0005-port-utilite-to-distro-generic-boot-commands.patch
omap3 beagle
8ea945ff9d
.patch
omap5/beagleboard x15
https://anonscm.debian.org/git/collab-maint/u-boot.git/plain/debian/patches/am57xx/omap5_distro_bootcmd?h=experimental-2016.07
This commit is contained in:
parent
b917e4ac71
commit
c54d079f71
@ -1,7 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2016/05/29 01:35:33 jsg Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2016/06/18 03:04:44 jsg Exp $
|
||||
|
||||
COMMENT= U-Boot firmware
|
||||
DISTNAME= u-boot-2016.05
|
||||
REVISION= 0
|
||||
CATEGORIES= sysutils
|
||||
HOMEPAGE= http://www.denx.de/wiki/U-Boot
|
||||
MAINTAINER= Jonathan Gray <jsg@openbsd.org>
|
||||
|
135
sysutils/u-boot/patches/patch-include_configs_cm_fx6_h
Normal file
135
sysutils/u-boot/patches/patch-include_configs_cm_fx6_h
Normal file
@ -0,0 +1,135 @@
|
||||
$OpenBSD: patch-include_configs_cm_fx6_h,v 1.1 2016/06/18 03:04:44 jsg Exp $
|
||||
--- include/configs/cm_fx6.h.orig Tue May 17 00:40:32 2016
|
||||
+++ include/configs/cm_fx6.h Mon Jun 13 17:29:29 2016
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef __CONFIG_CM_FX6_H
|
||||
#define __CONFIG_CM_FX6_H
|
||||
|
||||
+#include <config_distro_defaults.h>
|
||||
#include "mx6_common.h"
|
||||
|
||||
/* Machine config */
|
||||
@@ -63,97 +64,43 @@
|
||||
#define CONFIG_ENV_SIZE (8 * 1024)
|
||||
#define CONFIG_ENV_OFFSET (768 * 1024)
|
||||
|
||||
+#ifndef CONFIG_SPL_BUILD
|
||||
+#include <config_distro_defaults.h>
|
||||
+#include <config_distro_bootcmd.h>
|
||||
+
|
||||
+#ifdef CONFIG_AHCI
|
||||
+#define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0)
|
||||
+#else
|
||||
+#define BOOT_TARGET_DEVICES_SCSI(func)
|
||||
+#endif
|
||||
+
|
||||
+#define BOOT_TARGET_DEVICES(func) \
|
||||
+ func(MMC, mmc, 2) \
|
||||
+ BOOT_TARGET_DEVICES_SCSI(func) \
|
||||
+ func(PXE, pxe, na) \
|
||||
+ func(DHCP, dhcp, na)
|
||||
+
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"stdin=serial,usbkbd\0" \
|
||||
"stdout=serial,vga\0" \
|
||||
"stderr=serial,vga\0" \
|
||||
"panel=HDMI\0" \
|
||||
- "autoload=no\0" \
|
||||
- "kernel=uImage-cm-fx6\0" \
|
||||
- "script=boot.scr\0" \
|
||||
"dtb=cm-fx6.dtb\0" \
|
||||
- "bootm_low=18000000\0" \
|
||||
"loadaddr=0x10800000\0" \
|
||||
"fdtaddr=0x11000000\0" \
|
||||
+ "fdt_addr_r=0x18000000\0" \
|
||||
+ "pxefile_addr_r=0x17f00000\0" \
|
||||
+ "scriptaddr=0x17e00000\0" \
|
||||
+ "kernel_addr_r=0x11000000\0" \
|
||||
+ "ramdisk_addr_r=0x18100000\0" \
|
||||
+ "bootm_size=0x20000000\0" \
|
||||
"console=ttymxc3,115200\0" \
|
||||
"ethprime=FEC0\0" \
|
||||
- "video_hdmi=mxcfb0:dev=hdmi,1920x1080M-32@50,if=RGB32\0" \
|
||||
- "video_dvi=mxcfb0:dev=dvi,1280x800M-32@50,if=RGB32\0" \
|
||||
- "doboot=bootm ${loadaddr}\0" \
|
||||
- "doloadfdt=false\0" \
|
||||
- "setboottypez=setenv kernel zImage-cm-fx6;" \
|
||||
- "setenv doboot bootz ${loadaddr} - ${fdtaddr};" \
|
||||
- "setenv doloadfdt true;\0" \
|
||||
- "setboottypem=setenv kernel uImage-cm-fx6;" \
|
||||
- "setenv doboot bootm ${loadaddr};" \
|
||||
- "setenv doloadfdt false;\0"\
|
||||
- "mmcroot=/dev/mmcblk0p2 rw rootwait\0" \
|
||||
- "sataroot=/dev/sda2 rw rootwait\0" \
|
||||
- "nandroot=/dev/mtdblock4 rw\0" \
|
||||
- "nandrootfstype=ubifs\0" \
|
||||
- "mmcargs=setenv bootargs console=${console} root=${mmcroot} " \
|
||||
- "${video}\0" \
|
||||
- "sataargs=setenv bootargs console=${console} root=${sataroot} " \
|
||||
- "${video}\0" \
|
||||
- "nandargs=setenv bootargs console=${console} " \
|
||||
- "root=${nandroot} " \
|
||||
- "rootfstype=${nandrootfstype} " \
|
||||
- "${video}\0" \
|
||||
- "nandboot=if run nandloadkernel; then " \
|
||||
- "run nandloadfdt;" \
|
||||
- "run setboottypem;" \
|
||||
- "run storagebootcmd;" \
|
||||
- "run setboottypez;" \
|
||||
- "run storagebootcmd;" \
|
||||
- "fi;\0" \
|
||||
- "run_eboot=echo Starting EBOOT ...; "\
|
||||
- "mmc dev 2 && " \
|
||||
- "mmc rescan && mmc read 10042000 a 400 && go 10042000\0" \
|
||||
- "loadscript=load ${storagetype} ${storagedev} ${loadaddr} ${script};\0"\
|
||||
- "loadkernel=load ${storagetype} ${storagedev} ${loadaddr} ${kernel};\0"\
|
||||
- "loadfdt=load ${storagetype} ${storagedev} ${fdtaddr} ${dtb};\0" \
|
||||
- "bootscript=echo Running bootscript from ${storagetype} ...;" \
|
||||
- "source ${loadaddr};\0" \
|
||||
- "nandloadkernel=nand read ${loadaddr} 0 780000;\0" \
|
||||
- "nandloadfdt=nand read ${fdtaddr} 780000 80000;\0" \
|
||||
- "setupmmcboot=setenv storagetype mmc; setenv storagedev 2;\0" \
|
||||
- "setupsataboot=setenv storagetype sata; setenv storagedev 0;\0" \
|
||||
- "setupnandboot=setenv storagetype nand;\0" \
|
||||
- "setupusbboot=setenv storagetype usb; setenv storagedev 0;\0" \
|
||||
- "storagebootcmd=echo Booting from ${storagetype} ...;" \
|
||||
- "run ${storagetype}args; run doboot;\0" \
|
||||
- "trybootk=if run loadkernel; then " \
|
||||
- "if ${doloadfdt}; then " \
|
||||
- "run loadfdt;" \
|
||||
- "fi;" \
|
||||
- "run storagebootcmd;" \
|
||||
- "fi;\0" \
|
||||
- "trybootsmz=if run loadscript; then " \
|
||||
- "run bootscript;" \
|
||||
- "fi;" \
|
||||
- "run setboottypem;" \
|
||||
- "run trybootk;" \
|
||||
- "run setboottypez;" \
|
||||
- "run trybootk;\0"
|
||||
+ BOOTENV
|
||||
|
||||
-#define CONFIG_BOOTCOMMAND \
|
||||
- "run setupmmcboot;" \
|
||||
- "mmc dev ${storagedev};" \
|
||||
- "if mmc rescan; then " \
|
||||
- "run trybootsmz;" \
|
||||
- "fi;" \
|
||||
- "run setupusbboot;" \
|
||||
- "if usb start; then "\
|
||||
- "if run loadscript; then " \
|
||||
- "run bootscript;" \
|
||||
- "fi;" \
|
||||
- "fi;" \
|
||||
- "run setupsataboot;" \
|
||||
- "if sata init; then " \
|
||||
- "run trybootsmz;" \
|
||||
- "fi;" \
|
||||
- "run setupnandboot;" \
|
||||
- "run nandboot;"
|
||||
+#else /* ifndef CONFIG_SPL_BUILD */
|
||||
+#define CONFIG_EXTRA_ENV_SETTINGS
|
||||
+#endif
|
||||
|
||||
#define CONFIG_PREBOOT "usb start"
|
||||
|
66
sysutils/u-boot/patches/patch-include_configs_omap3_beagle_h
Normal file
66
sysutils/u-boot/patches/patch-include_configs_omap3_beagle_h
Normal file
@ -0,0 +1,66 @@
|
||||
$OpenBSD: patch-include_configs_omap3_beagle_h,v 1.1 2016/06/18 03:04:44 jsg Exp $
|
||||
--- include/configs/omap3_beagle.h.orig Tue May 17 00:40:32 2016
|
||||
+++ include/configs/omap3_beagle.h Mon Jun 13 17:28:45 2016
|
||||
@@ -113,9 +113,12 @@
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"loadaddr=0x80200000\0" \
|
||||
+ "kernel_addr_r=0x80200000\0" \
|
||||
"rdaddr=0x81000000\0" \
|
||||
+ "initrd_addr_r=0x81000000\0" \
|
||||
"fdt_high=0xffffffff\0" \
|
||||
- "fdtaddr=0x80f80000\0" \
|
||||
+ "fdtaddr=0x90f80000\0" \
|
||||
+ "fdt_addr_r=0x90f80000\0" \
|
||||
"usbtty=cdc_acm\0" \
|
||||
"bootfile=uImage\0" \
|
||||
"ramdisk=ramdisk.gz\0" \
|
||||
@@ -210,39 +213,17 @@
|
||||
"userbutton=if gpio input 173; then run userbutton_xm; " \
|
||||
"else run userbutton_nonxm; fi;\0" \
|
||||
"userbutton_xm=gpio input 4;\0" \
|
||||
- "userbutton_nonxm=gpio input 7;\0"
|
||||
-/* "run userbutton" will return 1 (false) if pressed and 0 (true) if not */
|
||||
+ "userbutton_nonxm=gpio input 7;\0" \
|
||||
+ BOOTENV
|
||||
+
|
||||
+#define BOOT_TARGET_DEVICES(func) \
|
||||
+ func(MMC, mmc, 0)
|
||||
+
|
||||
#define CONFIG_BOOTCOMMAND \
|
||||
"run findfdt; " \
|
||||
- "mmc dev ${mmcdev}; if mmc rescan; then " \
|
||||
- "if run userbutton; then " \
|
||||
- "setenv bootenv uEnv.txt;" \
|
||||
- "else " \
|
||||
- "setenv bootenv user.txt;" \
|
||||
- "fi;" \
|
||||
- "echo SD/MMC found on device ${mmcdev};" \
|
||||
- "if run loadbootenv; then " \
|
||||
- "echo Loaded environment from ${bootenv};" \
|
||||
- "run importbootenv;" \
|
||||
- "fi;" \
|
||||
- "if test -n $uenvcmd; then " \
|
||||
- "echo Running uenvcmd ...;" \
|
||||
- "run uenvcmd;" \
|
||||
- "fi;" \
|
||||
- "if run loadbootscript; then " \
|
||||
- "run bootscript; " \
|
||||
- "else " \
|
||||
- "if run loadimage; then " \
|
||||
- "run mmcboot;" \
|
||||
- "fi;" \
|
||||
- "fi; " \
|
||||
- "fi;" \
|
||||
- "run nandboot;" \
|
||||
- "setenv bootfile zImage;" \
|
||||
- "if run loadimage; then " \
|
||||
- "run loadfdt;" \
|
||||
- "run mmcbootz; " \
|
||||
- "fi; " \
|
||||
+ "run distro_bootcmd"
|
||||
+
|
||||
+#include <config_distro_bootcmd.h>
|
||||
|
||||
/*
|
||||
* OMAP3 has 12 GP timers, they can be driven by the system clock
|
@ -0,0 +1,45 @@
|
||||
$OpenBSD: patch-include_configs_ti_omap5_common_h,v 1.1 2016/06/18 03:04:44 jsg Exp $
|
||||
--- include/configs/ti_omap5_common.h.orig Tue May 17 00:40:32 2016
|
||||
+++ include/configs/ti_omap5_common.h Wed Jun 15 15:52:24 2016
|
||||
@@ -66,6 +66,18 @@
|
||||
#define DFUARGS
|
||||
#endif
|
||||
|
||||
+#define BOOT_TARGET_DEVICES(func) \
|
||||
+ func(MMC, mmc, 0) \
|
||||
+ func(MMC, mmc, 1) \
|
||||
+ func(PXE, pxe, na) \
|
||||
+ func(DHCP, dhcp, na)
|
||||
+
|
||||
+#define CONFIG_BOOTCOMMAND \
|
||||
+ "run findfdt; " \
|
||||
+ "run distro_bootcmd"
|
||||
+
|
||||
+#include <config_distro_bootcmd.h>
|
||||
+
|
||||
#ifndef CONFIG_SPL_BUILD
|
||||
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
@@ -111,21 +123,8 @@
|
||||
"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
|
||||
DFUARGS \
|
||||
NETARGS \
|
||||
+ BOOTENV
|
||||
|
||||
-#define CONFIG_BOOTCOMMAND \
|
||||
- "if test ${dofastboot} -eq 1; then " \
|
||||
- "echo Boot fastboot requested, resetting dofastboot ...;" \
|
||||
- "setenv dofastboot 0; saveenv;" \
|
||||
- "echo Booting into fastboot ...; fastboot 0;" \
|
||||
- "fi;" \
|
||||
- "run findfdt; " \
|
||||
- "run envboot; " \
|
||||
- "run mmcboot;" \
|
||||
- "setenv mmcdev 1; " \
|
||||
- "setenv bootpart 1:2; " \
|
||||
- "setenv mmcroot /dev/mmcblk0p2 rw; " \
|
||||
- "run mmcboot;" \
|
||||
- ""
|
||||
#endif
|
||||
|
||||
/*
|
Loading…
x
Reference in New Issue
Block a user