Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
16 user(s) are online (10 user(s) are browsing Forum)

Members: 1
Guests: 15

Ball000, more...

Browsing this Thread:   1 Anonymous Users



(1) 2 3 4 ... 12 »


Native port for Raspberry Pi

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 884
Offline
Hi,

I was just fiddling with the ABI_v1 build system and I tried to give it a new target "raspberrypi-(arm/thumb)"

Here's what I've done, is it now really that simple to create crosscompiler for Aros or am I missing something?


AROS=/home/ubuntu/aros_svn/trunk/AROS

mkdir AROS
.toolchain-arm
cd AROS
.toolchain-arm

$AROS
/configure --target=raspberrypi-arm --with-aros-toolchain-install=/opt/aros-arm

make 
-s crosstools

mkdir AROS
.raspberrypi-arm
cd AROS
.raspberrypi-arm

$AROS
/configure --target=raspberrypi-arm --with-aros-toolchain-install=/opt/aros-arm --with-aros-toolchain=yes --disable-crosstools
make 
-s


raspberrypi*)
        
aros_target_arch="raspberrypi"
        
aros_target_cpu="arm"
        
aros_object_format="armelf_linux_eabi"
        
gcc_target_cpu="arm"
        
aros_flavour="standalone"
        
case "$target_cpuin
            
*arm*)
                
aros_config_cflags="$aros_config_cflags -marm"
                
;;
            *
thumb*)
                
aros_config_cflags="$aros_config_cflags -mthumb"
                
;;
            *)
                
AC_MSG_ERROR("Unknown CPU for Raspberry Pi $target_cpu")
                ;;
        
esac
        
;;


If it is that simple then next thing would be to code bootstrap code... GCC is still building so I don't know what the result will be

Posted on: 2012/11/4 4:47

Edited by DizzyOfCRN on 2012/11/4 5:40:45
Transfer the post to other applications Transfer


Re: Native port for Raspberry Pi

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 884
Offline
Nope, it needs a lot more...

Building AROS/Libs/version.library ...
/opt/aros-arm/arm-aros-ld: /home/ubuntu/AROS.raspberrypi-arm/bin/raspberrypi-arm/gen/compiler/libinit/libentry.o: compiled for a little endian system and target is big endian

Edit: Stupid me, let's just give the elf object a correct flag in configure > aros_object_format="armelf_linux_eabi"

And now we fail with

Linking AROS/Tests/getcpuinfo...
Link failed: /home/ubuntu/AROS.raspberrypi-arm/bin/linux-i386/tools/arm-raspberrypi-aros-gcc /home/ubuntu/AROS.raspberrypi-arm/bin/raspberrypi-arm/gen/test/getcpuinfo.o -o /home/ubuntu/AROS.raspberrypi-arm/bin/raspberrypi-arm/AROS/Tests/getcpuinfo -lcoolimagesstatic -lhiddstubs -loop
There are undefined symbols in '/home/ubuntu/AROS.raspberrypi-arm/bin/raspberrypi-arm/AROS/Tests/getcpuinfo':
w __cxa_begin_cleanup /home/ubuntu/AROS.toolchain-arm/bin/linux-i386/Ports/gcc/gcc-4.6.2/libgcc/../gcc/config/arm/unwind-arm.c:1090
w __cxa_call_unexpected /home/ubuntu/AROS.toolchain-arm/bin/linux-i386/Ports/gcc/gcc-4.6.2/libgcc/../gcc/config/arm/unwind-arm.c:1204
w __cxa_type_match /home/ubuntu/AROS.toolchain-arm/bin/linux-i386/Ports/gcc/gcc-4.6.2/libgcc/../gcc/config/arm/unwind-arm.c:1170
w __gnu_Unwind_Find_exidx /home/ubuntu/AROS.toolchain-arm/bin/linux-i386/Ports/gcc/gcc-4.6.2/libgcc/../gcc/config/arm/unwind-arm.c:603
make[1]: *** [/home/ubuntu/AROS.raspberrypi-arm/bin/raspberrypi-arm/AROS/Tests/getcpuinfo] Error 1
make --no-print-directory TOP=/home/ubuntu/AROS.raspberrypi-arm SRCDIR=/home/ubuntu/aros_svn/trunk/AROS CURDIR=test TARGET=test-common --file=mmakefile test-common failed: 512
Error: Error while running make in test: No such file or directory
make: *** [all] Error 10

Edit: gcc flags should take care of that

Edit: I fear that the cross compiler needs some patches... or it needs to be configured differently

Edit: Let's mess with the cross tools compilation and declare --without-system-libunwind

Edit: Nope, --disable-libunwind-exceptions ?

Edit: I'm getting nowhere...

Edit: Bypassing getcpu the next one failing is AROS/Tests/benchmarks/graphics/pixelarray... but a lot of code compiles in between

Edit: Bypassing pixelarray the next one failing is AROS/Libs/uuid.library

All these fail the same as getcpu (no __cxa_begin_cleanup etc.)

Posted on: 2012/11/4 5:22

Edited by DizzyOfCRN on 2012/11/4 6:30:24
Edited by DizzyOfCRN on 2012/11/4 6:57:59
Edited by DizzyOfCRN on 2012/11/4 7:23:22
Edited by DizzyOfCRN on 2012/11/4 8:41:26
Edited by DizzyOfCRN on 2012/11/4 9:08:54
Edited by DizzyOfCRN on 2012/11/4 9:13:50
_________________
Jyrki.J.Koivisto
Transfer the post to other applications Transfer


