Firefly开源社区

标题: Firefly-RK3288 编译debian问题 [打印本页]

作者: caven    时间: 2020-8-4 18:10
标题: 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!====

作者: 时间的蝴蝶    时间: 2020-8-5 14:44
打包个固件,烧写试一下喽~
作者: caven    时间: 2020-8-7 14:11
烧录,提示成功,但是插上显示器没有任何图像出来;
作者: 时间的蝴蝶    时间: 2020-8-8 09:24
是接的什么屏,默认是 hdmi 显示;看下串口,系统有没有起来。
作者: caven    时间: 2020-8-8 11:27
接hdmi的显示。用网上买的usb转串囗线,黑线接板子地,红线(Tⅹ)接板子RX,棕线(RX)接板子Tⅹ,用shellx6 连Com口成功,重启板子,接串口无输出信息。用瑞芯微升级工具连板子,没有发现设备。
作者: caven    时间: 2020-8-9 12:40
在mash模式下,烧录loader与参数文件(或 loader,参数文件,uboot, trust,内核 ), 烧录成功,但提示还是找不到设备;按住recovery重启,也是一样;
E:\work\蓝牙项目\mashrom升级3.png
参数文件中 0x00002000@0x00004000 的单位是什么,是字节,块,页,KB
参数文件开始地址与 loader重叠是否可能被覆盖;
单独升级loader,会停留在 mash状态;如果还升级了任何其他东西,开始地址在任何地方,状态都会变成没有找到设备;
作者: caven    时间: 2020-8-9 13:00
在maskrom模式下, 在瑞芯微开发工具的高级功能便签页,执行任何操作都失败,包括获取flash id等;
作者: 时间的蝴蝶    时间: 2020-8-10 09:44
- 串口使用说明,http://wiki.t-firefly.com/zh_CN/Firefly-RK3288/serial_debug.html

- 应该是 kernel、uboot 存在问题导致无法启动;看下代码是否正常更新



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


作者: caven    时间: 2020-8-10 16:39
我怀疑下载的版本不是一个稳定的基线版本,代码只下了一次clone了主线分支;
作者: caven    时间: 2020-8-11 10:13
怎么看代码是否正常更新啊,git 更新日志吗,我怎么知道怎么是对的,怎么是不对的;我的当前代码是可以正常编译的;
作者: caven    时间: 2020-8-11 12:51
loader方式升级模式,执行这个模式的是 loader这个程序吗; 如果按住recovery重启发现不了设备,说明什么问题。 loader无效,还是paramter.txt有问题,还是uboot有问题;
作者: 时间的蝴蝶    时间: 2020-8-12 09:35
- 看有没有这些提交,git log
```
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

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

```

- 检测不到设备,说明没有进 loader 模式,uboot 这块检测出现问题;

- 你再检查下编译步骤吧,看看这个贴有没有帮助
http://dev.t-firefly.com/thread-102281-1-1.html
作者: caven    时间: 2020-8-12 11:28
这个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!

作者: caven    时间: 2020-8-12 11:39
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:08
本帖最后由 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
作者: 时间的蝴蝶    时间: 2020-8-13 09:36
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



作者: caven    时间: 2020-8-13 11:27
请问下拉代码的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#

作者: 时间的蝴蝶    时间: 2020-8-13 15:00
下拉代码也是在 bundle 目录,这个没错。
不过你先用下面的命令设置一下你的 用户名 和 邮箱,再按照我之前说的方式更新代码。
  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"
作者: caven    时间: 2020-8-13 17:02
本帖最后由 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 ...                后面就没有出日志了


作者: 时间的蝴蝶    时间: 2020-8-13 19:51
- 配置文件应该没错吧,
ls -l device/rockchip/.BoardConfig.mk
device/rockchip/.BoardConfig.mk -> rk3288/firefly-rk3288-ubuntu.mk

- 你只烧了 kernel、uboot?
其它也重新编译一下,比如,recovery,然后打包一个完整固件再烧写
作者: caven    时间: 2020-8-14 11:05
本帖最后由 caven 于 2020-8-14 11:15 编辑

我开始是烧录整个固件的,但是有问题才分区烧录的;我使用debian,根据指导书修改了,但是配置还是用ubuntu的;paramter.txt 没有reovery分区所以我也没有加进去;
root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk# ls -l device/rockchip/.BoardConfig.mk
lrwxrwxrwx 1 root root 31 Aug  5 09:21 device/rockchip/.BoardConfig.mk -> rk3288/firefly-rk3288-ubuntu.mk
   
