Thanks for your hard work on the RasPi code. I have a question regarding what you've done: on GitHub, you're writing not to run the code with a kernel with the SD/MMC subsystem enabled. Could you explain that further? So far, I have no experience with the RasPi, and not a whole lot with Linux kernels.
Sure. The default kernel used in raspberry pi linux distributions has drivers for the SD slot integrated (else one couldn't run the default setup from SD card). In order to "abuse" the SD slot for unbricking those drivers mustn't be there as they would interfere with the communication. and as those drivers are built into the usual kernel images and not loaded as modules (external driver files) one has to use a custom built kernel without said SD/MMC drivers. You can find guides on compiling/building your own raspberry kernel, I will release a ready to flash linux image in a few days.
edit: somehow I mised a quite important "not" there... (in regards "not as modules")
bkifft what are you compile flags?
I tried:
gcc main.c -std=c99
And get implict declaration of functions, "usleep", "sd_issue_command", as well as unknown type "useconds_t". I presume I am supposed to link to another library.
-lm not helping either...
strange, i don't link any libs explicitly and on the rasppi i don't have any c host flags set up. let me investigate.
edit: usleep and useconds_t should be defined in unistd.h. my built in compiler options:
Code:
root@SpillPassPi:~/perverseunbrick# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14+rpi1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-14+rpi1)