From 4a57461cac5e4a17a4bd1f09ae30cbae2ab0fd18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Mon, 20 Apr 2015 10:10:48 +0000 Subject: main/u-boot: upgrade to 2015.04 and use distroconfig --- main/u-boot/APKBUILD | 48 +++++---- main/u-boot/alpine-bootscript.h | 6 -- main/u-boot/config-wandboard.patch | 55 ---------- main/u-boot/distroconfig-beaglebone.patch | 73 +++++++++++++ main/u-boot/distroconfig-wandboard.patch | 169 ++++++++++++++++++++++++++++++ main/u-boot/include-sys-types.patch | 25 +++-- 6 files changed, 285 insertions(+), 91 deletions(-) delete mode 100644 main/u-boot/alpine-bootscript.h delete mode 100644 main/u-boot/config-wandboard.patch create mode 100644 main/u-boot/distroconfig-beaglebone.patch create mode 100644 main/u-boot/distroconfig-wandboard.patch diff --git a/main/u-boot/APKBUILD b/main/u-boot/APKBUILD index 9cd3ad3146..7acad6f110 100644 --- a/main/u-boot/APKBUILD +++ b/main/u-boot/APKBUILD @@ -2,29 +2,33 @@ # Contributor: Timo Teras # Maintainer: Leonardo Arena pkgname=u-boot -pkgver=2015.01 -pkgrel=1 +pkgver=2015.04 +pkgrel=0 pkgdesc="Bootloader for ARM" url="http://www.denx.de/wiki/U-Boot/" arch="armhf" license="GPL2" depends="" depends_dev="" -makedepends="$depends_dev" +makedepends="$depends_dev bc" install="" subpackages="" -source="ftp://ftp.denx.de/pub/u-boot/u-boot-$pkgver.tar.bz2 +source="ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver//_/-}.tar.bz2 + distroconfig-beaglebone.patch + distroconfig-wandboard.patch + include-sys-types.patch - config-wandboard.patch - alpine-bootscript.h " -_srcdir="$srcdir"/u-boot-$pkgver +_srcdir="$srcdir"/u-boot-${pkgver//_/-} _builddir="$srcdir"/build board_configs=" + beagleboard:am335x_boneblack + cubieboard:Cubieboard,Cubieboard2 + raspberrypi:rpi,rpi_2 wandboard:wandboard_solo,wandboard_dl,wandboard_quad - beagleboard:am335x_boneblack" + " for board_config in $board_configs; do subpackages="$subpackages $pkgname-${board_config%%:*}" @@ -38,8 +42,6 @@ prepare() { *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done - - cp "$srcdir"/alpine-bootscript.h "$_srcdir"/include/configs/alpine-bootscript.h } build() { @@ -77,7 +79,7 @@ _split_boards() { msg "Including board $board" mkdir -p "$subpkgdir"/usr/share/$pkgname/$board export BUILD_DIR="$_builddir"/$board - for image in MLO u-boot.imx u-boot.img; do + for image in MLO u-boot.imx u-boot.img u-boot.bin; do if [ -e "$BUILD_DIR"/$image ]; then cp "$BUILD_DIR"/$image "$subpkgdir"/usr/share/$pkgname/$board \ || return 1 @@ -92,15 +94,15 @@ for board_config in $board_configs; do eval "${board}() { _split_boards $board ${configs//,/ }; }" done -md5sums="7f08dc9e98a71652bd6968888ed6ec95 u-boot-2015.01.tar.bz2 -946644b87937315253151db8b1ba98ec include-sys-types.patch -a81d24110cf527f0eaab0de5ef15b7a1 config-wandboard.patch -581d2a5a617e0dce93a295fb4f6d4cf6 alpine-bootscript.h" -sha256sums="383051a656ebe11757b17d38a3326387e4a1b0949ca8a9e8ee506bf71dac9fde u-boot-2015.01.tar.bz2 -675676d857758d2eafab39592ad0f937be4021deb5cc47e44bea174a744871b3 include-sys-types.patch -aa5a047ea3dddf434ffaca13f284f78facf190d582e26513ea02835e3184726b config-wandboard.patch -1c185db1fe3de4e5c224c831141863745a8970a39fc9801f45ec92b2e6950b69 alpine-bootscript.h" -sha512sums="6697c6da5f463bdfa75b8025a2dd302e9cda58ce36bc3252590f11976807aeccc1ca76be93cbc83d3367a7557878516bb57130ffb76197ffd513640c48e18938 u-boot-2015.01.tar.bz2 -3e3a3a1d0f0fb9a41fe0e1427f91d05ec3c70103d5a185ed1d287ea23032ddcd01c0786ddca1d45d05e34df1b4a54a961bd123115798148205a22f6083142a57 include-sys-types.patch -8236cf2bc838d8f5231c825f660486c5be770e76db60127f5b7bc902d77fefbb5026fb5d63269748057a5f034bb738401a31d54a2f12bcbded5c0cb6099619f0 config-wandboard.patch -4ce96a48010b061fa77a15992824e7ac161672cab4d933ba91a995dd784bf1c263b6e907a967b02f54dba263677900d62c5eb9e31784672229f9cdac4cde696a alpine-bootscript.h" +md5sums="570bdc2c47270c2a98ca60ff6c5c74cd u-boot-2015.04.tar.bz2 +a5b2aab8f3613e6f4154714b16ea9ad3 distroconfig-beaglebone.patch +880f99276de9722b8d85d03a06784d5b distroconfig-wandboard.patch +2c144ed08a9aab244c0d8ea45e578ce5 include-sys-types.patch" +sha256sums="0a1a70df586655f527befa6f12e184e96ed61b126e5a567382321b17200f5d60 u-boot-2015.04.tar.bz2 +4a49c939184c25f216b35e800669874a46354f805218a91b1db2bb27aa979310 distroconfig-beaglebone.patch +fc4b571e840e171f6fb6f4923697cd0768eca3b52aac912b87dfe22f61b0c753 distroconfig-wandboard.patch +ac7fc4678aa6018ae8730536ab55ed1e1d2bc93f699a25f8bd4504132cb27302 include-sys-types.patch" +sha512sums="e50a3d7e44bf588a7cf8e28cdf3342bc38bd1bf55231d579c2501b75386cfff0fbc7a34648d893971e0095510c9d582b7180427832cb78470b4e7af2ce0e3646 u-boot-2015.04.tar.bz2 +e840c2928afdab14442fe276a934d5d3ee615fdf32370819a1c988bf2dba99f27ccf479943f664aadaa14fbf48841e4d7d22973bb911db2d77f13aa2b4c40f88 distroconfig-beaglebone.patch +ce22043cfe65ba3a09f965dbf69985345fa0d56ef093703a595fde2dc3cb1ddcf1012e2fdcd56eed216de2bd8b3ec3a8de08266d70ad373cf33faa79d94ad93f distroconfig-wandboard.patch +bb237aceacc0470c12778559fb3c7b1b8e9481f5113743ca76937d1d0052f1639c2da1d0b34069f73311aac44f9dcf628241d9322912ea7e8bd2c440a1d121bb include-sys-types.patch" diff --git a/main/u-boot/alpine-bootscript.h b/main/u-boot/alpine-bootscript.h deleted file mode 100644 index c40c9c7539..0000000000 --- a/main/u-boot/alpine-bootscript.h +++ /dev/null @@ -1,6 +0,0 @@ -#define CONFIG_BOOTCOMMAND \ - "if test -z \"${bootargs}\"; then setenv bootargs console=${console},${baudrate} alpine_dev=mmcblk${devnum}p${devpart}; fi; " \ - "load ${devtype} ${devnum}:${devpart} ${fdt_addr_r} /boot/dtbs/${fdt_file} ; " \ - "load ${devtype} ${devnum}:${devpart} ${kernel_addr_r} /boot/vmlinuz-grsec ; " \ - "load ${devtype} ${devnum}:${devpart} ${initrd_addr_r} /boot/initramfs-grsec ; " \ - "bootz ${kernel_addr_r} ${initrd_addr_r}:${filesize} ${fdt_addr_r}" diff --git a/main/u-boot/config-wandboard.patch b/main/u-boot/config-wandboard.patch deleted file mode 100644 index 30537514ef..0000000000 --- a/main/u-boot/config-wandboard.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- u-boot-2015.01.orig/include/configs/wandboard.h -+++ u-boot-2015.01/include/configs/wandboard.h -@@ -75,7 +75,9 @@ - #define CONFIG_GENERIC_MMC - #define CONFIG_BOUNCE_BUFFER - #define CONFIG_CMD_EXT2 -+#define CONFIG_CMD_EXT4 - #define CONFIG_CMD_FAT -+#define CONFIG_CMD_FS_GENERIC - #define CONFIG_DOS_PARTITION - - /* USB Configs */ -@@ -130,6 +132,8 @@ - #define CONFIG_DEFAULT_FDT_FILE "imx6q-wandboard.dtb" - #endif - -+#if 0 -+ - #define CONFIG_EXTRA_ENV_SETTINGS \ - "script=boot.scr\0" \ - "image=zImage\0" \ -@@ -244,6 +248,25 @@ - "fi; " \ - "else run netboot; fi" - -+#else -+ -+#define CONFIG_EXTRA_ENV_SETTINGS \ -+ "console=ttymxc0\0" \ -+ "devtype=mmc\0" \ -+ "devnum=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ -+ "devpart=1\0" \ -+ "fdt_addr_r=0x18000000\0" \ -+ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ -+ "fdt_high=0xffffffff\0" \ -+ "initrd_addr_r=0x13000000\0" \ -+ "initrd_high=0xffffffff\0" \ -+ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ -+ "" -+ -+#include "alpine-bootscript.h" -+ -+#endif -+ - /* Miscellaneous configurable options */ - #define CONFIG_SYS_LONGHELP - #define CONFIG_SYS_HUSH_PARSER -@@ -283,6 +306,7 @@ - - #define CONFIG_OF_LIBFDT - #define CONFIG_CMD_BOOTZ -+#define CONFIG_SUPPORT_RAW_INITRD - - #ifndef CONFIG_SYS_DCACHE_OFF - #define CONFIG_CMD_CACHE diff --git a/main/u-boot/distroconfig-beaglebone.patch b/main/u-boot/distroconfig-beaglebone.patch new file mode 100644 index 0000000000..e5f9810c90 --- /dev/null +++ b/main/u-boot/distroconfig-beaglebone.patch @@ -0,0 +1,73 @@ +From ecb7a2bbcf68921cdca7aed2740561b6bb14970b Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Fri, 6 Mar 2015 10:31:19 +0000 +Subject: [PATCH 04/14] Switch am335x_evm.h to use config_distro_defaults and + config_distro_bootcmd. Add scriptaddr to DEFAULT_LINUX_BOOT_ENV, as + scriptaddr is used for boot scripts in config_distro_defaults. + +--- + include/configs/am335x_evm.h | 26 +++++++++++++++++--------- + include/configs/ti_armv7_common.h | 1 + + 2 files changed, 18 insertions(+), 9 deletions(-) + +diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h +index a87059c..3fb175e 100644 +--- a/include/configs/am335x_evm.h ++++ b/include/configs/am335x_evm.h +@@ -18,6 +18,21 @@ + + #include + ++#include ++ ++#define BOOTENV_BOOT_PARTITIONS "1 2" ++ ++#define BOOTENV_INIT_COMMAND "run findfdt ;" ++#ifdef CONFIG_NAND ++#define BOOTENV_POST_COMMAND "run nandboot ;" ++#endif ++ ++#define BOOT_TARGET_DEVICES(func) \ ++ func(MMC, mmc, 0) \ ++ func(MMC, mmc, 1) ++ ++#include ++ + #ifndef CONFIG_SPL_BUILD + #ifndef CONFIG_FIT + # define CONFIG_FIT +@@ -181,17 +196,10 @@ + "if test $fdtfile = undefined; then " \ + "echo WARNING: Could not determine device tree to use; fi; \0" \ + NANDARGS \ +- DFUARGS ++ DFUARGS \ ++ BOOTENV + #endif + +-#define CONFIG_BOOTCOMMAND \ +- "run findfdt; " \ +- "run mmcboot;" \ +- "setenv mmcdev 1; " \ +- "setenv bootpart 1:2; " \ +- "run mmcboot;" \ +- "run nandboot;" +- + /* NS16550 Configuration */ + #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */ + #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */ +diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h +index 110a4f8..b6e37b3 100644 +--- a/include/configs/ti_armv7_common.h ++++ b/include/configs/ti_armv7_common.h +@@ -54,6 +54,7 @@ + #define DEFAULT_LINUX_BOOT_ENV \ + "loadaddr=0x82000000\0" \ + "kernel_addr_r=0x82000000\0" \ ++ "scriptaddr=0x82000000\0" \ + "fdtaddr=0x88000000\0" \ + "fdt_addr_r=0x88000000\0" \ + "rdaddr=0x88080000\0" \ +-- +2.3.2 + diff --git a/main/u-boot/distroconfig-wandboard.patch b/main/u-boot/distroconfig-wandboard.patch new file mode 100644 index 0000000000..94529acb9c --- /dev/null +++ b/main/u-boot/distroconfig-wandboard.patch @@ -0,0 +1,169 @@ +From d5e9f0b3d2495bcf81647887c8aaadf02223d108 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Fri, 6 Mar 2015 10:33:25 +0000 +Subject: [PATCH 06/14] wandboard: port to generic distro booting + +set the variables and functions needed for generic distro booting. +--- + include/configs/wandboard.h | 48 ++++++++++++++++++++++++--------------------- + 1 file changed, 26 insertions(+), 22 deletions(-) + +diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h +index 117d1f7..1d8459c 100644 +--- a/include/configs/wandboard.h ++++ b/include/configs/wandboard.h +@@ -51,8 +51,6 @@ + #define CONFIG_CMD_BMODE + #define CONFIG_CMD_SETEXPR + +-#define CONFIG_BOOTDELAY 5 +- + #define CONFIG_SYS_MEMTEST_START 0x10000000 + #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M) + #define CONFIG_LOADADDR 0x12000000 +@@ -74,9 +72,6 @@ + #define CONFIG_CMD_MMC + #define CONFIG_GENERIC_MMC + #define CONFIG_BOUNCE_BUFFER +-#define CONFIG_CMD_EXT2 +-#define CONFIG_CMD_FAT +-#define CONFIG_DOS_PARTITION + + /* USB Configs */ + #define CONFIG_CMD_USB +@@ -88,10 +83,6 @@ + #define CONFIG_MXC_USB_FLAGS 0 + + /* Ethernet Configuration */ +-#define CONFIG_CMD_PING +-#define CONFIG_CMD_DHCP +-#define CONFIG_CMD_MII +-#define CONFIG_CMD_NET + #define CONFIG_FEC_MXC + #define CONFIG_MII + #define IMX_FEC_BASE ENET_BASE_ADDR +@@ -124,6 +115,16 @@ + #define CONFIG_MXC_OCOTP + #endif + ++#ifndef CONFIG_SPL_BUILD ++#include ++#include ++ ++#define BOOT_TARGET_DEVICES(func) \ ++ func(MMC, mmc, 0) \ ++ func(PXE, pxe, na) \ ++ func(DHCP, dhcp, na) ++ ++ + #if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S) + #define CONFIG_DEFAULT_FDT_FILE "imx6dl-wandboard.dtb" + #elif defined(CONFIG_MX6Q) +@@ -133,13 +134,16 @@ + #define CONFIG_EXTRA_ENV_SETTINGS \ + "script=boot.scr\0" \ + "image=zImage\0" \ +- "console=ttymxc0\0" \ ++ "console=ttymxc0,115200\0" \ + "splashpos=m,m\0" \ +- "fdt_high=0xffffffff\0" \ +- "initrd_high=0xffffffff\0" \ +- "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ +- "fdt_addr=0x18000000\0" \ ++ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ ++ "fdt_addr_r=0x18000000\0" \ + "boot_fdt=try\0" \ ++ "pxefile_addr_r=0x17f00000\0" \ ++ "scriptaddr=0x17e00000\0" \ ++ "kernel_addr_r=0x11000000\0" \ ++ "ramdisk_addr_r=0x18100000\0" \ ++ "bootm_size=0x20000000\0" \ + "ip_dyn=yes\0" \ + "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ + "mmcpart=1\0" \ +@@ -158,7 +162,7 @@ + "mmc write ${loadaddr} 0x2 ${fw_sz}; " \ + "fi; " \ + "fi\0" \ +- "mmcargs=setenv bootargs console=${console},${baudrate} " \ ++ "mmcargs=setenv bootargs console=${console} " \ + "root=${mmcroot}; run videoargs\0" \ + "videoargs=" \ + "setenv nextcon 0; " \ +@@ -207,7 +211,7 @@ + "else " \ + "bootz; " \ + "fi;\0" \ +- "netargs=setenv bootargs console=${console},${baudrate} " \ ++ "netargs=setenv bootargs console=${console} " \ + "root=/dev/nfs " \ + "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ + "netboot=echo Booting from net ...; " \ +@@ -230,7 +234,8 @@ + "fi; " \ + "else " \ + "bootz; " \ +- "fi;\0" ++ "fi;\0" \ ++ BOOTENV + + #define CONFIG_BOOTCOMMAND \ + "mmc dev ${mmcdev}; if mmc rescan; then " \ +@@ -244,6 +249,10 @@ + "fi; " \ + "else run netboot; fi" + ++#else ++#define BOOT_TARGET_DEVICES ++#endif ++ + /* Miscellaneous configurable options */ + #define CONFIG_SYS_LONGHELP + #define CONFIG_SYS_HUSH_PARSER +@@ -257,8 +266,6 @@ + + #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR + +-#define CONFIG_CMDLINE_EDITING +- + /* Physical Memory Map */ + #define CONFIG_NR_DRAM_BANKS 1 + #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR +@@ -281,9 +288,6 @@ + #define CONFIG_ENV_OFFSET (6 * 64 * 1024) + #define CONFIG_SYS_MMC_ENV_DEV 0 + +-#define CONFIG_OF_LIBFDT +-#define CONFIG_CMD_BOOTZ +- + #ifndef CONFIG_SYS_DCACHE_OFF + #define CONFIG_CMD_CACHE + #endif +-- +2.3.2 + +From c1b63c708f15f8840307507b649c36abb529c08f Mon Sep 17 00:00:00 2001 +From: Dennis Gilmore +Date: Sat, 21 Mar 2015 12:17:08 -0500 +Subject: [PATCH 13/14] WANDBOARD: run the dsitro bootcmd first before falling + back to old settings + +--- + include/configs/wandboard.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h +index 1d8459c..07c3d63 100644 +--- a/include/configs/wandboard.h ++++ b/include/configs/wandboard.h +@@ -238,6 +238,7 @@ + BOOTENV + + #define CONFIG_BOOTCOMMAND \ ++ "run distro_bootcmd;" \ + "mmc dev ${mmcdev}; if mmc rescan; then " \ + "if run loadbootscript; then " \ + "run bootscript; " \ +-- +2.3.2 + diff --git a/main/u-boot/include-sys-types.patch b/main/u-boot/include-sys-types.patch index 3869e9f081..254befb7f5 100644 --- a/main/u-boot/include-sys-types.patch +++ b/main/u-boot/include-sys-types.patch @@ -1,5 +1,5 @@ ---- u-boot-2014.04.orig/include/image.h -+++ u-boot-2014.04/include/image.h +--- u-boot-2015.04-rc5.orig/include/image.h ++++ u-boot-2015.04-rc5/include/image.h @@ -24,6 +24,8 @@ #ifdef USE_HOSTCC @@ -9,8 +9,9 @@ /* new uImage format support enabled on host */ #define CONFIG_FIT 1 #define CONFIG_OF_LIBFDT 1 ---- u-boot-2014.04.orig/tools/mkimage.h -+++ u-boot-2014.04/tools/mkimage.h +Only in u-boot-2015.04-rc5: include/timestamp_autogenerated.h +--- u-boot-2015.04-rc5.orig/tools/imagetool.h ++++ u-boot-2015.04-rc5/tools/imagetool.h @@ -16,6 +16,7 @@ #include #include @@ -18,9 +19,19 @@ +#include #include #include - #include ---- u-boot-2014.04.orig/tools/proftool.c -+++ u-boot-2014.04/tools/proftool.c + #include +--- u-boot-2015.04-rc5.orig/tools/mkimage.h ++++ u-boot-2015.04-rc5/tools/mkimage.h +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- u-boot-2015.04-rc5.orig/tools/proftool.c ++++ u-boot-2015.04-rc5/tools/proftool.c @@ -16,6 +16,7 @@ #include #include -- cgit v1.2.3