caven 发表于 2020-8-14 11:05:51

本帖最后由 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 Aug5 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-x2 root root 4096 Aug3 22:14 ./
drwxr-xr-x 20 root root 4096 Aug 13 19:59 ../
lrwxrwxrwx1 root root   27 Aug3 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-x3 root root   4096 Aug 13 02:33 ./
drwxr-xr-x 20 root root   4096 Aug 13 19:59 ../
lrwxrwxrwx1 root root       19 Aug4 03:18 boot.img -> ../kernel/zboot.img
lrwxrwxrwx1 root root       55 Aug4 03:18 idbloader.img -> /home/lzd/work/rtl3288/firefly-sdk/u-boot/idbloader.img
lrwxrwxrwx1 root root       37 Aug4 03:18 MiniLoaderAll.bin -> ../u-boot/rk3288_loader_v1.08.258.bin
lrwxrwxrwx1 root root       44 Aug4 03:18 misc.img -> ../device/rockchip/rockimg/wipe_all-misc.img*
drwxr-xr-x2 root root   4096 Aug4 03:28 pack/
lrwxrwxrwx1 root root       46 Aug4 03:18 parameter.txt -> ../device/rockchip/rk3288/parameter-ubuntu.txt
-rw-r--r--1 root root 16351232 Aug 13 02:33 recovery.img
lrwxrwxrwx1 root root       27 Aug4 03:18 rootfs.img -> ../debian/linaro-rootfs.img
lrwxrwxrwx1 root root       19 Aug4 03:18 trust.img -> ../u-boot/trust.img
lrwxrwxrwx1 root root       19 Aug4 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:52

烧录整个固件,内核启动成功了,串口可以进入命令行,且可以执行命令;但debian文件系统进入有些问题,不能显示界面,不知道是显卡驱动问题,还是文件系统问题;
错误日志:
[   10.557080] rc.local:
Failed to start Light Display Manager.


[   11.111450] rc.local: line: DRIVER=usb
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
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.
: , prefix: PRODUCT=.[   11.737814] dhd_preinit_ioctls wl ampdu_hostreorder failed -23

See 'systemctl status lightdm.service' for details.
[   11.450372] rc.local: line: MODALIAS=usb:v0A12p0001d8891dcE0dsc01dp01icE0isc01ip01in01
[   11.457689] rc.local: , prefix: PRODUCT=.
[   11.462042] rc.local: uevent path:/sys/bus/usb/devices/1-1.4:1.0/uevent
[   11.469037] rc.local: line: DEVTYPE=usb_interface
[   11.474136] rc.local: , prefix: PRODUCT=.
[   11.478553] rc.local: line: DRIVER=hub
[   11.482720] rc.local: , prefix: PRODUCT=.
[   11.487135] rc.local: line: PRODUCT=1a40/101/111
[   11.492159] rc.local: , prefix: PRODUCT=.
[   11.496584] rc.local: pid:vid : 1a40:0101
[   11.501065] rc.local: line: TYPE=9/0/1
[   11.505142] rc.local: , prefix: PRODUCT=.
[   11.509549] rc.local: line: INTERFACE=9/0/0
[   11.514153] rc.local: , prefix: PRODUCT=.
[   11.518568] rc.local: 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: , prefix: PRODUCT=.
[   11.606583] rc.local: ] uevent path:/sys/bus/usb/devices/1-1.1/ueventStopped Light Display Manager.


[   11.703055] rc.local: line: DEVNUM=003 Failed to start Light Display Manager.
See 'systemctl status lightdm.service'

caven 发表于 2020-8-14 12:37:16

本帖最后由 caven 于 2020-8-14 18:18 编辑

up

caven 发表于 2020-8-14 22:36:07

编译debian是下载了大量的库,怎么才能把这些库清掉,然后重编。

caven 发表于 2020-8-15 08:22:53

本帖最后由 caven 于 2020-8-15 15:18 编辑

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

第一次编译,出现错误,binary-tar.tar.gz 没有生成,lb source 已经是 lb build,最后的代码了,所以我猜测是live-build生成的压缩包名可能变了
日志如下 :
lb source
P: start exec source
P: exec sourcebefore Set_defaults
P: exec sourcebefore 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

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



时间的蝴蝶 发表于 2020-8-17 14:17:01

有看这个文件吗? debian/readme.md,你按里面的步骤操作试下

caven 发表于 2020-8-18 14:36:17

这个看过,只是比较高层的执行;原来有编译出 linaro-rootfs.img ,上次因为kernel起不来,重新更新了代码,原来的工程编译debian失败,重新搭了一个环境还是失败;

caven 发表于 2020-8-19 09:16:00

问题解决,更换debian的镜像(从清华 --》华为),手动 删除 debian/linaro-rootfs.img。 debian编译成功,且可以在开发板上正常运行;
谢谢时间的蝴蝶。

时间的蝴蝶 发表于 2020-8-19 09:47:47

{:4_211:}

gang897572 发表于 2020-8-25 11:11:02

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

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

请问如何更新代码?
页: 1 2 [3] 4
查看完整版本: Firefly-RK3288 编译debian问题