赞
踩
参考:100ASK_T113-PRO板串口3 改为PE08,PE09
此套SDK基于 Buildroot 主线版本,整合了 全志较新的 Linux Kernel Bootloader,最大程度简化了操作难度,比较适合用来上手学习,我们也会作为授课使用的主要支持SDK。对于做产品的同学,目前组件支持并不是特别完整,请慎重考虑。
buildroot_100ask_t113-pro.tar源码百度网盘:
链接:https://pan.baidu.com/s/1Ov_ECC2HJBkfoIUMbufEIw?pwd=p8va
提取码:p8va
book@100ask:~/buildroot-100ask_t113-pro/buildroot$ make BR2_EXTERNAL="../br2t113pro ../br2lvgl " 100ask_t113-pro_sdcard_core_defconfig
book@100ask:~/buildroot-100ask_t113-pro/buildroot$ time make V=1
编译完成后会在 output/images目录下输出 sdcard.img 文件,将文件拷贝到Windows系统下使用 wind32diskimage烧写,或者使用dd if 烧录到tf卡内,
之后插到开发板上,即可启动。 请参考左侧 快速启动 页面
... /usr/bin/gcc -Wp,-MD,scripts/kconfig/.lexer.lex.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -I ./scripts/kconfig -c -o scripts/kconfig/lexer.lex.o scripts/kconfig/lexer.lex.c /usr/bin/gcc -Wp,-MD,scripts/kconfig/.parser.tab.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -I ./scripts/kconfig -c -o scripts/kconfig/parser.tab.o scripts/kconfig/parser.tab.c /usr/bin/gcc -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/confdata.o scripts/kconfig/expr.o scripts/kconfig/lexer.lex.o scripts/kconfig/parser.tab.o scripts/kconfig/preprocess.o scripts/kconfig/symbol.o scripts/kconfig/conf --defconfig=arch/arm/configs/sun8iw20p1smp_t113_auto_defconfig Kconfig *** *** Can't find default configuration "arch/arm/configs/sun8iw20p1smp_t113_auto_defconfig"! *** scripts/kconfig/Makefile:90: recipe for target 'sun8iw20p1smp_t113_auto_defconfig' failed make[3]: *** [sun8iw20p1smp_t113_auto_defconfig] Error 1 Makefile:590: recipe for target 'sun8iw20p1smp_t113_auto_defconfig' failed make[2]: *** [sun8iw20p1smp_t113_auto_defconfig] Error 2 linux/linux.mk:597: recipe for target '/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/build/linux-origin_master/.stamp_dotconfig' failed make[1]: *** [/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/build/linux-origin_master/.stamp_dotconfig] Error 2 Makefile:84: recipe for target '_all' failed make: *** [_all] Error 2 real 14m21.868s user 51m4.585s sys 9m54.995s
找一下这个文件,也是存在的:
buildroot-100ask_t113-pro/buildroot$ find ./ -name "sun8iw20p1smp_t113_auto_defconfig"
./dl/linux/git/arch/arm/configs/sun8iw20p1smp_t113_auto_defconfig
目前还没有找到为啥会有这个问题。
修改文件:buildroot-100ask_t113-pro/br2t113pro/configs/100ask_t113-pro_sdcard_core_defconfig
将原来的:
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="origin/master"
改为:
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="dc6e999b53b3994078cff097ca569a3143660185"
如下:
再编译就可以了:
make clean
make BR2_EXTERNAL="../br2t113pro ../br2lvgl " 100ask_t113-pro_sdcard_core_defconfig
time make -j16 V=1
... Allocating group tables: done Writing inode tables: done Creating journal (8192 blocks): done Copying files into the device: done Writing superblocks and filesystem accounting information: done rm -rf /home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/build/buildroot-fs/ext2/target ln -sf rootfs.ext2 /home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images/rootfs.ext4 ln -snf /home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot /home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/staging mkdir -p /home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images >>> Executing post-image script support/scripts/genimage.sh INFO: cmd: "mkdir -p "/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/build/genimage.tmp"" (stderr): INFO: cmd: "rm -rf "/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/build/genimage.tmp"/*" (stderr): INFO: cmd: "mkdir -p "/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/build/genimage.tmp"" (stderr): INFO: cmd: "cp -a "/tmp/tmp.Cm04R1Kw3d" "/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/build/genimage.tmp/root"" (stderr): INFO: cmd: "find '/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/build/genimage.tmp/root' -depth -type d -printf '%P\0' | xargs -0 -I {} touch -r '/tmp/tmp.Cm04R1Kw3d/{}' '/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/build/genimage.tmp/root/{}'" (stderr): INFO: cmd: "mkdir -p "/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images"" (stderr): INFO: vfat(boot.vfat): cmd: "dd if=/dev/zero of="/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images/boot.vfat" seek=33554432 count=0 bs=1 2>/dev/null" (stderr): INFO: vfat(boot.vfat): cmd: "mkdosfs '/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images/boot.vfat'" (stderr): INFO: vfat(boot.vfat): adding file 'boot.img' as 'boot.img' ... INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -sp -i '/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images/boot.vfat' '/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images/boot.img' '::'" (stderr): INFO: vfat(boot.vfat): adding file 'zImage' as 'zImage' ... INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -sp -i '/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images/boot.vfat' '/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images/zImage' '::'" (stderr): INFO: vfat(boot.vfat): adding file 'sun8iw20p1-t113-100ask-t113-pro.dtb' as 'sun8iw20p1-t113-100ask-t113-pro.dtb' ... INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -sp -i '/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images/boot.vfat' '/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images/sun8iw20p1-t113-100ask-t113-pro.dtb' '::'" (stderr): INFO: vfat(boot.vfat): adding file 'dsp0.fex' as 'dsp0.fex' ... INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -sp -i '/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images/boot.vfat' '/home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images/dsp0.fex' '::'" (stderr): INFO: hdimage(100ask-t113-pro_sdcard.img): adding partition 'boot0' from 'boot0_sdcard.fex' ... INFO: hdimage(100ask-t113-pro_sdcard.img): adding partition 'boot-packages' from 'boot_package.fex' ... INFO: hdimage(100ask-t113-pro_sdcard.img): adding partition 'boot-resource' (in MBR) from 'boot-resource.fex' ... INFO: hdimage(100ask-t113-pro_sdcard.img): adding partition 'env' (in MBR) from 'env.fex' ... INFO: hdimage(100ask-t113-pro_sdcard.img): adding partition 'env-redund' (in MBR) from 'env.fex' ... INFO: hdimage(100ask-t113-pro_sdcard.img): adding partition 'boot' (in MBR) from 'boot.vfat' ... INFO: hdimage(100ask-t113-pro_sdcard.img): adding partition 'rootfs' (in MBR) from 'rootfs.ext4' ... INFO: hdimage(100ask-t113-pro_sdcard.img): adding partition 'share' (in MBR) ... INFO: hdimage(100ask-t113-pro_sdcard.img): adding partition '[MBR]' ... INFO: hdimage(100ask-t113-pro_sdcard.img): adding partition '[GPT header]' ... INFO: hdimage(100ask-t113-pro_sdcard.img): adding partition '[GPT array]' ... INFO: hdimage(100ask-t113-pro_sdcard.img): adding partition '[GPT backup]' ... INFO: hdimage(100ask-t113-pro_sdcard.img): writing GPT INFO: hdimage(100ask-t113-pro_sdcard.img): writing hybrid MBR real 16m39.887s user 67m49.463s sys 11m59.428s
固件地址:buildroot-100ask_t113-pro/buildroot/output/images/100ask-t113-pro_sdcard.img
使用wind32diskimage软件进行SD卡烧录。
113-pro/../tina-pack-tools/update_mbr' -> '/home/liefyuan/mangopi-t113/buildroot-100ask_t113-pro/buildroot/output/images/update_mbr'
'/home/liefyuan/mangopi-t113/buildroot-100ask_t113-pro/br2t113pro/board/100ask/t113-pro/../tina-pack-tools/update_mbr.exe' -> '/home/liefyuan/mangopi-t113/buildroot-100ask_t113-pro/buildroot/output/images/update_mbr.exe'
GetPrivateProfileSection read to end
content_count=4
/home/liefyuan/mangopi-t113/buildroot-100ask_t113-pro/br2t113pro/board/100ask/t113-pro/post-build-sd.sh: line 31: mkbootimg: command not found
Makefile:732: recipe for target 'target-finalize' failed
make[1]: *** [target-finalize] Error 127
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2
real 15m52.490s
user 49m53.793s
sys 10m54.336s
sudo apt-get install mkbootimg -y
book@100ask:~/buildroot-100ask_t113-pro/buildroot$ make BR2_EXTERNAL="../br2t113pro ../br2lvgl" 100ask_t113-pro_spinand_core_defconfig
book@100ask:~/buildroot-100ask_t113-pro/buildroot$ time make V=1
# 或者多核编译(11m42s):
$ time make -j16 V=1
# 单核编译(17m12s)
$ time make V=1
编译完成后会在 output/images
目录下输出 buildroot_linux_nand_uart3.img
文件,将文件拷贝到Windows系统下使用 使用 全志官方的 AllwinnertechPhoeniSuit 进行烧写。
详细烧写步骤请,请参考左侧 快速启动 页面。
编译成功的log:
... -----------------dragon pack-------------------------- /home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images/ /home/liefyuan/Liefyuan/buildroot-100ask_t113-pro/buildroot/output/images Begin Parse sys_partion.fex Add partion boot-resource.fex BOOT-RESOURCE_FEX Add partion very boot-resource.fex BOOT-RESOURCE_FEX FilePath: boot-resource.fex FileLength=200000Add partion env.fex ENV_FEX000000000 Add partion very env.fex ENV_FEX000000000 FilePath: env.fex FileLength=20000Add partion env.fex ENV_FEX000000000 Add partion very env.fex ENV_FEX000000000 FilePath: env.fex FileLength=20000Add partion boot.fex BOOT_FEX00000000 Add partion very boot.fex BOOT_FEX00000000 FilePath: boot.fex FileLength=475800Add partion rootfs-ubifs.fex ROOTFS-UBIFS_FEX Add partion very rootfs-ubifs.fex ROOTFS-UBIFS_FEX FilePath: rootfs-ubifs.fex FileLength=1dc7000Add partion dsp0.fex DSP0_FEX00000000 Add partion very dsp0.fex DSP0_FEX00000000 FilePath: dsp0.fex FileLength=3fc78BuildImg 0 Dragon execute image.cfg SUCCESS ! real 17m12.280s user 74m25.258s sys 14m32.679s
烧写以后运行正常。
book@100ask:~/buildroot_100ask_t113-pro/buildroot$make uboot-rebuild
book@100ask:~/buildroot_100ask_t113-pro/buildroot$make linux-rebuild
cd output/images
book@100ask:~/buildroot_100ask_t113-pro/buildroot$cd output/images/
book@100ask:~/buildroot_100ask_t113-pro/buildroot/output/images$./dragonsecboot -pack boot_package.cfg
make menuconfig
> Target packages > Graphic libraries and applications (graphic/text) > Qt5
然后编译,烧录SD卡,在开发板上运行
/usr/lib/qt/examples/
cd /usr/lib/qt/examples/widgets/animation/animatedtiles
./animatedtiles -platform linuxfb
/usr/lib/
目录下关于全志T113开发板接7寸LCD屏幕显示异常问题的解决方案
buildroot-100ask_t113-pro/buildroot$ vim dl/linux/git/drivers/video/fbdev/sunxi/disp2/disp/de/disp_lcd.c
buildroot-100ask_t113-pro/buildroot$ vim dl/linux/git/arch/arm/boot/dts/sun8iw20p1-t113-100ask-t113-pro.dts
typedef struct { volatile unsigned int Timing0; volatile unsigned int Timing1; volatile unsigned int Timing2; volatile unsigned int Timing3; }RegTypeDef; static void set_lcd_timings(unsigned int dwLcdRegBase, struct disp_video_timings* pTimings) { RegTypeDef* reg; unsigned int dwWidth, dwHeight; unsigned int dwHT, dwHBP; unsigned int dwVT, dwVBP; unsigned int dwHSPW, dwVSPW; reg = (RegTypeDef*)(dwLcdRegBase + 0x48); dwWidth = pTimings->x_res; dwHSPW = pTimings->hor_sync_time; dwHBP = pTimings->hor_back_porch + pTimings->hor_sync_time; //在官方文档里:hbp = hbp + hspw,然而在>全志的代码里面又将hspw其减去,所以在这里需要加回来 dwHT = pTimings->hor_total_time; dwHeight = pTimings->y_res;; dwVSPW = pTimings->ver_sync_time; dwVBP = pTimings->ver_back_porch + pTimings->ver_sync_time; dwVT = pTimings->ver_total_time; reg->Timing0 = ((dwWidth - 1) << 16) | (dwHeight - 1); reg->Timing1 = ((dwHT - 1) << 16) | (dwHBP - 1); reg->Timing2 = (((dwVT - 1) * 2) << 16) | (dwVBP - 1); reg->Timing3 = ((dwHSPW - 1) << 16) | (dwVSPW - 1); printk("width: %d, hspw: %d, hbp: %d, ht: %d\n", dwWidth, dwHSPW, dwHBP, dwHT); printk("height: %d, vspw: %d, vbp: %d, vt: %d\n", dwHeight, dwVSPW, dwVBP, dwVT); } ... s32 disp_init_lcd(struct disp_bsp_init_para *para) { ... #endif disp_lcd_init(lcd, lcd->disp); set_lcd_timings(para->reg_base[DISP_MOD_LCD0], &lcd->timings); disp_device_register(lcd); #if defined(CONFIG_DISP2_LCD_ESD_DETECT) ... }
sun8iw20p1-t113-100ask-t113-pro.dts
&lcd0 { /* part 1 */ lcd_used = <1>; lcd_driver_name = "default_lcd"; lcd_backlight = <100>; /* part 2 */ lcd_if = <0>; lcd_hv_if = <0>; /* part 3 */ lcd_x = <1024>; lcd_y = <600>; lcd_width = <280>; lcd_height = <150>; lcd_dclk_freq = <51>; lcd_hbp = <160>; lcd_ht = <1344>; lcd_hspw = <20>; lcd_vbp = <23>; lcd_vt = <635>; lcd_vspw = <3>; lcd_pwm_used = <1>; lcd_pwm_ch = <7>; lcd_pwm_freq = <500>; lcd_pwm_pol = <1>; ...
/usr/lib/qt/examples/widgets/animation/animatedtiles/
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。