怎样在升级固件内提取uboot

怎样在升级固件内提取uboot,第1张

这个是二进制代码,不是普通软件包,搞嵌入式开发的或单片机底层开发的都知道,它是开发人员用汇编和c语言开发好的手机启动物蠢代码。编译好后成为.uboot.bin (也就是可执行的代码) 烧写到手机正辩的flash中,才能启动手机。(类似dos下 .exe 可执行文件)uboot.bin 也罩清陪类似电脑BIOS芯片中要烧写的启动文件,道理一样,BIOS 刷好后才能开机,才能引导xp等 *** 作系统,再装其他软件。 注意:只能厂家提供的uboot.bin文件, 或者开发人员有电路图等开发资料,修改对原理图电路支持,编译成uboot.bin文件才有用, 不是解开它来修改。

开发板的最大内存寻址范围。这样就OK了。重新编译烧写启动后,输出如下:

U-Boot 2016.11-gbf241c8 (Mar 04 2017 - 06:46:50 +0800) for TINY4412

CPU: Exynos4412 @ 1.4 GHz

Model: Insignal Tiny4412 evaluation board based on Exynos4412

Board: Insignal Tiny4412 evaluation board based on Exynos4412

DRAM: 1 GiB

WARNING: Caches not enabled

MMC: DWMMC56: Can't get the dev index

exynos_dwmci_process_node: failed to decode dev 0

SAMSUNG SDHCI: 0

sdhci_transfer_data: Error detected in status(0x208002)!

sdhci_transfer_data: Error detected in status(0x208002)!

sdhci_transfer_data: Error detected in status(0x208000)!

*** Warning - read failed, using default environment

Hit any key to stop autoboot: 0

sdhci_transfer_data: Error detected in status(0x208002)!

sdhci_transfer_data: Error detected in status(0x208002)!

sdhci_transfer_data: Error detected in status(0x208000)!

SD/MMC found on device 0

** ext4fs_devread read error - block

Failed to mount ext2 filesystem...

** Unrecognized filesystem type **

** ext4fs_devread read error - block

Failed to mount ext2 filesystem...

** Unrecognized filesystem type **

** ext4fs_devread read error - block

Failed to mount ext2 filesystem...

** Unrecognized filesystem type **

Wrong Image Format for bootm command

ERROR: can't get kernel image!

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

上面有两处需要修复的:

第一姿薯枣点是:

DWMMC56: Can’t get the dev index

exynos_dwmci_process_node: failed to decode dev 0

第二点是:

sdhci_transfer_data: Error detected in status(0x208002)!

sdhci_transfer_data: Error detected in status(0x208002)!

sdhci_transfer_data: Error detected in status(0x208000)!

首先解决第一点,看输出是因为没有给EMMC添加相应的节点,导致在解析的时候手亮出问题了,查看Tiny4412的设备树文件,会发现确实没有给EMMC添加设备描述迹拆,我们添加下面的信息就可以解决找不到节点的问题了。

diff --git a/arch/arm/dts/exynos4210-tiny4412.dts b/arch/arm/dts/exynos4210-tiny4412.dts

index a4fe14f..77934e5 100644

--- a/arch/arm/dts/exynos4210-tiny4412.dts

+++ b/arch/arm/dts/exynos4210-tiny4412.dts

@@ -49,4 +49,14 @@

sdhci@12540000 {

status = "disabled"

}

+

+ dwmmc@12550000 {

+ samsung,bus-width = <8>

+ samsung,timing = <2 1 0>

+ samsung,removable = <0>

+ fifoth_val = <0x203f0040>

+ bus_hz = <400000000>

+ div = <0x3>

+ index = <4>

+ }

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

那么第二个问题才是最大的问题,我自己解决了很久,也科学上网去查找过相关的信息,但是都没有解决,所以,是的,我是来求助的,因为我真的是知识有限,没有办法解决啊,不过还是尝试过很多办法的,下面也和大家分享一下吧:

之前看到这样一个帖子:

http://u-boot.10912.n7.nabble.com/Bisected-quot-sdhci-transfer-data-Error-detected-in-status-0x208002-quot-problem-on-ODROID-X-td231188.html

就是显示解决这个问题的,我按照帖子中的说明进行了如下修改:

diff --git a/arch/arm/mach-exynos/clock.c b/arch/arm/mach-exynos/clock.c

index 3d31f9d..a8fc72a 100644

--- a/arch/arm/mach-exynos/clock.c

+++ b/arch/arm/mach-exynos/clock.c

@@ -1688,8 +1688,8 @@ unsigned long get_mmc_clk(int dev_index)

void set_mmc_clk(int dev_index, unsigned int div)

{

/* If want to set correct value, it needs to substract one from div.*/

- if (div >0)

- div -= 1

+// if (div >0)

+// div -= 1

if (cpu_is_exynos5()) {

if (proid_is_exynos5420() || proid_is_exynos5422())

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

然后上面显示的error都没有显示了,而且执行saveenv,显示done,执行mmc read/write显示的都是done,但是验证的时候发现都没有效果,我是通过执行mmc read 0x43E00000 0x800 0x100,意思是将mmc设备中第2048个block开始,读取256个block到内存0x43E00000,即u-boot执行的首地址处,然后在执行go 0x43E00000,如果mmc设备正常的话,通过上面的 *** 作,0x43E00000位置的内容应该要被覆盖,那么go 0x43E00000 *** 作后,开发板应该是宕机才对的,但是开发板是重新执行了uboot的初始化过程,因此看起来像是mmc设备还是没有初始化成功啊,起码mmc write/read都不能正常执行。

所以如果有哪位朋友也遇到过这种情况,还请和大家分享一下啊,谢谢!

makefile文件里面有个include $(TOPDIR)/config.mk

而在你第世带一搜歼芦次make xxx.config时会向改卜config.mk中写入include xxx.h


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/12197065.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-21
下一篇 2023-05-21

发表评论

登录后才能评论

评论列表(0条)

保存