Tiny Rockchip related fixes. Fix boot priority on MiQi. Start from SD if insterted, otherwise boot from eMMC, go up with u-boot to 2017.11, 2018.03 hangs ...

This commit is contained in:
Igor Pecovnik 2018-05-30 11:46:32 +00:00
parent e83d5b54ac
commit a7b8386b02
6 changed files with 23 additions and 2 deletions

View File

@ -1,2 +1,3 @@
verbosity=1
console=tty1
console=both

View File

@ -1 +1,2 @@
verbosity=1
ethaddr=06:e6:ad:01:68:3c

View File

@ -6,7 +6,7 @@
setenv rootdev "/dev/mmcblk0p1"
setenv fdt_file "rk3288-miqi.dtb"
setenv ramdisk_addr_r "0x21000000"
setenv console "ttyS2,115200n8"
setenv console "ttyS2,115200n8 console=tty1"
setenv verbosity "1"
itest.b ${devnum} == 0 && echo "U-boot loaded from SD"

2
config/sources/rockchip.conf Executable file → Normal file
View File

@ -10,7 +10,7 @@ BOOTDELAY=0
BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
BOOTDIR=$MAINLINE_UBOOT_DIR
BOOTBRANCH='tag:v2017.09'
BOOTBRANCH='tag:v2017.11'
SERIALCON=ttyS2

View File

@ -140,6 +140,10 @@ case "$1" in
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
systemctl restart systemd-networkd
;;
*)
# change random mac from armbianEnv.txt
MACADDR=$(printf 'DC:44:6D:%02X:%02X:%02X\n' $[RANDOM%256] $[RANDOM%256] $[RANDOM%256])
[[ -f /boot/armbianEnv.txt ]] && sed -i "s/^ethaddr=.*/ethaddr=$MACADDR/" /boot/armbianEnv.txt
esac
systemctl disable firstrun

View File

@ -0,0 +1,15 @@
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index 35d948a..0710f02
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -14,8 +14,8 @@
/* First try to boot from SD (index 0), then eMMC (index 1) */
#if CONFIG_IS_ENABLED(CMD_MMC)
#define BOOT_TARGET_MMC(func) \
- func(MMC, mmc, 0) \
- func(MMC, mmc, 1)
+ func(MMC, mmc, 1) \
+ func(MMC, mmc, 0)
#else
#define BOOT_TARGET_MMC(func)
#endif