您尚未登录。

楼主 #1 2020-02-02 21:13:28

流氓兔
会员
注册时间: 2020-02-01
已发帖子: 121
积分: 109.5

全志A33 主线u-boot/Linux入坑记录

1. sunxi-tools

2. u-boot

3. linux

4. rootfs(buildroot)

5. package

离线

楼主 #2 2020-02-02 21:14:05

流氓兔
会员
注册时间: 2020-02-01
已发帖子: 121
积分: 109.5

Re: 全志A33 主线u-boot/Linux入坑记录

1. sunxi-tools

mkdir /opt/a33 -p

git clone https://github.com/linux-sunxi/sunxi-tools

cd sunxi-tools

make

离线

楼主 #3 2020-02-02 21:15:10

流氓兔
会员
注册时间: 2020-02-01
已发帖子: 121
积分: 109.5

Re: 全志A33 主线u-boot/Linux入坑记录

2. u-boot

git clone https://github.com/linux-sunxi/u-boot-sunxi u-boot-sunxi
#或者
git clone https://gitlab.denx.de/u-boot/u-boot.git u-boot-sunxi


cd u-boot-sunxi

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make Sinlinx_SinA33_defconfig
#或者
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make A33-OLinuXino_defconfig


#编译:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make

/opt/a33/sunxi-tools/sunxi-fel uboot u-boot-sunxi-with-spl.bin

最近编辑记录 流氓兔 (2020-02-02 21:19:27)

离线

#4 2020-02-02 21:45:58

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 全志A33 主线u-boot/Linux入坑记录

支持,A33这个片子不错

离线

楼主 #5 2020-02-02 23:19:47

流氓兔
会员
注册时间: 2020-02-01
已发帖子: 121
积分: 109.5

Re: 全志A33 主线u-boot/Linux入坑记录

#
# USB peripherals
#
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
# CONFIG_SYS_USB_EVENT_POLL is not set
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
# CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP is not set
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
# CONFIG_USB_GADGET_ATMEL_USBA is not set
# CONFIG_USB_GADGET_BCM_UDC_OTG_PHY is not set
# CONFIG_USB_GADGET_DWC2_OTG is not set
# CONFIG_CI_UDC is not set
CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_DUALSPEED=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_USB_FUNCTION_MASS_STORAGE=y
# CONFIG_USB_FUNCTION_ROCKUSB is not set
# CONFIG_USB_FUNCTION_SDP is not set
# CONFIG_USB_FUNCTION_THOR is not set
CONFIG_USB_ETHER=y
# CONFIG_USB_ETH_CDC is not set
CONFIG_USB_ETH_RNDIS=y
CONFIG_USBNET_DEVADDR="de:ad:be:ef:00:01"
CONFIG_USBNET_HOST_ADDR="de:ad:be:ef:00:00"
# CONFIG_USB_HOST_ETHER is not set

新版 u-boot 驱动越来越多了, 居然携带了这么多的usb驱动,就是还没学会怎么使用.

离线

楼主 #6 2020-02-02 23:30:50

流氓兔
会员
注册时间: 2020-02-01
已发帖子: 121
积分: 109.5

Re: 全志A33 主线u-boot/Linux入坑记录

sunxi-fel启动u-boot, 用fatls 显示 TF 卡文件正常:

=> fatls mmc 0:1
            lost.dir/
            android/
 555152547   6a.mp4
 205590075   ardurino.mp4

但是把这个 u-boot 烧录到 TF卡, 启动不正常:

U-Boot SPL 2019.01-rc3-g829407b58f-dirty (Feb 02 2020 - 21:32:54 +0800)
DRAM: 256 MiB
Trying to boot from MMC1
MMC: no card present
spl: mmc init failed with error: -123
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

看起来这个u-boot默认去找 emmc(MMC1), 而不是 TF卡(MMC0) ?

离线

楼主 #7 2020-02-03 13:08:43

