T113-S3 boot console change from uart0 to uart3

Hi,
I successfully build img with buildroot and enter console prompt on UART0.
Now I want to change to UART3 (also bootloader messages). I don’t now how to generate new env.fex file.
Bytheway: longan_MQ-Dual_uart0_pe2_pe3_rgb800480.img is not working. It seems to be corrupted.

Best regards

tina-sdk

  1. sysconfig.fex
    debug_mode =1
    storage_type = 1
[uart_para]
uart_debug_port = 0
uart_debug_tx   = port:PE02<6><1><default><default>
uart_debug_rx   = port:PE03<6><1><default><default>

uart_debug_port = 3
uart_debug_tx   = port:PB06<7><1><default><default>
uart_debug_rx   = port:PB07<7><1><default><default>

  1. env.cfg
    earlyprintk=sunxi-uart,0x02500C00

console=ttyS3,115200

  1. board.dts
        uart3_pins_a: uart3_pins@0 {  /* For EVB1 board */
                pins = "PB6", "PB7";
                function = "uart3";
                muxsel = <5>;
                drive-strength = <10>;
                bias-pull-up;
        };

&uart3 {
        /*compatible = "allwinner,sun20iw1-dsp-uart";*/
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&uart3_pins_a>;
        pinctrl-1 = <&uart3_pins_a>;
        status = "okay";
};

  1. D1s : u-boot-2018/configs/sun20iw1p1_defconfig
    T113: u-boot-2018/configs/sun8iw20p1_defconfig

added :
CONFIG_BAUDRATE=115200
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_CONS_INDEX=4
#4 is uart3

  1. 内核配置: config-5.4
    CONFIG_DEBUG_UART_PHYS=0x02500c00
    CONFIG_DEBUG_UART_VIRT=0xf2500c00

Thank you very much. Where can I get tina-sdk?
I am experienced with microcontrollers (STM32) but new to embedded linux. Should I use Buildroot and/or other tools? Wich tools?

Best regards

I tried to build Tina-Linux. After overcoming some difficulties I am stuck at make:

Applying ./patches/0001-swupdate-add-awboot_handler.patch using plaintext:
patching file Makefile.flags
Hunk #1 succeeded at 177 (offset -5 lines).
patching file handlers/Config.in
Hunk #1 FAILED at 212.
1 out of 1 hunk FAILED – saving rejects to file handlers/Config.in.rej
patching file handlers/Makefile
patching file handlers/awboot_handler.c
Patch failed! Please fix ./patches/0001-swupdate-add-awboot_handler.patch!
make[3]: *** [Makefile:128: /home/jr/Projects/Tina-Linux/out/t113-evb1/compile_dir/target/swupdate-2019.11/.prepared_0e5f5e98ee4c
ec3bfdc4c56799396c55] Error 1
make[3]: Leaving directory ‘/home/jr/Projects/Tina-Linux/package/allwinner/swupdate’
make[2]: *** [package/Makefile:193: package/allwinner/swupdate/compile] Error 2
make[2]: Leaving directory ‘/home/jr/Projects/Tina-Linux’
make[1]: *** [package/Makefile:189: /home/jr/Projects/Tina-Linux/out/t113-evb1/staging_dir/target/stamp/.package_compile] Error 2
make[1]: Leaving directory ‘/home/jr/Projects/Tina-Linux’
make: *** [/home/jr/Projects/Tina-Linux/build/toplevel.mk:306: world] Error 2
[2]+ Done $T/tools/build/buildserver --path $T 2> /dev/null 1>&2

make failed to build some targets (24 seconds)

Best regards

I tried new setup.
muboot:
There is no directory: Tina-Linux/lichee/brandy-2.0/spl/
but is: Tina-Linux/lichee/brandy-2.0/spl_pub/

r@jr-VirtualBox:~/Projects/Tina-Linux$ source build/envsetup.sh
Setup env done! Please run lunch next.
jr@jr-VirtualBox:~/Projects/Tina-Linux$ lunch

You’re building on Linux

Lunch menu… pick a combo:
1. f133_evb1-tina
2. f133_pro-tina
3. t113_evb1-tina

Which would you like?: 3

TINA_BUILD_TOP=/home/jr/Projects/Tina-Linux
TINA_TARGET_ARCH=arm
TARGET_PRODUCT=t113_evb1
TARGET_PLATFORM=t113
TARGET_BOARD=t113-evb1
TARGET_PLAN=evb1
TARGET_BUILD_VARIANT=tina
TARGET_BUILD_TYPE=release
TARGET_KERNEL_VERSION=5.4
TARGET_UBOOT=u-boot-2018
TARGET_CHIP=sun8iw20p1

no buildserver to clean
[1] 12864
jr@jr-VirtualBox:~/Projects/Tina-Linux$ muboot
t113_evb1 t113 t113-evb1
build_boot platform:sun8iw20p1 o_option:uboot
grep: /home/jr/Projects/Tina-Linux/lichee/brandy-2.0/spl/Makefile: No such file or directory
Prepare toolchain …

Make:
1.)
Tina-Linux/out/t113-evb1/compile_dir/host/m4-1.4.18/lib/c-stack.c
add line 53: #undef SIGSTKSZ
2.)
Tina-Linux/tools/mklibs/Makefile
add line 21: HOST_CPPFLAGS += -std=gnu++14
3.)
Tina-Linux/tools/lz4/Makefile
replace line 11: PKG_VERSION:=1.9.2 with PKG_VERSION:=1.9.3
replace line 16: PKG_MD5SUM:=3898c56c82fb3d9455aefd48db48eaad with PKG_MD5SUM:=3a1ab1684e14fc1afc66228ce61b2db3
also openwrt repository should be changed too.
file:
Tina-Linux/build/download.mk
replace line 8: OPENWRT_GIT =http://github.com/openwrt
with:https://git.openwrt.org

4.)
Tina-Linux/out/t113-evb1/compile_dir/host/fakeroot-1.20.2/libfakeroot.c
add line 185:
#ifndef _STAT_VER
#if defined (aarch64)
#define _STAT_VER 0
#elif defined (x86_64)
#define _STAT_VER 1
#else
#define _STAT_VER 3
#endif
#endif
5.)
Tina-Linux/out/t113-evb1/compile_dir/host/squashfskit-v4.14/squashfs-tools/mksquashfs.h
replace line 136:
struct cache *bwriter_buffer, *fwriter_buffer;
with
extern struct cache *bwriter_buffer, *fwriter_buffer;
6.)
Tina-Linux/out/t113-evb1/compile_dir/host/squashfskit-v4.14/squashfs-tools/mksquashfs.c
replace line 275:
struct cache *bwriter_buffer, *fwriter_buffer;
with
extern struct cache *bwriter_buffer, *fwriter_buffer;

Again same result as in previous post.
Best regards