| 1 | == Build and Debug == |
| 2 | === Optimization flags == |
| 3 | I did set the compile optimization flags in my ~/.rmprc It looks like this: |
| 4 | |
| 5 | {{{ |
| 6 | optflags: armv3l -O0 -g -march=armv3 |
| 7 | optflags: armv4b -O0 -g -march=armv4 |
| 8 | optflags: armv4l -O0 -g -march=armv4 |
| 9 | optflags: armv4tl -O0 -g -march=armv4t |
| 10 | optflags: armv5tel -O0 -g -march=armv5te |
| 11 | optflags: armv5tejl -O0 -g -march=armv5te |
| 12 | optflags: armv6l -O0 -g -march=armv6 |
| 13 | optflags: armv7l -O0 -g -march=armv7 |
| 14 | optflags: armv7hl -O0 -g -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -mno-thumb |
| 15 | optflags: armv7nhl -O0 -g -march=armv7-a -mfloat-abi=hard -mfpu=neon -mno-thumb |
| 16 | optflags: armv7thl -O0 -g -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb |
| 17 | optflags: armv7tnhl -O0 -g -march=armv7-a -mfloat-abi=hard -mfpu=neon -mthumb |
| 18 | }}} |
| 19 | |
| 20 | In addition I added this into ~/.rpmmacros |
| 21 | {{{ |
| 22 | %debug_package %{nil} |
| 23 | }}} |
| 24 | |
| 25 | and in the ofono.spec file i changed the install section to: |
| 26 | |
| 27 | {{{ |
| 28 | %install |
| 29 | export DONT_STRIP=1 |
| 30 | rm -rf %{buildroot} |
| 31 | }}} |
| 32 | |
| 33 | and for the Version I changed in the ofono.spec |
| 34 | {{{ |
| 35 | Version: 1.14+guhl01 |
| 36 | }}} |
| 37 | |
| 38 | There is an error in the date format of one line in the rpm/ofono.changes. '''Change that line'''! |
| 39 | |
| 40 | === building === |
| 41 | I did the initial build with |
| 42 | |
| 43 | {{{ |
| 44 | mb2 -s rpm/ofono.spec -t $VENDOR-$DEVICE-armv7hl build |
| 45 | }}} |
| 46 | later builds I just did with (in the ofono directory where the Makefile is) |
| 47 | {{{ |
| 48 | sb2 -t $VENDOR-$DEVICE-armv7hl |
| 49 | make |
| 50 | }}} |
| 51 | |
| 52 | === install === |
| 53 | The first install i did using rpm |
| 54 | {{{ |
| 55 | rpm -e --nodeps ofono |
| 56 | rpm -i /home/nemo/ofono-1.14+guhl01-1.armv7hl.rpm |
| 57 | }}} |
| 58 | after that i just copied the ofonod executabel to /usr/sbin/ofonod |
| 59 | |
| 60 | === debug === |
| 61 | on the phone: |
| 62 | {{{ |
| 63 | export OFONO_ARGS=--noplugin=he910,dun_gw_bluez5,hfp_bluez5,hfp_ag_bluez5,cdma_provision,bluez5,isimodem,n900,u8500,qmimodem,gobi,cdmamodem,isiusb,nwmodem,ztemodem,iceramodem,huaweimodem,calypsomodem,swmodem,mbmmodem,hsomodem,ifxmodem,stemodem,dunmodem,hfpmodem,speedupmodem,phonesim |
| 64 | gdbserver :3050 /usr/sbin/ofonod -n -d $OFONO_ARGS |
| 65 | }}} |
| 66 | |
| 67 | on the pc: |
| 68 | {{{ |
| 69 | ddd --debugger /usr/bin/arm-linux-gnueabi-gdb |
| 70 | }}} |
| 71 | change the path to where ever your ddd --debugger /usr/bin/arm-linux-gnueabi-gdb is. |
| 72 | |
| 73 | Then set your breakpoints and continue |
| 74 | |
| 75 | |