zoukankan      html  css  js  c++  java
  • Yocto开发笔记之《错误记录》(QQ交流群:519230208)

    QQ群:519230208,为避免广告骚扰,申请时请注明 “开发者” 字样

    ==============================================

    提问:

    1. 怎样修改linux代码,修改后怎么用git管理。

    2. 怎样编译修改后的代码,只编译和install修改的部分,加快速度。

    3. bitbake的clean都clean了哪些内容,为什么源码不见了。

    4. 自己的修改的代码怎么和fsl的修改合并在一起。

    5. 烧写.sdcard没问题,但从tftp启动image就出错。

    6. 开发版编译的是什么版本,是fsl-image-gui吗? 

    7. 我是做驱动开发的,怎么调试单个模块?比如usb serial module驱动3G模块。

    8. 写了一个应用程序,在fsl的image上可以正常运行,我自己编译了一个minimal的内核,却提示不能够执行。

    9. 通过eclipse插件,新建一个Yocto project,我的main.c文件想调用其他文件的*.c实现,发现总是引用不成功,不知道是插件的问题还是哪儿用错了。

    10. 直接到内核代码处执行make menuconfig和执行bitbake -C menuconfig "module"有啥不同吗

    ========================================================

    一 u-boot可以通过tftp正常加载image和dbt文件,但显示文件错误

    ===============================================

    U-Boot 2015.04-imx_v2015.04_3.14.38_6ul_ga+g5d63276 (Aug 18 2015 - 21:32:01)

    CPU:   Freescale i.MX6UL rev1.0 at 396 MHz
    CPU:   Temperature 38 C
    Reset cause: POR
    Board: MX6UL 14x14 EVK
    I2C:   ready
    DRAM:  512 MiB
    MMC:   FSL_SDHC: 0, FSL_SDHC: 1
    Display: TFT43AB (480x272)
    Video: 480x272x24
    In:    serial
    Out:   serial
    Err:   serial
    switch to partitions #0, OK
    mmc1 is current device
    Net:   FEC1
    Normal Boot
    Hit any key to stop autoboot:  0
    BOOTP broadcast 1
    DHCP client bound to address 192.168.0.105 (3 ms)
    Using FEC1 device
    TFTP from server 192.168.0.107; our IP address is 192.168.0.105
    Filename 'zImage'.
    Load address: 0x80800000
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             ########################
             885.7 KiB/s
    done
    Bytes transferred = 6070432 (5ca0a0 hex)
    BOOTP broadcast 1
    DHCP client bound to address 192.168.0.105 (3 ms)
    Using FEC1 device
    TFTP from server 192.168.0.107; our IP address is 192.168.0.105
    Filename 'zImage-imx6ul-14x14-evk.dtb'.
    Load address: 0x83000000
    Loading: ###
             364.3 KiB/s
    done
    Bytes transferred = 34342 (8626 hex)
    Kernel image @ 0x80800000 [ 0x000000 - 0x5ca0a0 ]
    Wrong Ramdisk Image Format
    Ramdisk image is corrupt or invalid

    -----------------------------------------

    => print


    baudrate=115200
    boot_fdt=try
    bootargs=console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=${serverip}:/nfsroot/rootfs,v3,tcp
    bootargsset=setenv bootargs ${consoleinfo} ${rootfsinfo}
    bootcmd=run bootcmd_net
    bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};
    bootcmd_net=run rootfsinfo bootargsset; dhcp ${image}; dhcp ${fdt_addr} ${fdt_file}; bootz ${loadaddr} - ${fdt_addr}
    bootdelay=3
    bootfile=zImage-imx6ul-14x14-evk.dtb
    bootscript=echo Running bootscript from mmc ...; source
    console=ttymxc0
    consoleinfo=console=ttymxc0,115200
    dnsip=202.96.134.33
    ethact=FEC1
    ethaddr=00:04:9f:03:e9:1d
    ethprime=FEC
    fdt_addr=0x83000000
    fdt_file=zImage-imx6ul-14x14-evk.dtb
    fdt_high=0xffffffff
    fileaddr=83000000
    filesize=8626
    gatewayip=192.168.0.1
    image=zImage
    initrd_addr=0x83800000
    initrd_high=0xffffffff
    ip_dyn=yes
    ipaddr=192.168.0.105
    loadaddr=0x80800000 setenv fdt_addr 0x83000000
    loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
    loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
    loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
    mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc g_mass_storage.stall=0 g_mass_storage.removable=1 g_mass_storage.i
    mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot}
    mmcautodetect=yes
    mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadadd;
    mmcdev=1
    mmcpart=1
    mmcroot=/dev/mmcblk1p2 rootwait rw
    netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
    netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${;
    netmask=255.255.255.0
    panel=TFT43AB
    rootfsinfo=root=/dev/nfs ip=dhcp nfsroot=${serverip}:/nfsroot/rootfs,v3,tcp
    script=boot.scr
    serverip=192.168.0.107

    Environment size: 2488/8188 bytes
    =>
    =============================================================================================================

    无法启动网络

    root@imx6ulevk:/usr/games# ifconfig eth0 up  
    ifconfig: SIOCSIFFLAGS: No such device
    root@imx_mfgtools_nogpu:~# dmesg | grep eth -C 5
    bio: create slab <bio-0> at 0
    mxs-dma 1804000.dma-apbh: initialized
    can-3v3: 3300 mV 
    VSD_3V3: 3300 mV 
    gpio_dvfs: 1300 <--> 1400 mV at 1400 mV 
    i2c-core: driver [max17135] using legacy suspend method
    i2c-core: driver [max17135] using legacy resume method
    SCSI subsystem initialized
    libata version 3.00 loaded.
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    --
    fsl-quadspi 21e0000.qspi: QuadSPI SPI NOR flash driver
    spi_gpio spi4.14: gpio-miso property not found, switching to no-rx mode
    CAN device driver interface
    flexcan 2090000.can: device registered (reg_base=a0968000, irq=142)
    flexcan 2094000.can: device registered (reg_base=a0970000, irq=143)
    20b4000.ethernet supply phy not found, using dummy regulator
    pps pps0: new PPS source ptp0
    libphy: fec_enet_mii_bus: probed
    fec 20b4000.ethernet eth0: registered PHC device 0
    2188000.ethernet supply phy not found, using dummy regulator
    pps pps1: new PPS source ptp1
    fec 2188000.ethernet eth1: registered PHC device 1
    ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    ehci-mxc: Freescale On-Chip EHCI Host driver
    usbcore: registered new interface driver usb-storage
    usbcore: registered new interface driver usb_ehset_test
    2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
    --
    hub 1-0:1.0: 1 port detected
    mousedev: PS/2 mouse device common for all mice
    input: 20cc000.snvs-pwrkey as /devices/soc0/soc.0/2000000.aips-bus/20cc000.snvs-pwrkey/input/input0
    snvs_pwrkey 20cc000.snvs-pwrkey: i.MX snvs powerkey probed
    input: iMX6UL TouchScreen Controller as /devices/virtual/input/input1
    i2c-core: driver [isl29023] using legacy suspend method
    i2c-core: driver [isl29023] using legacy resume method
    input: FreescaleAccelerometer as /devices/virtual/input/input2
    fxls8471 device driver probe successfully
    snvs_rtc 20cc034.snvs-rtc-lp: rtc core: registered 20cc034.snvs-rtc-lp as rtc0
    i2c /dev entries driver
    IR NEC protocol handler initialized
    --
    0-000e supply vdd not found, using dummy regulator
    0-000e supply vddio not found, using dummy regulator
    mag3110 0-000e: check mag3110 chip ID
    input: mag3110 as /devices/virtual/input/input3
    mag3110 0-000e: mag3110 is probed
    i2c-core: driver [mag3110] using legacy suspend method
    i2c-core: driver [mag3110] using legacy resume method
    imx2-wdt 20bc000.wdog: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=0)
    Bluetooth: HCI UART driver ver 2.2
    Bluetooth: HCI H4 protocol initialized
    Bluetooth: HCI BCSP protocol initialized
    Bluetooth: HCIATH3K protocol initialized

    =============================================================================================================

    正常,出厂状态下的print信息

    baudrate=115200
    boot_fdt=try
    bootcmd=mmc dev ${mmcdev};mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimage; then run mi
    bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};
    bootdelay=3
    bootscript=echo Running bootscript from mmc ...; source
    console=ttymxc0
    ethact=FEC1
    ethaddr=00:04:9f:03:fb:92
    ethprime=FEC
    fdt_addr=0x83000000
    fdt_file=imx6ul-14x14-evk.dtb
    fdt_high=0xffffffff
    image=zImage
    initrd_addr=0x83800000
    initrd_high=0xffffffff
    ip_dyn=yes
    loadaddr=0x80800000
    loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
    loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
    loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
    mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc g_mass_storage.stall=0 g_mass_storage.removable=1 g_mass_storage.i 
    mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot}
    mmcautodetect=yes
    mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadadd;
    mmcdev=1
    mmcpart=1
    mmcroot=/dev/mmcblk1p2 rootwait rw
    netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
    netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${;
    panel=TFT43AB
    script=boot.scr
    
    Environment size: 2042/8188 bytes

    在自己的image上不能执行的文件属性:

    summer@summer-ThinkPad-X230:/nfsroot/workspace/hello$ file hello
    hello: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=3801ca19875a1f217a660eab159099fddbd90974, not stripped

    tony提供的可以执行的文件

    summer@summer-ThinkPad-X230:/nfsroot/tonys$ file hello 
    hello: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=312402ec4e4e472214fbf65068ac3a5ebcb24919, stripped

    =============================================================================================================

    问题:

    ERROR: User requested feature sdl
           configure was not able to find it.
           Install SDL devel

    解决:

    sudo apt-get install libsdl1.2-dev
  • 相关阅读:
    在一个字符串中找到第一个只出现一次的字符
    声明数组变量/// 计算所有元素的总和/打印所有元素总和/输出/foreach循环/数组作为函数的参数/调用printArray方法打印
    intellij idea 如何更改编辑器文本字体和大小
    称砝码算法//输入与算法分开
    invalid types 'int[int]' for array subscript// EOF 输入多组数据//如何键盘输入EOF
    scanf和gets的差别
    输入3行字符串/定义flag/while/字符串后要加空格符
    ‘'的单引号/输入字符串/输出单个字符
    窗口迅速关闭的解决办法/scanf/if/for/break
    【笔记】【VSCode】Windows下VSCode编译调试c/c++
  • 原文地址:https://www.cnblogs.com/alanfang/p/5069551.html
Copyright © 2011-2022 走看看