GhaSShee


Raspberry Pi


# raspbian OS 1. download raspbian os img file 2. unpack it 3. mount microSD card (into USB port) 4. `$ diskutil unmountDisk /dev/disk2` 5. `$ diskutil mountDisk /dev/desk2` 6. `$ sudo dd if=/path/to/20yy-mm-dd-raspbian-xxxx.img of=/dev/rdisk2 bs=100m`
# RPi LCDisplay http://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A) Command Line on Raspberry Pi ~~~ > mkdir lcd > wget http://www.waveshare.com/w/upload/4/4b/LCD-show-161112.tar.gz > tar xvf LCD-show-YYMMDD.tar.gz > cd LCD-show/ > ./LCD35-show ~~~ # gcc Cross-Compiler ~~~ This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project. From: YuGiOhJCJ Mailing-List To: gcc-help at gcc dot gnu dot org Date: Sun, 13 Mar 2016 06:01:43 +0100 Subject: Building a cross-compiler for a Raspberry Pi Authentication-results: sourceware.org; auth=none Hello, I have already built successfully a working cross-compiler for several machines: i686-w64-mingw32 and avr. Now, I would like to build a cross-compiler for a Raspberry Pi. The programs I am using are: - binutils-2.26 - gcc-5.3.0 I start by building binutils for my target machine: --- $ ./configure --prefix=/usr --target=arm-unknown-linux-gnueabi --disable-nls $ make --- As you can see, I am using the "arm-unknown-linux-gnueabi" machine name. I don't know exactly how we determine the correct machine name. I have done a first try with "arm-linux-gnu" then I got an error later while building gcc: --- $ ../gcc-5.3.0/configure --prefix=/usr --target=arm-linux-gnu --enable-languages=c --disable-nls --disable-multilib --disable-threads --disable-shared $ make [...] checking if mkdir takes one argument... no *** Configuration arm-unknown-linux-gnu not supported make[1]: *** [configure-gcc] Error 1 make[1]: Leaving directory `/tmp/build/arm-unknown-linux-gnueabi/gcc-5.3.0-tmp' make: *** [all] Error 2 --- But as I have read some web pages [1, 2, 3] where "arm-unknown-linux-gnueabi" is the machine name, I have used this machine name. With this new machine name, the error above disappears. It seems that the machine name matters while building the cross-compiler and I can't use any value for that. After building binutils successfully, I continue by building gcc for my target machine: $ ../gcc-5.3.0/configure --prefix=/usr --target=arm-unknown-linux-gnueabi --enable-languages=c,c++ --disable-nls --disable-multilib --disable-threads --disable-shared $ make [...] checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES. make[1]: *** [configure-target-libssp] Error 1 make[1]: Leaving directory `/tmp/build/arm-unknown-linux-gnueabi/gcc-5.3.0-tmp' make: *** [all] Error 2 The error above means that glibc is missing (at least that's what I read in [4]). So, I need to cross-compile glibc. But for doing that, I have to build a minimal cross-compiler first. I probably need to disable other things in order to build the cross-compiler without glibc. My questions: 1) How we determine the correct machine name? 2) How to build my cross-compiler without glibc? Thank you. Best regards. [1] http://www.bootc.net/archives/2012/05/26/how-to-build-a-cross-compiler-for-your-raspberry-pi/ [2] http://blog.felipe.rs/2015/01/20/how-to-build-a-gcc-cross-compiler-for-the-raspberrypi/ [3] https://gcc.gnu.org/gcc-5/buildstat.html [4] https://gcc.gnu.org/ml/gcc-help/2012-07/msg00015.html ~~~