Firefly开源社区

[Linux] Linux的固件无法引导kernel

58

积分

0

威望

0

贡献

技术小白

积分
58
发表于 2021-1-4 18:21:50     
1. 编译过程:使用了官方Firefly RK3288的最新linux SDK ,所有流程都按官方的wiki走的,最后编译的大固件在/home/dev/proj/firefly-sdk/rockdev/pack/ 下 FIREFLY-RK3288-UBUNTUUBUNTU-GPT-20210104-1557.img
2. 烧写过程: 开发板上跑的是官方的GPT固件,我使用了瑞芯微开发工具v2.5.8 进入maskrom模式,烧录上述固件,烧录成功
3. 问题: 设备无法引导kernel,错误显示无法分配kernel,是不是我的操作过程有什么问题

?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, 250
mmc2:cmd19,100
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=14910MB
FwPartOffset=2000 , 2000
mmc0:cmd8,400
mmc0:cmd8,400
mmc0:cmd8,400
SdmmcInit=0 1
StorageInit ok = 27115
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:0x3a9200
GPT part:  7, name:         userdata, start:0x403200, size:0x191bddf
find part:uboot OK. first_lba:0x4000.
find part:trust OK. first_lba:0x6000.
LOADER Check OK! 0x4000, 134656
TOS    Check OK! 0x6000, 171065
Enter Trust OS
INF [0x0] TEE-CORE:init_primary_helper:385: Core0 Initializing (1.1.0-432-gc99a453d #4 Mon Aug 17 09:16:49 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 (Jan 04 2021 - 15:56:51 +0800)

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: None
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 - 6a:67:0f:94:23:ed
eth0: ethernet@ff290000
Hit key to stop autoboot('CTRL+C'):  0
ANDROID: reboot reason: "(none)"
Load FDT from boot part
DTB: rk-kernel.dtb
Booting ZIMAGE kernel at 0x02008000(Uncompress to 0) with fdt at 0x8300000...


ERROR: Failed to allocate 0x1188000 bytes below 0x1188000.
Sysmem Error: Failed to alloc "UNCOMPRESS-KERNEL" at 0x00000000 - 0x01188000
## Booting Android Image at 0x02007800 ...
Kernel load addr 0x02008000 size 8079 KiB
RAM disk load addr 0x0a200000 size 8675 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 0f787000, end 0ffff94e ... OK
   Loading Device Tree to 0f770000, end 0f786136 ... OK
Adding bank: 0x00000000 - 0x08400000 (size: 0x08400000)
Adding bank: 0x09310000 - 0x80000000 (size: 0x76cf0000)
Total: 4181.958 ms

Starting kernel ...


回复

使用道具 举报

58

积分

0

威望

0

贡献

技术小白

积分
58
发表于 2021-1-5 09:25:51     
commitID

commit acbe401083ab0b57c81c9be6c44baad788e939c4
Author: huangjc <service@t-firefly.com>
Date:   Thu Dec 3 10:42:23 2020 +0800

    [rkbin]: update in commit 2e3e6bb1f2bf7a30d392bec1b113f7f318228686
回复

使用道具 举报

58

积分

0

威望

0

贡献

技术小白

积分
58
发表于 2021-1-5 09:32:01     
image.png
按照wiki教程来操作的

配置如下所示:

# Target arch
export RK_ARCH=arm                                              # 32位 ARM 架构
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=firefly-rk3288                        # u-boot 配置文件
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=firefly_linux_defconfig              # kernel 配置文件
# Kernel dts
export RK_KERNEL_DTS=rk3288-firefly                              # dts 文件
# parameter for GPT table
export RK_PARAMETER=parameter-ubuntu.txt                        # 分区表
# rootfs image path
export RK_ROOTFS_IMG=ubuntu_rootfs/rk3288_ubuntu_rootfs.img     # 根文件系统路径
回复

使用道具 举报

58

积分

0

威望

0

贡献

技术小白

积分
58
发表于 2021-1-5 10:32:14     
直接升级 boot.image 也不能引导 kernel
image.png
image.jpg
回复

使用道具 举报

1306

积分

0

威望

0

贡献

中级创客

Rank: 4

积分
1306
发表于 2021-1-5 10:53:56     
- 看下这个帖子:http://dev.t-firefly.com/forum.p ... mp;extra=#pid240236
- 确认下代码更新,http://wiki.t-firefly.com/zh_CN/ ... e_gpt.html#geng-xin
- 有没有这两个 kernel、 uboot 提交
[u-boot]: update in commit f6759c8e50d7768338740cbd1b0d8803011371c0
[kernel]: update in commit 43ba1641bbfd903c9406c9aa30e8845f1a75bfaf
回复

使用道具 举报

58

积分

0

威望

0

贡献

技术小白

积分
58
发表于 2021-1-5 15:41:31     
嗯,更新之后 问题解决了,谢谢 蝴蝶大神
回复

使用道具 举报

58

积分

0

威望

0

贡献

技术小白

积分
58
发表于 2021-1-5 15:45:17     
请问,如何更新 内核的img; 我的做法是
./build.sh kernel---->生成的boot.img--->瑞星微开发工具V2.5.8烧录boot选项--》结果kernel无法启动
image.jpg
回复

使用道具 举报

1306

积分

0

威望

0

贡献

中级创客

Rank: 4

积分
1306
发表于 2021-1-6 09:13:28     
- 更新 rk3288 的内核是烧写 zboot.img 文件,
# boot image type
export RK_BOOT_IMG=zboot.img

- 其次是烧写地址要正确,http://wiki.t-firefly.com/zh_CN/ ... ml#fen-qu-shuo-ming
回复

使用道具 举报

58

积分

0

威望

0

贡献

技术小白

积分
58
发表于 2021-1-6 14:27:46     
好的,可以烧录了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表