Re: Native port for Raspberry Pi

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 884
Offline
Googling a bit lead me to belief it's a gcc bug with 4.5-4.6 versions

Running FILE with one of the build librarys tells me this:

file /home/ubuntu/AROS.raspberrypi-arm/bin/raspberrypi-arm/AROS/Libs/version.library
/home/ubuntu/AROS.raspberrypi-arm/bin/raspberrypi-arm/AROS/Libs/version.library: ELF 32-bit LSB relocatable, ARM, version 1, not stripped

Posted on: 2012/11/4 9:18
_________________
Jyrki.J.Koivisto
Transfer the post to other applications Transfer


Re: Native port for Raspberry Pi

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 884
Offline
ubuntu@ubuntu-desktop:~$ /opt/aros-arm/arm-aros-objdump -D /home/ubuntu/AROS.raspberrypi-arm/bin/raspberrypi-arm/AROS/Libs/version.library

/home/ubuntu/AROS.raspberrypi-arm/bin/raspberrypi-arm/AROS/Libs/version.library: file format elf32-littlearm


Disassembly of section .text:

00000000 <__resident_entry>:
0: e3e00000 mvn r0, #0
4: e12fff1e bx lr

00000008 :
8: e3a00000 mov r0, #0
c: e12fff1e bx lr

