Created
March 23, 2015 03:08
-
-
Save hak8or/e461a6a878b4c793979e to your computer and use it in GitHub Desktop.
GCC on ARM using Canadian build of crosstools-ng. Just needed to put arm-unknown-linux-gnueabi (cross compiler) in host system tuple in ct-ng menuconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RomBOOT | |
============================== | |
Using Dataflash! | |
ba_offset = 0xb ... | |
AT91Bootstrap 3.7.1-00054-gef803bb-dirty (Sun Mar 15 19:00:41 PDT 2015) | |
Edited by hak8or! | |
Yey custom code execution and toolchain verification! :D | |
======--======--======--====== | |
MASTER_CLOCK (MCLK): 0x5f5e100 | |
SPI clock rate requested: 0xa1220 | |
scbr: 0x97 | |
SF: Got Manufacturer and Device ID:0x1f 0x25 0x0 0x1 0x0 | |
SF: Copy 0x55500 bytes from 0x8400 to 0x20008400 | |
SF: Done loading image from SerialFlash | |
Jumping to JUMP_ADDR (0x20008400) ... | |
U-Boot 2014.07-00058-gb44bde2-dirty (Mar 21 2015 - 13:50:41) | |
CPU: AT91SAM9N12 | |
Crystal frequency: 16 MHz | |
CPU clock : 301.333 MHz | |
Master clock : 100.444 MHz | |
DRAM: 64 MiB | |
WARNING: Caches not enabled | |
NAND: atmel_nand: Fail to initialize #0 chip0 MiB | |
MMC: mci: 0 | |
** Bad device usb 0 ** | |
Using default environment | |
In: serial | |
Out: serial | |
Err: serial | |
Net: ks8851_mll: Invalid chip id 0x30c0 | |
Board Net Initialization Failed | |
No ethernet found. | |
Hit any key to stop autoboot: 0 | |
(Re)start USB... | |
USB0: scanning bus 0 for devices... 2 USB Device(s) found | |
scanning usb for storage devices... 1 Storage Device(s) found | |
reading uimage.bin | |
1515300 bytes read in 4070 ms (363.3 KiB/s) | |
## Booting kernel from Legacy Image at 20000000 ... | |
Image Name: linux-2.6 | |
Image Type: ARM Linux Kernel Image (uncompressed) | |
Data Size: 1515236 Bytes = 1.4 MiB | |
Load Address: 20008000 | |
Entry Point: 20008000 | |
Verifying Checksum ... OK | |
Loading Kernel Image ... OK | |
Starting kernel ... | |
Uncompressing Linux... done, booting the kernel. | |
Linux version 2.6.39 (hak8or@ubuntu) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05 -29) ) #5 Mon Mar 16 07:24:35 EDT 2015 | |
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177 | |
CPU: VIVT data cache, VIVT instruction cache | |
Machine: Atmel AT91SAM9N12-EK | |
Memory policy: ECC disabled, Data cache writeback | |
Clocks: CPU 301 MHz, master 100 MHz, main 16.000 MHz | |
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 | |
Kernel command line: console=ttyS0,115200 root=/dev/sda2 rootwait ro rootfstype=ext2 init=/bin/init | |
PID hash table entries: 256 (order: -2, 1024 bytes) | |
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) | |
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) | |
Memory: 64MB = 64MB total | |
Memory: 61728k/61728k available, 3808k reserved, 0K highmem | |
Virtual kernel memory layout: | |
vector : 0xffff0000 - 0xffff1000 ( 4 kB) | |
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) | |
DMA : 0xff000000 - 0xffe00000 ( 14 MB) | |
vmalloc : 0xc4800000 - 0xfee00000 ( 934 MB) | |
lowmem : 0xc0000000 - 0xc4000000 ( 64 MB) | |
modules : 0xbf000000 - 0xc0000000 ( 16 MB) | |
.init : 0xc0008000 - 0xc0027000 ( 124 kB) | |
.text : 0xc0027000 - 0xc02de000 (2780 kB) | |
.data : 0xc02de000 - 0xc02fcac0 ( 123 kB) | |
NR_IRQS:192 | |
AT91: 128 gpio irqs in 4 banks | |
Console: colour dummy device 80x30 | |
console [ttyS0] enabled | |
Calibrating delay loop... 149.91 BogoMIPS (lpj=749568) | |
pid_max: default: 32768 minimum: 301 | |
Mount-cache hash table entries: 512 | |
CPU: Testing write buffer coherency: ok | |
AT91: Power Management (with slow clock mode) | |
AT91: Starting after power-restored wakeup | |
bio: create slab <bio-0> at 0 | |
SCSI subsystem initialized | |
usbcore: registered new interface driver usbfs | |
usbcore: registered new interface driver hub | |
usbcore: registered new device driver usb | |
i2c-gpio i2c-gpio.0: using pins 62 (SDA) and 63 (SCL) | |
at_hdmac at_hdmac.0: Atmel AHB DMA Controller ( cpy slave ), 8 channels | |
Advanced Linux Sound Architecture Driver Version 1.0.24. | |
Switching to clocksource tcb_clksrc | |
NetWinder Floating Point Emulator V0.97 (double precision) | |
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. | |
msgmni has been set to 120 | |
io scheduler noop registered (default) | |
atmel_hlcdfb atmel_hlcdfb_base.0: 510KiB frame buffer at 23980000 (mapped at ffd80000) | |
Console: switching to colour frame buffer device 60x34 | |
atmel_hlcdfb atmel_hlcdfb_base.0: fb0: Atmel LCDC at 0xf8038000 (mapped at c486e000), irq 25 | |
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL | |
brd: module loaded | |
loop: module loaded | |
ssc ssc.0: Atmel SSC device at 0xc4878000 (irq 28) | |
atmel_nand atmel_nand: Using dma0chan0 for DMA transfers. | |
nand_get_flash_type: second ID read did not match 30,30 against ff,00 | |
No NAND device found. | |
atmel_spi atmel_spi.0: Using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers | |
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xf0000000 (irq 13) | |
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver | |
at91_ohci at91_ohci: AT91 OHCI | |
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1 | |
at91_ohci at91_ohci: irq 22, io mem 0x00500000 | |
hub 1-0:1.0: USB hub found | |
hub 1-0:1.0: 1 port detected | |
Initializing USB Mass Storage driver... | |
usbcore: registered new interface driver usb-storage | |
USB Mass Storage support registered. | |
usbcore: registered new interface driver libusual | |
udc: at91_udc version 3 May 2006 | |
mousedev: PS/2 mouse device common for all mice | |
input: gpio-keys as /devices/platform/gpio-keys/input/input0 | |
qt1070 0-001b: can not read register, returned -6 | |
qt1070 0-001b: ID -6 not supported | |
atmel_tsadcc atmel_tsadcc: Master clock is set at: 100444438 Hz | |
atmel_tsadcc atmel_tsadcc: Prescaler is set at: 166 | |
input: atmel touch screen controller as /devices/platform/atmel_tsadcc/input/input1 | |
at91_rtc at91_rtc: rtc core: registered at91_rtc as rtc0 | |
AT91 Real Time Clock driver. | |
i2c /dev entries driver | |
usbcore: registered new interface driver usbhid | |
usbhid: USB HID core driver | |
ASoC: Setting pck0 to 32768Hz | |
wm8904-codec 0-001a: i2c_transfer() returned -6 | |
wm8904-codec 0-001a: Device is not a WM8904, ID is 0 | |
wm8904-codec 0-001a: asoc: failed to probe CODEC wm8904-codec.0-001a: -22 | |
asoc: failed to instantiate card WM8904 @ AT91SAM9N12: -22 | |
ASoC: at91sam9n12_init ok | |
ALSA device list: | |
No soundcards found. | |
at91_rtc at91_rtc: setting system clock to 2007-01-01 00:00:21 UTC (1167609621) | |
atmel_mci atmel_mci.0: Using dma0chan2 for DMA transfers | |
atmel_mci atmel_mci.0: Atmel MCI controller at 0xf0008000 irq 12, 1 slots | |
Waiting for root device /dev/sda2... | |
usb 1-1: new full speed USB device number 2 using at91_ohci | |
usb 1-1: device descriptor read/64, error -62 | |
scsi0 : usb-storage 1-1:1.0 | |
scsi 0:0:0:0: Direct-Access OCZ DIESEL PMAP PQ: 0 ANSI: 0 CCS | |
sd 0:0:0:0: [sda] 31326208 512-byte logical blocks: (16.0 GB/14.9 GiB) | |
sd 0:0:0:0: [sda] Write Protect is off | |
sd 0:0:0:0: [sda] Assuming drive cache: write through | |
sd 0:0:0:0: [sda] Assuming drive cache: write through | |
sda: detected capacity change from 0 to 16039018496 | |
sda: sda1 sda2 | |
sd 0:0:0:0: [sda] Assuming drive cache: write through | |
sd 0:0:0:0: [sda] Attached SCSI removable disk | |
VFS: Mounted root (ext2 filesystem) readonly on device 8:2. | |
Freeing init memory: 124K | |
/bin/sh: can't access tty; job control turned off | |
/ # ls | |
bin etc linuxrc proc sys | |
dev lib mnt sbin usr | |
/ # cd usr/ | |
/usr # ls | |
bin home lib sbin | |
/usr # cd home/ | |
/usr/home # ls | |
arm-unknown-linux-gnueabi | |
/usr/home # cd arm-unknown-linux-gnueabi/ | |
/usr/home/arm-unknown-linux-gnueabi # ls | |
arm-unknown-linux-gnueabi include share | |
bin lib | |
build.log.bz2 libexec | |
/usr/home/arm-unknown-linux-gnueabi # cd bin | |
/usr/home/arm-unknown-linux-gnueabi/bin # ls | |
arm-unknown-linux-gnueabi-addr2line arm-unknown-linux-gnueabi-gcov | |
arm-unknown-linux-gnueabi-ar arm-unknown-linux-gnueabi-gprof | |
arm-unknown-linux-gnueabi-as arm-unknown-linux-gnueabi-ld | |
arm-unknown-linux-gnueabi-c++ arm-unknown-linux-gnueabi-ld.bfd | |
arm-unknown-linux-gnueabi-c++filt arm-unknown-linux-gnueabi-ldd | |
arm-unknown-linux-gnueabi-cc arm-unknown-linux-gnueabi-nm | |
arm-unknown-linux-gnueabi-cpp arm-unknown-linux-gnueabi-objcopy | |
arm-unknown-linux-gnueabi-ct-ng.config arm-unknown-linux-gnueabi-objdump | |
arm-unknown-linux-gnueabi-elfedit arm-unknown-linux-gnueabi-populate | |
arm-unknown-linux-gnueabi-g++ arm-unknown-linux-gnueabi-ranlib | |
arm-unknown-linux-gnueabi-gcc arm-unknown-linux-gnueabi-readelf | |
arm-unknown-linux-gnueabi-gcc-4.8.3 arm-unknown-linux-gnueabi-size | |
arm-unknown-linux-gnueabi-gcc-ar arm-unknown-linux-gnueabi-strings | |
arm-unknown-linux-gnueabi-gcc-nm arm-unknown-linux-gnueabi-strip | |
arm-unknown-linux-gnueabi-gcc-ranlib | |
/usr/home/arm-unknown-linux-gnueabi/bin # ./arm-unknown-linux-gnueabi-gcc -v | |
Using built-in specs. | |
COLLECT_GCC=./arm-unknown-linux-gnueabi-gcc | |
COLLECT_LTO_WRAPPER=/usr/home/arm-unknown-linux-gnueabi/bin/../libexec/gcc/arm-unknown-linux-gnueabi/4.8.3/lto -wrapper | |
Target: arm-unknown-linux-gnueabi | |
Configured with: /home/hak8or/Desktop/toolchain_setup/crosstool-ng-crosstool-ng-1.20.0/.build/src/gcc-4.8.3/co nfigure --build=x86_64-build_unknown-linux-gnu --host=arm-host_unknown-linux-gnueabi --target=arm-unknown-linu x-gnueabi --prefix=/home/hak8or/cross-native-toolchain/arm-unknown-linux-gnueabi --with-sysroot=/home/hak8or/c ross-native-toolchain/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot --enable-languages=c,c++ --w ith-pkgversion='crosstool-NG 1.20.0' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-li bssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --with-gmp=/home/hak8or/Deskto p/toolchain_setup/crosstool-ng-crosstool-ng-1.20.0/.build/arm-unknown-linux-gnueabi/buildtools/complibs-host - -with-mpfr=/home/hak8or/Desktop/toolchain_setup/crosstool-ng-crosstool-ng-1.20.0/.build/arm-unknown-linux-gnue abi/buildtools/complibs-host --with-mpc=/home/hak8or/Desktop/toolchain_setup/crosstool-ng-crosstool-ng-1.20.0/ .build/arm-unknown-linux-gnueabi/buildtools/complibs-host --with-isl=/home/hak8or/Desktop/toolchain_setup/cros stool-ng-crosstool-ng-1.20.0/.build/arm-unknown-linux-gnueabi/buildtools/complibs-host --with-cloog=/home/hak8 or/Desktop/toolchain_setup/crosstool-ng-crosstool-ng-1.20.0/.build/arm-unknown-linux-gnueabi/buildtools/compli bs-host --with-libelf=/home/hak8or/Desktop/toolchain_setup/crosstool-ng-crosstool-ng-1.20.0/.build/arm-unknown -linux-gnueabi/buildtools/complibs-host --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-target-optspace --disable-nls --disable-multilib --with-local-prefix=/hom e/hak8or/cross-native-toolchain/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot --enable-c99 --ena ble-long-long | |
Thread model: posix | |
gcc version 4.8.3 (crosstool-NG 1.20.0) | |
/usr/home/arm-unknown-linux-gnueabi/bin # ./arm-unknown-linux-gnueabi-gcc -v | |
Using built-in specs. | |
COLLECT_GCC=./arm-unknown-linux-gnueabi-gcc | |
COLLECT_LTO_WRAPPER=/usr/home/arm-unknown-linux-gnueabi/bin/../libexec/gcc/arm-unknown-linux-gnueabi/4.8.3/lto-wrapper | |
Target: arm-unknown-linux-gnueabi | |
Configured with: /home/hak8or/Desktop/toolchain_setup/crosstool-ng-crosstool-ng-1.20.0/.build/src/gcc-4.8.3/configure --build=x86_64-build_unknown-linux-gnu --host=arm-host_unknown-linux-gnueabi --target=arm-unknown-linux-gnueabi --prefix=/home/hak8or/cross-native-toolchain/arm-unknown-linux-gnueabi --with-sysroot=/home/hak8or/cross-native-toolchain/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot --enable-languages=c,c++ --with-pkgversion='crosstool-NG 1.20.0' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --with-gmp=/home/hak8or/Desktop/toolchain_setup/crosstool-ng-crosstool-ng-1.20.0/.build/arm-unknown-linux-gnueabi/buildtools/complibs-host --with-mpfr=/home/hak8or/Desktop/toolchain_setup/crosstool-ng-crosstool-ng-1.20.0/.build/arm-unknown-linux-gnueabi/buildtools/complibs-host --with-mpc=/home/hak8or/Desktop/toolchain_setup/crosstool-ng-crosstool-ng-1.20.0/.build/arm-unknown-linux-gnueabi/buildtools/complibs-host --with-isl=/home/hak8or/Desktop/toolchain_setup/crosstool-ng-crosstool-ng-1.20.0/.build/arm-unknown-linux-gnueabi/buildtools/complibs-host --with-cloog=/home/hak8or/Desktop/toolchain_setup/crosstool-ng-crosstool-ng-1.20.0/.build/arm-unknown-linux-gnueabi/buildtools/complibs-host --with-libelf=/home/hak8or/Desktop/toolchain_setup/crosstool-ng-crosstool-ng-1.20.0/.build/arm-unknown-linux-gnueabi/buildtools/complibs-host --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-target-optspace --disable-nls --disable-multilib --with-local-prefix=/home/hak8or/cross-native-toolchain/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot --enable-c99 --enable-long-long | |
Thread model: posix | |
gcc version 4.8.3 (crosstool-NG 1.20.0) | |
/usr/home/arm-unknown-linux-gnueabi/bin # cd /mnt/ramfs/ | |
/mnt/ramfs # nano | |
/bin/sh: nano: not found | |
/mnt/ramfs # vi hello.cpp | |
/mnt/ramfs # /usr/home/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-g | |
++ hello.cpp | |
/usr/home/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.8.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find crt1.o: No such file or directory | |
/usr/home/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.8.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory | |
/usr/home/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.8.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find -lstdc++ | |
/usr/home/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.8.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find -lm | |
/usr/home/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.8.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find -lgcc_s | |
/usr/home/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.8.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find -lc | |
/usr/home/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.8.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find -lgcc_s | |
/usr/home/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.8.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find crtn.o: No such file or directory | |
collect2: error: ld returned 1 exit status | |
/mnt/ramfs # /arm-unknown-linux-gnueabi/bin/ld: cannot find crt1.o: No such file | |
or directory | |
/bin/sh: /arm-unknown-linux-gnueabi/bin/ld:: not found | |
/mnt/ramfs # cat hello.cpp | |
#include <iostream> | |
int main(void){ | |
std::cout << "Hello world! :o\n"; | |
return 0; | |
} | |
/mnt/ramfs # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment