[resolved] using U-Boot and connect UDOO by serial port ( Still Try Boot android from NFS)

Discussion in 'Android' started by TonTon, Aug 3, 2015.

  1. TonTon

    TonTon New Member

    Joined:
    Aug 3, 2015
    Messages:
    19
    Likes Received:
    1
    Hi All,
    I am the new here.
    I have meet an issue for UDOO with Android !
    Now, I need boot Android as a clean (initial) status every times, therefore I am trying to find how to make Android boot from NFS.
    However, I google it and got this page:

    " U-Boot 2013 Released! - UDOO: http://www.udoo.org/u-boot-2013-released/ "
    The guides of “how to boot from NFS and SATA using U-Boot 2013″ will be available soon.
    Here’s the direct link for the github while all the binary files are available here.

    Anyone know where is the guides ? or how to boot Android on UDOO from NFS ?

    Thank you very much !!!!
     
  2. kevinaj

    kevinaj New Member

    Joined:
    Aug 4, 2015
    Messages:
    1
    Likes Received:
    0
    I too have spent the past couple days trying to get this to work without much success. I cheated a bit, I wrote the Ubuntu image to an SD card to get U-boot 2013. From there I can boot from a uImage on an NFS share. I can see that it mounts the root file system, but the boot process hangs at "Freeing Init Memory". If I change the androidboot.console to ttymxc1, I can see that it's stuck in a loop of starting services, and untracked pids exiting. I have no output over HDMI; not even the bootanim.
     
  3. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Hi there all,
    there is no such guide actually.
    Cheers
     
  4. TonTon

    TonTon New Member

    Joined:
    Aug 3, 2015
    Messages:
    19
    Likes Received:
    1
    Thanks for your answer !
    However, is it possible that I can build U-Boot which download from ftp://ftp.denx.de/pub/u-boot/u-boot-2015.07.tar.bz2 to setup the boot option ?
    This because I have installed U_Boot 2013 (http://udoo.org/download/files/UDOO_Unico/u-Boot_Dual/u-boot-d.imx) to UDOO which form this guide, but I can't setup anything !
    http://www.elinux.org/UDOO_creating..._from_precompiled_binaries#Install_the_U-Boot
    screenshot as follow:
    IMG_20150807_042756.jpg
    As I know, maybe I can use dd to insert the U-boot to SD Card, and then I can setup the boot options which like http://www.denx.de/wiki/view/DULG/LinuxNfsRoot
    I need try to boot Android base on U-Boot from NFS !
    If it possible, could you please give me an instruction ?

    Thank you very much !
     
  5. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    u-boot-2015.07 can be compiled and works fine.
    In 2015.10 version there will be small change to have only one bootloader for both dual and quad board.
     
  6. TonTon

    TonTon New Member

    Joined:
    Aug 3, 2015
    Messages:
    19
    Likes Received:
    1
    Th
    thanks for your response !

    anyone please give an instruction about how to build u-boot for UDOO?
    (My goal is boot from u-boot and the setup boot from NFS with Android)

    not this page http://www.udoo.org/docs/Advanced_Setup/Compile_Android_From_Sources
    build u-boot from_precompiled_binaries
    !

    Also I have Google thsi page: http://udoo.org/forum/threads/uboot-now-has-udoo-support.449/

    I have tried these instruction as follow:

    Code:
    # git clone git://git.denx.de/u-boot-imx.git
    # cd u-boot-imx/
    # make udoo_defconfig (no quard config)
    # make
    # dd if=u-boot.imx of=/dev/mmcblk0 seek=2 bs=512 ( no u-boot-q.imx)
    
    # wget ftp://ftp.denx.de/pub/u-boot/u-boot-2015.07.tar.bz2
    # tar -jxf u-boot-2015.07.tar.bz2
    # cd u-boot-2015.07
    # make udoo_quad_defconfig
    # make
    # dd if=u-boot.imx of=/dev/mmcblk0 seek=2 bs=512 
    ( no u-boot.imx or u-boot-q.imx only u-boot.bin and u-boot.img )
    
    These two instruction as above which can't boot u-boot on UDOO !

    Thanks !
     
  7. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
  8. TonTon

    TonTon New Member

    Joined:
    Aug 3, 2015
    Messages:
    19
    Likes Received:
    1
    Thanks for your response. However, I have finish this instructions about u-boot

    Code:
    wget -c https://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz
    tar xf gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz
    export CC=`pwd`/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-
    ${CC}gcc --version
    
    git clone git://git.denx.de/u-boot.git
    cd u-boot/
    git checkout v2015.10-rc1 -b tmp
    
    wget -c https://rcn-ee.com/repos/git/u-boot-patches/v2015.10-rc1/0001-udoo-uEnv.txt-bootz-n-fixes.patch
     patch -p1 < 0001-udoo-uEnv.txt-bootz-n-fixes.patch
    
    make ARCH=arm CROSS_COMPILE=${CC} distclean
    make ARCH=arm CROSS_COMPILE=${CC} udoo_defconfig
    make ARCH=arm CROSS_COMPILE=${CC}
    
    sudo dd if=./u-boot/SPL of=${DISK} seek=1 bs=1k
    sudo dd if=./u-boot/u-boot.img of=${DISK} seek=69 bs=1k
    
    It's still can't boot and HDMI no signal

    Maybe I hava make mistake ? UDOO can boot from U-Boot, If I haven't set up and Install Kernel and Root File System ?
    I want to boot on U-boot and then tries to use "setenv command" to setup boot from NFS (Android) !

    BTW, Many thanks for your great help !
     
  9. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    Did you compiled u-boot succesfully (you got files SPL and u-boot.img)? You just copy/paste commands from web page but actual result of them is mistery ;)
    And do you have serial console attached? You see u-boot messages and you get prompt when you press enter or space?
    HDMI is not enabled so nothing is visible at this stage.
     
  10. TonTon

    TonTon New Member

    Joined:
    Aug 3, 2015
    Messages:
    19
    Likes Received:
    1
    Last edited: Aug 7, 2015
  11. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    Create one working SD card image to and get your serial console working. THEN try to use your new bootloader.
     
  12. TonTon

    TonTon New Member

    Joined:
    Aug 3, 2015
    Messages:
    19
    Likes Received:
    1
    Hi ! Thanks !

    Did you mean that I need write pre-compile system image (e.g. Android) to SDCARD and also write u-boot to SDCARD, then boot and connect with serial port ? (is it can setup the u-boot ? if I need use setenv command etc...)

    or I only write pre-compile system image (e.g. Android) to SDCARD and connect UDOO by serial port ?

    Thank you very much !

    PS: I have try to write Android to SDCARD and boot it successes with HDMI, every thing is ok !
    IMG_20150803_162415.jpg
     
    Last edited: Aug 8, 2015
  13. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    I'm starting to wonder what you actually wants? You obviously have system already running. Just connect serial console and interrupt bootloader and do what you want.
     
  14. TonTon

    TonTon New Member

    Joined:
    Aug 3, 2015
    Messages:
    19
    Likes Received:
    1
    Hi !
    I have tried again.
    1. only write pre-compileed system image (I use Android) to SDCard, then connect by serial port. (if boot with HDMI is ok)
    2. write pre-compileed system image (I use Android) and also write SPL & u-boot.img to SDCard, then connect by serial port.(if boot with HDMI it's no signal)

    However, these situation as above both are no signal, if I connect by serial port.

    Actually, I want to boot UDOO with u-boot, and use setenv command to boot Android from NFS.
    just like this: http://www.codeproject.com/Articles/461037/Booting-Android-completely-over-ethernet
    Code:
    U-Boot# setenv bootargs 'console=ttyO0,115200n8 androidboot.console=ttyO0 mem=256M root=/dev/nfs ip=<client-device-ip> nfsroot=<nfs-server-ip>:<rootfs-path> rootdelay=2'
    U-Boot# setenv serverip 'host-pc-ip'
    U-Boot# bootm <Load address>
    
    Is it possible ? or I have lost something to do ?

    Thank you so much !
     
  15. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    I don't know which u-boot is using android but every other version I used show progress on serial console and it can be interrupted to check environment variables. And this were official udoo u-boot, curretn master u-boot, u-boot 2015.01, 2015.07, u-boot from solidrun with patches for udoo...

    Seems you are doing something very wrong. Make SD card for udoobuntu or openelec and check there.
     
  16. TonTon

    TonTon New Member

    Joined:
    Aug 3, 2015
    Messages:
    19
    Likes Received:
    1
    I am not sure is it possible !
    I want to create a " Modify-Build-Flash-Test " cycle for Android !
    It's mean that I can test Android and quickly recovery to clean status for the next test.
    So I tried to use u-boot as bootloader and then set up boot Android from NFS !

    Before use UDOO, I have try to use Banana Pi, and compile/write u-boot to sdcard then boot successes, however it has bug with usb keyboard (USB 1.0), or sometimes the Ethernet can't connect my NFS host ! The screenshot as follow:

    IMG_20150712_183249.jpg

    PS: I have tried many u-boot version (2015-04~2015-07) on this device (Banana Pi), and get the error " ERROR OHCI ....."

    Therefore, as I know with use Banana Pi, I can only write the u-boot (compile by myself) and then input the command " setenv" to boot Android from NFS.
    That's why I do many instructions as above posts, even it likes stupid work.

    Now, I have try to write this image: UDOObuntu 2.0 Minimal Edition for UDOO Quad (from sourceforge: UDOObuntu 2 Minimal Edition for UDOO Quad )
    With only write this image, I can boot and input username/password with HDMI.
    IMG_20150809_045156.jpg
    However, when I connect with serial port, it still no any single.

    Maybe it's impossible boot Android from NFS with u-boot on UDOO.

    Thanks for your advance help !!
     
    Last edited: Aug 18, 2015
  17. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    I don't know why you don't see anything in serial console. It must always shows something. So fix this first if you want to play with u-boot. Maybe you cable is broken, driver not installed, wrong terminal settings, ...
    If you can boot Android from NFS I have no idea. And you know: there is only u-boot bootloader. There is nothing else from what I know.
     
  18. TonTon

    TonTon New Member

    Joined:
    Aug 3, 2015
    Messages:
    19
    Likes Received:
    1
    Hello !

    I have found the problem that why can't I boot u-boot on UDOO by connect serial port !!!
    based on this manual: http://udoo.org/download/files/Documents/UDOO_Starting_Manual_beta0.4_11_28_2013.pdf

    3.2.1. i.MX6 Debug Serial Freescale i.MX6 has a dedicated serial port for debugging, which is accessible through an USB-to-RS-232 bridge on micro-USB connector CN6.
    The J18jumper switches USB connection coming from CN6 to the iMX6 debug serial port, instead of SAM3X8E programming port. It gives accessto Linux console while

    IMG_20150809_180640.jpg

    Finally, I can connect UDOO by serial port and see the output log !!!!

    U-Boot_Serial.png

    Thank you so much for your quickly response !!!! Thank you !!!
     
    Last edited: Aug 18, 2015
  19. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    So I assume you changed the position of this jumper before.

    Glad that it's working now.
     
  20. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240

Share This Page