diff --git a/projects/Amlogic/devices/LePotato/packages/u-boot/package.mk b/projects/Amlogic/devices/LePotato/packages/u-boot/package.mk deleted file mode 100644 index 54e3a7331f..0000000000 --- a/projects/Amlogic/devices/LePotato/packages/u-boot/package.mk +++ /dev/null @@ -1,56 +0,0 @@ -################################################################################ -# This file is part of LibreELEC - https://libreelec.tv -# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) -# Copyright (C) 2017-present Team LibreELEC -# -# LibreELEC is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# LibreELEC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with LibreELEC. If not, see . -################################################################################ - -PKG_NAME="u-boot" -PKG_VERSION="a43076c" -PKG_ARCH="arm aarch64" -PKG_SITE="https://www.denx.de/wiki/U-Boot" -PKG_URL="https://github.com/BayLibre/u-boot/archive/$PKG_VERSION.tar.gz" -PKG_SOURCE_DIR="u-boot-$PKG_VERSION*" -PKG_DEPENDS_TARGET="toolchain dtc:host gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host" -PKG_LICENSE="GPL" -PKG_SECTION="tools" -PKG_SHORTDESC="u-boot: Universal Bootloader project" -PKG_LONGDESC="Das U-Boot is a cross-platform bootloader for embedded systems, used as the default boot loader by several board vendors. It is intended to be easy to port and to debug, and runs on many supported architectures, including PPC, ARM, MIPS, x86, m68k, NIOS, and Microblaze." -PKG_IS_KERNEL_PKG="yes" - -PKG_NEED_UNPACK="$PROJECT_DIR/$PROJECT/bootloader" -[ -n "$DEVICE" ] && PKG_NEED_UNPACK+=" $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader" - -make_target() { - export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH - CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make mrproper - CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make $UBOOT_CONFIG - CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make HOSTCC="$HOST_CC" HOSTSTRIP="true" -} - -makeinstall_target() { - mkdir -p $INSTALL/usr/share/bootloader - - # Only install u-boot.img et al when building a board specific image - find_file_path bootloader/install && . ${FOUND_PATH} - - # Always install the update script - find_file_path bootloader/update.sh && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader - - cp $PKG_BUILD/fip/u-boot.bin.sd.bin $INSTALL/usr/share/bootloader/u-boot - - find_file_path bootloader/boot.ini && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader - find_file_path bootloader/config.ini && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader -} diff --git a/projects/Amlogic/devices/LePotato/packages/u-boot/patches/u-boot-0003-use-arm-eabi-for-bl301-scp_task.patch b/projects/Amlogic/devices/LePotato/packages/u-boot/patches/u-boot-0003-use-arm-eabi-for-bl301-scp_task.patch deleted file mode 100644 index 84d8810514..0000000000 --- a/projects/Amlogic/devices/LePotato/packages/u-boot/patches/u-boot-0003-use-arm-eabi-for-bl301-scp_task.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 28c3064d6d3a89962e26f5c9ae3ee105d7377090 Mon Sep 17 00:00:00 2001 -From: Jonas Karlman -Date: Mon, 8 Aug 2016 01:59:07 +0200 -Subject: [PATCH] Use arm-eabi for bl301/scp_task - -For use with Linaro toolchain 4.9-2016.02 ---- - arch/arm/cpu/armv8/gxl/firmware/scp_task/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/cpu/armv8/gxl/firmware/scp_task/Makefile b/arch/arm/cpu/armv8/gxl/firmware/scp_task/Makefile -index 865d142..d905365 100644 ---- a/arch/arm/cpu/armv8/gxl/firmware/scp_task/Makefile -+++ b/arch/arm/cpu/armv8/gxl/firmware/scp_task/Makefile -@@ -6,7 +6,7 @@ include $(buildtree)/include/autoconf.mk - include $(buildtree)/.config - - # Select ARMv7-m bare-metal toolchain --CROSS_COMPILE=arm-none-eabi- -+CROSS_COMPILE=arm-eabi- - ASM=$(CROSS_COMPILE)as - CC=$(CROSS_COMPILE)gcc - CPP=$(CROSS_COMPILE)cpp diff --git a/projects/Amlogic/devices/Odroid_C2/packages/u-boot/package.mk b/projects/Amlogic/devices/Odroid_C2/packages/u-boot/package.mk deleted file mode 100644 index e29a2be45e..0000000000 --- a/projects/Amlogic/devices/Odroid_C2/packages/u-boot/package.mk +++ /dev/null @@ -1,59 +0,0 @@ -################################################################################ -# This file is part of LibreELEC - https://libreelec.tv -# Copyright (C) 2017-present Team LibreELEC -# -# LibreELEC is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# LibreELEC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with LibreELEC. If not, see . -################################################################################ - -PKG_NAME="u-boot" -PKG_VERSION="6e4e886" -PKG_SHA256="0d05829e07e226d1acbc6b23ff038d6c92fa3ed738ddc28703d51987c0fab3bb" -PKG_SITE="https://github.com/hardkernel/u-boot" -PKG_URL="https://github.com/hardkernel/u-boot/archive/$PKG_VERSION.tar.gz" -PKG_DEPENDS_TARGET="toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host" -PKG_ARCH="arm aarch64" -PKG_LICENSE="GPL" -PKG_SECTION="tools" -PKG_SHORTDESC="u-boot: Universal Bootloader project (Hardkernel Fork)" -PKG_LONGDESC="Das U-Boot is a cross-platform bootloader for embedded systems, used as the default boot loader by several board vendors. It is intended to be easy to port and to debug, and runs on many supported architectures, including PPC, ARM, MIPS, x86, m68k, NIOS, and Microblaze." - -pre_configure_target() { - if [ -z "$UBOOT_CONFIG" ]; then - echo "$TARGET_PLATFORM does not define any u-boot configuration, aborting." - echo "Please add UBOOT_CONFIG to your project options file." - exit 1 - fi - - unset LDFLAGS - -# dont build in parallel because of problems - MAKEFLAGS=-j1 - -# copy compiler-gcc5.h to compiler-gcc6. for fake building - cp include/linux/compiler-gcc5.h include/linux/compiler-gcc6.h -} - -make_target() { - export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH - CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make mrproper - CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make $UBOOT_CONFIG - CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make HOSTCC="$HOST_CC" HOSTSTRIP="true" -} - -makeinstall_target() { - mkdir -p $INSTALL/usr/share/bootloader - cp $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/boot.ini $INSTALL/usr/share/bootloader - cp $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/config.ini $INSTALL/usr/share/bootloader - cp -av $PKG_BUILD/u-boot.bin $INSTALL/usr/share/bootloader/u-boot -} diff --git a/projects/Amlogic/devices/Odroid_C2/patches/u-boot/u-boot-0001-use-arm-eabi-for-bl301-scp_task.patch b/projects/Amlogic/devices/Odroid_C2/patches/u-boot/u-boot-0001-use-arm-eabi-for-bl301-scp_task.patch deleted file mode 100644 index de61acedbe..0000000000 --- a/projects/Amlogic/devices/Odroid_C2/patches/u-boot/u-boot-0001-use-arm-eabi-for-bl301-scp_task.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 28c3064d6d3a89962e26f5c9ae3ee105d7377090 Mon Sep 17 00:00:00 2001 -From: Jonas Karlman -Date: Mon, 8 Aug 2016 01:59:07 +0200 -Subject: [PATCH] Use arm-eabi for bl301/scp_task - -For use with Linaro toolchain 4.9-2016.02 ---- - arch/arm/cpu/armv8/gxb/firmware/scp_task/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/cpu/armv8/gxb/firmware/scp_task/Makefile b/arch/arm/cpu/armv8/gxb/firmware/scp_task/Makefile -index 865d142..d905365 100644 ---- a/arch/arm/cpu/armv8/gxb/firmware/scp_task/Makefile -+++ b/arch/arm/cpu/armv8/gxb/firmware/scp_task/Makefile -@@ -6,7 +6,7 @@ include $(buildtree)/include/autoconf.mk - include $(buildtree)/.config - - # Select ARMv7-m bare-metal toolchain --CROSS_COMPILE=arm-none-eabi- -+CROSS_COMPILE=arm-eabi- - ASM=$(CROSS_COMPILE)as - CC=$(CROSS_COMPILE)gcc - CPP=$(CROSS_COMPILE)cpp diff --git a/projects/Amlogic/devices/KVIM/packages/u-boot/package.mk b/projects/Amlogic/packages/u-boot/package.mk similarity index 54% rename from projects/Amlogic/devices/KVIM/packages/u-boot/package.mk rename to projects/Amlogic/packages/u-boot/package.mk index 3ba1e070c3..a1602bb6d4 100644 --- a/projects/Amlogic/devices/KVIM/packages/u-boot/package.mk +++ b/projects/Amlogic/packages/u-boot/package.mk @@ -1,6 +1,5 @@ ################################################################################ # This file is part of LibreELEC - https://libreelec.tv -# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) # Copyright (C) 2017-present Team LibreELEC # # LibreELEC is free software: you can redistribute it and/or modify @@ -18,30 +17,49 @@ ################################################################################ PKG_NAME="u-boot" -PKG_VERSION="ffc14fc" -PKG_ARCH="arm aarch64" PKG_SITE="https://www.denx.de/wiki/U-Boot" -PKG_URL="https://github.com/khadas/u-boot/archive/$PKG_VERSION.tar.gz" -PKG_SOURCE_DIR="u-boot-$PKG_VERSION*" -PKG_DEPENDS_TARGET="toolchain dtc:host gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host" +PKG_DEPENDS_TARGET="toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host" +PKG_ARCH="arm aarch64" PKG_LICENSE="GPL" PKG_SECTION="tools" PKG_SHORTDESC="u-boot: Universal Bootloader project" PKG_LONGDESC="Das U-Boot is a cross-platform bootloader for embedded systems, used as the default boot loader by several board vendors. It is intended to be easy to port and to debug, and runs on many supported architectures, including PPC, ARM, MIPS, x86, m68k, NIOS, and Microblaze." -PKG_IS_KERNEL_PKG="yes" + +case "$DEVICE" in + "Odroid_C2") + PKG_URL="https://github.com/hardkernel/u-boot/archive/$PKG_VERSION.tar.gz" + PKG_VERSION="6e4e886" + PKG_SHA256="0d05829e07e226d1acbc6b23ff038d6c92fa3ed738ddc28703d51987c0fab3bb" + ;; + "KVIM"*) + PKG_URL="https://github.com/khadas/u-boot/archive/$PKG_VERSION.tar.gz" + PKG_VERSION="ffc14fc" + PKG_SHA256="1326126ca7962d314cb522d95e657dbf71966e74c84fb093181910f9e4f2c1fa" + ;; + "LePotato") + PKG_URL="https://github.com/BayLibre/u-boot/archive/$PKG_VERSION.tar.gz" + PKG_VERSION="a43076c" + PKG_SHA256="0ae5fd97ba86fcd6cc7b2722580745a0ddbf651ffa0cc0bd188a05a9b668373f" + ;; + *) + PKG_TOOLCHAIN="manual" + ;; +esac PKG_NEED_UNPACK="$PROJECT_DIR/$PROJECT/bootloader" [ -n "$DEVICE" ] && PKG_NEED_UNPACK+=" $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader" post_unpack() { - sed -i "s|arm-none-eabi-|arm-eabi-|g" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/gxl/firmware/scp_task/Makefile + sed -i "s|arm-none-eabi-|arm-eabi-|g" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/gx*/firmware/scp_task/Makefile 2>/dev/null || true } make_target() { - export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH - CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make mrproper - CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make $UBOOT_CONFIG - CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make HOSTCC="$HOST_CC" HOSTSTRIP="true" + if [ -n "$PKG_URL" ]; then + export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH + CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make mrproper + CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make $UBOOT_CONFIG + CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS="" LDFLAGS="" make HOSTCC="$HOST_CC" HOSTSTRIP="true" + fi } makeinstall_target() { @@ -53,8 +71,22 @@ makeinstall_target() { # Always install the update script find_file_path bootloader/update.sh && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader - cp $PKG_BUILD/fip/u-boot.bin.sd.bin $INSTALL/usr/share/bootloader/u-boot + # Always install the canupdate script + if find_file_path bootloader/canupdate.sh; then + cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader + sed -e "s/@PROJECT@/${DEVICE:-$PROJECT}/g" \ + -i $INSTALL/usr/share/bootloader/canupdate.sh + fi find_file_path bootloader/boot.ini && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader find_file_path bootloader/config.ini && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader + + case "$DEVICE" in + "Odroid_C2") + cp -av $PKG_BUILD/u-boot.bin $INSTALL/usr/share/bootloader/u-boot + ;; + "KVIM"*|"LePotato") + cp -av $PKG_BUILD/fip/u-boot.bin.sd.bin $INSTALL/usr/share/bootloader/u-boot + ;; + esac } diff --git a/projects/Amlogic/devices/Odroid_C2/patches/u-boot/u-boot-0002-gcc7.patch b/projects/Amlogic/packages/u-boot/patches/6e4e886/u-boot-0002-gcc7.patch similarity index 100% rename from projects/Amlogic/devices/Odroid_C2/patches/u-boot/u-boot-0002-gcc7.patch rename to projects/Amlogic/packages/u-boot/patches/6e4e886/u-boot-0002-gcc7.patch diff --git a/projects/Amlogic/devices/Odroid_C2/patches/u-boot/u-boot-0003-set-default-boot-options.patch b/projects/Amlogic/packages/u-boot/patches/6e4e886/u-boot-0003-set-default-boot-options.patch similarity index 100% rename from projects/Amlogic/devices/Odroid_C2/patches/u-boot/u-boot-0003-set-default-boot-options.patch rename to projects/Amlogic/packages/u-boot/patches/6e4e886/u-boot-0003-set-default-boot-options.patch diff --git a/projects/Amlogic/devices/Odroid_C2/patches/u-boot/u-boot-0004-update_cec_wakeup_code.patch b/projects/Amlogic/packages/u-boot/patches/6e4e886/u-boot-0004-update_cec_wakeup_code.patch similarity index 100% rename from projects/Amlogic/devices/Odroid_C2/patches/u-boot/u-boot-0004-update_cec_wakeup_code.patch rename to projects/Amlogic/packages/u-boot/patches/6e4e886/u-boot-0004-update_cec_wakeup_code.patch diff --git a/projects/Amlogic/devices/Odroid_C2/patches/u-boot/u-boot-0005-update_cec_simplink_wakeup.patch b/projects/Amlogic/packages/u-boot/patches/6e4e886/u-boot-0005-update_cec_simplink_wakeup.patch similarity index 100% rename from projects/Amlogic/devices/Odroid_C2/patches/u-boot/u-boot-0005-update_cec_simplink_wakeup.patch rename to projects/Amlogic/packages/u-boot/patches/6e4e886/u-boot-0005-update_cec_simplink_wakeup.patch diff --git a/projects/Amlogic/devices/LePotato/packages/u-boot/patches/u-boot-0001-remove-hardcoded-toolchain-path.patch b/projects/Amlogic/packages/u-boot/patches/a43076c/u-boot-0001-remove-hardcoded-toolchain-path.patch similarity index 100% rename from projects/Amlogic/devices/LePotato/packages/u-boot/patches/u-boot-0001-remove-hardcoded-toolchain-path.patch rename to projects/Amlogic/packages/u-boot/patches/a43076c/u-boot-0001-remove-hardcoded-toolchain-path.patch diff --git a/projects/Amlogic/devices/LePotato/packages/u-boot/patches/u-boot-0002-add-linux-compiler-gcc5.h.patch b/projects/Amlogic/packages/u-boot/patches/a43076c/u-boot-0002-add-linux-compiler-gcc5.h.patch similarity index 100% rename from projects/Amlogic/devices/LePotato/packages/u-boot/patches/u-boot-0002-add-linux-compiler-gcc5.h.patch rename to projects/Amlogic/packages/u-boot/patches/a43076c/u-boot-0002-add-linux-compiler-gcc5.h.patch diff --git a/projects/Amlogic/devices/LePotato/packages/u-boot/patches/u-boot-0004-faster-boot.patch b/projects/Amlogic/packages/u-boot/patches/a43076c/u-boot-0004-faster-boot.patch similarity index 100% rename from projects/Amlogic/devices/LePotato/packages/u-boot/patches/u-boot-0004-faster-boot.patch rename to projects/Amlogic/packages/u-boot/patches/a43076c/u-boot-0004-faster-boot.patch diff --git a/projects/Amlogic/devices/KVIM/packages/u-boot/patches/u-boot-0001-khadas_vim-amend-boot-procedure-for-LibreELEC.patch b/projects/Amlogic/packages/u-boot/patches/ffc14fc/u-boot-0001-khadas_vim-amend-boot-procedure-for-LibreELEC.patch similarity index 100% rename from projects/Amlogic/devices/KVIM/packages/u-boot/patches/u-boot-0001-khadas_vim-amend-boot-procedure-for-LibreELEC.patch rename to projects/Amlogic/packages/u-boot/patches/ffc14fc/u-boot-0001-khadas_vim-amend-boot-procedure-for-LibreELEC.patch