root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk# cat device/rockchip/rk3288/firefly-rk3288-ubuntu.mk
#!/bin/bash

CMD=`realpath $BASH_SOURCE`
CUR_DIR=`dirname $CMD`

source $CUR_DIR/BoardConfig.mk

# Uboot defconfig
export RK_UBOOT_DEFCONFIG=firefly-rk3288
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=firefly_linux_defconfig
# Kernel dts
export RK_KERNEL_DTS=rk3288-firefly
# parameter for GPT table
export RK_PARAMETER=parameter-ubuntu.txt
# packagefile for pack image files
export RK_PACKAGE_FILE=rk3288-ubuntu-package-file

# Set rootfs type, including ext2 ext4 squashfs
export RK_ROOTFS_TYPE=ext4
# rootfs image path
export RK_ROOTFS_IMG=ubuntu_rootfs/rk3288_ubuntu_rootfs.img
# recovery ramdisk
export RK_RECOVERY_RAMDISK=recovery-arm.cpio.gz

# Buildroot config
export RK_CFG_BUILDROOT=
# Recovery config
export RK_CFG_RECOVERY=
#OEM config
export RK_OEM_DIR=
#userdata config
export RK_USERDATA_DIR=

root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk# ll ubuntu_rootfs/
total 8
drwxr-xr-x  2 root root 4096 Aug  3 22:14 ./
drwxr-xr-x 20 root root 4096 Aug 13 19:59 ../
lrwxrwxrwx  1 root root   27 Aug  3 22:14 rk3288_ubuntu_rootfs.img -> ../debian/linaro-rootfs.img

root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk# cat tools/linux/Linux_Pack_Firmware/rockdev/rk3288-ubuntu-package-file
# NAME                Relative path
#
#HWDEF                HWDEF
package-file        package-file
bootloader        Image/MiniLoaderAll.bin
parameter        Image/parameter.txt
trust                Image/trust.img
uboot                Image/uboot.img
boot                Image/boot.img
misc                Image/misc.img
recovery        Image/recovery.img
rootfs                Image/rootfs.img
userdata:grow RESERVED
backup                RESERVED


root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk# ll rockdev
total 15980
drwxr-xr-x  3 root root     4096 Aug 13 02:33 ./
drwxr-xr-x 20 root root     4096 Aug 13 19:59 ../
lrwxrwxrwx  1 root root       19 Aug  4 03:18 boot.img -> ../kernel/zboot.img
lrwxrwxrwx  1 root root       55 Aug  4 03:18 idbloader.img -> /home/lzd/work/rtl3288/firefly-sdk/u-boot/idbloader.img
lrwxrwxrwx  1 root root       37 Aug  4 03:18 MiniLoaderAll.bin -> ../u-boot/rk3288_loader_v1.08.258.bin
lrwxrwxrwx  1 root root       44 Aug  4 03:18 misc.img -> ../device/rockchip/rockimg/wipe_all-misc.img*
drwxr-xr-x  2 root root     4096 Aug  4 03:28 pack/
lrwxrwxrwx  1 root root       46 Aug  4 03:18 parameter.txt -> ../device/rockchip/rk3288/parameter-ubuntu.txt
-rw-r--r--  1 root root 16351232 Aug 13 02:33 recovery.img
lrwxrwxrwx  1 root root       27 Aug  4 03:18 rootfs.img -> ../debian/linaro-rootfs.img
lrwxrwxrwx  1 root root       19 Aug  4 03:18 trust.img -> ../u-boot/trust.img
lrwxrwxrwx  1 root root       19 Aug  4 03:18 uboot.img -> ../u-boot/uboot.img


root@ubuntu:/home/lzd/work/rtl3288/firefly-sdk# cat device/rockchip/rk3288/parameter-ubuntu.txt
FIRMWARE_VER: 8.1
MACHINE_MODEL:RK3288
MACHINE_ID:007
MANUFACTURER:RK3288
MAGIC: 0x5041524B
ATAG: 0x00200800
MACHINE: 3288
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
TYPE: GPT
CMDLINE: 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