流氓兔
会员
注册时间: 2020-02-01
已发帖子: 121
积分: 109.5

Re: 全志A33 主线u-boot/Linux入坑记录

QQ图片20200203125741.png

真折腾, spl 识别到了 TF 卡, 但是 u-boot 却没有识别到 TF 卡.

离线

楼主 #8 2020-02-03 21:31:04

流氓兔
会员
注册时间: 2020-02-01
已发帖子: 121
积分: 109.5

Re: 全志A33 主线u-boot/Linux入坑记录

QQ图片20200203213003.png

修改 arch/arm/dts/sun8i-a33-sinlinx-sina33.dts 搞定, 可能是 TF 卡检测引脚和我的板子并不匹配吧.


重新编译 u-boot:

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

直接运行:

/opt/a33/sunxi-tools/sunxi-fel uboot u-boot-sunxi-with-spl.bin

烧录到TF卡:

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

离线

楼主 #9 2020-02-03 21:34:40

流氓兔
会员
注册时间: 2020-02-01
已发帖子: 121
积分: 109.5

Re: 全志A33 主线u-boot/Linux入坑记录

克隆编译Linux:

#克隆
git clone https://github.com/torvalds/linux

cd linux

#配置
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make sunxi_defconfig

#编译
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j3

下面这两个就是你需要的文件了:

arch/arm/boot/zImage
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dtb

离线

楼主 #10 2020-02-03 21:35:36

流氓兔
会员
注册时间: 2020-02-01
已发帖子: 121
积分: 109.5

Re: 全志A33 主线u-boot/Linux入坑记录

u-boot 手动加载命令:

fatload mmc 0:1 0x46000000 zImage
fatload mmc 0:1 0x49000000 sun8i-a33-sinlinx-sina33.dtb

setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait panic=10

bootz 0x46000000 - 0x49000000

离线

楼主 #11 2020-02-03 21:39:21

流氓兔
会员
注册时间: 2020-02-01
已发帖子: 121
积分: 109.5

Re: 全志A33 主线u-boot/Linux入坑记录

建立 boot.cmd 文件:

fatload mmc 0:1 0x46000000 zImage
fatload mmc 0:1 0x49000000 sun8i-a33-sinlinx-sina33.dtb

setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait panic=10

bootz 0x46000000 - 0x49000000

mkimage -C none -A arm -T script -d boot.cmd boot.scr

然后把 boot.scr, zImage, sun8i-a33-sinlinx-sina33.dtb 三个文件

一起拷贝到 TF 卡第一个分区, 这样就不用手动敲命令了.

离线

#12 2020-03-11 21:42:29

KevinS
会员
注册时间: 2020-01-18
已发帖子: 23
积分: 18

Re: 全志A33 主线u-boot/Linux入坑记录

这个帖子怎么不更新了,kernel rootfs 的内容怎么不更新了?

离线

#13 2020-03-12 08:56:10

staunchheart
会员
注册时间: 2019-12-17
已发帖子: 221
积分: 183

Re: 全志A33 主线u-boot/Linux入坑记录

支持一下,我等学渣,就跟在后面喊“666,666”

离线

#14 2020-05-11 15:27:50

tianjjff
会员
注册时间: 2018-12-24
已发帖子: 129
积分: 22

Re: 全志A33 主线u-boot/Linux入坑记录

流氓兔 说:

sunxi-fel启动u-boot, 用fatls 显示 TF 卡文件正常:

=> fatls mmc 0:1
            lost.dir/
            android/
 555152547   6a.mp4
 205590075   ardurino.mp4

但是把这个 u-boot 烧录到 TF卡, 启动不正常:

U-Boot SPL 2019.01-rc3-g829407b58f-dirty (Feb 02 2020 - 21:32:54 +0800)
DRAM: 256 MiB
Trying to boot from MMC1
MMC: no card present
spl: mmc init failed with error: -123
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

