diff --git a/config/bootscripts/boot-pine64-default.cmd b/config/bootscripts/boot-pine64-default.cmd index 4f7a8be191..26f21e6ebb 100644 --- a/config/bootscripts/boot-pine64-default.cmd +++ b/config/bootscripts/boot-pine64-default.cmd @@ -24,10 +24,19 @@ if test "${console}" = "serial" || test "${console}" = "both"; then setenv conso setenv bootargs "root=${rootdev} rootfstype=${rootfstype} rootwait ${consoleargs} no_console_suspend earlycon=uart,mmio32,0x01c28000 mac_addr=${ethaddr} panic=10 consoleblank=0 loglevel=${verbosity} ${extraargs} ${extraboardargs}" +# determine board type from DT compiled into u-boot binary, currently SoPine is not autodetected +fdt get value dt_name / dt-name +if test "${dt_name}" = "sun50iw1p1-pine64so"; then + setenv pine64_model "pine64so" +fi + load mmc ${boot_part} ${fdt_addr} ${prefix}dtb/sun50iw1p1-${pine64_model}.dtb load mmc ${boot_part} ${initrd_addr} ${prefix}uInitrd load mmc ${boot_part} ${kernel_addr} ${prefix}Image +fdt addr ${fdt_addr} +fdt resize + # set display resolution from uEnv.txt or other environment file # default to 720p60 if test "${disp_mode}" = "480i"; then setenv fdt_disp_mode "<0x00000000>" @@ -47,13 +56,11 @@ elif test "${disp_mode}" = "2160p24"; then setenv fdt_disp_mode "<0x0000001e>" else setenv fdt_disp_mode "<0x00000005>" fi -fdt addr ${fdt_addr} -fdt resize if test "${pine64_lcd}" = "1" || test "${pine64_lcd}" = "on"; then fdt set /soc@01c00000/disp@01000000 screen0_output_type "<0x00000001>" fdt set /soc@01c00000/disp@01000000 screen0_output_mode "<0x00000004>" fdt set /soc@01c00000/disp@01000000 screen1_output_mode ${fdt_disp_mode} - + fdt set /soc@01c00000/lcd0@01c0c000 lcd_used "<0x00000001>" fdt set /soc@01c00000/boot_disp output_type "<0x00000001>" @@ -62,7 +69,7 @@ if test "${pine64_lcd}" = "1" || test "${pine64_lcd}" = "on"; then fdt set /soc@01c00000/ctp status "okay" fdt set /soc@01c00000/ctp ctp_used "<0x00000001>" fdt set /soc@01c00000/ctp ctp_name "gt911_DB2" -else +elif test "${pine64_model}" != "pine64-pinebook"; then fdt set /soc@01c00000/disp@01000000 screen0_output_mode ${fdt_disp_mode} fi diff --git a/config/sources/sun50iw1.conf b/config/sources/sun50iw1.conf index 554c30afcd..d9155028ef 100644 --- a/config/sources/sun50iw1.conf +++ b/config/sources/sun50iw1.conf @@ -50,9 +50,6 @@ family_tweaks() cp $SRC/lib/config/asound.state.pine64-default $CACHEDIR/$SDCARD/var/lib/alsa/asound.state fi fi - if [[ $BRANCH == default && $BOARD == pine64so ]]; then - echo "pine64_model=pine64so" >> $CACHEDIR/$SDCARD/boot/armbianEnv.txt - fi if [[ $BRANCH == dev && $BOARD == pine64so ]]; then echo "mmc0-broken-cd=on" >> $CACHEDIR/$SDCARD/boot/armbianEnv.txt fi diff --git a/patch/u-boot/u-boot-pine64-default/stop-autoboot-double-esc.patch b/patch/u-boot/u-boot-pine64-default/stop-autoboot-double-esc.patch new file mode 100644 index 0000000000..49b5ceacea --- /dev/null +++ b/patch/u-boot/u-boot-pine64-default/stop-autoboot-double-esc.patch @@ -0,0 +1,14 @@ +diff --git a/u-boot-pine64/include/configs/sun50iw1p1.h b/u-boot-pine64/include/configs/sun50iw1p1.h +index f2eebc0..cd8b0fd 100644 +--- a/u-boot-pine64/include/configs/sun50iw1p1.h ++++ b/u-boot-pine64/include/configs/sun50iw1p1.h +@@ -419,7 +419,8 @@ + + #define CONFIG_AUTOBOOT_KEYED + #define CONFIG_AUTOBOOT_STOP_STR "s" +-#define CONFIG_AUTOBOOT_PROMPT "autoboot in %d seconds, Press s to abort\n",bootdelay ++#define CONFIG_AUTOBOOT_STOP_STR2 "\x1b\x1b" ++#define CONFIG_AUTOBOOT_PROMPT "autoboot in %d seconds, Press s or to abort\n",bootdelay + + // Make it actually useful. + #define CONFIG_SYS_BOOTMAPSZ 0x4000000