@@ -11,43 +11,48 @@ sidebar_position: 2
1111首先,在Windows上访问下面的论坛地址,打开Tina5-SDK基础包获取:通过网盘分享的文件:T113s4sdnand-SDK
1212链接: https://pan.baidu.com/s/1JhS8JNbhPgcCiaVDay_rYw?pwd=bdz2 提取码: bdz2
1313
14- > 通过百度网盘下载,大小约21.81G,名称为t113s4 -tin5SDK-8939a92cf6401f1d2e156bc1e248d5e4.tar.gz 下载完成后通过网络等方式拷贝到虚拟机目录下。
14+ > 通过百度网盘下载,大小约21.81G,名称为 t113s4 -tin5SDK-8939a92cf6401f1d2e156bc1e248d5e4.tar.gz 下载完成后通过网络等方式拷贝到虚拟机目录下。
1515
1616把基础包拷贝到虚拟机之后,执行以下指令,进行解压:
1717
1818~~~ bash
19- ubuntu@ubuntu1804:~ $ tar -xvf t113s4-tin5SDK-8939a92cf6401f1d2e156bc1e248d5e4.tar.gz -c tina5sdk-bsp
19+ ubuntu@ubuntu1804:~ $ tar -xvf t113s4-tin5SDK-8939a92cf6401f1d2e156bc1e248d5e4.tar.gz
2020~~~
2121
22- 解压后,sdk基础包的命名是` t113s4-tin5SDK ` 。
22+ 解压后,sdk基础包的命名是` t113-tin5-v1.2 ` 。
2323
2424出现以上文件,说明Tina5-SDK源码获取成功。
2525
2626## 获取补丁包
2727
28-
2928基于T113s4pro v1.3 sdnand版本开发板,我们提供了一个扩展补丁包,执行以下指令,获取扩展支持仓库,然后加以应用,
3029
3130~~~ bash
3231ubuntu@ubuntu1804:~ $ git clone https://github.com/DongshanPI/100ASK_T113s4-SdNand_TinaSDK5.git
33- ubuntu@ubuntu1804:~ $ cd ~ /tina5sdk-bsp
34- ubuntu@ubuntu1804:~ /tina5sdk-bsp $ cp ./100ASK_T113s4-SdNand_TinaSDK5/* -rfvd .
32+ ubuntu@ubuntu1804:~ $ cd t113-tin5-v1.2/
33+ ubuntu@ubuntu1804:~ /t113-tin5-v1.2 $ cp . ./100ASK_T113s4-SdNand_TinaSDK5/* -rfvd .
3534~~~
3635
36+ ![ image-20251106114156868] ( ./images/image-20251106114156868.png )
37+
3738## 编译固件
3839
39- 进入 sdk 源码根目录 ` tina5sdk-bsp ` ,执行以下指令,删除配置文件:
40+ 进入 sdk 源码根目录 ` t113-tin5-v1.2 ` ,执行以下指令,删除配置文件:
4041
4142~~~ bash
42- ubuntu@ubuntu1804:~ $ cd tina5sdk-bsp /
43- ubuntu@ubuntu1804:~ /tina5sdk-bsp $ rm .buildconfig
43+ ubuntu@ubuntu1804:~ $ cd t113-tin5-v1.2 /
44+ ubuntu@ubuntu1804:~ /t113-tin5-v1.2 $ rm .buildconfig
4445~~~
4546
4647继续在当前路径下,执行指令,初始化环境变量,
4748
49+ ``` bash
50+ ubuntu@ubuntu1804:~ /t113-tin5-v1.2$ source build/envsetup.sh
51+ ```
52+
4853~~~ bash
49- ubuntu@ubuntu1804: ~ /tina5sdk-bsp$ source build/envsetup.sh
50- NOTE: The SDK(/home/ubuntu/tina5sdk-bsp ) was successfully loaded
54+
55+ NOTE: The SDK(/home/ubuntu/t113-tin5-v1.2 ) was successfully loaded
5156load openwrt... ok
5257Please run lunch next for openwrt.
5358load buildroot,bsp...ok
@@ -91,129 +96,118 @@ Usage: pack [args]
9196
9297接着执行编译指令,首次编译需要我们选择相应的单板选项。如下:
9398
99+ 
100+
94101~~~bash
95- ubuntu@ubuntu1804:~/tina5sdk-bsp$ ./build.sh
102+ ubuntu@ubuntu1804:~/t113-tin5-v1.2$ ./build.sh config
103+ 11-05 22:42:48.281 2929 D mkcommon : ========ACTION List: mk_config ;========
104+ 11-05 22:42:48.282 2929 D mkcommon : options :
96105All available platform:
97106 0. android
98107 1. linux
99- Choice [android ]: 1
108+ Choice [linux ]: 1
100109All available linux_dev:
101110 0. bsp
102111 1. buildroot
103112 2. openwrt
104- Choice [bsp ]: 1
113+ Choice [buildroot ]: 1
105114All available ic:
106- 0. t113
107- 1. t113_i
108- Choice [t113]: 0
115+ 0. t113_s4
116+ Choice [t113_s4]: 0
109117All available board:
110- 0. dev
111- 1. evb1
112- 2. evb1_auto
113- 3. evb1_auto_nor
114- 4. pro
115- Choice [dev]: 2
118+ 0. 100ask
119+ 1. 100ask_linux5_10
120+ Choice [100ask]: 0
116121All available flash:
117122 0. default
118123 1. nor
119124Choice [default]: 0
120- INFO: Prepare toolchain ...
121- INFO: kernel defconfig: generate /home/ubuntu/tina5sdk-bsp/out/t113/kernel/build/.config by /home/ubuntu/tina5sdk-bsp/device/config/chips/t113/configs/evb1_auto/linux-5.4/config-5.4
122- INFO: Prepare toolchain ...
123- make: Entering directory ' /home/ubuntu/tina5sdk-bsp/kernel/linux-5.4'
124- make[1]: Entering directory ' /home/ubuntu/tina5sdk-bsp/out/t113/kernel/build'
125- GEN Makefile
126- *** Default configuration is based on ' ../../../../../device/config/chips/t113/configs/evb1_auto/linux-5.4/config-5.4'
127- #
128- # No change to .config
129- #
130- make[1]: Leaving directory ' /home/ubuntu/tina5sdk-bsp/out/t113/kernel/build'
131- make: Leaving directory ' /home/ubuntu/tina5sdk-bsp/kernel/linux-5.4'
132- make: Entering directory ' /home/ubuntu/tina5sdk-bsp/buildroot/buildroot-201902'
133- GEN /home/ubuntu/tina5sdk-bsp/out/t113/evb1_auto/buildroot/buildroot/Makefile
125+ 11-05 22:42:58.438 2929 I mkcommon : kernel relative recovery defconfig: ../../../../../device/config/chips/t113_s4/configs/100ask/linux-5.4/config-5.4-recovery
126+ 11-05 22:42:58.438 2929 I mkcommon : kernel absolute recovery defconfig: /home/ubuntu/t113-tin5-v1.2/device/config/chips/t113_s4/configs/100ask/linux-5.4/config-5.4-recovery
127+ 11-05 22:42:58.487 2929 I mkcommon : Prepare toolchain ...
128+ 11-05 22:42:58.494 2929 D mkcommon : Uncompressing ' /home/ubuntu/t113-tin5-v1.2/prebuilt/kernelbuilt/arm/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi.tar.xz' to ' /home/ubuntu/t113-tin5-v1.2/out/toolchain/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi' ...
129+ 11-05 22:43:14.850 2929 I mkcommon : kernel defconfig: generate /home/ubuntu/t113-tin5-v1.2/out/t113_s4/kernel/build/.config by /home/ubuntu/t113-tin5-v1.2/device/config/chips/t113_s4/configs/100ask/linux-5.4/config-5.4
130+ 11-05 22:43:14.851 2929 I mkcommon : Prepare toolchain ...
131+ 11-05 22:43:14.932 2929 D mkcommon : make: Entering directory ' /home/ubuntu/t113-tin5-v1.2/kernel/linux-5.4'
132+ 11-05 22:43:14.934 2929 D mkcommon : make[1]: Entering directory ' /home/ubuntu/t113-tin5-v1.2/out/t113_s4/kernel/build'
133+ 11-05 22:43:15.055 2929 D mkcommon : GEN Makefile
134+ 11-05 22:43:15.062 2929 D mkcommon : HOSTCC scripts/basic/fixdep
135+ 11-05 22:43:15.472 2929 D mkcommon : HOSTCC scripts/kconfig/conf.o
136+ 11-05 22:43:15.601 2929 D mkcommon : HOSTCC scripts/kconfig/confdata.o
137+ 11-05 22:43:15.842 2929 D mkcommon : HOSTCC scripts/kconfig/expr.o
138+ 11-05 22:43:16.017 2929 D mkcommon : LEX scripts/kconfig/lexer.lex.c
139+ 11-05 22:43:16.040 2929 D mkcommon : YACC scripts/kconfig/parser.tab.[ch]
140+ 11-05 22:43:16.080 2929 D mkcommon : HOSTCC scripts/kconfig/lexer.lex.o
141+ 11-05 22:43:16.247 2929 D mkcommon : HOSTCC scripts/kconfig/parser.tab.o
142+ 11-05 22:43:16.562 2929 D mkcommon : HOSTCC scripts/kconfig/preprocess.o
143+ 11-05 22:43:16.662 2929 D mkcommon : HOSTCC scripts/kconfig/symbol.o
144+ 11-05 22:43:16.931 2929 D mkcommon : HOSTLD scripts/kconfig/conf
145+ 11-05 22:43:16.949 2929 D mkcommon : *** Default configuration is based on ' ../../../../../device/config/chips/t113_s4/configs/100ask/linux-5.4/config-5.4'
146+ 11-05 22:43:17.611 2929 D mkcommon : #
147+ 11-05 22:43:17.612 2929 D mkcommon : # configuration written to .config
148+ 11-05 22:43:17.613 2929 D mkcommon : #
149+ 11-05 22:43:17.616 2929 D mkcommon : make[1]: Leaving directory ' /home/ubuntu/t113-tin5-v1.2/out/t113_s4/kernel/build'
150+ 11-05 22:43:17.618 2929 D mkcommon : make: Leaving directory ' /home/ubuntu/t113-tin5-v1.2/kernel/linux-5.4'
151+ make: Entering directory ' /home/ubuntu/t113-tin5-v1.2/buildroot/buildroot-201902'
152+ mkdir -p /home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config/lxdialog
153+ PKG_CONFIG_PATH="" make CC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc" \
154+ obj=/home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config -C support/kconfig -f Makefile.br conf
155+ /usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config -DCONFIG_=\"\" -MM *.c > /home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config/.depend 2>/dev/null || :
156+ /usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config -DCONFIG_=\"\" -c conf.c -o /home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config/conf.o
157+ /usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config -DCONFIG_=\"\" -I. -c /home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config/zconf.tab.c -o /home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config/zconf.tab.o
158+ /usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config -DCONFIG_=\"\" /home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config/conf.o /home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config/zconf.tab.o -o /home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config/conf
159+ rm /home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/build/buildroot-config/zconf.tab.c
160+ GEN /home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot/buildroot/Makefile
161+ ../config/buildroot/allwinner/display/gpu_um_pub/Config.in:21:warning: config symbol defined without type
134162Config.in.legacy:1769:warning: choice value used outside its choice group
135163#
136- # configuration written to /home/ubuntu/tina5sdk-bsp /out/t113/evb1_auto /buildroot/buildroot/.config
164+ # configuration written to /home/ubuntu/t113-tin5-v1.2 /out/t113_s4/100ask /buildroot/buildroot/.config
137165#
138- make: Leaving directory ' /home/ubuntu/tina5sdk-bsp/buildroot/buildroot-201902'
139- INFO: buildroot defconfig is sun8iw20p1_t113_defconfig
140- INFO: clean buildserver
141- INFO: prepare_buildserver
142- ========ACTION List: build_linuxdev;========
143- options :
144- INFO: ----------------------------------------
145- INFO: build linuxdev ...
146- INFO: chip: sun8iw20p1
147- INFO: platform: linux
148- INFO: kernel: linux-5.4
149- INFO: board: evb1_auto
150- INFO: output: /home/ubuntu/tina5sdk-bsp/out/t113/evb1_auto/buildroot
151- INFO: ----------------------------------------
152- INFO: don' t build dtbo ...
153- INFO: build arisc
154- find: ' /home/ubuntu/tina5sdk-bsp/brandy/brandy-2.0/spl' : No such file or directory
155- find: ' /home/ubuntu/tina5sdk-bsp/brandy/dramlib' : No such file or directory
156- INFO: build_bootloader: brandy_path=/home/ubuntu/tina5sdk-bsp/brandy/brandy-2.0
157- INFO: skip build brandy.
158- INFO: build kernel ...
159- INFO: prepare_buildserver
160- INFO: Prepare toolchain ...
161- Makefile:681: arch//Makefile: No such file or directory
162- make: *** No rule to make target ' arch//Makefile' . Stop.
163- ERROR: build Failed
164- INFO: build kernel failed
166+ make: Leaving directory ' /home/ubuntu/t113-tin5-v1.2/buildroot/buildroot-201902'
167+ 11-05 22:43:25.031 2929 I mkcommon : buildroot defconfig is sun8iw20p1_t113_defconfig
168+ 11-05 22:43:25.352 2929 I mkcommon : clean buildserver
169+ 11-05 22:43:25.353 2929 I mkcommon : prepare_buildserve
165170~~~
166171
167- 首次编译,会出现以上报错,加上参数 ` -d ` ,接着编译 。
172+ 配置完成后,可以执行 ./build.sh 开始编译 。
168173
169174~~~bash
170- ubuntu@ubuntu1804:~ /tina5sdk-bsp$ ./build.sh -d
171- ========ACTION List: build_linuxdev; ========
172- options :
173- INFO: ----------------------------------------
174- INFO: build linuxdev ...
175- INFO: chip: sun8iw20p1
176- INFO: platform: linux
177- INFO: kernel: linux-5.4
178- INFO: board: evb1_auto
179- INFO: output: /home/ubuntu/tina5sdk-bsp/out/t113/evb1_auto/buildroot
180- INFO: ----------------------------------------
181- INFO: don' t build dtbo ...
182- INFO: build arisc
183- ......省略
184- Exportable Squashfs 4.0 filesystem, xz compressed, data block size 131072
185- compressed data, compressed metadata, compressed fragments, no xattrs
186- duplicates are removed
187- Filesystem size 56836.34 Kbytes (55.50 Mbytes)
188- 38.89% of uncompressed filesystem size (146148.83 Kbytes)
189- Inode table size 54570 bytes (53.29 Kbytes)
190- 23.73% of uncompressed inode table size (229985 bytes)
191- Directory table size 70900 bytes (69.24 Kbytes)
192- 49.04% of uncompressed directory table size (144579 bytes)
193- Number of duplicate files found 37
194- Number of inodes 6685
195- Number of files 5570
196- Number of fragments 397
197- Number of symbolic links 813
198- Number of device nodes 0
199- Number of fifo nodes 0
200- Number of socket nodes 0
201- Number of directories 302
202- Number of ids (unique uids + gids) 1
203- Number of uids 1
204- root (0)
205- Number of gids 1
206- root (0)
207- INFO: pack rootfs ok ...
208- INFO: ----------------------------------------
209- INFO: build Tina OK.
210- INFO: ----------------------------------------
175+ ubuntu@ubuntu1804:~/t113-tin5-v1.2$ ./build.sh
176+ 11-05 22:46:00.269 6893 D mkcommon : ========ACTION List: build_linuxdev;========
177+ 11-05 22:46:00.270 6893 D mkcommon : options :
178+ 11-05 22:46:00.271 6893 I mkcommon : ----------------------------------------
179+ 11-05 22:46:00.271 6893 I mkcommon : build linuxdev ...
180+ 11-05 22:46:00.272 6893 I mkcommon : chip: sun8iw20p1
181+ 11-05 22:46:00.273 6893 I mkcommon : platform: linux
182+ 11-05 22:46:00.275 6893 I mkcommon : kernel: linux-5.4
183+ 11-05 22:46:00.276 6893 I mkcommon : board: 100ask
184+ 11-05 22:46:00.277 6893 I mkcommon : output: /home/ubuntu/t113-tin5-v1.2/out/t113_s4/100ask/buildroot
185+ 11-05 22:46:00.278 6893 I mkcommon : ----------------------------------------
186+ 11-05 22:46:00.288 6893 I mkcommon : build rtos ...
187+ 11-05 22:46:00.325 6893 D mkcommon : Setup env done!
188+ 11-05 22:46:00.327 6893 D mkcommon : Run lunch_rtos to select project
189+ 11-05 22:46:00.360 6893 D mkcommon : last=t113_s4_c906_evb1_auto
190+ 11-05 22:46:00.361 6893 D mkcommon : select=t113_s4_c906_evb1_auto...
191+ 11-05 22:46:00.362 6893 D mkcommon : t113_s4_c906/evb1_auto
192+ 11-05 22:46:00.366 6893 D mkcommon : ' /home/ubuntu/t113-tin5-v1.2/rtos/lichee/rtos/projects/t113_s4_c906/evb1_auto/defconfig' -> ' /home/ubuntu/t113-tin5-v1.2/rtos/lichee/rtos/.config'
193+ 11-05 22:46:00.381 6893 D mkcommon : ============================================
194+ 11-05 22:46:00.382 6893 D mkcommon : RTOS_BUILD_TOP=/home/ubuntu/t113-tin5-v1.2/rtos
195+ 11-05 22:46:00.383 6893 D mkcommon : RTOS_TARGET_ARCH=riscv
196+ 11-05 22:46:00.384 6893 D mkcommon : RTOS_TARGET_CHIP=sun8iw20p1
197+ 11-05 22:46:00.385 6893 D mkcommon : RTOS_TARGET_DEVICE=t113_s4_c906
198+ 11-05 22:46:00.386 6893 D mkcommon : RTOS_PROJECT_NAME=t113_s4_c906_evb1_auto
199+ 11-05 22:46:00.386 6893 D mkcommon : ============================================
200+ 11-05 22:46:00.392 6893 D mkcommon : Run mrtos_menuconfig to config rtos
201+ 11-05 22:46:00.393 6893 D mkcommon : Run m or mrtos to build rtos
202+ 11-05 22:46:00.393 6893 D mkcommon : build rtos ...
203+ 11-05 22:46:00.408 6893 D mkcommon : Dark Builder
204+
211205~~~
212206
213- 需要等待一段时间 ,编译完成后,在当前目录下,执行以下指令,进行镜像打包,
207+ 等待一段时间(约30~90分)具体根据电脑性能而定 ,编译完成后,在当前目录下,执行以下指令,进行镜像打包,
214208
215209~~~bash
216- ubuntu@ubuntu1804:~/tina5sdk-bsp $ ./build.sh pack
210+ ubuntu@ubuntu1804:~/t113-tin5-v1.2 $ ./build.sh pack
217211~~~
218212
219213镜像打包完成后,执行 `cout` 会进入到镜像生成的路径。
0 commit comments