odroid-c2-uboot: fix with musl, fix with gcc-8

This commit is contained in:
Enno Boland 2018-11-17 11:34:38 +01:00
parent de0fa9acbb
commit 1e42f0ac35
No known key found for this signature in database
GPG Key ID: D09964719BDE9971
5 changed files with 1069 additions and 7 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
--- drivers/gpio/amlogic_gpio.c.orig 2018-11-17 11:44:17.580326515 +0100
+++ drivers/gpio/amlogic_gpio.c 2018-11-17 11:44:22.666420744 +0100
@@ -66,7 +66,7 @@ static int aml_gpio_get_function(struct
unsigned int bit = plat->regs[REG_DIR].bit + offset;
unsigned int val;
val = readl(reg);
- bool dir = !!(val * BIT(bit));
+ bool dir = !!(val && BIT(bit) != 0);
/* GPIOF_FUNC is not implemented yet */

View File

@ -0,0 +1,29 @@
--- arch/arm/cpu/armv8/gxb/bl31_apis.c.orig 2018-11-17 11:41:31.601584797 +0100
+++ arch/arm/cpu/armv8/gxb/bl31_apis.c 2018-11-17 11:41:49.539917138 +0100
@@ -59,10 +59,11 @@ int32_t meson_trustzone_efuse(struct efu
offset = arg->offset;
size = arg->size;
- if (arg->cmd == EFUSE_HAL_API_WRITE)
+ if (arg->cmd == EFUSE_HAL_API_WRITE) {
memcpy((void *)sharemem_input_base,
(const void *)arg->buffer_phy, size);
asm __volatile__("" : : : "memory");
+ }
register uint64_t x0 asm("x0") = cmd;
register uint64_t x1 asm("x1") = offset;
--- drivers/mmc/aml_sd_emmc.c.orig 2018-11-17 11:47:36.303008208 +0100
+++ drivers/mmc/aml_sd_emmc.c 2018-11-17 11:47:45.301174914 +0100
@@ -239,8 +239,9 @@ static int sd_inand_staff_init(struct mm
while (get_timer(base)<200) ;
#endif
}
- if (!sdio->inited_flag)
+ if (!sdio->inited_flag) {
sdio->inited_flag = 1;
+ }
return SD_NO_ERROR;
}

View File

@ -0,0 +1,11 @@
--- drivers/usb/gadget/s3c_udc_otg.c.orig 2018-11-17 11:50:35.892335415 +0100
+++ drivers/usb/gadget/s3c_udc_otg.c 2018-11-17 11:50:39.228397221 +0100
@@ -68,7 +68,7 @@ static char *state_names[] = {
struct s3c_udc *the_controller;
static const char driver_name[] = "s3c-udc";
-static const char driver_desc[] = DRIVER_DESC;
+//static const char driver_desc[] = DRIVER_DESC;
static const char ep0name[] = "ep0-control";
/* Max packet size*/

View File

@ -1,7 +1,7 @@
# Template file for 'odroid-c2-uboot'
pkgname=odroid-c2-uboot
version=v2015.01
revision=3
revision=4
_githash=f416a769454b89c39d5b217d28bd3c9f5d1594df
wrksrc="u-boot-${_githash}"
only_for_archs="aarch64 aarch64-musl"
@ -13,12 +13,6 @@ license="GPL-2"
homepage="https://github.com/hardkernel/u-boot"
distfiles="https://github.com/hardkernel/u-boot/archive/${_githash}.tar.gz"
checksum=6b5fb2c5f278cdeaf8361fbcb349a75ffa551db3f993143f87cefd32fdc38874
broken="fails to build with gcc >= 5"
case "$XBPS_MACHINE" in
x86_64) ;;
*) broken="Can only be built from x86_64: https://github.com/hardkernel/u-boot/issues/23" ;;
esac
make_build_args="ARCH=arm"
if [ "$CROSS_BUILD" ]; then
@ -28,6 +22,7 @@ else
fi
post_extract() {
cp include/linux/compiler-gcc4.h include/linux/compiler-gcc8.h
touch include/stddef.h # musl hack
sed -i '1itypedef unsigned long ulong;' \
include/image.h tools/mkimage.h tools/proftool.c