Firefly-RK3288 编译debian问题

我在 ubuntu 16.04 (livebuild debootstrap 更新为最新的)上编译debian,使用Firefly官方编译工程,与官方指导书,有提示编译错误(Failed to run livebuild, please check your network connection. ),但是也生成了linaro-rootfs.img(看日期是新生成的)。这种情况算编译成功了吗;
部分日志如下:
if [ -f binary-tar.tar.gz ]; then
tar -jcf linaro-stretch-alip-date +%Y%m%d-1.config.tar.bz2 auto/ config/ configure;
sudo mv binary.contents linaro-stretch-alip-date +%Y%m%d-1.contents;
sudo mv chroot.packages.live linaro-stretch-alip-date +%Y%m%d-1.packages;
sudo mv binary-tar.tar.gz linaro-stretch-alip-date +%Y%m%d-1.tar.gz;
md5sum linaro-stretch-alip-date +%Y%m%d-1.build-log.txt linaro-stretch-alip-date +%Y%m%d-1.config.tar.bz2 linaro-stretch-alip-date +%Y%m%d-1.contents linaro-stretch-alip-date +%Y%m%d-1.packages linaro-stretch-alip-date +%Y%m%d-1.tar.gz > linaro-stretch-alip-date +%Y%m%d-1.md5sums.txt;
sha1sum linaro-stretch-alip-date +%Y%m%d-1.build-log.txt linaro-stretch-alip-date +%Y%m%d-1.config.tar.bz2 linaro-stretch-alip-date +%Y%m%d-1.contents linaro-stretch-alip-date +%Y%m%d-1.packages linaro-stretch-alip-date +%Y%m%d-1.tar.gz > linaro-stretch-alip-date +%Y%m%d-1.sha1sums.txt;
fi
Failed to run livebuild, please check your network connection.
\033[36m Run mk-base-debian.sh first \033[0m
Extract image
tar: linaro-stretch-alip-*.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
umount: binary/dev: not mounted
Making rootfs!
0+0 records in
0+0 records out
0 bytes copied, 0.00109913 s, 0.0 kB/s
Format rootfs to ext4
mke2fs 1.42.13 (17-May-2015)
Discarding device blocks: done
Creating filesystem with 1024000 4k blocks and 256000 inodes
Filesystem UUID: b8269df7-a53c-4af5-be26-c14cf7750b86
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

Mount rootfs to ./rootfs
Copy rootfs to ./rootfs
Umount rootfs
Rootfs Image: linaro-rootfs.img
linaro-rootfs.img: 51872/256000 files (0.5% non-contiguous), 469448/1024000 blocks
resize2fs 1.42.13 (17-May-2015)
Resizing the filesystem on linaro-rootfs.img to 695466 (4k) blocks.
The filesystem on linaro-rootfs.img is now 695466 (4k) blocks long.

====Build Debian9 ok!====

打包个固件,烧写试一下喽~

烧录,提示成功,但是插上显示器没有任何图像出来;

是接的什么屏,默认是 hdmi 显示;看下串口,系统有没有起来。

接hdmi的显示。用网上买的usb转串囗线,黑线接板子地,红线(Tⅹ)接板子RX,棕线(RX)接板子Tⅹ,用shellx6 连Com口成功,重启板子,接串口无输出信息。用瑞芯微升级工具连板子,没有发现设备。

在mash模式下,烧录loader与参数文件(或 loader,参数文件,uboot, trust,内核 ), 烧录成功,但提示还是找不到设备;按住recovery重启,也是一样;

参数文件中 0x00002000@0x00004000 的单位是什么,是字节,块,页,KB
参数文件开始地址与 loader重叠是否可能被覆盖;
单独升级loader,会停留在 mash状态;如果还升级了任何其他东西,开始地址在任何地方,状态都会变成没有找到设备;

在maskrom模式下, 在瑞芯微开发工具的高级功能便签页,执行任何操作都失败,包括获取flash id等;

  • 串口使用说明,http://wiki.t-firefly.com/zh_CN/Firefly-RK3288/serial_debug.html

  • 应该是 kernel、uboot 存在问题导致无法启动;看下代码是否正常更新
    2020-08-10 09-43-58屏幕截图.png

  • 分区说明可以看下文档 rk3288/docs/Kernel/TOOL
    配置文件,rk3288/device/rockchip/rk3288/parameter-ubuntu.txtrk3288/tools/linux/Linux_Pack_Firmware/rockdev/rk3288-ubuntu-package-file

我怀疑下载的版本不是一个稳定的基线版本,代码只下了一次clone了主线分支;

怎么看代码是否正常更新啊,git 更新日志吗,我怎么知道怎么是对的,怎么是不对的;我的当前代码是可以正常编译的;

loader方式升级模式,执行这个模式的是 loader这个程序吗; 如果按住recovery重启发现不了设备,说明什么问题。 loader无效,还是paramter.txt有问题,还是uboot有问题;

  • 看有没有这些提交,git log
commit 08bfc1d6f9612a1045209d4fb8a8012d911273ab (HEAD -> firefly)
Author: liulq <[email]llq@t-chip.com.cn[/email]>
Date:   Mon Jul 6 15:12:33 2020 +0800

    [u-boot]: update in commit f6759c8e50d7768338740cbd1b0d8803011371c0

commit f953c97cc507a069f3400a71402ac5de0726d97e
Author: liulq <[email]llq@t-chip.com.cn[/email]>
Date:   Mon Jul 6 15:12:19 2020 +0800

    [kernel]: update in commit 43ba1641bbfd903c9406c9aa30e8845f1a75bfaf

commit a708bcd1af52c64997325ee3213f28abc437266d
Author: zhangxf <[email]zxf0@t-chip.com.cn[/email]>
Date:   Tue Jul 28 16:31:23 2020 +0800

    [docs]: update in commit 722401607cee988be4a1be5c5a481473743fb384

commit c1e02d8e16bdd0039ddc7b055729ab1b6fa7386c
Author: zhangxf <[email]zxf0@t-chip.com.cn[/email]>
Date:   Fri Jul 3 11:52:16 2020 +0800

    [device/rockchip]: update in commit e590d19a4db8c9a9f44daa55146d51ad14a7a9c0

commit 4efd7b76b62caa7b1d6186f24edfac2f0784f921
Author: Firefly <[email]service@t-firefly.com[/email]>
Date:   Wed Jul 1 15:07:33 2020 +0800

    [buildroot]: update in commit 17b63ddd7a1f4db6f1d468aaf61cb6903335d5b2

commit 93d19b2186d6204ea2d75d57ea5493cc4d618f69
Author: Firefly <[email]service@t-firefly.com[/email]>
Date:   Mon Jun 29 17:27:54 2020 +0800

    [device/rockchip]: update in commit da4f63c084e7646b8d20f9c1fcbedb37f2dee36a

commit 442ad5955470e2f4f2336881e9bc14ec4c041572
Author: Firefly <[email]service@t-firefly.com[/email]>
Date:   Sun Jun 28 18:09:32 2020 +0800

    [SDK]:Init Firefly SDK in 20200628

这个u-boot启动提示失败,是什么原因啊
U-Boot 2017.09 (Jul 30 2020 - 19:51:00 -0700)

Model: Firefly-RK3288
PreSerial: 2
DRAM: 2 GiB
Sysmem: init
Relocation Offset is: 00000000
I2c speed: 400000Hz
MMC: dwmmc@ff0c0000: 1, dwmmc@ff0f0000: 0
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Model: Firefly-RK3288
Bootdev(atags): mmc 0
volume up: read ‘keyup-threshold-microvolt’ failed, ret=-61
volume up: read ‘keyup-threshold-microvolt’ failed, ret=-61
MMC0: High Speed, 52Mhz
PartType: EFI
boot mode: recovery
enter Recovery mode!

CLK: (sync kernel. arm: enter 1000000 KHz, init 1000000 KHz, kernel 0N/A)
apll 1000000 KHz
dpll 396000 KHz
cpll 384000 KHz
gpll 594000 KHz
npll 24000 KHz
aclk_bus 297000 KHz
Net:
Warning: ethernet@ff290000 (eth0) using random MAC address - ce:62:ce:d7:c6:5a
eth0: ethernet@ff290000
Hit key to stop autoboot(‘CTRL+C’): 0
ANDROID: reboot reason: “recovery”
boot mode: recovery
Load FDT from recovery part
DTB: rk-kernel.dtb
Booting ZIMAGE kernel at 0x02008000(Uncompress to 0) with fdt at 0x8300000…

ERROR: Failed to allocate 0x119a400 bytes below 0x119a400.
Sysmem Error: Failed to alloc “UNCOMPRESS-KERNEL” at 0x00000000 - 0x0119a400
## Booting Android Image at 0x02007800 …
Kernel load addr 0x02008000 size 8112 KiB
RAM disk load addr 0x0a200000 size 7740 KiB
## Flattened Device Tree blob at 08300000
Booting using the fdt blob at 0x8300000
XIP Kernel Image … OK
‘reserved-memory’ dma-unusable@fe000000: addr=fe000000 size=1000000
‘reserved-memory’ ramoops@00000000: addr=8000000 size=f0000
Loading Ramdisk to 0f871000, end 0ffffd6a … OK
Loading Device Tree to 0f85a000, end 0f870136 … OK
Adding bank: 0x00000000 - 0x08400000 (size: 0x08400000)
Adding bank: 0x09300000 - 0x80000000 (size: 0x76d00000)
Total: 4157.264 ms

Starting kernel …

本帖最后由 caven 于 2020-8-12 17:13 编辑

以下提交日志没有:
commit 08bfc1d6f9612a1045209d4fb8a8012d911273ab (HEAD → firefly)
Author: liulq <llq@t-chip.com.cn>
Date: Mon Jul 6 15:12:33 2020 +0800

[u-boot]: update in commit f6759c8e50d7768338740cbd1b0d8803011371c0

commit f953c97cc507a069f3400a71402ac5de0726d97e
Author: liulq <llq@t-chip.com.cn>
Date: Mon Jul 6 15:12:19 2020 +0800

[kernel]: update in commit 43ba1641bbfd903c9406c9aa30e8845f1a75bfaf

最后一条提交·日志是 7月28日的,缺7月6日提交的2条日志;
commit a708bcd1af52c64997325ee3213f28abc437266d
Author: zhangxf <zxf0@t-chip.com.cn>
Date: Tue Jul 28 16:31:23 2020 +0800

重新执行了git更新命令,还是没有以上缺失日志
./bundle/update rk3288-linux-bundle
git rebase FETCH_HEAD
./bundle/update common-linux-bundle
git rebase FETCH_HEAD

1、 代码更新问题
这两个提交是关键,否则后面的编译运行会有问题。
[u-boot]: update in commit f6759c8e50d7768338740cbd1b0d8803011371c0
[kernel]: update in commit 43ba1641bbfd903c9406c9aa30e8845f1a75bfaf

你这样更新一下,更新完后正常就能看到 uboot、kernel 提交了,之后再编译:

  • 恢复代码到初始状态

cd /path/to/firefly-sdk
//这个是默认状态提交号 442ad59 - Firefly 2020-06-28 : [SDK]:Init Firefly SDK in 20200628
git reset --hard 442ad5955470e2f4f2336881e9bc14ec4c041572

cd /path/to/firefly-sdk/bundle/
git reset --hard

  • 更新 bundle 代码

#1. 更新
cd /path/to/firefly-sdk/bundle/
git remote update

#2. 下拉代码
git pull origin rk3288-linux-bundle:rk3288-linux-bundle
git reset --hard
git pull origin common-linux-bundle:common-linux-bundle
git reset --hard

  • 更新代码

cd /path/to/firefly-sdk

./bundle/update rk3288-linux-bundle
git rebase FETCH_HEAD

./bundle/update common-linux-bundle
git rebase FETCH_HEAD

请问下拉代码的git命令在哪个目录下执行啊,按照以上命令执行了一遍任然没有看到那2条日志;
执行过程:
root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk# git reset --hard 442ad5955470e2f4f2336881e9bc14ec4c041572
HEAD is now at 442ad59 [SDK]:Init Firefly SDK in 20200628
root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk# cd bundle
root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk/bundle# git reset --hard
HEAD is now at 546e9d8 update: 3.bundle
root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk/bundle# git remote update
Fetching origin
root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk/bundle# git pull origin rk3288-linux-bundle:rk3288-linux-bundle

*** Please tell me who you are.

Run

git config --global user.email “you@example.com
git config --global user.name “Your Name”

to set your account’s default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got ‘root@ubuntu.(none)’)
root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk/bundle# git reset --hard
HEAD is now at 546e9d8 update: 3.bundle
root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk/bundle# git pull origin common-linux-bundle:common-linux-bundle
Already up-to-date.
root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk/bundle# git reset --hard
HEAD is now at 546e9d8 update: 3.bundle
root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk/bundle# cd ..
root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk# ./bundle/update rk3288-linux-bundle
[Info]Update Bundle repo…

*** Please tell me who you are.

Run

git config --global user.email “you@example.com
git config --global user.name “Your Name”

to set your account’s default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got ‘root@ubuntu.(none)’)
Switched to branch ‘rk3288-linux-bundle’

