全志v3s linux 编译,全志v3s学习笔记(2)——u-boot编译与烧录

一、编译

1、安装交叉编译环境

2、获取uboot(不同版本uboot)

//普通

git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-current

//支持spi flash

git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental1

2

3

4

3、编译uboot

cd u-boot

//不同屏幕不同配置(配置文件在configs文件夹下)--------------------------------------

//默认

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LicheePi_Zero_defconfig

//4.3寸屏

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LicheePi_Zero_480x272LCD_defconfig

//5寸屏

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LicheePi_Zero_800x480LCD_defconfig

//配置和编译-----------------------------------------------------------------------

make ARCH=arm menuconfig

time make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 2>&1 | tee build.log1

2

3

4

5

6

7

8

9

10

11

12

13

二、烧录

1、进入 fel 模式使用 sunxi-fel 工具烧录

//检查是否可以探测到芯片信息:

sudo sunxi-fel -l

//确认是否成功进入fel模式:

sudo sunxi-fel ver1

2

3

4

9c17cbbd1b92d5432182570b4391a058.png

有两种方式进行程序下载:

烧录到RAM中去执行,以 uboot file-with-spl形式进行(单次运行,测试时个人推荐)

sudo sunxi-fel uboot u-boot-sunxi-with-spl.bin

//或者执行烧录地址

sudo sunxi-fel -p write 0x40000000 u-boot-sunxi-with-spl.bin

sudo sunxi-fel exec 0x400000001

2

3

4

5

烧录到 spi-flash (开机自启)

sunxi-fel -p spiflash-write 0 u-boot-sunxi-with-spl.bin1

注意:如果烧录到 spi-flash ,需要修改 include/configs/sun8i.h ,从flash引导系统

uboot启动信息:

U-Boot SPL 2017.01-rc2-00057-g32ab1804cd (Jan 16 2021 - 12:28:54)

DRAM: 64 MiB

Trying to boot from FEL

U-Boot 2017.01-rc2-00057-g32ab1804cd (Jan 16 2021 - 12:28:54 +0800) Allwinner Technology

CPU: Allwinner V3s (SUN8I 1681)

Model: Lichee Pi Zero

DRAM: 64 MiB

MMC: SUNXI SD/MMC: 0

Card did not respond to voltage select!

*** Warning - MMC init failed, using default environment

In: serial@01c28000

Out: serial@01c28000

Err: serial@01c28000

Net: No ethernet found.

starting USB...

No controllers found

Hit any key to stop autoboot: 0

Card did not respond to voltage select!

starting USB...

No controllers found

USB is stopped. Please issue 'usb start' first.

starting USB...

No controllers found

No ethernet found.

missing environment variable: pxeuuid

missing environment variable: bootfile

Retrieving file: pxelinux.cfg/00000000

No ethernet found.

missing environment variable: bootfile

Retrieving file: pxelinux.cfg/0000000

No ethernet found.

missing environment variable: bootfile

Retrieving file: pxelinux.cfg/000000

No ethernet found.

missing environment variable: bootfile

Retrieving file: pxelinux.cfg/00000

No ethernet found.

missing environment variable: bootfile

Retrieving file: pxelinux.cfg/0000

No ethernet found.

missing environment variable: bootfile

Retrieving file: pxelinux.cfg/000

No ethernet found.

missing environment variable: bootfile

Retrieving file: pxelinux.cfg/00

No ethernet found.

missing environment variable: bootfile

Retrieving file: pxelinux.cfg/0

No ethernet found.

missing environment variable: bootfile

Retrieving file: pxelinux.cfg/default-arm-sunxi

No ethernet found.

missing environment variable: bootfile

Retrieving file: pxelinux.cfg/default-arm

No ethernet found.

missing environment variable: bootfile

Retrieving file: pxelinux.cfg/default

No ethernet found.

Config file not found

starting USB...

No controllers found

No ethernet found.

No ethernet found.

=>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

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

2、烧录到TF/SD卡

TF卡中的系统镜像一般分为三个区:

boot区或者引导区 - 该部分没有文件系统而是直接将二进制的bootloader(uboot)文件直接写入。

linux内核区 - fat文件系统,存放linux内核、内核参数文件还有设备数dtb文件。

rootfs分区 - 用来存放根文件系统和用户数据等,一般是ext4文件分区格式。

//插入TF卡前后查询,确认设备名称

ls /dev/sd*

//删除TF/SD的分区信息

sudo dd if=/dev/zero of=/dev/sdb bs=512K count=1

//烧录到TF卡(`u-boot-sunxi-with-spl.bin`在uboot根目录下)

sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=81

2

3

4

5

6

7

8

02ef8dbc0ba4b8abe773f22aa7b6e44e.png

6da2457cf484b174053124cae4d74fb4.png

uboot启动信息:

U-Boot 2017.01-rc2-00057-g32ab1804cd-dirty (Jan 16 2021 - 22:48:52 +0800) Allwinner Technology

CPU: Allwinner V3s (SUN8I 1681)

Model: Lichee Pi Zero

DRAM: 64 MiB

MMC: SUNXI SD/MMC: 0

*** Warning - bad CRC, using default environment

Setting up a 480x272 lcd console (overscan 0x0)

dotclock: 10000kHz = 10000kHz: (1 * 3MHz * 20) / 6

In: serial@01c28000

Out: serial@01c28000

Err: serial@01c28000

Net: No ethernet found.

starting USB...

No controllers found

Hit any key to stop autoboot: 0

** Invalid partition 1 **

** Invalid partition 1 **

=>1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

三、启动成功后显示界面:

1、直接烧录到RAM启动(USB):

292c3ba75185a3d1ba2d16a8d4edbb0d.png

2、烧录到TF启动:

注意TF卡要插在靠近USB的那个接口:

0d33c4c183566b539d0f4babb7a1a708.png

文章来源: blog.csdn.net,作者:丨匿名用户丨,版权归原作者所有,如需转载,请联系作者。

原文链接:blog.csdn.net/p1279030826/article/details/112672535

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值