作者: caven    时间: 2020-8-14 12:30
烧录整个固件,内核启动成功了,串口可以进入命令行,且可以执行命令;  但debian文件系统进入有些问题,不能显示界面,不知道是显卡驱动问题,还是文件系统问题;
错误日志:
[   10.557080] rc.local[717]: [FAILEDuevent path:/sys/bus/usb/devices/1-1/uevent]
Failed to start Light Display Manager.


[   11.111450] rc.local[717]: line: DRIVER=usb[FAILED]
Failed to start Light Display Manager.[   11.117499]



[[   11.702159] dhd_conf_set_txglom_params: txglom_mode=copy
FAILED dhd_conf_set_txglom_params: txglomsize=0, deferred_tx_len=0
[0m[   11.715503] dhd_conf_set_txglom_params: txinrx_thres=-1, dhd_txminmax=1
[   11.384576] [   11.722358] dhd_conf_set_txglom_params: tx_max_offset=0, txctl_tmo_fix=300
] [   11.730513] dhd_conf_get_disable_proptx: fw_proptx=0, disable_proptx=1
rc.localFailed to start Light Display Manager.
[717]: , prefix: PRODUCT=.[   11.737814] dhd_preinit_ioctls wl ampdu_hostreorder failed -23

See 'systemctl status lightdm.service' for details.
[   11.450372] rc.local[717]: line: MODALIAS=usb:v0A12p0001d8891dcE0dsc01dp01icE0isc01ip01in01
[   11.457689] rc.local[717]: , prefix: PRODUCT=.
[   11.462042] rc.local[717]: uevent path:/sys/bus/usb/devices/1-1.4:1.0/uevent
[   11.469037] rc.local[717]: line: DEVTYPE=usb_interface
[   11.474136] rc.local[717]: , prefix: PRODUCT=.
[   11.478553] rc.local[717]: line: DRIVER=hub
[   11.482720] rc.local[717]: , prefix: PRODUCT=.
[   11.487135] rc.local[717]: line: PRODUCT=1a40/101/111
[   11.492159] rc.local[717]: , prefix: PRODUCT=.
[   11.496584] rc.local[717]: pid:vid : 1a40:0101
[   11.501065] rc.local[717]: line: TYPE=9/0/1
[   11.505142] rc.local[717]: , prefix: PRODUCT=.
[   11.509549] rc.local[717]: line: INTERFACE=9/0/0
[   11.514153] rc.local[717]: , prefix: PRODUCT=.
[   11.518568] rc.local[717]: line: MODALIAS=usb:v1A40p0101d0111dc09dsc00dp01ic0[   11.823896] rtt_do_get_ioctl: failed to send getbuf proxd iovar (CMD ID : 1), status=-23
9isc00ip00in00
[   11.838755] dhd_rtt_init : FTM is not supported
[   11.844657] dhd_preinit_ioctls: SensorHub diabled 0
[   11.845025] dhd_preinit_ioctls failed to set ShubHub disable
[   11.845379] dhd_ndo_get_version: failed, retcode = -23
[   11.845799] dhd_wl_ioctl_get_intiovar: get int iovar wnm_bsstrans_resp failed, ERR -23
[   11.845800] failed to get wnm_bsstrans_resp
[   11.846135] failed to set WNM capabilities
[   11.846293] dhd_conf_set_country: set country ALL, revision 0
[   11.849194] Country code: ALL (ALL/0)
[   11.850741] wl_android_wifi_on: Success
[   11.853874] CFG80211-ERROR) __wl_update_wiphybands : error reading vhtmode (-23)
[   11.858823] dhd_open : the lock is released.
[   11.858824] dhd_open: Exit ret=0
[   11.539234] rc.local[717]: , prefix: PRODUCT=.
[   11.606583] rc.local[  OK  [717]: ] uevent path:/sys/bus/usb/devices/1-1.1/ueventStopped Light Display Manager.


[   11.703055] rc.local[717]: line: DEVNUM=003[FAILED] Failed to start Light Display Manager.
See 'systemctl status lightdm.service'
作者: caven    时间: 2020-8-14 12:37
本帖最后由 caven 于 2020-8-14 18:18 编辑

up

作者: caven    时间: 2020-8-14 22:36
编译debian是下载了大量的库,怎么才能把这些库清掉,然后重编。
作者: caven    时间: 2020-8-15 08:22
本帖最后由 caven 于 2020-8-15 15:18 编辑

重新搭了个环境,编译debian。我使用P: live-build 1:20191221