[Info]Update to FETCH_HEAD:
From ./bundle/0.bundle

  • branch HEAD → FETCH_HEAD
    [Info]Fetch ./bundle/0.bundle successfully!!
    root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk# git rebase FETCH_HEAD
    First, rewinding head to replay your work on top of it…
    Fast-forwarded HEAD to FETCH_HEAD.
    root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk# ./bundle/update common-linux-bundle
    [Info]Update Bundle repo…

*** Please tell me who you are.

Run

git config --global user.email “you@example.com
git config --global user.name “Your Name”

to set your account’s default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got ‘root@ubuntu.(none)’)
Switched to branch ‘common-linux-bundle’

[Info]Update to FETCH_HEAD:
From ./bundle/3.bundle

  • branch HEAD → FETCH_HEAD
    [Info]Fetch ./bundle/3.bundle successfully!!
    root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk# git rebase FETCH_HEAD
    First, rewinding head to replay your work on top of it…

*** Please tell me who you are.

Run

git config --global user.email “you@example.com
git config --global user.name “Your Name”

to set your account’s default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got ‘root@ubuntu.(none)’)
root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk# git log
commit a708bcd1af52c64997325ee3213f28abc437266d
Author: zhangxf <zxf0@t-chip.com.cn>
Date: Tue Jul 28 16:31:23 2020 +0800

