u-boot v2016.1 for Seco SBC A62

Discussion in 'SECOSBC-A62' started by graugans, Feb 24, 2016.

  1. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    I am having some progress on my project porting a SPL capable u-boot to the SBC A62 platform. Why is this needed? Because with the help of a SPL u-boot we can boot all SBC A62 flavours with one single u-boot. This make yocto machine configuration pretty easy.

    If you are interested in my work checkout my github repository: https://github.com/graugans/u-boot-seco

    This work is mostly based on the SPL port of u-boot for the UDOO Quad/Dual boards. I made some minor adjustments and added support for the Seco A62 Solo variant.

    I build my stuff with a yocto 2.0 (jethro) toolchain

    Code:
    $ source /opt/poky/2.0/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
    $ make distclean
    $ make secomx6sbca62_defconfig
    $ make
    
    Finally burn the images to the SD-Card
    Code:
    $ sudo umount /dev/sdd? ; sudo dd if=u-boot.img of=/dev/sdd bs=1K seek=69 && sudo dd if=SPL of=/dev/sdd bs=1K seek=1 && sync && sync
     
    Last edited: Mar 5, 2016
    Andrea Rovai and modjo like this.
  2. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Hi graugans, very nice job ;) if i understand, yocto 2.0 turn on A62 Now ? Can you precise more how to use it please ? Can we juste make a repo sync and bitbake the image for A62, or do we need to build uboot from your source and burn it to the sd ?
     
    Andrea Rovai likes this.
  3. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    @modjo this is the first step towards,
    I still have some doubts on the DDR calibration. Anyway the updated meta-udoo provides a machine secosbca62 which should be compatible to Seco A62 in Quad, Dual Litem, and Solo flavor. Detailed instruction will follow
     
    Andrea Rovai likes this.
  4. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Hi graugans, i have build with success the secoA62 layer (full qt5 image), copy it to the sd but already same problem, impossible to boot from the sd card :

    Code:
    secoq7config
    
    Seco interactive configuration utility.
    
    Chose the ram memory size to dedicate to the Kernel.
    
    [min size: 512M - max size 1024M]
    
    > 1024
    
    Will use 1024M of RAM memory
    
    
    Chose boot Device for Kernel.
    
    1) eMMC onboard.
    
    2) uSD onboard.
    
    3) SATA.
    
    4) TFTP.
    
    5) USB.
    
    > 2
    
    Chose the partition of the selected device.
    
    > 1
    
    
    
    
    Chose boot Device for Kernel.
    
    1) eMMC onboard.
    
    2) uSD onboard.
    
    3) SATA.
    
    4) NFS.
    
    5) USB.
    
    > 2
    
    Chose the partition of the selected device.
    
    > 2
    
    
    
    Chose video output device for Seco i.MX6 board.
    
    1) Primary LVDS Only.
    
    2) HDMI Only.
    
    3) LVDS + HDMI.
    
    4) HDMI + LVDS.
    
    5) LVDS + LVDS.
    
    6) LVDS + LVDS + HDMI.
    
    7) HDMI + LVDS + LVDS.
    
    > 1
    
    Chose video output resolution for N°1 LVDS display on Seco i.MX6 board.
    
    1) WVGA [800x480].
    
    2) SVGA [800x600].
    
    3) XGA  [1024x768].
    
    4) WXGA [1368x768].
    
    > 1
    
    Chose MAX cpu frequency [default = 792 MHz].
    
    1) 396 MHz.
    
    2) 792 MHz.
    
    3) 996 MHz.
    
    > 2
    
    
    
    Writing to MMC(1)... done
    
    
    MX6Q SECO_A62 U-Boot > boot
    
    mmc0 is current device
    
    Failed to mount ext2 filesystem...
    
    ** Unrecognized filesystem type **
    
    Wrong Image Format for bootm command
    
    ERROR: can't get kernel image!
    
    MX6Q SECO_A62 U-Boot > 
    If i boot from emmc the board boot (quad) but with the bad uboot ! do i need to compil uboot like in your top post and burn it to the sd ?
     
  5. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    Looks like you Boot from emmc or spi flash because I've not yet ported the secoconfig cmd
    Ensure J27 is closed.

    SecoA62J27.jpg
     
    Last edited: Mar 1, 2016
    modjo likes this.
  6. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Ok, i will check this tomorrow ... For information, in this config your board boot ?
    Good news, you have your sa62 board ;)
     
    graugans likes this.
  7. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Hi graugans, goog job ! if i close the j27 jumper the board boot on yocto !
    First issue, i didn't have a functional screen , not hdmi, not lvds 7 (it just show udoo logo at boot, after nothing)
    Second issue, didn't have serial debug from j31
    ssh working over eth.
     
  8. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    Okay, related to screens I have to check the device trees. Will check the J31 this afternoon

    Gesendet von meinem FP2 mit Tapatalk
     
  9. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Ok, it Will be a good thing if you can describe (if you have the time) rapidly the procedure to rebuild the device trees ! In this way, we can try to modify it in our side !
     
  10. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    I guess I have to dig into the u-boot sources for the seco command which tuning knobs they are using. Because there are only two device trees in the UDOOBuntu git repo. Maybe more are located in the secogit.
     
  11. Csaba Borsányi

    Csaba Borsányi New Member

    Joined:
    Feb 25, 2016
    Messages:
    2
    Likes Received:
    2
    Hi Guys!
    I have a same issue with HDMI!

    [ 60.243367] imx-hdmi-audio imx-hdmi-audio: HDMI Video is not read y!
    [ 60.250412] imx-hdmi-audio imx-hdmi-audio: ASoC: can't open platform imx-hdmi -audio: -22
    [ 60.264676] imx-hdmi-audio imx-hdmi-audio: HDMI Video is not ready!
    [ 60.271486] imx-hdmi-audio imx-hdmi-audio: ASoC: can't open platform imx-hdmi

    Any idea?

    Thanks,

    Csaba
     
  12. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    I was busy yesterday, so this is still pending I will post some link later.

    Gesendet von meinem FP2 mit Tapatalk
     
    Andrea Rovai likes this.
  13. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    It looks the Display config is missing in my u-boot port. So you can test this by adding something like this to your bootargs:
    Code:
    video=mxcfb0:dev=hdmi,1280x720@60,bpp=32
    You'll find some details here.

    At the moment I am at the local hackerspace so I can not test. In theory this should work:

    Code:
    setenv mmcargs 'setenv bootargs console=${console},${baudrate} root=${mmcroot} video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32'
    
     
    modjo likes this.
  14. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Thanks but the debug port (J31) didn't work for the moment --> we didn't have entry for Uboot (or perhaps need to connect directly on a usb port of SA62 like udoo quad ?)
     
  15. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    Ups, that's J31 is strange. You have this adapter board with two DSUB-9 connectors attached? I am using the lower one the other is not working. USB is just OTG and there is no console output. If you have pluged-in Micro USB the board will not boot.
     
  16. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Yes i have the adapter (it works with emmc, j27 open), i use the lower so, speed 115200. I will try tomorrow another time and let you know ...
     
    graugans likes this.
  17. Csaba Borsányi

    Csaba Borsányi New Member

    Joined:
    Feb 25, 2016
    Messages:
    2
    Likes Received:
    2

    Hi!

    There was some issue about hdmi....

    Now, it's works with this env settings:

    baudrate=115200
    board_rev=MX6Q
    boot_fdt=try
    bootcmd=run findfdt; mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi
    bootdelay=3
    bootscript=echo Running bootscript from mmc ...; source
    console=ttymxc1
    ethact=FEC
    ethaddr=00:c0:08:8b:c4:7f
    ethprime=FEC
    fdt_addr=0x18000000
    fdt_file=undefined
    fdt_high=0xffffffff
    findfdt=if test $board_rev = MX6Q ; then setenv fdt_file imx6q-seco_SBC_A62.dtb; fi; if test $board_rev = MX6DL ; then setenv fdt_file imx6dl-seco_SBC_A62.dtb; fi; if test $board_rev = MX6SOLO ; then setenv fdt_file imx6dl-seco_SBC_A62.dtb; fi; if test $fdt_file = undefined; then echo WARNING: Could not determine dtb to use; fi;
    hdmi_patch=udoo_hdmi_force_hpdetect udoo_hdmi_force_edid
    image=zImage
    initrd_high=0xffffffff
    ip_dyn=yes
    loadaddr=0x12000000
    loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
    loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
    loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
    mmcargs=setenv bootargs console=ttymxc1,115200 root=/dev/mmcblk0p2 rootwait rw udoo_hdmi_force_hpdetect udoo_hdmi_force_edid fbmem=24M video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32
    mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
    mmcdev=0
    mmcpart=1
    mmcroot=/dev/mmcblk0p2 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} ${image}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
    script=boot.scr
    splashpos=m,m
    stderr=serial
    stdin=serial
    stdout=serial
    update_sd_firmware=if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; if mmc dev ${mmcdev}; then if ${get_cmd} ${update_sd_firmware_filename}; then setexpr fw_sz ${filesize} / 0x200; setexpr fw_sz ${fw_sz} + 1; mmc write ${loadaddr} 0x2 ${fw_sz}; fi; fi
    update_sd_firmware_filename=u-boot.imx


    Thanks,

    Csaba
     
    modjo and graugans like this.
  18. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    Perfect I'll prepare a patch at the weekend. Which takes this into account. Or if you familiar with git and u-boot you can create a pull request or a patch and I'll apply it so the ownership is kept

    Gesendet von meinem FP2 mit Tapatalk
     
  19. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    When it is not working I will double check the configs.
     
  20. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    The serial debug work fine ! (sorry :oops:) i can use the HDMI screen but lvds7 impossible to use it, i tried with :
    Code:
    setenv mmcargs 'setenv bootargs console=${console},${baudrate} root=${mmcroot} video=mxcfb0:dev=ldb,LDB-WVGA,if=RGB666,bpp=32'
    i just saw the logo udoo but after nothing ...

    Otherwise, i have build the image with QT5 (the same conf that works with neo and udoo quad) but if i try to launch an exemple i have this error :
    It seems that it didn't find the display ...
     

Share This Page