dev-embedded/u-boot-tools-odroidc1: update the ubuild

This commit is contained in:
nemunaire 2017-11-18 22:12:47 +01:00 committed by root
parent f4f81356ee
commit 6012a9b0a8
4 changed files with 84 additions and 61 deletions

View File

@ -1,2 +1,2 @@
AUX 000_change_abi.patch 1124 SHA256 9136fa21ba31ac9ec4fa5820d3f8fc049a4722368ad1e10b0dc27c2d7103f683 SHA512 36ef79e5cbb69f7b4582939615b94ec522fa764ac06956193758d7fac1e21cafeafca6a43423b31dcac2c09a6e679b61c0df956f34a40125e6138335046efa6f WHIRLPOOL abfaabd56ea816b8658b14da387b18941662ae25490fcffc67ecf450d55d3ac219c9b74ad3115ca9bb8e29a9fe7abbc98c9a7b97e131ee94919fef3eef6d06c3
EBUILD u-boot-tools-odroidc1-2011.03.ebuild 1033 SHA256 3912c523f70509785d5ad189daff2554eb046554bffd4bc02a66e46f0739f40c SHA512 d7007dd38cccd3d4bc68e77887673392b31770f42371f7eb91e8adb91b8b9748bf1c7be7eebdc3b8f46f5b05d7361b903f60c47d77328a69f8da7f398e82a786 WHIRLPOOL 256a979446fec4f38534966648b01a78812ea8c4544ece15307ea24aba7736c10525b28dee024508f811931a07873b567caaf596fd063a225e54277bd4c45b09
AUX 0001-fix-missing-header.patch 2532 SHA256 030620efa898232c44469801a01b5418271040b909fe48299bfb6575a68bb834 SHA512 075c87acb89f1d057b52f1bf686f3654d56e522727b0250a29c86358ee31ae203886a5f5af8cf8f89fc465a980a07ba8bfd448932ff1e791d6ed4a1545ce7c44 WHIRLPOOL 7e4d0354c93d2e30480921e9f6ae12f3bf4a083c87a766048cace77b9cf282e20de785591f0d0b30bc5b6723226b3a13fa06fd997617ab9c40f356ea9d7dcecc
EBUILD u-boot-tools-odroidc1-2011.03.ebuild 1111 SHA256 ff88f9cecf20d2c9da08489e6eb0b02696c32d2246344ace9e5cfb8d62870e82 SHA512 f35daef883837dfad01792884a9321ca469ca6f085b5da68098bbdd5328870bfc69daef681dc0641768b8fabc9c4c8dade24ded82baf9fec428a29fd449a3fc4 WHIRLPOOL 0ce361a1ff0e8b3c2de402571ff1abcce2dfd44909eee09c8fd122d7a01398ffc54137f62e4ba0ce29148d2376f00bc149ea30b8c395a34ce1fd444a0b4775ee

View File

@ -0,0 +1,64 @@
From 113d97b63e5ae42eb811cc58e52e0f7722cc23dc Mon Sep 17 00:00:00 2001
From: Pierre-Olivier Mercier <nemunaire@nemunai.re>
Date: Sun, 12 Nov 2017 00:13:36 +0100
Subject: [PATCH] fix missing header
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -I/usr/include -o build/tools/gdb/gdbsend.o gdbsend.c -c
fw_env_aml.c:65:2: error: unknown type name uint8_t
uint8_t mtd_type; /* type of the MTD device */
^
fw_env_aml.c:93:2: error: unknown type name uint32_t
uint32_t crc; /* CRC32 over data bytes */
^
fw_env_aml.c:98:2: error: unknown type name uint32_t
uint32_t crc; /* CRC32 over data bytes */
^
fw_env_aml.c:111:2: error: unknown type name uint32_t
uint32_t *crc;
^
fw_env_aml.c: In function fw_env_close:
fw_env_aml.c:355:31: error: uint8_t undeclared (first use in this function)
*environment.crc = crc32(0, (uint8_t *) environment.data, ENV_SIZE);
^
fw_env_aml.c:355:31: note: each undeclared identifier is reported only once for each function it appears in
fw_env_aml.c:355:40: error: expected expression before ) token
*environment.crc = crc32(0, (uint8_t *) environment.data, ENV_SIZE);
^
fw_env_aml.c:355:21: error: too few arguments to function crc32
*environment.crc = crc32(0, (uint8_t *) environment.data, ENV_SIZE);
^
In file included from fw_env_aml.c:46:0:
fw_env.h:58:23: note: declared here
extern unsigned long crc32 (unsigned long, const unsigned char *, unsigned);
^
fw_env_aml.c: At top level:
fw_env_aml.c:642:37: error: unknown type name uint8_t
static int flash_bad_block (int fd, uint8_t mtd_type, loff_t *blockstart)
^
fw_env_aml.c:670:21: error: unknown type name uint8_t
off_t offset, uint8_t mtd_type)
^
fw_env_aml.c:762:22: error: unknown type name uint8_t
off_t offset, uint8_t mtd_type) ^
---
tools/env/fw_env_aml.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/env/fw_env_aml.c b/tools/env/fw_env_aml.c
index 059dd10..d2aa994 100644
--- a/tools/env/fw_env_aml.c
+++ b/tools/env/fw_env_aml.c
@@ -27,6 +27,7 @@
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
--
2.13.6

