6 Replies Latest reply on Mar 3, 2017 11:39 PM by grantira

    U-Boot 2017.03 Won't Boot

    grantira

      Just wanted to see if anyone here has experience with Andy Shevchenko's (0andriy ) U-Boot fork. We've gotten it to compile and build, but when we flash it to the Edison it just prints a single newline and hangs forever. We're loading over U-Boot 2014.04 and are running truncate -s %4096 as his instructions here (Update U-Boot ) indicate. We've built a 4.10 (?) kernel using his sources, but can't get it to load without an up to date U-Boot. I figure it's not officially supported by Intel, but has anyone been able to get U-Boot 2017.0X working?

        • 1. Re: U-Boot 2017.03 Won't Boot
          0andriy

          Thank you for trying it. I know at least 3 independent people who manage to update their U-Boot (besides that fact I had managed many times).

          So, can you, please, elaborate what exactly you did and what you get?

          • 2. Re: U-Boot 2017.03 Won't Boot
            grantira

            This is our current build process:

             

            $ git clone https://github.com/andy-shev/u-boot.git

            $ cd u-boot

            $ git checkout edison

            $ # Fix compilation error in sdram.c

            $ git diff

            diff --git a/arch/x86/cpu/tangier/sdram.c b/arch/x86/cpu/tangier/sdram.c

            index 9ff7d53..ce0f2bc 100644

            --- a/arch/x86/cpu/tangier/sdram.c

            +++ b/arch/x86/cpu/tangier/sdram.c

            @@ -120,8 +120,8 @@ static struct sfi_table_simple *sfi_search_mmap(void)

                            error("failed to locate SFI MMAP table\n");     \

                                                                            \

                    (mentry) = (struct sfi_mem_entry *) (sb)->pentry;       \

            -                                                               \

            -       for (int i = 0; i < SFI_GET_NUM_ENTRIES((sb),           \

            +       int i;                                                  \

            +       for (i = 0; i < SFI_GET_NUM_ENTRIES((sb),               \

                            struct sfi_mem_entry); i++, (mentry)++)         \

             

            static unsigned sfi_setup_e820(unsigned max_entries, struct e820entry *entries)

            $ make edison_defconfig

            $ make

            $ truncate -s %4096 u-boot.bin

            $ # Run the script to generate u-boot-edison.img, uncommenting line 21: Create U-Boot image suitable for xFSTK and DFU for Intel Edison · GitHub

            $ mv u-boot.bin u-boot-edison.bin

            $ cp u-boot-edison.* ../toFlash/

            $ cd ../toFlash

            $ # Unplug and replug Edison

            $ sudo ./flashall.sh --recovery

            $ sudo screen /dev/ttyUSB0 115200

             

            We get the ROM boot message:

             

             

            ******************************

            PSH KERNEL VERSION: b0182727

                            WR: 20104000

            ******************************

             

            SCU IPC: 0x800000d0  0xfffce92c

             

            PSH miaHOB version: TNG.B0.VVBD.0000000c

             

            microkernel built 23:15:13 Apr 24 2014

             

            ******* PSH loader *******

            PCM page cache size = 192 KB

            Cache Constraint = 0 Pages

            Arming IPC driver ..

            Adding page store pool ..

            PagestoreAddr(IMR Start Address) = 0x04899000

            pageStoreSize(IMR Size)          = 0x00080000

             

            *** Ready to receive application ***

             

            This message is followed by about a 1 second pause and then a single newline. Then nothing happens.

             

            We've also tried bootstrapping from U-Boot 2014.04 by first flashing with 2014.04 then doing a normal (non-recovery) flash with the new u-boot.bin. Same results. We've also tried adding putc early in the boot process to try and track down where it fails. None of them printed, leading us to believe it never makes it to console_init.

             

            For reference, our build environment is Ubuntu 14.04 LTS x86_64 with GCC 4.8.4. I'm pretty convinced the problem is somewhere in our build process, but I have no idea where. One thing I haven't tried yet is compiling natively on the Edison.

             

            • 3. Re: U-Boot 2017.03 Won't Boot
              0andriy

              Instead of

              ./flashall --recovery
              

              simple run

              xfstk-dldr-solo --gpflags 0x80000007 --osimage u-boot-edison.img --osdnx edison_dnx_osr.bin
              

              Note: it might fail and you need to restart few times.

              • 4. Re: U-Boot 2017.03 Won't Boot
                grantira

                Doesn't seem to help. I got it to work once, but I tried to flash with a new filesystem image and after that it stopped working. Not really sure why. I still get the ROM boot message and a single newline. I tried to reset everything by reflashing with a known working image with 2014.04 then deleting the u-boot repo and starting from scratch, but it didn't help. I've tried making the image both with and without the truncate step and it still doesn't boot.

                • 5. Re: U-Boot 2017.03 Won't Boot
                  0andriy

                  Let me check here with another (clean) board.

                   

                  First of all, I have checked that everything is pushed to my Github repository:

                   

                  $ git push -f gh-andy-shev
                  Everything up-to-date
                  

                   

                  Then, I re-flashed board with official Edison BSP (iot-devkit-prof-dev-image-edison-20160606):

                  $ ./flashall.sh --recovery
                  Using suffix
                  Starting Recovery mode
                  Please plug and reboot the board
                  Flashing IFWI
                  
                  

                  and

                  $ ./flashall.sh
                  Using suffix
                  Using U-Boot target: edison-blankcdc
                  Now waiting for dfu device 8087:0a99
                  Please plug and reboot the board
                  Flashing IFWI
                  

                   

                  After boot and reboot I have checked the version of U-Boot:

                   

                  U-Boot 2014.04 (Jun 06 2016 - 14:40:07)

                   

                   

                  Interrupted to get U-Boot shell and run:

                  boot > run do_force_flash_os
                  Saving Environment to MMC...
                  Writing to redundant MMC(0)... done
                  GADGET DRIVER: usb_dnl_dfu
                  #
                  DFU complete CRC32: 0xf340088e
                  DOWNLOAD ... OK
                  Ctrl+C to exit ...
                  


                  On the host:

                  $ make clean && make edison_defconfig && make -j16
                  $ truncate -s %4096 u-boot.bin 
                  $ dfu-util -v -d 8087:0a99 --alt u-boot0 -D u-boot.bin
                  
                  


                  Again in U-Boot shell:

                  boot > reset
                  resetting ...
                  
                  ******************************
                  PSH KERNEL VERSION: b0182b2b
                                  WR: 20104000
                  ******************************
                  
                  SCU IPC: 0x800000d0  0xfffce92c
                  
                  PSH miaHOB version: TNG.B0.VVBD.0000000c
                  
                  microkernel built 11:24:08 Feb  5 2015
                  
                  ******* PSH loader *******
                  PCM page cache size = 192 KB
                  Cache Constraint = 0 Pages
                  Arming IPC driver ..
                  Adding page store pool ..
                  PagestoreAddr(IMR Start Address) = 0x04899000
                  pageStoreSize(IMR Size)          = 0x00080000
                  
                  *** Ready to receive application ***
                  
                  U-Boot 2017.03-rc3-00012-ge6566cddc9 (Mar 01 2017 - 21:01:06 +0200)
                  
                  CPU: x86_64, vendor Intel, device 406a8h
                  DRAM:  980.6 MiB
                  MMC:   mmc@ff3fc000: 0, mmc@ff3fa000: 1
                  In:    serial@ff010180
                  Out:   serial@ff010180
                  Err:   serial@ff010180
                  Net:   Net Initialization Skipped
                  No ethernet found.
                  Hit any key to stop autoboot:  0
                  =>
                  

                   

                   

                  I dunno what you, grantira, are doing, but I have seen no issues.

                  • 6. Re: U-Boot 2017.03 Won't Boot
                    grantira

                    After giving up for a few days, we followed your steps on a different machine and it just worked. Still no idea what was wrong, but at least we have it working. Thanks for your help and all of your work on U-Boot and the kernel. It's pretty awesome.