mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-18 04:41:35 +00:00
Update rk3328 patches and config
This commit is contained in:
parent
680a8ca3d7
commit
88b4345666
7 changed files with 53 additions and 48 deletions
|
@ -6,7 +6,11 @@ BOOTSCRIPT='boot-rk3328.cmd:boot.cmd'
|
|||
BOOTENV_FILE='rk3328-default.txt'
|
||||
|
||||
UBOOT_TARGET_MAP=";;idbloader.bin uboot.img trust.bin"
|
||||
UBOOT_USE_GCC='> 6.0'
|
||||
UBOOT_USE_GCC='> 7.0'
|
||||
|
||||
BOOTSOURCE='https://github.com/ayufan-rock64/linux-u-boot'
|
||||
BOOTDIR='u-boot-rk3328'
|
||||
BOOTPATCHDIR="u-boot-rk3328-${BRANCH}"
|
||||
|
||||
HAS_UUID_SUPPORT=yes
|
||||
BOOTDELAY=0
|
||||
|
@ -18,13 +22,10 @@ ATFBRANCH='branch:master'
|
|||
ATF_USE_GCC='> 6.0'
|
||||
ATF_TARGET_MAP='PLAT=rk3328 DEBUG=1 bl31;;trust.bin'
|
||||
|
||||
BOOTSOURCE='https://github.com/ayufan-rock64/linux-u-boot'
|
||||
BOOTDIR='u-boot-rk3328'
|
||||
BOOTBRANCH='branch:release'
|
||||
UBOOT_USE_GCC='> 5.0'
|
||||
|
||||
case $BRANCH in
|
||||
default)
|
||||
BOOTBRANCH='branch:release'
|
||||
|
||||
KERNELSOURCE='https://github.com/ayufan-rock64/linux-kernel'
|
||||
KERNELBRANCH='branch:release-4.4'
|
||||
KERNELDIR='linux-rk3328'
|
||||
|
@ -34,6 +35,8 @@ case $BRANCH in
|
|||
;;
|
||||
|
||||
dev)
|
||||
BOOTBRANCH='branch:mainline-master'
|
||||
|
||||
KERNELSOURCE='https://github.com/ayufan-rock64/linux-mainline-kernel'
|
||||
KERNELBRANCH='branch:master'
|
||||
KERNELDIR='linux-rk3328-mainline'
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
|
||||
index 7924367f..9f4730b1 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/of_device.h>
|
||||
+#include <linux/of_net.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/delay.h>
|
||||
@@ -1156,11 +1157,20 @@ void rk_get_eth_addr(void *priv, unsigned char *addr)
|
||||
int ret;
|
||||
struct rk_priv_data *bsp_priv = priv;
|
||||
struct device *dev = &bsp_priv->pdev->dev;
|
||||
+ const char *dt_mac_addr;
|
||||
|
||||
rk_devinfo_get_eth_mac(addr);
|
||||
if (is_valid_ether_addr(addr))
|
||||
goto out;
|
||||
|
||||
+ if (dev->of_node) {
|
||||
+ dt_mac_addr = of_get_mac_address(dev->of_node);
|
||||
+ if (dt_mac_addr)
|
||||
+ memcpy(addr, dt_mac_addr, ETH_ALEN);
|
||||
+ }
|
||||
+ if (is_valid_ether_addr(addr))
|
||||
+ goto out;
|
||||
+
|
||||
ret = rk_vendor_read(LAN_MAC_ID, addr, 6);
|
||||
if (ret != 6 || !is_valid_ether_addr(addr)) {
|
||||
dev_err(dev, "%s: rk_vendor_read eth mac address failed (%d)",
|
||||
@@ -1176,7 +1186,7 @@ void rk_get_eth_addr(void *priv, unsigned char *addr)
|
||||
}
|
||||
|
||||
out:
|
||||
- dev_err(dev, "%s: mac address: %02x:%02x:%02x:%02x:%02x:%02x",
|
||||
+ dev_info(dev, "%s: mac address: %02x:%02x:%02x:%02x:%02x:%02x",
|
||||
__func__, addr[0], addr[1], addr[2],
|
||||
addr[3], addr[4], addr[5]);
|
||||
}
|
13
patch/kernel/rk3328-dev/set-default-target-to-Image.patch
Normal file
13
patch/kernel/rk3328-dev/set-default-target-to-Image.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
|
||||
index f839ecd9..cd276162 100644
|
||||
--- a/arch/arm64/Makefile
|
||||
+++ b/arch/arm64/Makefile
|
||||
@@ -103,7 +103,7 @@ core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
|
||||
|
||||
# Default target when executing plain make
|
||||
boot := arch/arm64/boot
|
||||
-KBUILD_IMAGE := $(boot)/Image.gz
|
||||
+KBUILD_IMAGE := $(boot)/Image
|
||||
KBUILD_DTBS := dtbs
|
||||
|
||||
all: Image.gz $(KBUILD_DTBS)
|
|
@ -0,0 +1,18 @@
|
|||
diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h
|
||||
index 5a06244594..8bf67a5205 100644
|
||||
--- a/include/configs/rk3328_common.h
|
||||
+++ b/include/configs/rk3328_common.h
|
||||
@@ -51,10 +51,13 @@
|
||||
"kernel_addr_r=0x02000000\0" \
|
||||
"ramdisk_addr_r=0x04000000\0"
|
||||
|
||||
+#define FDTFILE "rockchip/" CONFIG_DEFAULT_DEVICE_TREE ".dtb"
|
||||
+
|
||||
#include <config_distro_bootcmd.h>
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
ENV_MEM_LAYOUT_SETTINGS \
|
||||
"partitions=" PARTS_DEFAULT \
|
||||
+ "fdtfile=" FDTFILE "\0" \
|
||||
BOOTENV
|
||||
|
||||
#endif
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
|
||||
index 0e8dc01..22170d2 100644
|
||||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -1082,6 +1082,8 @@ config ARCH_ROCKCHIP
|
||||
select DM_PWM
|
||||
select DM_REGULATOR
|
||||
imply FAT_WRITE
|
||||
+ select OF_LIBFDT
|
||||
+ select OF_LIBFDT_OVERLAY
|
||||
|
||||
config TARGET_THUNDERX_88XX
|
||||
bool "Support ThunderX 88xx"
|
Loading…
Add table
Reference in a new issue