第一次编译,出现错误,binary-tar.tar.gz 没有生成,lb source 已经是 lb build,最后的代码了,所以我猜测是live-build生成的压缩包名可能变了
日志如下 :
[2020-08-14 22:39:02] lb source
P: start exec source
P: exec source  before Set_defaults
P: exec source  before LB_SOURCE: false
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: mountpoint not found
Making rootfs!
dd: failed to open 'linaro-rootfs.img': Too many levels of symbolic links
====Build Debian9 ok!====


然后我在./firefly-sdk/debian/ubuntu-build-service/stretch-desktop-armhf/Makefile 新增了一块代码,以上错误就过了
        set -e; sudo lb build 2>&1 | tee $(LOGFILE)
        #新增的代码
        if [ -f live-image-armhf.tar.tar.gz ]; then \
                sudo mv live-image-armhf.tar.tar.gz binary-tar.tar.gz; \
                sudo mv live-image-armhf.contents binary.contents; \
        fi

        if [ -f binary-tar.tar.gz ]; then \
                tar -jcf $(CONFIGFILE) auto/ config/ configure; \
                sudo mv binary.contents $(LISTFILE); \
                sudo mv chroot.packages.live $(PKGSFILE); \
                sudo mv binary-tar.tar.gz $(TARGZFILE); \
                md5sum $(LOGFILE) $(CONFIGFILE) $(LISTFILE) $(PKGSFILE) $(TARGZFILE) > $(MD5SUMSFILE); \
                sha1sum $(LOGFILE) $(CONFIGFILE) $(LISTFILE) $(PKGSFILE) $(TARGZFILE) > $(SHA1SUMSFILE); \
        fi


但是还是没有成功,日志有好几个地方提示有问题,但我不确定那些是关键信息;
root@ubuntu:/# chmod o+x /usr/lib/dbus-1.0/dbus-daemon-launch-helper
root@ubuntu:/# apt-get update
qemu: Unsupported syscall: 384
qemu: Unsupported syscall: 384
Err:1 https://mirrors.tuna.tsinghua.edu.cn/debian stretch InRelease
  Could not resolve host: mirrors.tuna.tsinghua.edu.cn
Err:2 https://mirrors.tuna.tsinghua.edu.cn/debian-security stretch/updates InRelease
  Could not resolve host: mirrors.tuna.tsinghua.edu.cn
Err:3 https://mirrors.tuna.tsinghua.edu.cn/debian stretch-updates InRelease
  Could not resolve host: mirrors.tuna.tsinghua.edu.cn

。。。。。。。。。。。。。。。。。。。。。。。



log_build_debian_lasterr_20200815.rar

6.42 KB, 下载次数: 0, 下载积分: 灯泡 -1 , 经验 -1

编译debian错误日志


作者: 时间的蝴蝶    时间: 2020-8-17 14:17
有看这个文件吗? debian/readme.md,你按里面的步骤操作试下
作者: caven    时间: 2020-8-18 14:36
这个看过,只是比较高层的执行;原来有编译出 linaro-rootfs.img ,上次因为kernel起不来,重新更新了代码,原来的工程编译debian失败,重新搭了一个环境还是失败;
作者: caven    时间: 2020-8-19 09:16
问题解决,更换debian的镜像(从清华 --》华为),手动 删除 debian/linaro-rootfs.img  。 debian编译成功,且可以在开发板上正常运行;
谢谢  时间的蝴蝶。
作者: 时间的蝴蝶    时间: 2020-8-19 09:47

作者: gang897572    时间: 2020-8-25 11:11
时间的蝴蝶 发表于 2020-8-13 15:00
下拉代码也是在 bundle 目录,这个没错。
不过你先用下面的命令设置一下你的 用户名 和 邮箱,再按照我之 ...

再按照我之前说的方式更新代码。

请问如何更新代码?
作者: gang897572    时间: 2020-8-25 18:48
终于搞定了,原来是代码更新的问题,
代码更新问题
这两个提交是关键,否则后面的编译运行会有问题。
[u-boot]: update in commit f6759c8e50d7768338740cbd1b0d8803011371c0
[kernel]: update in commit 43ba1641bbfd903c9406c9aa30e8845f1a75bfaf
作者: gang897572    时间: 2020-8-25 18:52
教程上也没写清楚,我照着教程来做,之前居然不成功,让人很不爽,要在github注册一个账号




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1