XBMC image for wandboard dual

Hi,

Following several requests, I have just prepared an XBMC image which should work on wandboard dual.

How to install

Please have a look at XBMC on wandboard post.
Instructions are the same except :

  • You have to replace the filename wand.bin by wand_dual.bin
  • You have to connect a serial cable on db9 and to hit ESC on first boot. On uboot prompt, you have to type
set bootcmd ‘mmc dev 2; mmc read ${loadaddr} 0×800 0×1200; bootm’
set bootargs 'console=ttymxc0,115200 root=/dev/mmcblk0p1 rootwait ro video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 rootwait'
saveenv
run bootcmd

This specific step is required only once

NB : This post has just been updated on the 24th of July (and the image has also been updated.) Please Download again the image and check that the md5sum is df9b68ae2dc7342320018327d10774ff

Regards

27 thoughts on “XBMC image for wandboard dual

  1. Hi Stephan, I am very interested in experimenting with your xbmc image for the wandboard dual, however I am having trouble creating the image on my SD card.

    The first step I have done is to download u-boot for the dual lite, from
    http://www.wandboard.org/images/downloads/wand-dev-sd-20130204-dual.img.xz

    and I mount it by entering the command

    dd if=./wand-dev-sd-20130204-dual.img of=/dev/sdb bs=512 count=2048

    Then I add the xbmc files by
    dd if=wand_dual.bin of=/dev/sdb bs=4M

    When I hook up a serial cable, u-boot loads properly, but it cannot find the kernel. I understand that this is untested, but I do not know if it is something I am doing incorrectly or not. Any help would be greatly appreciated.

    Thanks you,
    Josh Kurland

    • Hi Josh

      This new image should be “ready to use” for wandboard dual…
      After extraction, you only have to issue the command :
      dd if=wand_dual.bin of=/dev/sdx bs=4M
      And you are ready to test… (well, you should at least lol)

      Edit : sorry your first step is useless but if you cannot find the kernel this is strange : could you post your error message ?
      Maybe you have to edit the bootcmd variable in uboot that way :
      set bootcmd “mmc dev 0; mmc read ${loadaddr} 0x800 0x1200; bootm”
      saveenv
      run bootcmd
      Stephan

    • Hi

      No blocking issue here :
      XBMC is able to decode dts (by software) and output as analog sound
      Of course you loose some advantages of dts but you have sound at least 😉

  2. Here is the error message.

    U-Boot 2009.08 (Feb 04 2013 – 18:09:31)

    CPU: Freescale i.MX6 family TO1.1 at 792 MHz
    Temperature: 25 C, calibration data 0x58e5305f
    mx6q pll1: 792MHz
    mx6q pll2: 528MHz
    mx6q pll3: 480MHz
    mx6q pll8: 50MHz
    ipg clock : 66000000Hz
    ipg per clock : 66000000Hz
    uart clock : 80000000Hz
    cspi clock : 60000000Hz
    ahb clock : 132000000Hz
    axi clock : 198000000Hz
    emi_slow clock: 22000000Hz
    ddr clock : 396000000Hz
    usdhc1 clock : 198000000Hz
    usdhc2 clock : 198000000Hz
    usdhc3 clock : 198000000Hz
    usdhc4 clock : 198000000Hz
    nfc clock : 24000000Hz
    Board: i.MX6DL/Solo WandBoard 0x61011 [POR ]
    Boot Device: SD
    DRAM: 1 GB
    MMC: FSL_USDHC: 0,FSL_USDHC: 1,FSL_USDHC: 2
    In: serial
    Out: serial
    Err: serial
    Got MAC = 00:1F:7B:B2:07:0A
    Hit any key to stop autoboot: 0
    mmc2 is current device

    MMC read: dev # 2, block # 2048, count 3328 … 3328 blocks read: OK
    ## Booting kernel from Legacy Image at 10800000 …
    Image Name: Linux-3.0.35+
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 2232528 Bytes = 2.1 MB
    Load Address: 10008000
    Entry Point: 10008000
    Verifying Checksum … Bad Data CRC
    ERROR: can’t get kernel image!
    WANDBOARD U-Boot >

    It looks like the board is trying to boot from the wrong device, however the uboot script you provided fails as well. The exact error is

    WANDBOARD U-Boot > set bootcmd “mmc dev 0; mmc read ${loadaddr} 0×800 0×1200; bootm”

    MMC read: dev # 0, block # 0, count 0 … 0 blocks read: OK
    Unknown command ‘bootm”’ – try ‘help’

    I am just beginning to learn embedded processors and uboot, so this is all a little new to me.

    • I too get the same error with the original u-boot parameters where it seems to fail the kernel image CRC check. I tried the provided bootcmd parameters but used ‘ (single quotes) instead of the double quotes (“) and that worked better in that the whole parameter list was there for the bootcmd variable but still no luck. I did get it to boot the kernel once but then it hung up and it got late so couldn’t investigate it further.

      • I tried Brett’s suggestion, and get this error instead

        Card did not respond to voltage select!
        mmc0(part 0) is current device

        MMC read: dev # 0, block # 0, count 0 … Card did not respond to voltage select!
        0 blocks read: OK
        ## Booting kernel from Legacy Image at 10800000 …
        Image Name: Linux-3.0.35+
        Image Type: ARM Linux Kernel Image (uncompressed)
        Data Size: 2232528 Bytes = 2.1 MB
        Load Address: 10008000
        Entry Point: 10008000
        Verifying Checksum … Bad Data CRC
        ERROR: can’t get kernel image!
        WANDBOARD U-Boot >

      • OK many thanks for your posts ; I think I understand the issue : Let me check I will update the post in a moment …

        • OK I understand your issue : You don’t load totally the uImage from sdcard that’s why you get the crc error.
          You load only 3328 blocks (ie 1703936 bytes while the uImage is 2232924 bytes long)
          But I made a mistake in my previous comment : Please try the following :

          set bootcmd ‘mmc dev 2; mmc read ${loadaddr} 0×800 0×1200; bootm’

          saveenv

          run bootcmd

          If it does not work please type :
          printenv

          And send me your output…
          Regards

          • The file size change (how much to read) fixes the problem and makes sense now that I know how uboot works. We got past the kernel image loading but it does a kernel panic when it tries to load the rootfs. It can’t find a file system, tries ext2, ext3, ext4, and vfat. I tried forcing it to in uboot using rootfstype=ext3. I tried several times reimaging the sd card using dd and same thing. I looked at it using parted and it confirms 1 partition of about 65M and no file system on it. If it’s not too much trouble can you post the kernel and rootfs separately and I can make my own sdcard using those pieces. I think I know enough now to do that. I am going to dd the quad image and try that and maybe it would be quicker just to replace the GPU firmware file on it. Thoughts? I totally appreciate your work in this area.

          • Since I couldn’t get the dual image to show a file system I used the quad image and replaced uboot with a dual uboot that I built with yocto. It booted into uboot and then booted the kernel but had a panic until I added the bootwait command to the bootargs and also changed the hdmi to what it was for dual. The kernel boots and I can ssh into it. I tried running xbmc but it complains that I need the hardware acceleration for OpenGL. I tried using the firmware file pointed to on the wanboard forum but still no luck and tried renaming and removing quad firmware but still no luck.

  3. Hi brett,

    Thanks for your feedback. I will post the RFS alone this evening and I have just understood your issue regarding the unrecognized FS : I will also try to solve it this evening and update the image…
    Sorry for all this trouble : I wanted to make things easier for wandboard dual users but blind development rarely works at first try. Yet I am confident that thanks to all your feedback we are close to a working and easy to install image even for dual…
    Regards

    • Hi,
      The post and the image have just been updated : It should work …
      Please keep me informed,
      If it works I will ask you to create an image of uboot with the correct env so that I can update the image and get rid of the configuration step…
      Regards

      • Stephan,

        Tried the image and it works great. I was fooled momentarily because my Denon receiver wasn’t detecting the HDMI but plugged it directly into my Samsung tv and it worked. I ran both sample videos and it used about 38% total CPU (both cores combined) at full frame rate compared to the image I tried to create which didn’t use the GPU and was 118% at only 11 fps. I will make an image for you but not sure how, can you tell me how. Does it matter that my SD card is 8GB? Thanks again this is great. I think I found a bug in that the time was correct (local time) and then I went to a new screen and didn’t think I changed anything but the time change to GMT maybe.

        Anyway great job and let me know what I need to do to create image and send/post it to you.

        Brett

        • Thanks Stephen, this is awesome!

          I do have three questions for you though:

          1.) Does this work with the second micro SD card in its slot? I read error messages about unable to mount in my serial terminal (I don’t have the error log in front of me but I can provide it if it would be useful).

          2.) As Brett asked, will this work on SD cards larger than 8gb? I attempted to mount the image onto a 16gb card in order to load video directly off of the card. The kernel fails to boot both before and after the uboot parameters were changed. Could it be a simple uboot env change?

          3.) How can I disable the CPU usage information that is being displayed at the top left of the screen? Is it possible to toggle that feature on and off while in xbmc?

          Thanks,
          Josh

  4. Hi all,
    Great news !

    First of all, I have just realized that we should also add “consoleblank=0” in bootargs to avoid the screen to turn black after a certain amount of time…

    set bootargs ‘console=ttymxc0,115200 root=/dev/mmcblk0p1 rootwait ro video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 consoleblank=0’
    saveenv

    should do the trick

    To create the image I need, please issue the command
    dd if=/dev/sdx of=uboot_dual.bin bs=512 count=2048
    /dev/sdx being the sdcard device

    Now a few remarks and answers :
    @brett
    About 38% of CPU : it cannot be directly compared to 118%. Indeed frequency scaling occurs (ondemand govenor being used) and with my image you get 38% of cpu load at 396Mhz while you were very likely at 996Mhz during your previous tests at 118% : So the difference is even greater…
    You can know about frequency for cpu0 in /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq for instance…

    About your 8GiB sdcard, it does not matter : You can resize the partition and the RFS using gparted for instance : It will still work and you will be able to use all available space…

    Regarding time, a ntp client should run
    Default TZ is UTC-0002, you can change it in /etc/profile

    @Josh
    1. I have not checked with the second sdcard. It should at least, I will have a look but for now I don’t have a second usdcard to give it a try right now…
    By the time maybe your kernel logs can help to figure out what’s going on
    2. your issue with 16gib sdcard is also quite strange : maybe there is an issue with uboot : I will update it with the latest version which has been mainstreamed recently in my next release to check whether it helps. Yet you should be able to stream your vids from network without issue : I tried both smb and nfs -XBMC lacks nfs client support for now but nfs mounts work fine when initiated from the console or added in /etc/fstab- and it works fine…
    3. Of course it is 😉
    system->settings->system->debugging and unchek “enable debug logging”
    4. login/pass is root/xbmcpoc

    Regards
    Stephan

  5. Pingback: XBMC image for dual (part 2) | Stephan's blog

  6. Hi Stephan, could you explain what the parameters in your uboot prompt mean? I ask because I am trying to make my own minimalist image using Yocto, but I am having issues with gstreamer. The rep from Freescale has confirmed that it should work on the Quad, but is not able to test it on the dual lite yet. I would really appreciate it if you have the time to talk for a bit.

    Thanks,
    Josh Kurland
    joshkrlnd@gmail.com

    • Hi Josh
      There is nothing really special in my uboot params (I set RFS device, console and video output)… At least nothing that can help or prevent gstreamer to run. Can you explain what your gstreamer issue is ? Maybe I will have an idea…

      • I started off using the Dylan branch of the Yocto project and the Freescale BSP. I tried using the prebuilt image fsl-image-gui just to start messing around to see how it works. If I used the gui video player, everything worked fine. Then I tried to play video in the terminal (which works fine on the Ubuntu release). The video “played” to completion without any issues, but nothing was ever displayed. In my serial terminal I saw the error

        mxc_sdc_fb mxc_sdc_fb.0: Unable to allocate framebuffer memory
        detected fb_set_par error, error code: -12
        mxc_v4l2_output mxc_v4l2_output.0: ERR:config_disp_output fb_set_var ret:-12
        mxc_v4l2_output mxc_v4l2_output.0: Config display output failed

        Right before gstreamer started to unroll everything. On a suggestion from a Freescale guy I switched to the Master repo and tried again. Now I get DMA memory allocation errors if I try to play using that video player as well as in gstreamer. That is why I am thinking it is a uboot issue. I just started learning about embedded systems like this so I’m not really sure how to go about debugging my issue.

        Thanks,
        Josh

          • You can apply this patch by hand if you are not familiar with this stuff. Do you know how to rebuild your kernel ?
            If so, just edit the file arch/arm/mach-mx6/board-wand.c in your kernel tree, locate the line
            “phys = memblock_alloc_base(wand_gpu_pdata.reserved_mem_size, SZ_4K, SZ_512M);”
            and replace it by the single line :
            “phys = memblock_alloc_base(wand_gpu_pdata.reserved_mem_size, SZ_4K, SZ_1G);”

            then rebuild your kernel and use this new kernel : It should work…

            Regards

  7. To be honest I don’t know where my kernel is. I just started messing around with Yocto a few days ago.

  8. Hello admin, i must say you have high quality
    articles here. Your blog should go viral. You need initial traffic only.
    How to get it? Search for: Mertiso’s tips go viral

Leave a Reply

Your email address will not be published. Required fields are marked *