On Mon, 28 Dec 2015 13:18:46 +0100 Piotr Król <[email protected]> wrote:
> On Thu, Dec 17, 2015 at 01:19:02PM +0100, Piotr Król wrote: > > Hi all, > > I'm trying to enter FEL mode by using SD card image provided in > > sunxi-tools. I follow procedure: > > > > http://linux-sunxi.org/FEL#Through_a_special_SD_card_image > > > > it doesn't seem to work as expected. Booting process stall. It doesn't > > not proceed through boot order, so this seems to be ok. But FEL tool > > cannot communicate with device and there is no logs in Linux dmesg > > showing that new USB device was detected. So I assume device didn't > > enter FEL. > > > > Running FEL mode using button works fine, but I would like to validate > > procedures that can work without FEL/Recovery button. > > > > What I tried: > > > > * Cubietruck and A20-OLinuXino-MICRO > > * toolchains (Linaro 2014.07, 2015.05) > > * different order of power on and inserting USB cable > > * SD cards (Samsung, SanDisk, Kingston) > > * enter using UART method: > > http://linux-sunxi.org/FEL#Through_serial_console > > > > Can someone confirm that this feature ever worked with mentioned boards? > > > > Have you got any ideas what may be wrong or how to enter FEL without > > button ? > > Hi all, > for those having similar issues. I was able to resolve problem using > binaries already available on github: > https://github.com/linux-sunxi/sunxi-tools/tree/master/bin Hi, > I assume there is problem with modern Linaro toolchain, which not > produce expected result. I tried also recent Debian > gcc-arm-linux-gnueabi package, but without luck. In your original e-mail you did not even mention that you tried to compile fel-sdboot.sunxi yourself. It is difficult to help you because you are not telling us any details even now. > Which toolchain was used for fel-sdboot.sunxi stored on github ? > > Does anyone built fel-sdboot with recent toolchain ? $ arm-linux-gnueabihf-gcc -v Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/arm-linux-gnueabihf/gcc-bin/4.7.4/arm-linux-gnueabihf-gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/arm-linux-gnueabihf/4.7.4/lto-wrapper Target: arm-linux-gnueabihf Configured with: /var/tmp/portage/cross-arm-linux-gnueabihf/gcc-4.7.4/work/gcc-4.7.4/configure --host=x86_64-pc-linux-gnu --target=arm-linux-gnueabihf --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/arm-linux-gnueabihf/gcc-bin/4.7.4 --includedir=/usr/lib/gcc/arm-linux-gnueabihf/4.7.4/include --datadir=/usr/share/gcc-data/arm-linux-gnueabihf/4.7.4 --mandir=/usr/share/gcc-data/arm-linux-gnueabihf/4.7.4/man --infodir=/usr/share/gcc-data/arm-linux-gnueabihf/4.7.4/info --with-gxx-include-dir=/usr/lib/gcc/arm-linux-gnueabihf/4.7.4/include/g++-v4 --with-python-dir=/share/gcc-data/arm-linux-gnueabihf/4.7.4/python --enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.7.4 p1.4, pie-0.5.5' --enable-libstdcxx-time --enable-poison-system-directories --with-sysroot=/usr/arm-linux-gnueabihf --disable-bootstrap --enable-__cxa_atexit --enable-clocale=gnu --disable-multilib --disable-altivec --disable-fixed-point --with-float=hard --disable-libgcj --disable-libgomp --disable-libmudflap --disable-libssp --disable-libquadmath --enable-lto --without-cloog --without-ppl --with-cpu=cortex-a8 --with-float=hard Thread model: posix gcc version 4.7.4 (Gentoo 4.7.4 p1.4, pie-0.5.5) $ CROSS_COMPILE=arm-linux-gnueabihf- make fel-sdboot.sunxi $ r2 -a arm fel-sdboot.sunxi [0x00000000]> pd ,=< 0x00000000 060000ea b 0x20 | 0x00000004 65474f4e cdpmi p7, 4, c4, c15, c5, 3 | 0x00000008 2e425430 subslo r4, r4, lr, lsr 4 | 0x0000000c 8c55b361 invalid | 0x00000010 00200000 andeq r2, r0, r0 | 0x00000014 53504c01 qdaddeq r5, r3, ip | 0x00000018 00000000 andeq r0, r0, r0 | 0x0000001c 00000000 andeq r0, r0, r0 `-> 0x00000020 08402de9 push {r3, lr} 0x00000024 04309fe5 ldr r3, [pc, 4] ; [:4]=0xffff0020 ; '0' 0x00000028 33ff2fe1 blx r3 0x00000045() 0x0000002c 0880bde8 pop {r3, pc} $ sudo dd if=fel-sdboot.sunxi of=/dev/sdX bs=1024 seek=8 Then insert this SD card into a Cubietruck board and power it on: $ sunxi-fel ver AWUSBFEX soc=00001651(A20) 00000001 ver=0001 44 08 scratchpad=00007e00 For comparison, the current fel-sdboot.sunxi binary contains the following code: $ r2 -a arm bin/fel-sdboot.sunxi [0x00000000]> pd ,=< 0x00000000 060000ea b 0x20 | 0x00000004 65474f4e cdpmi p7, 4, c4, c15, c5, 3 | 0x00000008 2e425430 subslo r4, r4, lr, lsr 4 | 0x0000000c 2cc70742 andmi ip, r7, 0xb00000 | 0x00000010 00020000 andeq r0, r0, r0, lsl 4 | 0x00000014 00000000 andeq r0, r0, r0 | 0x00000018 00000000 andeq r0, r0, r0 | 0x0000001c 00000000 andeq r0, r0, r0 `-> 0x00000020 08402de9 push {r3, lr} 0x00000024 08309fe5 ldr r3, [pc, 8] ; [:4]=0xffff0020 ; '4' 0x00000028 0fe0a0e1 mov lr, pc ,==< 0x0000002c 13ff2fe1 bx r3 | 0x00000030 0880bde8 pop {r3, pc} My random guess is that your toolchain is probably generating thumb2 code by default. We might need to add '-marm' option to CFLAGS in the makefile. -- Best regards, Siarhei Siamashka -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
