Skip to content

Commit 3fb9d6d

Browse files
committed
Add(T113): Support Tina5 v1.0 SDK
1. Debug Uart3 config PB6 PB7 2. Support SPI NAND Flash Signed-off-by: codebug8 <[email protected]>
1 parent 8e2abb0 commit 3fb9d6d

29 files changed

+5512
-0
lines changed
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
linux-5.4/board.dts
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
LICHEE_KERN_DEFCONF:=config-5.4
2+
LICHEE_KERN_DEFCONF_RECOVERY:=config-5.4-recovery
3+
LICHEE_BR_RAMFS_CONF=sun8iw20p1_recovery_nand_defconfig
4+
LICHEE_BUILDING_SYSTEM:=buildroot
5+
LICHEE_BR_VER:=201902
6+
LICHEE_BR_DEFCONF:=sun8iw20p1_t113_nand_defconfig
7+
LICHEE_COMPILER_TAR=arm/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi.tar.xz
8+
LICHEE_BRANDY_DEFCONF:=sun8iw20p1_t113s3p_nand_defconfig
9+
LICHEE_REDUNDANT_ENV_SIZE:=0x20000
10+
LICHEE_RTOS_PROJECT_NAME:=
11+
LICHEE_NO_RAMDISK_NEEDED:=y
12+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
LICHEE_CHIP:=sun8iw20p1
2+
LICHEE_ARCH:=arm
3+
LICHEE_BRANDY_VER:=2.0
4+
LICHEE_FLASH:=nor
5+
LICHEE_BRANDY_DEFCONF:=sun8iw20p1_defconfig
6+
LICHEE_KERN_VER:=5.4
7+
LICHEE_KERN_DEFCONF:=sun8iw20p1smp_min_defconfig
8+
LICHEE_ROOTFS:=target-arm-linaro-5.3.tar.bz2
9+
Binary file not shown.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
#kernel command arguments
3+
earlyprintk=sunxi-uart,0x02500000
4+
initcall_debug=0
5+
console=ttyS0,115200
6+
nand_root=ubi0_5
7+
nor_root=/dev/mtdblock5
8+
mmc_root=/dev/mmcblk0p5
9+
mtd_name=sys
10+
rootfstype=ubifs,rw
11+
init=/init
12+
loglevel=8
13+
cma=8M
14+
mac=
15+
wifi_mac=
16+
bt_mac=
17+
specialstr=
18+
keybox_list=widevine,ec_key,ec_cert1,ec_cert2,ec_cert3,rsa_key,rsa_cert1,rsa_cert2,rsa_cert3
19+
dsp0_partition=dsp0
20+
#set kernel cmdline if boot.img or recovery.img has no cmdline we will use this
21+
setargs_nor=setenv bootargs earlyprintk=${earlyprintk} clk_ignore_unused initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${nor_root} init=${init} partitions=${partitions} cma=${cma} snum=${snum} mac_addr=${mac} wifi_mac=${wifi_mac} bt_mac=${bt_mac} specialstr=${specialstr} gpt=1
22+
setargs_nand=setenv bootargs ubi.mtd=${mtd_name} earlyprintk=${earlyprintk} clk_ignore_unused initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${nand_root} rootfstype=${rootfstype} init=${init} partitions=${partitions} cma=${cma} snum=${snum} mac_addr=${mac} wifi_mac=${wifi_mac} bt_mac=${bt_mac} specialstr=${specialstr} gpt=1
23+
setargs_nand_ubi=setenv bootargs ubi.mtd=${mtd_name} earlyprintk=${earlyprintk} clk_ignore_unused initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${nand_root} rootfstype=${rootfstype} init=${init} partitions=${partitions} cma=${cma} snum=${snum} mac_addr=${mac} wifi_mac=${wifi_mac} bt_mac=${bt_mac} specialstr=${specialstr} gpt=1
24+
setargs_mmc=setenv bootargs earlyprintk=${earlyprintk} clk_ignore_unused initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${mmc_root} init=${init} partitions=${partitions} cma=${cma} snum=${snum} mac_addr=${mac} wifi_mac=${wifi_mac} bt_mac=${bt_mac} specialstr=${specialstr} gpt=1
25+
#nand command syntax: sunxi_flash read address partition_name read_bytes
26+
#0x4007f800 = 0x40080000(kernel entry) - 0x800(boot.img header 2k)
27+
boot_dsp0=sunxi_flash read 43000000 ${dsp0_partition};bootr 43000000 0 0
28+
boot_normal=sunxi_flash read 43000000 boot;bootm 43000000
29+
boot_recovery=sunxi_flash read 43000000 recovery;bootm 43000000
30+
boot_fastboot=fastboot
31+
32+
#uboot system env config
33+
bootdelay=0
34+
#default bootcmd, will change at runtime according to key press
35+
#default nand boot
36+
bootcmd=run setargs_nor boot_normal
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
#kernel command arguments
3+
earlycon=uart8250,mmio32,0x05000000
4+
initcall_debug=0
5+
console=ttyS3,115200
6+
nand_root=ubi0_5
7+
mmc_root=/dev/mmcblk0p5
8+
mtd_name=sys
9+
rootfstype=ubifs,rw
10+
root_partition=rootfsA
11+
boot_partition=bootA
12+
init=/init
13+
loglevel=8
14+
cma=16M
15+
mac=
16+
wifi_mac=
17+
bt_mac=
18+
specialstr=
19+
keybox_list=widevine,ec_key,ec_cert1,ec_cert2,ec_cert3,rsa_key,rsa_cert1,rsa_cert2,rsa_cert3
20+
dsp0_partition=dsp0
21+
riscv0_partition=riscv0
22+
#set kernel cmdline if boot.img or recovery.img has no cmdline we will use this
23+
setargs_nand=setenv bootargs ubi.mtd=${mtd_name} ubi.block=0,${root_partition} earlyprintk=${earlyprintk} clk_ignore_unused initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${nand_root} rootfstype=${rootfstype} init=${init} partitions=${partitions} cma=${cma} snum=${snum} mac_addr=${mac} wifi_mac=${wifi_mac} bt_mac=${bt_mac} specialstr=${specialstr} gpt=1
24+
setargs_nand_ubi=setenv bootargs ubi.mtd=${mtd_name} ubi.block=0,${root_partition} earlyprintk=${earlyprintk} clk_ignore_unused initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${nand_root} rootfstype=${rootfstype} init=${init} partitions=${partitions} cma=${cma} snum=${snum} mac_addr=${mac} wifi_mac=${wifi_mac} bt_mac=${bt_mac} specialstr=${specialstr} gpt=1
25+
setargs_mmc=setenv bootargs ubi.block=0,${root_partition} earlyprintk=${earlyprintk} clk_ignore_unused initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${mmc_root} init=${init} partitions=${partitions} cma=${cma} snum=${snum} mac_addr=${mac} wifi_mac=${wifi_mac} bt_mac=${bt_mac} specialstr=${specialstr} gpt=1
26+
#nand command syntax: sunxi_flash read address partition_name read_bytes
27+
#0x4007f800 = 0x40080000(kernel entry) - 0x800(boot.img header 2k)
28+
boot_dsp0=sunxi_flash read 43000000 ${dsp0_partition};bootr 43000000 0 0
29+
boot_riscv0=sunxi_flash read 43000000 ${riscv0_partition};bootrv 43000000 600000 0
30+
boot_normal=sunxi_flash read 43000000 ${boot_partition};bootm 43000000
31+
boot_recovery=sunxi_flash read 43000000 recovery;bootm 43000000
32+
boot_fastboot=fastboot
33+
34+
#uboot system env config
35+
bootdelay=0
36+
#default bootcmd, will change at runtime according to key press
37+
#default nand boot
38+
bootcmd=run setargs_mmc boot_normal
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
software =
2+
{
3+
version = "0.1.0";
4+
description = "Firmware update for t113s3p emmc Project";
5+
6+
stable = {
7+
8+
/* now in systemA, we need to upgrade systemB(bootB, rootfsB) */
9+
now_A_next_B = {
10+
images: (
11+
{
12+
filename = "kernel";
13+
device = "/dev/by-name/bootB";
14+
installed-directly = true;
15+
},
16+
{
17+
filename = "rootfs";
18+
device = "/dev/by-name/rootfsB";
19+
installed-directly = true;
20+
},
21+
{
22+
filename = "uboot";
23+
type = "awuboot";
24+
},
25+
{
26+
filename = "boot0";
27+
type = "awboot0";
28+
}
29+
);
30+
bootenv: (
31+
{
32+
name = "swu_mode";
33+
value = "upgrade_usr";
34+
},
35+
{
36+
name = "boot_partition";
37+
value = "bootB";
38+
},
39+
{
40+
name = "root_partition";
41+
value = "rootfsB";
42+
}
43+
);
44+
};
45+
46+
/* now in systemB, we need to upgrade systemA(bootA, rootfsA) */
47+
now_B_next_A = {
48+
images: (
49+
{
50+
filename = "kernel";
51+
device = "/dev/by-name/bootA";
52+
installed-directly = true;
53+
},
54+
{
55+
filename = "rootfs";
56+
device = "/dev/by-name/rootfsA";
57+
installed-directly = true;
58+
},
59+
{
60+
filename = "uboot";
61+
type = "awuboot";
62+
},
63+
{
64+
filename = "boot0";
65+
type = "awboot0";
66+
}
67+
);
68+
bootenv: (
69+
{
70+
name = "swu_mode";
71+
value = "upgrade_usr";
72+
},
73+
{
74+
name = "boot_partition";
75+
value = "bootA";
76+
},
77+
{
78+
name = "root_partition";
79+
value = "rootfsA";
80+
}
81+
);
82+
};
83+
84+
/* upgrade usr ==> clean ==> reboot */
85+
upgrade_usr = {
86+
/* upgrade usr */
87+
88+
/* clean swu_param,swu_software,swu_mode & reboot */
89+
bootenv: (
90+
{
91+
name = "swu_param";
92+
value = "";
93+
},
94+
{
95+
name = "swu_software";
96+
value = "";
97+
},
98+
{
99+
name = "swu_mode";
100+
value = "";
101+
},
102+
{
103+
name = "swu_next";
104+
value = "reboot";
105+
}
106+
);
107+
};
108+
109+
};
110+
111+
/* when not call with -e xxx,xxx just clean */
112+
bootenv: (
113+
{
114+
name = "swu_param";
115+
value = "";
116+
},
117+
{
118+
name = "swu_software";
119+
value = "";
120+
},
121+
{
122+
name = "swu_mode";
123+
value = "";
124+
},
125+
{
126+
name = "swu_version";
127+
value = "";
128+
}
129+
);
130+
131+
}
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
software =
2+
{
3+
version = "0.1.0";
4+
description = "Firmware update for t113s3p emmc Project";
5+
6+
stable = {
7+
8+
/* now in systemA, we need to upgrade systemB(bootB, rootfsB) */
9+
now_A_next_B = {
10+
images: (
11+
{
12+
filename = "kernel.rdiff.delta";
13+
type = "rdiff_image";
14+
device = "/dev/by-name/bootB";
15+
properties: {
16+
rdiffbase = ["/dev/by-name/bootA"];
17+
};
18+
},
19+
{
20+
filename = "rootfs.rdiff.delta";
21+
type = "rdiff_image";
22+
device = "/dev/by-name/rootfsB";
23+
properties: {
24+
rdiffbase = ["/dev/by-name/rootfsA"];
25+
};
26+
},
27+
{
28+
filename = "uboot";
29+
type = "awuboot";
30+
},
31+
{
32+
filename = "boot0";
33+
type = "awboot0";
34+
}
35+
);
36+
bootenv: (
37+
{
38+
name = "swu_mode";
39+
value = "upgrade_usr";
40+
},
41+
{
42+
name = "boot_partition";
43+
value = "bootB";
44+
},
45+
{
46+
name = "root_partition";
47+
value = "rootfsB";
48+
}
49+
);
50+
};
51+
52+
/* now in systemB, we need to upgrade systemA(bootA, rootfsA) */
53+
now_B_next_A = {
54+
images: (
55+
{
56+
filename = "kernel.rdiff.delta";
57+
type = "rdiff_image";
58+
device = "/dev/by-name/bootA";
59+
properties: {
60+
rdiffbase = ["/dev/by-name/bootB"];
61+
};
62+
},
63+
{
64+
filename = "rootfs.rdiff.delta";
65+
type = "rdiff_image";
66+
device = "/dev/by-name/rootfsA";
67+
properties: {
68+
rdiffbase = ["/dev/by-name/rootfsB"];
69+
};
70+
},
71+
{
72+
filename = "uboot";
73+
type = "awuboot";
74+
},
75+
{
76+
filename = "boot0";
77+
type = "awboot0";
78+
}
79+
);
80+
bootenv: (
81+
{
82+
name = "swu_mode";
83+
value = "";
84+
},
85+
{
86+
name = "boot_partition";
87+
value = "bootA";
88+
},
89+
{
90+
name = "root_partition";
91+
value = "rootfsA";
92+
}
93+
);
94+
};
95+
96+
/* upgrade usr ==> clean ==> reboot */
97+
upgrade_usr = {
98+
/* upgrade usr */
99+
100+
/* clean swu_param,swu_software,swu_mode & reboot */
101+
bootenv: (
102+
{
103+
name = "swu_param";
104+
value = "";
105+
},
106+
{
107+
name = "swu_software";
108+
value = "";
109+
},
110+
{
111+
name = "swu_mode";
112+
value = "";
113+
},
114+
{
115+
name = "swu_next";
116+
value = "reboot";
117+
}
118+
);
119+
};
120+
121+
};
122+
123+
/* when not call with -e xxx,xxx just clean */
124+
bootenv: (
125+
{
126+
name = "swu_param";
127+
value = "";
128+
},
129+
{
130+
name = "swu_software";
131+
value = "";
132+
},
133+
{
134+
name = "swu_mode";
135+
value = "";
136+
},
137+
{
138+
name = "swu_version";
139+
value = "";
140+
}
141+
);
142+
143+
}

0 commit comments

Comments
 (0)