[docs]: update in commit 722401607cee988be4a1be5c5a481473743fb384

commit c1e02d8e16bdd0039ddc7b055729ab1b6fa7386c
Author: zhangxf <zxf0@t-chip.com.cn>
Date: Fri Jul 3 11:52:16 2020 +0800

[device/rockchip]: update in commit e590d19a4db8c9a9f44daa55146d51ad14a7a9c0

commit 4efd7b76b62caa7b1d6186f24edfac2f0784f921
Author: Firefly <service@t-firefly.com>
Date: Wed Jul 1 15:07:33 2020 +0800

[buildroot]: update in commit 17b63ddd7a1f4db6f1d468aaf61cb6903335d5b2

commit 93d19b2186d6204ea2d75d57ea5493cc4d618f69
Author: Firefly <service@t-firefly.com>
Date: Mon Jun 29 17:27:54 2020 +0800

[device/rockchip]: update in commit da4f63c084e7646b8d20f9c1fcbedb37f2dee36a

commit 442ad5955470e2f4f2336881e9bc14ec4c041572
Author: Firefly <service@t-firefly.com>
Date: Sun Jun 28 18:09:32 2020 +0800

[SDK]:Init Firefly SDK in 20200628

commit f2bc782ebe213b95d05481f3b42d60f46909abeb
Author: Firefly <service@t-firefly.com>
Date: Sun Jun 28 18:09:31 2020 +0800