View File

@ -1,36 +0,0 @@
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 0f9bffe..910723b 100755
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -21,7 +21,7 @@
# MA 02111-1307 USA
#
-CROSS_COMPILE ?= arm-none-eabi-
+CROSS_COMPILE ?= armv7a-hardfloat-linux-gnueabi-
#arm-linux-
ifeq ($(BOARD),omap2420h4)
diff --git a/arch/arm/cpu/aml_meson/config.mk b/arch/arm/cpu/aml_meson/config.mk
index 0f9bffe..910723b 100755
--- a/arch/arm/cpu/aml_meson/config.mk
+++ b/arch/arm/cpu/aml_meson/config.mk
@@ -1,4 +1,4 @@
-CROSS_COMPILE=arm-none-eabi-
+CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi-
ARM_CPU=cortex-a9
PLATFORM_CPPFLAGS += $(call cc-option,-mcpu=cortex-a9 -ffixed-r8 -mno-long-calls -Wall -fPIC )
PF_CPPFLAGS_NO_UNALIGNED := $(call cc-option, -mno-unaligned-access,)
diff --git a/tools/env/Makefile b/tools/env/Makefile
index 0f9bffe..910723b 100644
--- a/tools/env/Makefile
+++ b/tools/env/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
ifdef CONFIG_AML_MESON
HOSTSRCS := fw_env_aml.c
-HOSTCC = arm-none-linux-gnueabi-gcc
+HOSTCC = armv7a-hardfloat-linux-gnueabi-gcc
else
HOSTSRCS := fw_env.c
endif

View File

@ -1,16 +1,12 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
ETYPE=sources
inherit eutils git-r3 versionator
inherit toolchain-funcs eutils git-r3 versionator
EGIT_REPO_URI=git://github.com/hardkernel/u-boot.git
EGIT_BRANCH="odroidc-v$(get_version_component_range 1-2)"
EGIT_CHECKOUT_DIR="$S"
DESCRIPTION="Odroid C1 U-Boot"
HOMEPAGE="https://github.com/hardkernel/u-boot"
@ -19,32 +15,31 @@ LICENSE="GPL-2"
KEYWORDS="~arm"
src_unpack() {
git-r3_src_unpack
}
src_prepare() {
epatch "${FILESDIR}"/000_change_abi.patch
}
PATCHES=(
"${FILESDIR}/0001-fix-missing-header.patch"
)
src_compile() {
export ARCH=arm
# remove LDFLAGS as ld is called directly
unset LDFLAGS
# Unset a few KBUILD variables. Bug #540476
unset KBUILD_OUTPUT KBUILD_SRC
emake odroidc_config
emake \
HOSTSTRIP=: \
STRIP=: \
HOSTCC="$(tc-getCC)" \
HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' \
odroidc_config
emake
emake tools-all
HOSTLDFLAGS="${LDFLAGS}" \
CONFIG_ENV_OVERWRITE=y \
tools-all
}
src_install() {
cd build/tools
dobin bmp_logo easylogo/easylogo env/fw_printenv gen_eth_addr img2srec inca-swap-bytes mkimage ncb ubsha1 uclpack
cd build/tools || die
dobin bmp_logo gen_eth_addr img2srec inca-swap-bytes mkimage ncb ubsha1 uclpack
dobin easylogo/easylogo
dobin env/fw_printenv
dosym fw_printenv /usr/bin/fw_setenv
doman "${S}"/doc/mkimage.1
cd ../..
dodir /opt/hardkernel