00000010 :
10: e1d032b4 ldrh r3, [r0, #36] ; 0x24
14: e92d4010 push {r4, lr}
18: e3e01000 mvn r1, #0
1c: e1a04000 mov r4, r0
20: e0833001 add r3, r3, r1
24: e1c432b4 strh r3, [r4, #36] ; 0x24
28: e59f003c ldr r0, [pc, #60] ; 6c
2c: e1a03004 mov r3, r4
30: e3a02000 mov r2, #0
34: ebfffffe bl 368
38: e1d432b4 ldrh r3, [r4, #36] ; 0x24
3c: e3530000 cmp r3, #0
40: 1a000007 bne 64
44: e5d40010 ldrb r0, [r4, #16]
48: e2100008 ands r0, r0, #8
4c: 08bd8010 popeq {r4, pc}
50: e1a00004 mov r0, r4
54: e514300c ldr r3, [r4, #-12]
58: e1a01004 mov r1, r4
5c: e12fff33 blx r3
60: e8bd8010 pop {r4, pc}
64: e3a00000 mov r0, #0
68: e8bd8010 pop {r4, pc}
6c: 00000000 andeq r0, r0, r0

00000070 :
70: e92d4010 push {r4, lr}
74: e1a04001 mov r4, r1
78: e3a01001 mov r1, #1
7c: e1a03004 mov r3, r4
80: e1a02001 mov r2, r1
84: e59f0028 ldr r0, [pc, #40] ; b4
88: ebfffffe bl 368
8c: e3500000 cmp r0, #0
90: 01a04000 moveq r4, r0
94: 11d422b4 ldrhne r2, [r4, #36] ; 0x24
98: 15d43010 ldrbne r3, [r4, #16]
9c: e1a00004 mov r0, r4
a0: 12822001 addne r2, r2, #1
a4: 13c33008 bicne r3, r3, #8
a8: 11c422b4 strhne r2, [r4, #36] ; 0x24
ac: 15c43010 strbne r3, [r4, #16]
b0: e8bd8010 pop {r4, pc}
b4: 00000000 andeq r0, r0, r0

000000b8 :
b8: e92d40f8 push {r3, r4, r5, r6, r7, lr}
bc: e1a04001 mov r4, r1
c0: e1d162b4 ldrh r6, [r1, #36] ; 0x24
c4: e3560000 cmp r6, #0
c8: 1a000024 bne 160
cc: e59fc0bc ldr ip, [pc, #188] ; 190
d0: e59f00bc ldr r0, [pc, #188] ; 194
d4: e3e01000 mvn r1, #0
d8: e3a02001 mov r2, #1
dc: e1a03004 mov r3, r4
e0: e59c7000 ldr r7, [ip]
e4: ebfffffe bl 368
e8: e3500000 cmp r0, #0
ec: 0a000021 beq 178
f0: e59f50a0 ldr r5, [pc, #160] ; 198
f4: e5953000 ldr r3, [r5]
f8: e1a00004 mov r0, r4
fc: e1a01003 mov r1, r3
100: e51330a8 ldr r3, [r3, #-168] ; 0xa8
104: e12fff33 blx r3
108: e1a02006 mov r2, r6
10c: e5953000 ldr r3, [r5]
110: e3a01001 mov r1, #1
114: e59f0080 ldr r0, [pc, #128] ; 19c
118: ebfffffe bl 4fc <_set_call_funcs>
11c: e1a02006 mov r2, r6
120: e5953000 ldr r3, [r5]
124: e3e01000 mvn r1, #0
128: e59f0070 ldr r0, [pc, #112] ; 1a0
12c: ebfffffe bl 4fc <_set_call_funcs>
130: e5951000 ldr r1, [r5]
134: e59f0068 ldr r0, [pc, #104] ; 1a4
138: ebfffffe bl 594 <_set_close_libraries_list>
13c: e1d411b2 ldrh r1, [r4, #18]
140: e5952000 ldr r2, [r5]
144: e1d4c1b4 ldrh ip, [r4, #20]
148: e0610004 rsb r0, r1, r4
14c: e512308c ldr r3, [r2, #-140] ; 0x8c
150: e081100c add r1, r1, ip
154: e12fff33 blx r3
158: e1a00007 mov r0, r7
15c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
160: e5d13010 ldrb r3, [r1, #16]
164: e3a07000 mov r7, #0
168: e1a00007 mov r0, r7
16c: e3833008 orr r3, r3, #8
170: e5c13010 strb r3, [r1, #16]
174: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
178: e5d43010 ldrb r3, [r4, #16]
17c: e1a07000 mov r7, r0
180: e1a00007 mov r0, r7
184: e3833008 orr r3, r3, #8
188: e5c43010 strb r3, [r4, #16]
18c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
...

000001a8 :
1a8: e92d4070 push {r4, r5, r6, lr}
1ac: e2524000 subs r4, r2, #0
1b0: e1a05000 mov r5, r0
1b4: e1a03001 mov r3, r1
1b8: 01a05004 moveq r5, r4
1bc: 0a000023 beq 250
1c0: e59f20f0 ldr r2, [pc, #240] ; 2b8
1c4: e1d411b6 ldrh r1, [r4, #22]
1c8: e5922000 ldr r2, [r2]
1cc: e1510002 cmp r1, r2
1d0: b3a05000 movlt r5, #0
1d4: ba00001d blt 250
1d8: e59f20dc ldr r2, [pc, #220] ; 2bc
1dc: e3a06000 mov r6, #0
1e0: e1c561b8 strh r6, [r5, #24]
1e4: e59f00d4 ldr r0, [pc, #212] ; 2c0
1e8: e1a01004 mov r1, r4
1ec: e5823000 str r3, [r2]
1f0: ebfffffe bl 58c <_set_open_libraries_list>
1f4: e1500006 cmp r0, r6
1f8: 1a000016 bne 258
1fc: e1a03004 mov r3, r4
200: e3a01001 mov r1, #1
204: e3a02000 mov r2, #0
208: e59f00b4 ldr r0, [pc, #180] ; 2c4
20c: ebfffffe bl 4fc <_set_call_funcs>
210: e3a02000 mov r2, #0
214: e1a03004 mov r3, r4
218: e3e01000 mvn r1, #0
21c: e59f00a4 ldr r0, [pc, #164] ; 2c8
220: ebfffffe bl 4fc <_set_call_funcs>
224: e59f0094 ldr r0, [pc, #148] ; 2c0
228: e1a01004 mov r1, r4
22c: ebfffffe bl 594 <_set_close_libraries_list>
230: e1d521b2 ldrh r2, [r5, #18]
234: e1d511b4 ldrh r1, [r5, #20]
238: e0620005 rsb r0, r2, r5
23c: e514308c ldr r3, [r4, #-140] ; 0x8c
240: e0821001 add r1, r2, r1
244: e1a02004 mov r2, r4
248: e12fff33 blx r3
24c: e3a05000 mov r5, #0
250: e1a00005 mov r0, r5
254: e8bd8070 pop {r4, r5, r6, pc}
258: e3a01001 mov r1, #1
25c: e59f0068 ldr r0, [pc, #104] ; 2cc
260: e1a02001 mov r2, r1
264: e1a03004 mov r3, r4
268: ebfffffe bl 4fc <_set_call_funcs>
26c: e1500006 cmp r0, r6
270: 0affffe1 beq 1fc
274: e3e01000 mvn r1, #0
278: e1a02006 mov r2, r6
27c: e1a03004 mov r3, r4
280: e59f0048 ldr r0, [pc, #72] ; 2d0
284: ebfffffe bl 4fc <_set_call_funcs>
288: e3a01001 mov r1, #1
28c: e1a02001 mov r2, r1
290: e59f003c ldr r0, [pc, #60] ; 2d4
294: e1a03005 mov r3, r5
298: ebfffffe bl 368
29c: e2502000 subs r2, r0, #0
2a0: 1affffea bne 250
2a4: e3e01000 mvn r1, #0
2a8: e1a03005 mov r3, r5
2ac: e59f0024 ldr r0, [pc, #36] ; 2d8
2b0: ebfffffe bl 368
2b4: eaffffd0 b 1fc
...

000002dc :
2dc: e3a00000 mov r0, #0
2e0: e12fff1e bx lr

000002e4 :
2e4: e2503000 subs r3, r0, #0
2e8: e92d4030 push {r4, r5, lr}
2ec: 01a00003 moveq r0, r3
2f0: e24dd014 sub sp, sp, #20
2f4: 0a000016 beq 354
2f8: e59f105c ldr r1, [pc, #92] ; 35c
2fc: e1d321b6 ldrh r2, [r3, #22]
300: e59f5058 ldr r5, [pc, #88] ; 360
304: e5914000 ldr r4, [r1]
308: e1520004 cmp r2, r4
30c: e5853000 str r3, [r5]
310: a3a00001 movge r0, #1
314: aa00000e bge 354
318: e3a00000 mov r0, #0
31c: e1a01003 mov r1, r3
320: e51330c4 ldr r3, [r3, #-196] ; 0xc4
324: e12fff33 blx r3
328: e5953000 ldr r3, [r5]
32c: e1a02003 mov r2, r3
330: e1d331b6 ldrh r3, [r3, #22]
334: e590c00c ldr ip, [r0, #12]
338: e28d1004 add r1, sp, #4
33c: e59f0020 ldr r0, [pc, #32] ; 364
340: e58dc004 str ip, [sp, #4]
344: e58d4008 str r4, [sp, #8]
348: e58d300c str r3, [sp, #12]
34c: ebfffffe bl 5b4 <___showerror>
350: e3a00000 mov r0, #0
354: e28dd014 add sp, sp, #20
358: e8bd8030 pop {r4, r5, pc}
...
364: 000000d4 ldrdeq r0, [r0], -r4

00000368 :
368: e92d41f0 push {r4, r5, r6, r7, r8, lr}
36c: e2504000 subs r4, r0, #0
370: e1a05001 mov r5, r1
374: e1a06002 mov r6, r2
378: e1a08003 mov r8, r3
37c: 0a00001f beq 400
380: e3510000 cmp r1, #0
384: a3a07001 movge r7, #1
388: b5947000 ldrlt r7, [r4]
38c: ea000006 b 3ac
390: e12fff32 blx r2
394: e3500000 cmp r0, #0
398: 0a000017 beq 3fc
39c: e3550000 cmp r5, #0
3a0: b3e03000 mvnlt r3, #0
3a4: a3a03001 movge r3, #1
3a8: e0877003 add r7, r7, r3
3ac: e3550000 cmp r5, #0
3b0: e7942107 ldr r2, [r4, r7, lsl #2]
3b4: ba000009 blt 3e0
3b8: e2921000 adds r1, r2, #0
3bc: 13a01001 movne r1, #1
3c0: e3510000 cmp r1, #0
3c4: e1a00008 mov r0, r8
3c8: 0a000009 beq 3f4
3cc: e3560000 cmp r6, #0
3d0: 1affffee bne 390
3d4: e1a00008 mov r0, r8
3d8: e12fff32 blx r2
3dc: eaffffee b 39c
3e0: e2971000 adds r1, r7, #0
3e4: 13a01001 movne r1, #1
3e8: e3510000 cmp r1, #0
3ec: e1a00008 mov r0, r8
3f0: 1afffff5 bne 3cc
3f4: e3a00001 mov r0, #1
3f8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
3fc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
400: e3a00001 mov r0, #1
404: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}

00000408 :
408: e92d45f8 push {r3, r4, r5, r6, r7, r8, sl, lr}
40c: e3500000 cmp r0, #0
410: e1a0a002 mov sl, r2
414: e1a04003 mov r4, r3
418: e59d5020 ldr r5, [sp, #32]
41c: e59d8024 ldr r8, [sp, #36] ; 0x24
420: e59d7028 ldr r7, [sp, #40] ; 0x28
424: 0a00001a beq 494
428: e3510000 cmp r1, #0
42c: ba00001b blt 4a0
430: e590c004 ldr ip, [r0, #4]
434: e35c0000 cmp ip, #0
438: 0a000015 beq 494
43c: e2806004 add r6, r0, #4
440: ea000005 b 45c
444: e12fff3c blx ip
448: e3500000 cmp r0, #0
44c: 0a000012 beq 49c
450: e5b6c004 ldr ip, [r6, #4]!
454: e35c0000 cmp ip, #0
458: 0a00000d beq 494
45c: e35a0000 cmp sl, #0
460: e1a00004 mov r0, r4
464: e1a01005 mov r1, r5
468: e1a02008 mov r2, r8
46c: e1a03007 mov r3, r7
470: 1afffff3 bne 444
474: e1a00004 mov r0, r4
478: e1a01005 mov r1, r5
47c: e1a02008 mov r2, r8
480: e1a03007 mov r3, r7
484: e12fff3c blx ip
488: e5b6c004 ldr ip, [r6, #4]!
48c: e35c0000 cmp ip, #0
490: 1afffff1 bne 45c
494: e3a00001 mov r0, #1
498: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
49c: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
4a0: e5906000 ldr r6, [r0]
4a4: e3560000 cmp r6, #0
4a8: e0807106 add r7, r0, r6, lsl #2
4ac: e7903106 ldr r3, [r0, r6, lsl #2]
4b0: 1a000006 bne 4d0
4b4: ea00000e b 4f4
4b8: e12fff33 blx r3
4bc: e3500000 cmp r0, #0
4c0: 0a00000a beq 4f0
4c4: e2566001 subs r6, r6, #1
4c8: e5373004 ldr r3, [r7, #-4]!
4cc: 0afffff0 beq 494
4d0: e35a0000 cmp sl, #0
4d4: e1a00004 mov r0, r4
4d8: e1a01005 mov r1, r5
4dc: 1afffff5 bne 4b8
4e0: e1a00004 mov r0, r4
4e4: e1a01005 mov r1, r5
4e8: e12fff33 blx r3
4ec: eafffff4 b 4c4
4f0: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
4f4: e3a00001 mov r0, #1
4f8: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}

000004fc <_set_call_funcs>:
4fc: e92d41f0 push {r4, r5, r6, r7, r8, lr}
500: e2514000 subs r4, r1, #0
504: e1a05000 mov r5, r0
508: e1a06002 mov r6, r2
50c: e1a08003 mov r8, r3
510: b5907000 ldrlt r7, [r0]
514: a3a07001 movge r7, #1
518: ea000006 b 538 <_set_call_funcs+0x3c>
51c: e12fff32 blx r2
520: e3500000 cmp r0, #0
524: 0a000017 beq 588 <_set_call_funcs+0x8c>
528: e3540000 cmp r4, #0
52c: b3e03000 mvnlt r3, #0
530: a3a03001 movge r3, #1
534: e0877003 add r7, r7, r3
538: e3540000 cmp r4, #0
53c: e7952107 ldr r2, [r5, r7, lsl #2]
540: ba000009 blt 56c <_set_call_funcs+0x70>
544: e2921000 adds r1, r2, #0
548: 13a01001 movne r1, #1
54c: e3510000 cmp r1, #0
550: e1a00008 mov r0, r8
554: 0a000009 beq 580 <_set_call_funcs+0x84>
558: e3560000 cmp r6, #0
55c: 1affffee bne 51c <_set_call_funcs+0x20>
560: e1a00008 mov r0, r8
564: e12fff32 blx r2
568: eaffffee b 528 <_set_call_funcs+0x2c>
56c: e2971000 adds r1, r7, #0
570: 13a01001 movne r1, #1
574: e3510000 cmp r1, #0
578: e1a00008 mov r0, r8
57c: 1afffff5 bne 558 <_set_call_funcs+0x5c>
580: e3a00001 mov r0, #1
584: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
588: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}

0000058c <_set_open_libraries_list>:
58c: e3a00001 mov r0, #1
590: e12fff1e bx lr

00000594 <_set_close_libraries_list>:
594: e12fff1e bx lr

00000598 :
598: e92d4010 push {r4, lr}
59c: e2504000 subs r4, r0, #0
5a0: 0a000001 beq 5ac
5a4: e5113158 ldr r3, [r1, #-344] ; 0x158
5a8: e12fff33 blx r3
5ac: e1a00004 mov r0, r4
5b0: e8bd8010 pop {r4, pc}

000005b4 <___showerror>:
5b4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
5b8: e1a06000 mov r6, r0
5bc: e24dd020 sub sp, sp, #32
5c0: e1a05001 mov r5, r1
5c4: e1a04002 mov r4, r2
5c8: e3a00000 mov r0, #0
5cc: e51230c4 ldr r3, [r2, #-196] ; 0xc4
5d0: e1a01002 mov r1, r2
5d4: e12fff33 blx r3
5d8: e590800c ldr r8, [r0, #12]
5dc: e59f0154 ldr r0, [pc, #340] ; 738 <___showerror+0x184>
5e0: e5143170 ldr r3, [r4, #-368] ; 0x170
5e4: e3a01000 mov r1, #0
5e8: e1a02004 mov r2, r4
5ec: e12fff33 blx r3
5f0: e2507000 subs r7, r0, #0
5f4: 0a00001e beq 674 <___showerror+0xc0>
5f8: e5173148 ldr r3, [r7, #-328] ; 0x148
5fc: e12fff33 blx r3
600: e3500000 cmp r0, #0
604: 0a00001a beq 674 <___showerror+0xc0>
608: e3580000 cmp r8, #0
60c: 0a000007 beq 630 <___showerror+0x7c>
610: e5173278 ldr r3, [r7, #-632] ; 0x278
614: e1a00008 mov r0, r8
618: e1a01007 mov r1, r7
61c: e12fff33 blx r3
620: e59f0114 ldr r0, [pc, #276] ; 73c <___showerror+0x188>
624: e5173278 ldr r3, [r7, #-632] ; 0x278
628: e1a01007 mov r1, r7
62c: e12fff33 blx r3
630: e3550000 cmp r5, #0
634: 0a00003a beq 724 <___showerror+0x170>
638: e517327c ldr r3, [r7, #-636] ; 0x27c
63c: e1a00006 mov r0, r6
640: e1a01005 mov r1, r5
644: e1a02007 mov r2, r7
648: e12fff33 blx r3
64c: e59f00ec ldr r0, [pc, #236] ; 740 <___showerror+0x18c>
650: e5173278 ldr r3, [r7, #-632] ; 0x278
654: e1a01007 mov r1, r7
658: e12fff33 blx r3
65c: e5143114 ldr r3, [r4, #-276] ; 0x114
660: e1a00007 mov r0, r7
664: e1a01004 mov r1, r4
668: e12fff33 blx r3
66c: e28dd020 add sp, sp, #32
670: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
674: e59f00c8 ldr r0, [pc, #200] ; 744 <___showerror+0x190>
678: e5143170 ldr r3, [r4, #-368] ; 0x170
67c: e3a01000 mov r1, #0
680: e1a02004 mov r2, r4
684: e12fff33 blx r3
688: e2507000 subs r7, r0, #0
68c: 0a00000e beq 6cc <___showerror+0x118>
690: e3a03014 mov r3, #20
694: e58d3008 str r3, [sp, #8]
698: e59f30a8 ldr r3, [pc, #168] ; 748 <___showerror+0x194>
69c: e3a00000 mov r0, #0
6a0: e58d000c str r0, [sp, #12]
6a4: e58d8010 str r8, [sp, #16]
6a8: e58d6014 str r6, [sp, #20]
6ac: e58d3018 str r3, [sp, #24]
6b0: e58d7000 str r7, [sp]
6b4: e28d1008 add r1, sp, #8
6b8: e517c188 ldr ip, [r7, #-392] ; 0x188
6bc: e1a02000 mov r2, r0
6c0: e1a03005 mov r3, r5
6c4: e12fff3c blx ip
6c8: eaffffe3 b 65c <___showerror+0xa8>
6cc: e3580000 cmp r8, #0
6d0: 0a000007 beq 6f4 <___showerror+0x140>
6d4: e28d1020 add r1, sp, #32
6d8: e5218004 str r8, [r1, #-4]!
6dc: e59f0068 ldr r0, [pc, #104] ; 74c <___showerror+0x198>
6e0: e58d4000 str r4, [sp]
6e4: e59f2064 ldr r2, [pc, #100] ; 750 <___showerror+0x19c>
6e8: e514c15c ldr ip, [r4, #-348] ; 0x15c
6ec: e1a03004 mov r3, r4
6f0: e12fff3c blx ip
6f4: e59f2054 ldr r2, [pc, #84] ; 750 <___showerror+0x19c>
6f8: e58d4000 str r4, [sp]
6fc: e1a00006 mov r0, r6
700: e514c15c ldr ip, [r4, #-348] ; 0x15c
704: e1a01005 mov r1, r5
708: e1a03004 mov r3, r4
70c: e12fff3c blx ip
710: e3a0000a mov r0, #10
714: e5143158 ldr r3, [r4, #-344] ; 0x158
718: e1a01004 mov r1, r4
71c: e12fff33 blx r3
720: eaffffd1 b 66c <___showerror+0xb8>
724: e5173278 ldr r3, [r7, #-632] ; 0x278
728: e1a00006 mov r0, r6
72c: e1a01007 mov r1, r7
730: e12fff33 blx r3
734: eaffffc4 b 64c <___showerror+0x98>
738: 00000100 andeq r0, r0, r0, lsl #2
73c: 0000010c andeq r0, r0, ip, lsl #2
740: 00000110 andeq r0, r0, r0, lsl r1
744: 00000114 andeq r0, r0, r4, lsl r1
748: 00000128 andeq r0, r0, r8, lsr #2
74c: 00000130 andeq r0, r0, r0, lsr r1
750: 00000000 andeq r0, r0, r0

Disassembly of section .rodata:

00000000 :
...
10: ffffffff ; instruction: 0xffffffff

00000014 <__CLOSELIB_LIST__>:
...

0000001c <__OPENLIB_LIST__>:
...

00000024 <__EXPUNGELIB_LIST__>:
...

0000002c <__INITLIB_LIST__>:
...

00000034 <__DTORS_LIST__>:
...

0000003c <__CTORS_LIST__>:
...

00000044 <__EXIT_LIST__>:
...

00000054 :
54: 00000000 andeq r0, r0, r0

00000058 :
58: 52455624 subpl r5, r5, #37748736 ; 0x2400000
5c: 6576203a ldrbvs r2, [r6, #-58]! ; 0x3a
60: 6f697372 svcvs 0x00697372
64: 696c2e6e stmdbvs ip!, {r1, r2, r3, r5, r6, r9, sl, fp, sp}^
68: 72617262 rsbvc r7, r1, #536870918 ; 0x20000006
6c: 30342079 eorscc r2, r4, r9, ror r0
70: 2820302e stmdacs r0!, {r1, r2, r3, r5, ip, sp}
74: 31312e34 teqcc r1, r4, lsr lr
78: 3130322e teqcc r0, lr, lsr #4
7c: 0a0d2932 beq 34a54c <___showerror+0x349f98>
80: 00000000 andeq r0, r0, r0

00000084 :
84: 73726576 cmnvc r2, #494927872 ; 0x1d800000
88: 2e6e6f69 cdpcs 15, 6, cr6, cr14, cr9, {3}
8c: 7262696c rsbvc r6, r2, #1769472 ; 0x1b0000
90: 00797261 rsbseq r7, r9, r1, ror #4

00000094 :
94: 00004afc strdeq r4, [r0], -ip
...
a0: 00092881 andeq r2, r9, r1, lsl #17
a4: 00000000 andeq r0, r0, r0
a8: 00000006 andeq r0, r0, r6
ac: 000000b8 strheq r0, [r0], -r8
...
b8: 00000028 andeq r0, r0, r8, lsr #32
...

000000c8 <__LIBS_LIST__>:
...

000000d0 <__forceerrorrequester>:
d0: 00000000 andeq r0, r0, r0
d4: 203a7325 eorscs r7, sl, r5, lsr #6
d8: 75716552 ldrbvc r6, [r1, #-1362]! ; 0x552
dc: 73657269 cmnvc r5, #-1879048186 ; 0x90000006
e0: 65786520 ldrbvs r6, [r8, #-1312]! ; 0x520
e4: 696c2e63 stmdbvs ip!, {r0, r1, r5, r6, r9, sl, fp, sp}^
e8: 72617262 rsbvc r7, r1, #536870918 ; 0x20000006
ec: 25762079 ldrbcs r2, [r6, #-121]! ; 0x79
f0: 202c646c eorcs r6, ip, ip, ror #8
f4: 6e756f66 cdpvs 15, 7, cr6, cr5, cr6, {3}
f8: 25762064 ldrbcs r2, [r6, #-100]! ; 0x64
fc: 000a646c andeq r6, sl, ip, ror #8
100: 2e736f64 cdpcs 15, 7, cr6, cr3, cr4, {3}
104: 7262696c rsbvc r6, r2, #1769472 ; 0x1b0000
108: 00797261 rsbseq r7, r9, r1, ror #4
10c: 0000203a andeq r2, r0, sl, lsr r0
110: 0000000a andeq r0, r0, sl
114: 75746e69 ldrbvc r6, [r4, #-3689]! ; 0xe69
118: 6f697469 svcvs 0x00697469
11c: 696c2e6e stmdbvs ip!, {r1, r2, r3, r5, r6, r9, sl, fp, sp}^
120: 72617262 rsbvc r7, r1, #536870918 ; 0x20000006
124: 00000079 andeq r0, r0, r9, ror r0
128: 74697845 strbtvc r7, [r9], #-2117 ; 0x845
12c: 00000000 andeq r0, r0, r0
130: 203a7325 eorscs r7, sl, r5, lsr #6
...

00000140 <__INIT_LIST__>:
140: 00000001 andeq r0, r0, r1
...

0000014c <__INIT_END__>:
...
154: 00000024 andeq r0, r0, r4, lsr #32
158: 00000024 andeq r0, r0, r4, lsr #32

Disassembly of section .eh_frame:

00000000 <.eh_frame>:
0: 00000000 andeq r0, r0, r0

Disassembly of section .bss:

00000000 :
0: 00000000 andeq r0, r0, r0

00000004 :
4: 00000000 andeq r0, r0, r0

Disassembly of section .ARM.attributes:

00000000 <.ARM.attributes>:
0: 00002e41 andeq r2, r0, r1, asr #28
4: 61656100 cmnvs r5, r0, lsl #2
8: 01006962 tsteq r0, r2, ror #18
c: 00000024 andeq r0, r0, r4, lsr #32
10: 06003605 streq r3, [r0], -r5, lsl #12
14: 09010806 stmdbeq r1, {r1, r2, fp}
18: 12020a01 andne r0, r2, #4096 ; 0x1000
1c: 15011401 strne r1, [r1, #-1025] ; 0x401
20: 18031701 stmdane r3, {r0, r8, r9, sl, ip}
24: 1a011901 bne 46430 <___showerror+0x45e7c>
28: 1e031b02 vmlane.f64 d1, d3, d2
2c: Address 0x0000002c is out of bounds.


Posted on: 2012/11/4 9:24
Transfer the post to other applications Transfer


Re: Native port for Raspberry Pi

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 884
Offline
It builds a lot of the libs in my mind

ubuntu@ubuntu-desktop:~$ ls AROS.raspberrypi-arm/bin/raspberrypi-arm/AROS/Development/lib/
detach.o libautoinit.a libdatatypes_rel.a libgraphics_rel.a liblocale_rel.a libpng_au_rel.a libworkbench.a
elf-startup.o libbz2.a libdebug.a libhiddstubs.a libm.a libpng_nostdio.a libworkbench_rel.a
libadf.a libbz2_au.a libdebug_rel.a libicon.a libmiami.a libpng_rel.a libz.a
libaeabi.a libbz2_au_rel.a libdiskfont.a libicon_rel.a libmui.a libpopupmenu.a libz_au.a
libamiga.a libbz2_nostdio.a libdiskfont_rel.a libiffparse.a libmuimaster.a libpopupmenu_rel.a libz_au_rel.a
libaros.a libbz2_rel.a libdos.a libiffparse_rel.a libmuimaster_rel.a libpopupmenu-shared.a libz_rel.a
libarosc.a libc_iff.a libdos_rel.a libintuition.a libnet.a libpopupmenu-shared_rel.a libz.static.a
libarosc_rel.a libcodesets.a libexec.a libintuition_rel.a liboop.a libreqtoolsstubs.a nixmain.o
libarosc.static.a libcommodities.a libexec_rel.a libkeymap.a liboop_rel.a libsana2.a pkgconfig
libarosm.a libcommodities_rel.a libexpansion.a libkeymap_rel.a libopenurl.a libtoollib.a startup.o
libaros_rel.a libcoolimagesstatic.a libexpansion_rel.a liblayers.a libpartition.a libutility.a
libarossupport.a libcybergraphics.a libgadtools.a liblayers_rel.a libpartition_rel.a libutility_rel.a
libasl.a libcybergraphics_rel.a libgadtools_rel.a liblibinit.a libpng.a libversion.a
libasl_rel.a libdatatypes.a libgraphics.a liblocale.a libpng_au.a libversion_rel.a

Edit: Building HDToolbox fails when uuid.library is bypassed as it depends on it

Edit: Next one failing is AROS/Tools/ShowConfig

I'd like the native Rasperry Pi to run solely on thumb instruction set, I'll try that next. Maybe it will bypass that GCC bug with version 4.6.2 or not.

Posted on: 2012/11/4 9:30

Edited by DizzyOfCRN on 2012/11/4 9:54:18
_________________
Jyrki.J.Koivisto
Transfer the post to other applications Transfer


Re: Native port for Raspberry Pi

Joined:
2004/3/30 23:19
From Clausthal-Zellerfeld, Germany
Group:
Member
Posts: 388
Offline
Quote:

DizzyOfCRN wrote:
Googling a bit lead me to belief it's a gcc bug with 4.5-4.6 versions

Running FILE with one of the build librarys tells me this:

file /home/ubuntu/AROS.raspberrypi-arm/bin/raspberrypi-arm/AROS/Libs/version.library
/home/ubuntu/AROS.raspberrypi-arm/bin/raspberrypi-arm/AROS/Libs/version.library: ELF 32-bit LSB relocatable, ARM, version 1, not stripped


There is no strange bug in gcc 4.6. Look at the nightlies, the arm version is built every night using gcc-4.6.2 crosscompiler (built together with AROS).

Not to mention that I've successfully built armel and armhf linux hosted targets here at home. No problem with that.

Regarding native rpi port - why don't you look at arm linux hosted and start there? Why do you try to create separate crosscompiler at this stage? Use the one AROS builds. Look at the linux-arm entries in configure script, or even at the efika entry which I started to work on. That should be your starting point I think...

BTW: You will need to link against aeabi library too

Posted on: 2012/11/4 12:26
_________________
Click to see original Image in a new window
Transfer the post to other applications Transfer


Re: Native port for Raspberry Pi

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 884
Offline
This is now taken from configure.in

raspberrypi)
aros_target_arch="raspberrypi"
aros_object_format="armelf_linux_eabi"
aros_flavour="standalone"
aros_shared_default="no"
gcc_default_cpu="arm1176jzf-s"
aros_arch_libs="-laeabi"
aros_target_cpu="arm"
gcc_target_cpu="arm"

aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dthumb"
aros_config_cflags="$aros_config_cflags -mthumb"
aros_kernel_cflags="$aros_kernel_cflags -mthumb"
aros_config_aflags="$aros_config_aflags -mthumb"
aros_config_ldflags="-mthumb"
aros_kernel_ldflags="-mthumb"
;;

This is all just a mental exercise, nothing to take serious about.

I should have really looked closer at the configure and the mmakefile which does the crosstool.

This is the Aros cross compiler not any separate one.

Posted on: 2012/11/4 12:31

Edited by DizzyOfCRN on 2012/11/5 0:21:56
_________________
Jyrki.J.Koivisto
Transfer the post to other applications Transfer


Re: Native port for Raspberry Pi

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 884
Offline
raspberrypi)
    
aros_target_arch="raspberrypi"
    
aros_object_format="armelf_linux_eabi"
    
aros_flavour="standalone"
    
aros_shared_default="no"
    
gcc_default_cpu="armv6"
    
aros_arch_libs="-laeabi"
    
aros_target_cpu="arm"
    
aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dthumb"
    
aros_config_cflags="$aros_config_cflags -mthumb"
    
aros_kernel_cflags="$aros_kernel_cflags -mthumb"
    
aros_config_aflags="$aros_config_aflags -mthumb"
    
aros_config_ldflags="-mthumb"
    
aros_kernel_ldflags="-mthumb"
    
;;


ifneq (,$(findstring $(AROS_TARGET_ARCH),raspberrypi))
GCC_LANGUAGES c,c++
GCC_EXTRA_OPTS 
    --
disable-sjlj-exceptions 
    
--with-cpu=arm1176jzf-
    
--with-tune=arm1176jzf-
    
--with-arch=armv6 
    
--with-float=softfp 
    
--with-fpu=$(GCC_DEFAULT_FPU
    --
with-mode=arm 
    
--target=$(AROS_TARGET_CPU)-aros 
    
--bindir=$(CROSSTOOLSDIR
    --
enable-languages=$(GCC_LANGUAGES
    --
enable-long-long 
    
--enable-version-specific-runtime-libs 
    
--disable-multilib
else ifneq (,$(findstring $(AROS_TARGET_CPU),arm))
GCC_LANGUAGES c,c++


With these those undefined symbol errors are gone, still need to make gcc not to throw error on [-Werror=implicit-function-declaration]

/home/ubuntu/aros_svn/trunk/AROS/workbench/devs/monitors/IntelGMA/galliumclass.c:198:5: error: implicit declaration of function ‘HIDD_BM_OBJ’ [-Werror=implicit-function-declaration]

Now that it compiles it's time to tune it to the platform (It builds everything at the moment)

Edit: For the good or worse it still emits Arm code by default, I thought I had enough -mthumbs in there...

Edit: Created arm-raspberrypi in arch with boot folder, efika as reference

Edit: First thing to code would be the boot code and serial driver for debug purposes.

Posted on: 2012/11/5 2:14

Edited by DizzyOfCRN on 2012/11/5 3:14:02
Edited by DizzyOfCRN on 2012/11/5 3:33:38
Edited by DizzyOfCRN on 2012/11/5 3:56:46
Transfer the post to other applications Transfer


Re: Native port for Raspberry Pi

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 884
Offline
While trying to figure out the arch specific code, I get thrown with this:

Linking gen/kobjs/kernel_resource.o
There are undefined symbols in '/home/ubuntu/AROS.raspberrypi/bin/raspberrypi-arm/AROS/boot/aros-raspberrypi':
U __LIBS__symbol_set_handler_missing
U __PROGRAM_ENTRIES__symbol_set_handler_missing

Is this the cause? Should I configure the crosstools differently to get rid of it... Removing exception handling?

http://infocenter.arm.com/help/index. ... oc.dui0203j/Cacdfeci.html

Edit: Oh... I think I switched them off already with the --disable-sjlj-exceptions switch while making the compiler

Let's add -fno-exceptions to cflags

Edit: Culprit wasn't GCC, but I suspect my UglyHackMonkeyCode(tm)... compiler/include/aros/symbolsets.h contains macro "THIS_PROGRAM_HANDLES_SYMBOLSET(x)" which emits those undefined symbols. -> genmodule.h ? collect-aros...

Posted on: 2012/11/5 4:52

Edited by DizzyOfCRN on 2012/11/5 6:32:08
Edited by DizzyOfCRN on 2012/11/5 6:50:05
Transfer the post to other applications Transfer


Re: Native port for Raspberry Pi

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 884
Offline
Calling "make raspberrypi-image" creates a 4 byte file called kernel.img from boot.o

8000: eafffffe b 8000

That's just a while(1); eg. branch to itself... All this for just 4 bytes worth of code... :)

Posted on: 2012/11/5 12:52
Transfer the post to other applications Transfer



(1) 2 3 4 ... 12 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
3762
2 nikolaos
nikolaos
3470
3 magorium
magorium
3122
4 phoenixkonsole
phoenixkonsole
3070
5 deadwood
deadwood
2371
6 ncafferkey
ncafferkey
2136
7 mazze
mazze
2070
8 clusteruk
clusteruk
2051
9 damocles
damocles
1771
10 Kalamatee
Kalamatee
1769
© 2004-2014 AROS Exec