root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk#

下拉代码也是在 bundle 目录,这个没错。
不过你先用下面的命令设置一下你的 用户名 和 邮箱,再按照我之前说的方式更新代码。
git config --global user.email “you@example.com
git config --global user.name “Your Name”

本帖最后由 caven 于 2020-8-13 18:01 编辑

   重新更新了代码,可以看到7月6日的提交代码了,重编了 uboot,与kernel; 重新烧录了一遍,提示成功;现象还是原样,按住recovery 重启,升级任然找不到设备(uboot是否有问题,看日志看不出,我没有烧录recovery.img 是否与这个有关),内核启动不了(没有启动过程的日志);      分区烧录时,boot区是选择 ./kernel/zboot.img 还是 ./kernel/boot.img  ./kernel/kernel.img,3种我都分别烧录了,内核都是没有打印信息;
   启动参数需要增加吗,这是parameter-ubuntu.txt中的 GPTCMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(trust),0x00002000@0x00008000(misc),0x00010000@0x0000a000(boot),0x00010000@0x0001a000(recovery),0x00010000@0x0002a000(backup),0x00600000@0x0005a000(rootfs),-@0x0065a000(userdata:grow)

uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9

通常方式启动板子的串口日志:
DDR Version 1.08 20190523
In
Channel a: DDR3 400MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
Channel b: DDR3 400MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
Memory OK
Memory OK
OUT
Boot1 Release Time: Nov 27 2019 15:30:08, version: 2.58
ChipType = 0x8, 249
mmc2:cmd19,100
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=7456MB
FwPartOffset=2000 , 2000
mmc0:cmd8,400
mmc0:cmd8,400
mmc0:cmd8,400
SdmmcInit=0 1
StorageInit ok = 25894
SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit read PBA: 0x1404
SecureInit read PBA: 0x1804
SecureInit read PBA: 0x1c04
SecureInit ret = 0, SecureMode = 0
atags_set_bootdev: ret:(0)
GPT part: 0, name: uboot, start:0x4000, size:0x2000
GPT part: 1, name: trust, start:0x6000, size:0x2000
GPT part: 2, name: misc, start:0x8000, size:0x2000
GPT part: 3, name: boot, start:0xa000, size:0x10000
GPT part: 4, name: recovery, start:0x1a000, size:0x10000
GPT part: 5, name: backup, start:0x2a000, size:0x10000
GPT part: 6, name: rootfs, start:0x5a000, size:0x600000
GPT part: 7, name: userdata, start:0x65a000, size:0x835fdf
find part:uboot OK. first_lba:0x4000.
find part:trust OK. first_lba:0x6000.
LOADER Check OK! 0x4000, 136689
TOS Check OK! 0x6000, 173093
Enter Trust OS
INF [0x0] TEE-CORE:init_primary_helper:385: Core0 Initializing (1.1.0-421-gd098c6d2 #4 Thu Feb 20 01:29:17 UTC 2020 arm)

INF [0x0] TEE-CORE:init_primary_helper:386: Release version: 1.3

INF [0x0] TEE-CORE:init_primary_helper:387: Next entry point address: 0x200000

INF [0x0] TEE-CORE:init_teecore:83: teecore inits done

U-Boot 2017.09 (Aug 13 2020 - 00:56:13 -0700)

Model: Firefly-RK3288
PreSerial: 2
DRAM: 2 GiB
Sysmem: init
Relocation Offset is: 00000000
Using default environment

dwmmc@ff0c0000: 1, dwmmc@ff0f0000: 0
Bootdev(atags): mmc 0
MMC0: High Speed, 52Mhz
PartType: EFI
boot mode: recovery (misc)
Load FDT from recovery part
DTB: rk-kernel.dtb
I2c0 speed: 400000Hz
vdd_log 1100000 uV
*** Warning - bad CRC, using default environment

Failed to found available display route
stdio_add_devices: Video device failed (ret=-19)
In: serial@ff690000
Out: serial@ff690000
Err: serial@ff690000
Model: Firefly-RK3288 Board (Linux Opensource)
CLK: (uboot. arm: enter 1000000 KHz, init 1000000 KHz, kernel 0N/A)
apll 1000000 KHz
dpll 396000 KHz
cpll 384000 KHz
gpll 594000 KHz
npll 24000 KHz
aclk_bus 297000 KHz
Net: No ethernet found.
Hit key to stop autoboot(‘CTRL+C’): 0
ANDROID: reboot reason: “recovery”
Booting ZIMAGE kernel at 0x02008000(Uncompress to 0) with fdt at 0x8300000…

## Booting Android Image at 0x02007800 …
Kernel load addr 0x02008000 size 8112 KiB
RAM disk load addr 0x0a200000 size 7740 KiB
## Flattened Device Tree blob at 08300000
Booting using the fdt blob at 0x8300000
XIP Kernel Image … OK
‘reserved-memory’ dma-unusable@fe000000: addr=fe000000 size=1000000
‘reserved-memory’ ramoops@00000000: addr=8000000 size=f0000
Loading Ramdisk to 0f871000, end 0ffffd6a … OK
Loading Device Tree to 0f85a000, end 0f870136 … OK
Adding bank: 0x00000000 - 0x08400000 (size: 0x08400000)
Adding bank: 0x09300000 - 0x80000000 (size: 0x76d00000)
Total: 3707.326 ms

Starting kernel … 后面就没有出日志了

  • 配置文件应该没错吧,
    ls -l device/rockchip/.BoardConfig.mk
    device/rockchip/.BoardConfig.mk → rk3288/firefly-rk3288-ubuntu.mk

  • 你只烧了 kernel、uboot?{:4_213:}
    其它也重新编译一下,比如,recovery,然后打包一个完整固件再烧写