看起来这个u-boot默认去找 emmc(MMC1), 而不是 TF卡(MMC0) ?

请问楼主这个怎么解决的,我的uboot一上电也是打印这个错误

离线

#15 2020-05-11 15:31:03

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: 全志A33 主线u-boot/Linux入坑记录

tianjjff 说:

请问楼主这个怎么解决的,我的uboot一上电也是打印这个错误

貌似修改 dts里面的 mmc0的cd(card detected)引脚。





离线

#16 2020-05-11 15:34:41

tianjjff
会员
注册时间: 2018-12-24
已发帖子: 129
积分: 22

Re: 全志A33 主线u-boot/Linux入坑记录

哇酷小二 说:

貌似修改 dts里面的 mmc0的cd(card detected)引脚。

去掉了检测引脚还是一样的

离线

#17 2020-05-11 15:40:21

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: 全志A33 主线u-boot/Linux入坑记录

tianjjff 说:

去掉了检测引脚还是一样的

那把dts里面的cd脚删除(屏蔽):

&mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>;
        vmmc-supply = <&reg_dcdc1>;
        bus-width = <4>;
        status = "okay";
};




离线

#18 2020-05-11 15:44:40

tianjjff
会员
注册时间: 2018-12-24
已发帖子: 129
积分: 22

Re: 全志A33 主线u-boot/Linux入坑记录

哇酷小二 说:

那把dts里面的cd脚删除(屏蔽):

&mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>;
        vmmc-supply = <&reg_dcdc1>;
        bus-width = <4>;
        status = "okay";
};

已经是这样改的,还是一样的效果

离线

#19 2020-05-11 15:53:24

tianjjff
会员
注册时间: 2018-12-24
已发帖子: 129
积分: 22

Re: 全志A33 主线u-boot/Linux入坑记录

tianjjff 说:

已经是这样改的,还是一样的效果

解决了,UBOOT menuconfig把PB4也去掉就可以了

&mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>;
        vmmc-supply = <&reg_dcdc1>;
        bus-width = <4>;
        status = "okay";
};

离线

#20 2020-05-11 16:04:25

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: 全志A33 主线u-boot/Linux入坑记录

这个问题当时我跟踪了很久,没想到是检测卡的问题。





离线

#21 2020-05-13 18:24:24

CyrilTaylor
会员
注册时间: 2020-05-13
已发帖子: 5
积分: 5

Re: 全志A33 主线u-boot/Linux入坑记录

诶,我也在搞mainline的u-boot和linux,真是看不上全志的卡烧方式啊,移植太麻烦了

离线

#22 2020-05-17 22:32:50

grantho
会员
注册时间: 2020-03-21
已发帖子: 67
积分: 8.5

Re: 全志A33 主线u-boot/Linux入坑记录

主线fel烧写感觉为有点慢,不过算是走上了主线之路

离线

#23 2021-04-21 21:53:48

eloi
会员
注册时间: 2021-04-21
已发帖子: 1
积分: 0.5

Re: 全志A33 主线u-boot/Linux入坑记录

tianjjff 说:
tianjjff 说:

已经是这样改的,还是一样的效果

解决了,UBOOT menuconfig把PB4也去掉就可以了

&mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>;
        vmmc-supply = <&reg_dcdc1>;
        bus-width = <4>;
        status = "okay";
};

请问那个menuconfig那处具体怎么操作,我的也是卡在这里了

离线

#24 2022-05-30 13:13:47

东哥
会员
注册时间: 2021-04-15
已发帖子: 11
积分: 5.5

Re: 全志A33 主线u-boot/Linux入坑记录

大佬,能分享一下你的固件吗,gnueabihf的太难找了

离线

#27 2023-06-21 10:34:45

mglx
会员
注册时间: 2023-06-21
已发帖子: 5
积分: 0

Re: 全志A33 主线u-boot/Linux入坑记录

价格没有优势,而且资料太乱了,有没有大神整理下的

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn