瑞芯微Rockchip开发者社区
直播中

juju宇哥

9年用户 1435经验值
擅长:479809
私信 关注
[问答]

请问OKMX6Q-C开发板sd卡启动失败是为什么?怎么解决?

  • 我手上有块OKMX6Q-C开发板,内存是1g还是2g我不太清楚,使用的是官方给的1G的源码。
    我照着官方的 Qt5.6+Linux4.1.15手册里的4.1.2小节,使用SD烧写镜像。环境为vmware 16,虚拟机的操作系统是直接使用了飞凌给的Ubuntu12.04,sd卡使用了闪迪的32g。
    我将 文件夹“SD卡烧写工具”里的“Q_1G”文件复制到了虚拟机里,里面文件为 creatSdcard.sh 和 update.tar.bz2。

    我运行了 creatSdcard.sh,终端打印的log为下:

    root@ubuntu:~/work# sudo ./createSdcard.sh

    ################################################################################

    This script will create a bootable SD card from custom or pre-built binaries.

    The script must be run with root permissions and from the bin directory of
    the SDK

    Example:
    $ sudo ./create-sdcard.sh

    Formatting can be skipped if the SD card is already formatted and
    partitioned properly.

    ################################################################################


    Availible Drives to write images to:

    #  major   minor    size   name
    1:   8       32   31166976 sdc

    Enter Device Number: 1


    sdc was selected

    ################################################################################

                    **********WARNING**********

            Selected Device is greater then 16GB
            Continuing past this point will erase data from device
            Double check that this is the correct SD Card

    ################################################################################

    Would you like to continue [y/n] : y




    Checking the device is unmounted
    unmounted /dev/sdc1

    sdc1  sdc2   sdc3
    31162880


    ################################################################################

       Detected device has 1 partitions already

       Re-partitioning will allow the choice of 1 partitions

    ################################################################################

    Would you like to re-partition the drive anyways [y/n] : y


    Now partitioning sdc ...


    ################################################################################

                    Now ** 1 partitions

    ################################################################################

    2048+0 records in
    2048+0 records out
    1048576 bytes (1.0 MB) copied, 0.528746 s, 2.0 MB/s
    DISK SIZE - 31914983424 bytes
    Checking that no-one is using this disk right now ...
    OK

    Disk /dev/sdc: 30436 cylinders, 64 heads, 32 sectors/track
    Old situation:
    Warning: The partition table looks like it was made
      for C/H/S=*/255/63 (instead of 30436/64/32).
    For this listing I'll assume that geometry.
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

       Device Boot Start     End   #cyls    #blocks   Id  System
    /dev/sdc1          0+   3880-   3880-  31162880    c  W95 FAT32 (LBA)
    /dev/sdc2          0       -       0          0    0  Empty
    /dev/sdc3          0       -       0          0    0  Empty
    /dev/sdc4          0       -       0          0    0  Empty
    trailing junk after number

    sfdisk: bad input

    ################################################################################

                    Partitioning Boot

    ################################################################################
    mkfs.vfat 3.0.12 (29 Oct 2011)

    Mount the partitions

    Emptying partitions

    ################################################################################

            Copying files now... will take minutes

    ################################################################################

    Copying boot partition
    untar update.tar.bz2 to boot partition
    ./sdrun/
    ./sdrun/ramdisk.img.u
    ./sdrun/logo.bmp
    ./sdrun/u-boot.bin
    ./sdrun/uImage
    ./target/
    ./target/imx6dl-c-sabresd.dtb
    ./target/imx6q-c-sabresd.dtb
    ./target/logo.bmp
    ./target/zImage
    ./target/u-boot.imx
    ./target/rootfs.tar.bz2
    tar: ./target/rootfs.tar.bz2: Wrote only 4608 of 10240 bytes
    tar: Exiting with failure status due to previous errors
    Buring th u-boot.bin to sdcard
    500+0 records in
    500+0 records out
    512000 bytes (512 kB) copied, 0.000438542 s, 1.2 GB/s
    dd: opening `boot/sdrun/u-boot.bin': No such file or directory
    dd: opening `boot/sdrun/logo.bmp': No such file or directory

    Syncing....


    Un-mount the partitions

    Remove created temp directories

    Operation Finished


    我得到了 sdrun 和 target两个目录,但是我将sd卡插入到板子上,并将拨码开关设置为1off,2on,3off,4off,上电后,lcd屏幕是全黑的,没有任何加载的进度。(lcd屏幕我确认是好的,因为当我使用emmc启动时,lcd屏幕显示了自带的系统)。

    我不知道我接下来改怎么办,希望能得到官方的解答,谢谢!

  • 补充:
    我使用的是闪迪的 tf卡+卡托,并不是sd卡,这是否会有区别?

回帖(2)

h1654155275.5753

2022-1-7 09:43:13
您的屏幕是多少分辨率的lcd,烧写过程中默认是800*480的,看您标题为SD启动,内容说的是SD卡烧写,这两种显示现象也是不一样的
举报

李宛蔓

2022-1-7 09:43:19
这个是挺复杂的,需要重新修改uboot的引导镜像,您可以直接在uboot源码中将默认屏幕改为10寸lvds,具体修改如下:
1 路径为uboot-2016/include/configs/mx6sabre_common.h,打开这个文件在72行#define MXC_FB0处将
"mxcfb0=video=mxcfb0:dev=lcd,CLAA-WVGA,if=RGB24,bpp=16,int_clk"改为
"mxcfb0=video=mxcfb0:dev=ldb,1280x800M@60,if=RGB24,bpp=16"保存后按照手册重新编译镜像后替换
sdrun中的u-boot.bin,然后您试一下
举报

更多回帖

发帖
×
20
完善资料,
赚取积分