mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-27 15:06:29 +00:00
Fix some build errors (#146)
* Fix folder * Add tinker board to build all * Fix download URL * Revert uart patch * Fix link p2 * Fix cmdline
This commit is contained in:
parent
c5e85a625f
commit
1dc2392f15
@ -16,7 +16,7 @@ The 64bit version is under development by RPi-Team. It work very nice but it cou
|
|||||||
|
|
||||||
## Serial console
|
## Serial console
|
||||||
|
|
||||||
For access to terminal over serial console, add `console=ttyAMA0,115200` to `cmdline.txt` and `enable_uart=1` into `config.txt`.
|
For access to terminal over serial console, add `console=ttyAMA0,115200` to `cmdline.txt` and `enable_uart=1` into `config.txt`. GPIO pins are: 6 = GND / 8 = UART TXD / 10 = UART RXD.
|
||||||
|
|
||||||
## Tweaks
|
## Tweaks
|
||||||
|
|
||||||
|
17
Documentation/boards/tinker.md
Normal file
17
Documentation/boards/tinker.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Tinker Board
|
||||||
|
|
||||||
|
Supported Hardware:
|
||||||
|
|
||||||
|
| Device | Board |
|
||||||
|
|--------|-----------|
|
||||||
|
| Tinker RK3288 | tinker |
|
||||||
|
| Tinker S RK3288 | tinker |
|
||||||
|
|
||||||
|
## EMMC
|
||||||
|
|
||||||
|
Actual we support only SD cards. The support for EMMC will follow.
|
||||||
|
|
||||||
|
## Serial console
|
||||||
|
|
||||||
|
For access to terminal over serial console, add `console=ttyS2,115200` to `cmdline.txt`. GPIO pins are: 34 = GND / 32 = UART TXD / 33 = UART RXD.
|
||||||
|
|
@ -1,71 +0,0 @@
|
|||||||
From db6c0eae291df886af7efd46703b78b0129ecb22 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
|
||||||
Date: Fri, 3 Aug 2018 10:22:02 +0000
|
|
||||||
Subject: [PATCH 1/1] tinker uart3 debug
|
|
||||||
|
|
||||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
|
||||||
---
|
|
||||||
arch/arm/dts/rk3288-tinker.dts | 4 ++--
|
|
||||||
arch/arm/mach-rockchip/rk3288-board-spl.c | 10 ++++++----
|
|
||||||
configs/tinker-rk3288_defconfig | 2 +-
|
|
||||||
3 files changed, 9 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/arch/arm/dts/rk3288-tinker.dts b/arch/arm/dts/rk3288-tinker.dts
|
|
||||||
index 3edd21cc2f4..372ab8bacdb 100644
|
|
||||||
--- a/arch/arm/dts/rk3288-tinker.dts
|
|
||||||
+++ b/arch/arm/dts/rk3288-tinker.dts
|
|
||||||
@@ -11,7 +11,7 @@
|
|
||||||
compatible = "rockchip,rk3288-tinker", "rockchip,rk3288";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
- stdout-path = &uart2;
|
|
||||||
+ stdout-path = &uart3;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
-&uart2 {
|
|
||||||
+&uart3 {
|
|
||||||
u-boot,dm-pre-reloc;
|
|
||||||
reg-shift = <2>;
|
|
||||||
};
|
|
||||||
diff --git a/arch/arm/mach-rockchip/rk3288-board-spl.c b/arch/arm/mach-rockchip/rk3288-board-spl.c
|
|
||||||
index ea6a14af4f0..8b7fa053a8d 100644
|
|
||||||
--- a/arch/arm/mach-rockchip/rk3288-board-spl.c
|
|
||||||
+++ b/arch/arm/mach-rockchip/rk3288-board-spl.c
|
|
||||||
@@ -154,10 +154,12 @@ void board_init_f(ulong dummy)
|
|
||||||
#define GRF_BASE 0xff770000
|
|
||||||
struct rk3288_grf * const grf = (void *)GRF_BASE;
|
|
||||||
|
|
||||||
- rk_clrsetreg(&grf->gpio7ch_iomux, GPIO7C7_MASK << GPIO7C7_SHIFT |
|
|
||||||
- GPIO7C6_MASK << GPIO7C6_SHIFT,
|
|
||||||
- GPIO7C7_UART2DBG_SOUT << GPIO7C7_SHIFT |
|
|
||||||
- GPIO7C6_UART2DBG_SIN << GPIO7C6_SHIFT);
|
|
||||||
+ rk_clrsetreg(&grf->gpio7a_iomux,
|
|
||||||
+ GPIO7A7_MASK << GPIO7A7_SHIFT,
|
|
||||||
+ GPIO7A7_UART3GPS_SIN << GPIO7A7_SHIFT);
|
|
||||||
+ rk_clrsetreg(&grf->gpio7b_iomux,
|
|
||||||
+ GPIO7B0_MASK << GPIO7B0_SHIFT,
|
|
||||||
+ GPIO7B0_UART3GPS_SOUT << GPIO7B0_SHIFT);
|
|
||||||
/*
|
|
||||||
* Debug UART can be used from here if required:
|
|
||||||
*
|
|
||||||
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
|
|
||||||
index 679d6e29eaf..5f8da09ded8 100644
|
|
||||||
--- a/configs/tinker-rk3288_defconfig
|
|
||||||
+++ b/configs/tinker-rk3288_defconfig
|
|
||||||
@@ -5,7 +5,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
|
|
||||||
CONFIG_ROCKCHIP_RK3288=y
|
|
||||||
CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y
|
|
||||||
CONFIG_TARGET_TINKER_RK3288=y
|
|
||||||
-CONFIG_DEBUG_UART_BASE=0xff690000
|
|
||||||
+CONFIG_DEBUG_UART_BASE=0xff1b0000
|
|
||||||
CONFIG_DEBUG_UART_CLOCK=24000000
|
|
||||||
CONFIG_SPL_STACK_R_ADDR=0x80000
|
|
||||||
CONFIG_DEFAULT_DEVICE_TREE="rk3288-tinker"
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -3,7 +3,7 @@ test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
|
|||||||
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
|
||||||
|
|
||||||
# HassOS bootargs
|
# HassOS bootargs
|
||||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor rootwait console=ttyS1,115200n8 console=ttyS2,115200n8"
|
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor rootwait"
|
||||||
|
|
||||||
# HassOS system A/B
|
# HassOS system A/B
|
||||||
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro"
|
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro"
|
||||||
@ -24,14 +24,14 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
|||||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||||
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
||||||
setenv load_kernel "ext4load mmc 1:2 ${kernel_addr_r} zImage"
|
setenv load_kernel "ext4load mmc 1:2 ${kernel_addr_r} zImage"
|
||||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} ${cmdline} rauc.slot=A"
|
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||||
fi
|
fi
|
||||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||||
if test ${BOOT_B_LEFT} -gt 0; then
|
if test ${BOOT_B_LEFT} -gt 0; then
|
||||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||||
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
||||||
setenv load_kernel "ext4load mmc 1:4 ${kernel_addr_r} zImage"
|
setenv load_kernel "ext4load mmc 1:4 ${kernel_addr_r} zImage"
|
||||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} ${cmdline} rauc.slot=B"
|
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -11,8 +11,8 @@ BLUETOOTH_BCM43XX_SITE = $(BR2_EXTERNAL_HASSOS_PATH)/package/bluetooth-bcm43xx
|
|||||||
BLUETOOTH_BCM43XX_SITE_METHOD = local
|
BLUETOOTH_BCM43XX_SITE_METHOD = local
|
||||||
|
|
||||||
define BLUETOOTH_BCM43XX_BUILD_CMDS
|
define BLUETOOTH_BCM43XX_BUILD_CMDS
|
||||||
curl -o $(@D)/BCM43430A1.hcd https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/ade2bae1aaaebede09abb8fb546f767a0e4c7804/broadcom/BCM43430A1.hcd
|
curl -L -o $(@D)/BCM43430A1.hcd https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/ade2bae1aaaebede09abb8fb546f767a0e4c7804/broadcom/BCM43430A1.hcd
|
||||||
curl -o $(@D)/BCM4345C0.hcd https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/ade2bae1aaaebede09abb8fb546f767a0e4c7804/broadcom/BCM4345C0.hcd
|
curl -L -o $(@D)/BCM4345C0.hcd https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/ade2bae1aaaebede09abb8fb546f767a0e4c7804/broadcom/BCM4345C0.hcd
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define BLUETOOTH_BCM43XX_INSTALL_TARGET_CMDS
|
define BLUETOOTH_BCM43XX_INSTALL_TARGET_CMDS
|
||||||
|
@ -11,10 +11,10 @@ BLUETOOTH_RTL8723_SITE = $(BR2_EXTERNAL_HASSOS_PATH)/package/bluetooth-rtl8723
|
|||||||
BLUETOOTH_RTL8723_SITE_METHOD = local
|
BLUETOOTH_RTL8723_SITE_METHOD = local
|
||||||
|
|
||||||
define BLUETOOTH_RTL8723_BUILD_CMDS
|
define BLUETOOTH_RTL8723_BUILD_CMDS
|
||||||
curl -o $(@D)/rtk_hciattach https://github.com/armbian/build/raw/dee62df8bb2fe8611fd41ddf02063fa15533298c/packages/bsp/rockchip/rtk_hciattach
|
curl -L -o $(@D)/rtk_hciattach https://raw.githubusercontent.com/armbian/build/dee62df8bb2fe8611fd41ddf02063fa15533298c/packages/bsp/rockchip/rtk_hciattach
|
||||||
|
|
||||||
curl -o $(@D)/rtl8723b_config.bin https://github.com/armbian/firmware/raw/4723bbb3d1ef70b5fbe7d2599c47d078ab125c47/rtl_bt/rtl8723b_config.bin
|
curl -L -o $(@D)/rtl8723b_config.bin https://raw.githubusercontent.com/armbian/firmware/4723bbb3d1ef70b5fbe7d2599c47d078ab125c47/rtl_bt/rtl8723b_config.bin
|
||||||
curl -o $(@D)/rtl8723b_fw.bin https://github.com/armbian/firmware/raw/4723bbb3d1ef70b5fbe7d2599c47d078ab125c47/rtl_bt/rtl8723b_fw.bin
|
curl -L -o $(@D)/rtl8723b_fw.bin https://raw.githubusercontent.com/armbian/firmware/4723bbb3d1ef70b5fbe7d2599c47d078ab125c47/rtl_bt/rtl8723b_fw.bin
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define BLUETOOTH_RTL8723_INSTALL_TARGET_CMDS
|
define BLUETOOTH_RTL8723_INSTALL_TARGET_CMDS
|
||||||
@ -23,8 +23,8 @@ define BLUETOOTH_RTL8723_INSTALL_TARGET_CMDS
|
|||||||
$(INSTALL) -m 0644 $(@D)/bluetooth-rtl8723.service $(TARGET_DIR)/usr/lib/systemd/system/
|
$(INSTALL) -m 0644 $(@D)/bluetooth-rtl8723.service $(TARGET_DIR)/usr/lib/systemd/system/
|
||||||
ln -fs /usr/lib/systemd/system/bluetooth-rtl8723.service $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants/
|
ln -fs /usr/lib/systemd/system/bluetooth-rtl8723.service $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants/
|
||||||
|
|
||||||
$(INSTALL) -d $(TARGET_DIR)/lib/firmware/rtl_bt
|
$(INSTALL) -d $(TARGET_DIR)/lib/firmware/rtlbt
|
||||||
$(INSTALL) -m 0644 $(@D)/*.bin $(TARGET_DIR)/lib/firmware/rtl_bt/
|
$(INSTALL) -m 0644 $(@D)/*.bin $(TARGET_DIR)/lib/firmware/rtlbt/
|
||||||
$(INSTALL) -m 0755 $(@D)/rtk_hciattach $(TARGET_DIR)/usr/sbin/
|
$(INSTALL) -m 0755 $(@D)/rtk_hciattach $(TARGET_DIR)/usr/sbin/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
From c5e56bfeffd5ba881e4f08dc00d8e5e10e880bdf Mon Sep 17 00:00:00 2001
|
From f76279f1d01d107972e7d1dce2ebcdfa00544da9 Mon Sep 17 00:00:00 2001
|
||||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||||
Date: Fri, 3 Aug 2018 09:47:15 +0000
|
Date: Sun, 5 Aug 2018 20:43:03 +0000
|
||||||
Subject: [PATCH 1/1] CMD: read string from fileinto env
|
Subject: [PATCH 1/1] CMD: read string from fileinto env
|
||||||
|
|
||||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||||
@ -41,7 +41,7 @@ index 323f1fd2c77..0d721dc5a72 100644
|
|||||||
obj-$(CONFIG_CMD_SMC) += smccc.o
|
obj-$(CONFIG_CMD_SMC) += smccc.o
|
||||||
diff --git a/cmd/fileenv.c b/cmd/fileenv.c
|
diff --git a/cmd/fileenv.c b/cmd/fileenv.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000000..c52001cbe83
|
index 00000000000..77699192f93
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/cmd/fileenv.c
|
+++ b/cmd/fileenv.c
|
||||||
@@ -0,0 +1,30 @@
|
@@ -0,0 +1,30 @@
|
||||||
@ -55,17 +55,17 @@ index 00000000000..c52001cbe83
|
|||||||
+{
|
+{
|
||||||
+ if (argc < 6)
|
+ if (argc < 6)
|
||||||
+ return CMD_RET_USAGE;
|
+ return CMD_RET_USAGE;
|
||||||
+ char *addr = (char *)simple_strtoul(argv[3], NULL, 16);
|
|
||||||
+
|
+
|
||||||
+ fs_argv[0] = "fatload";
|
+ fs_argv[0] = "fatload";
|
||||||
+ fs_argv[1] = argv[1];
|
+ fs_argv[1] = argv[1];
|
||||||
+ fs_argv[2] = argv[2];
|
+ fs_argv[2] = argv[2];
|
||||||
+ fs_argv[3] = addr;
|
+ fs_argv[3] = argv[3];
|
||||||
+ fs_argv[4] = argv[4];
|
+ fs_argv[4] = argv[4];
|
||||||
+
|
+
|
||||||
+ if (!do_fat_fsload(cmdtp, 0, 5, fs_argv))
|
+ if (do_fat_fsload(cmdtp, 0, 5, fs_argv) != 0)
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+
|
+
|
||||||
|
+ char *addr = (char *)simple_strtoul(argv[3], NULL, 16);
|
||||||
+ return env_set(argv[5], addr);
|
+ return env_set(argv[5], addr);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
@ -57,6 +57,8 @@ function _write_rauc_system() {
|
|||||||
|
|
||||||
|
|
||||||
function write_rauc_config() {
|
function write_rauc_config() {
|
||||||
|
mkdir -p ${TARGET_DIR}/etc/rauc
|
||||||
|
|
||||||
_create_rauc_header
|
_create_rauc_header
|
||||||
_write_rauc_boot
|
_write_rauc_boot
|
||||||
_write_rauc_system 0 A
|
_write_rauc_system 0 A
|
||||||
|
@ -3,7 +3,7 @@ set -e
|
|||||||
|
|
||||||
mkdir -p /build/release
|
mkdir -p /build/release
|
||||||
|
|
||||||
all_platforms=(ova rpi rpi0_w rpi2 rpi3 rpi3_64)
|
all_platforms=(ova rpi rpi0_w rpi2 rpi3 rpi3_64 tinker)
|
||||||
for platform in "${all_platforms[@]}"; do
|
for platform in "${all_platforms[@]}"; do
|
||||||
make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external \
|
make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external \
|
||||||
${platform}_defconfig
|
${platform}_defconfig
|
||||||
|
Loading…
x
Reference in New Issue
Block a user