[WIP]AOSP GB (compiling) - XPERIA X10 General

Hi to all
I'm trying to compile AOSP GB but always fail, the first "error" was this
Code:
build/core/base_rules.mk:78: *** Module name: gps.es209ra
build/core/base_rules.mk:79: *** Makefile location: hardware/qcom/gps/loc_api/libloc_api
build/core/base_rules.mk:80: *
build/core/base_rules.mk:81: * Each module must use a LOCAL_MODULE_TAGS in its
build/core/base_rules.mk:82: * Android.mk. Possible tags declared by a module:
build/core/base_rules.mk:83: *
build/core/base_rules.mk:84: * optional, debug, eng, tests, samples
build/core/base_rules.mk:85: *
build/core/base_rules.mk:86: * If the module is expected to be in all builds
build/core/base_rules.mk:87: * of a product, then it should use the
build/core/base_rules.mk:88: * "optional" tag:
build/core/base_rules.mk:89: *
build/core/base_rules.mk:90: * Add "LOCAL_MODULE_TAGS := optional" in the
build/core/base_rules.mk:91: * Android.mk for the affected module, and add
build/core/base_rules.mk:92: * the LOCAL_MODULE value for that component
build/core/base_rules.mk:93: * into the PRODUCT_PACKAGES section of product
build/core/base_rules.mk:94: * makefile(s) where it's necessary, if
build/core/base_rules.mk:95: * appropriate.
build/core/base_rules.mk:96: *
build/core/base_rules.mk:97: * If the component should be in EVERY build of ALL
build/core/base_rules.mk:98: * products, then add its LOCAL_MODULE value to the
build/core/base_rules.mk:99: * PRODUCT_PACKAGES section of
build/core/base_rules.mk:100: * build/target/product/core.mk
build/core/base_rules.mk:101: *
build/core/base_rules.mk:102: *** user tag detected on new module - user tags are only supported on legacy modules. Alto.
This is fixed but now I get this:
Code:
build/core/base_rules.mk:162: *** device/semc/es209ra/hciattach: MODULE.TARGET.EXECUTABLES.hciattach already defined by external/bluetooth/bluez/tools. Alto.
and idk how to fix it.
If anyone know how to do please help me.

Related

GSM to SD Backup

before upgrading I'll backup the original radio stack. I had used following Hardware, Software and Procedure
Serial Cable Sub9 to Qtek 1010
Tera Term V 2.3 ( 115200/8/n/1)
Flowcontrol serial Port: Hardware, Xon/Xoff tested
same results -1 hour an nothing happens - no finished Backup
Enter Bootloader ...
SDBackup ....
GSM to SD
Output from Tera Term:
******************************************************
InitDebugSerial using SERIAL PORT 2
******************************************************
HTC Bootloader for [Wallaby] Version:5.15
Copyright (c) 1998-2001 High Tech Computer Corporation
Built at: Jun 6 2002 20:29:17
CPU speed = 206 MHz
DRAM speed = 103 MHz
Hardware platform = 2; (0VT, 1re-PV, 2V, 3anasonic LCD, 4:Reserved)
Get resp timeout err, status is 42
Receive Response error, cmd = 41, arg = FFC000
comd1 No Response
Block size = 512 BYTES
Total blocks in Card: 243328 = 121664k bytes
No legal identify flag in SD Card
Wait for turn on GSM...
GSM Turn on time = 1780 ms
FW 0:10:22>HTC UTILITIES PROGRAM FOR WALLABY
Save GSM ROM to SD
Get resp timeout err, status is 42
Receive Response error, cmd = 41, arg = FFC000
comd1 No Response
GSM flash backup start...
Got request time out!!
.
.
.Got request time out!!
******************************************************
who has an idea where the error could be
CE Backup works
The same setting in Tera Term are used by backup CE to SD with following output:
*****************************************************
InitDebugSerial using SERIAL PORT 2
******************************************************
HTC Bootloader for [Wallaby] Version:5.15
Copyright (c) 1998-2001 High Tech Computer Corporation
Built at: Jun 6 2002 20:29:17
CPU speed = 206 MHz
DRAM speed = 103 MHz
Hardware platform = 2; (0VT, 1re-PV, 2V, 3anasonic LCD, 4:Reserved)
Get resp timeout err, status is 42
Receive Response error, cmd = 41, arg = FFC000
comd1 No Response
Block size = 512 BYTES
Total blocks in Card: 243328 = 121664k bytes
No legal identify flag in SD Card
Wait for turn on GSM...
GSM Turn on time = 1780 ms
FW 0:10:22>HTC UTILITIES PROGRAM FOR WALLABY
CE ROM image backup to SD
Get resp timeout err, status is 42
Receive Response error, cmd = 41, arg = FFC000
comd1 No Response
Block size = 512 BYTES
Total blocks in Card: 243328 = 121664k bytes
ImageStartAddress = A0040000
ImageEnd = A2000000
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * END
CheckSum = 0xD4DE987E
Store image to CF card successful
Unless you need to upgrade your radio stack or have problems with it, I would leave it alone.
Radio Version T313
My Prob is that GPRS Connection on other Devices (Samsung, Ericsson, Nokia) work more stable (every GPRS Connection is successful and faster as on the Qtek 1010).
The Radio Upgrade from t-mobile and O2 should increase the Speed up to 33%.
I can't find anywhere on the net my Radio Version T313 nor a Documentation about it.
I'll also will test MMS and other new features.
GSM backup to SD
I have the same problem what you. I it can not make backup original radio stack. Did this be successful Ci to make ? Maybe different way on spare? I look for such RSU T313 or RSU 3.19

Iconia A500 Bricked and do not boot

Hey guys, need some help on my iconia a500
After I flashed a new rom the tablet do not turn on again only the power button light( and charge light) is on, the tablet still turns on after a few combinations of reset button and power button
Does it show anything on the screen at all when turned on? Do you have the stock recovery or a modified one and can you get to it?
http://forum.xda-developers.com/showthread.php?t=1777254
taleot ellie
yaworski said:
http://forum.xda-developers.com/showthread.php?t=1777254
Click to expand...
Click to collapse
The problem is that I`m not a so advanced user, so I didn`t fully understand how to use nvflash and even find the TimmyDeans root tool.
If any of ya could describe how to proceed I would be very gratefull , thx
caio492 said:
The problem is that I`m not a so advanced user, so I didn`t fully understand how to use nvflash and even find the TimmyDeans root tool.
If any of ya could describe how to proceed I would be very gratefull , thx
Click to expand...
Click to collapse
theres a d/l link in my sig to timmydeans EUU
you'll need jazzyjames guide on how to rollback here http://forum.xda-developers.com/showthread.php?t=1516012
Your original issue no boot, black screen and power lite on is apx mode - which is normally used to flash the patched bootloader and a custom recovery, and from there you are able to flash yourself a custom rom... oh, does anything happen when you boot to recovery mode? hold vol down and press power button till the white writing appears "booting recovery kernel image" If thats a no go then....
i'd be tempted to try the nvflash again - if there are no errors u should be good to go. I did a guide here for using nvflash http://forum.xda-developers.com/showthread.php?t=1773323.
and if that doesn't work then timmydeans tool should get u back up and running on HC...oh, your data will get wiped using this.
good luck
dibb_nz said:
theres a d/l link in my sig to timmydeans EUU
you'll need jazzyjames guide on how to rollback here http://forum.xda-developers.com/showthread.php?t=1516012
Your original issue no boot, black screen and power lite on is apx mode - which is normally used to flash the patched bootloader and a custom recovery, and from there you are able to flash yourself a custom rom... oh, does anything happen when you boot to recovery mode? hold vol down and press power button till the white writing appears "booting recovery kernel image" If thats a no go then....
i'd be tempted to try the nvflash again - if there are no errors u should be good to go. I did a guide here for using nvflash http://forum.xda-developers.com/showthread.php?t=1773323.
and if that doesn't work then timmydeans tool should get u back up and running on HC...oh, your data will get wiped using this.
good luck
Click to expand...
Click to collapse
Thx for helping me telling what the problem is, but every thread I searched and every program I used comes to ending asking the damm CPUID, thats the problem right now because I dont have it saved before the problem and every method of getting it doesnt work or needs a fully running tablet wich I don`t have, please help me on this guys thx for your time
caio492 said:
Thx for helping me telling what the problem is, but every thread I searched and every program I used comes to ending asking the damm CPUID, thats the problem right now because I dont have it saved before the problem and every method of getting it doesnt work or needs a fully running tablet wich I don`t have, please help me on this guys thx for your time
Click to expand...
Click to collapse
first link in my sig - to get yr cpuid - theres a method in there to retrieve it while in apx mode or u may be able to get it using one of the other ways
failing that its the "update.zip" method to rollback - doesnt require a cpuid - there is a guide here somewhere - it may be an "unbrick" thread if i come across it i'll post it
once u r back at HC please do a nandroid backup and retrieve the cpuid from the text file in yr backup folder...and keep it somewhere safe....you'll be unable to unbrick and/or flash the bootloader without it
EDIT: although not strictly true - if u cannot get the "update.zip" to work then there is no other way
The first time downgrading can be confusing and time consuming especially if you don't get it first couple of go's
Just be sure to follow the guides as they are written - each step is in that order for a reason
The only other thing you have to have is your drivers installed correctly (which could explain why yr previous attempts
to retreive yr uid haven't worked...???)...Its in the first link!!!
Right, I figured out how to get my CPUID originated from this thread :
http://forum.xda-developers.com/showthread.php?t=1751978
But now every program I use(using the right CPUID and SBK) gives me a different error.
The blackthund3r`s program: A500APXFlash, turn the tablet on bootloader ok but while uploading the .apx image it simply stops the progress bar.
If I use nvflash following srbeen`s tutorial to the line, no matter the option I take ,it boots in boatloader butit give me this error message (see image bellow)
Error message if you can`t see in the picture
Flashing bootloader: bootloader_v8.bin ... * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Nvflash started * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[resume mode] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Formatting partition 4 please wait.. Command Execution failed cmd 13, error 0x120002 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
FAILED! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
command failure: format partition failed (bad command) * * * * * * * * * * * *
bootloader status: unknown operation (code: 1) message: *flags: 0 * * * * * * * * * * * * * * * * * * *
Nvflash started * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[resume mode] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Using the latest version of timmyDean`s tool, guess what, another error. (see image bellow)
Precautions I made :
Fresh driver intstal
Made sure that was in APX mode in every attempt
Incerted the right CPUID or SBK
Sorry for the mess, I`m not such an experienced guy
Come on guys, I`m so close in this one , I really need your help to unbrick my tablet.
Thx already for your time
caio492 said:
Right, I figured out how to get my CPUID originated from this thread :
http://forum.xda-developers.com/showthread.php?t=1751978
But now every program I use(using the right CPUID and SBK) gives me a different error.
The blackthund3r`s program: A500APXFlash, turn the tablet on bootloader ok but while uploading the .apx image it simply stops the progress bar.
If I use nvflash following srbeen`s tutorial to the line, no matter the option I take ,it boots in boatloader butit give me this error message (see image bellow)
Error message if you can`t see in the picture
Flashing bootloader: bootloader_v8.bin ... * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Nvflash started * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[resume mode] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Formatting partition 4 please wait.. Command Execution failed cmd 13, error 0x120002 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
FAILED! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
command failure: format partition failed (bad command) * * * * * * * * * * * *
bootloader status: unknown operation (code: 1) message: *flags: 0 * * * * * * * * * * * * * * * * * * *
Nvflash started * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[resume mode] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Click to expand...
Click to collapse
the latest version 0.4 apxflash tool fixes format errors
Using the latest version of timmyDean`s tool, guess what, another error. (see image bellow)
Precautions I made :
Fresh driver intstal
Made sure that was in APX mode in every attempt
Incerted the right CPUID or SBK
Sorry for the mess, I`m not such an experienced guy
Come on guys, I`m so close in this one , I really need your help to unbrick my tablet.
Thx already for your time
Click to expand...
Click to collapse
yes that iscreen is wot u r sposed to see, wot happened after u connected yr usb cable??
dibb_nz said:
the latest version 0.4 apxflash tool fixes format errors
Click to expand...
Click to collapse
The problem that i`m using the the 0.4v , it may be the .apx that i`m using, if you can recomed one,I would appreciate.
dibb_nz said:
yes that iscreen is wot u r sposed to see, wot happened after u connected yr usb cable??
Click to expand...
Click to collapse
I think that you didn`t understand, that screen is showing a error report after I have inserted my CPUID and he started to ``update`` and iniciated the tablet on bootloader(acer screen/Entering Acer Download Mode on the top), and if I click retry on the bottom of the program, the progress bar keps stuck on the very begining.
And about the nvflash error report??, have any toughts??
caio492 said:
The problem that i`m using the the 0.4v , it may be the .apx that i`m using, if you can recomed one,I would appreciate.
I think that you didn`t understand, that screen is showing a error report after I have inserted my CPUID and he started to ``update`` and iniciated the tablet on bootloader(acer screen/Entering Acer Download Mode on the top), and if I click retry on the bottom of the program, the progress bar keps stuck on the very begining.
And about the nvflash error report??, have any toughts??
Click to expand...
Click to collapse
yeh, sorry didnt see that - Well we're not having much luck here at all, (you do say yes when it asks you to "dump yr bct") yeh u can try using a different bundle with the apx tool - try 1.7.3 cwm and v7 which you can dl thru the tool itself or from civatos bootloader thread
Regarding yr nvflash error - it appears that there are some tabs that end up with a screwed up partition table using the nvflash. The fix for this is to run timmydeans EUU (or apxflash 0.4) which can 'repair' the partition table so you can run the nvflash/apx flash -
So whats the status of your tab at the moment, are you still stuck with the black screen and pwr lite on????? If you are then try lcds method in the cpuid guide, editing the flash command - its worked for a couple of folk.
"I downloaded timmyDean's root-3.2.1-V4.7z
I booted the tablet (in APX mode) and I connected the USB cable to it
in the directory root-3.2.1/Image I run the command
nvflash --bct flash.bct --setbct --odmdata 0x100c0105 --configfile flash.cfg --create --bl bootloader.bin --sbk (your sbk number after converting your UID number) 0xXXXXXXXX 0xXXXXXXXX 0xXXXXXXXX 0xXXXXXXXX --go
without rebooting, I flashed the v7 bootloader and recovery as per the bootloader thread; since the partition table was restored at the previous step, the operation now succeeded;
I rebooted the tablet in recovery, and proceeded to wipe the data and flash a ROM the usual way.
other than that try the update.zip from jnktechstuff http://forum.xda-developers.com/showthread.php?t=1699277 you shouldnt need to dl both roms either one should do the job.
failing that i'm out of ideas - i do know one thing however, what didn't work yesterday may work today - in other words just keep trying the only one that can really fix yr tab now is you!!! also a manual hard reset can sometimes shake yr tab out of its slumber
1) Turn off your tablet,
2) Rotation lock to your left;
3) Press Vol+ (next to arotation lock) and power on simultaneosly
4) As soon as the tablet vibrates you can release the power on button and you should start to switch rotation lock left and right till you see
Erasing Userdata...
Erasing Cache...
Vol+ is still pressed;
5) The tablet starts to format
6) Your tablet will be as clean as it can be.
see if you have any joy with any of that....fingers crossed

[Q] Compile rom without Recovery and kernel

Hi,
I want to compile OmniRom for Grouper (Nexus 7 2012 wifi) without recovery and kernel built-in (I'll flash prebuilt .zips of them).
I have added to BoardConfig.mk these lines
Code:
#added
TARGET_NO_RECOVERY := true
TARGET_NO_KERNEL := true
#
USE_CAMERA_STUB := true
USE_PROPRIETARY_AUDIO_EXTENSIONS := false
BOARD_HAL_STATIC_LIBRARIES := libdumpstate.grouper
TARGET_RECOVERY_UI_LIB := librecovery_ui_grouper
TARGET_RELEASETOOLS_EXTENSIONS := device/asus/grouper
...
but when I try to compile, it gives me this error
Code:
including ./vendor/omni/Android.mk ...
build/core/tasks/kernel.mk:65: ***************************************************************
build/core/tasks/kernel.mk:66: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:67: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:68: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:69: * source repository to kernel/asus/grouper
build/core/tasks/kernel.mk:70: * See http://forum.xda-developers.com/wiki/ROM/Integrated_Kernel_Build
build/core/tasks/kernel.mk:71: * for more information *
build/core/tasks/kernel.mk:72: ***************************************************************
make: *** Nessuna regola per generare l'obiettivo "bacon". Arresto.
What I did is right?
Thanks for the attention.
gorneman said:
Code:
including ./vendor/omni/Android.mk ...
build/core/tasks/kernel.mk:65: ***************************************************************
build/core/tasks/kernel.mk:66: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:67: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:68: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:69: * source repository to kernel/asus/grouper
build/core/tasks/kernel.mk:70: * See http://forum.xda-developers.com/wiki/ROM/Integrated_Kernel_Build
build/core/tasks/kernel.mk:71: * for more information *
build/core/tasks/kernel.mk:72: ***************************************************************
make: *** Nessuna regola per generare l'obiettivo "bacon". Arresto.
What I did is right?
Click to expand...
Click to collapse
Do you have any more errors, or more of the log? Last I checked, that kernel.mk line 65-72 is not a showstopper, just a warning. I've never messed with lines that you've added before. As for the kernel, why don't you compile the kernel from sources you choose? And if you really don't want to do that, why don't use the precompiled kernel, and that inserted in your build?
PonsAsinorem said:
Do you have any more errors, or more of the log? Last I checked, that kernel.mk line 65-72 is not a showstopper, just a warning. I've never messed with lines that you've added before. As for the kernel, why don't you compile the kernel from sources you choose? And if you really don't want to do that, why don't use the precompiled kernel, and that inserted in your build?
Click to expand...
Click to collapse
Thanks, but no luck. I try to include prebuilt kernel, but but gives me an error about overwriting commands.
gorneman said:
Thanks, but no luck. I try to include prebuilt kernel, but but gives me an error about overwriting commands.
Click to expand...
Click to collapse
Maybe some links? I can't really see what you're doing and I'm missing parts of the puzzle.
Can you link me to your device tree? And to the kernel source? A full build log, including commands, uploaded to pastebin would be nice as well.
Also, have you tried compiling the kernel with the build? That is the preferred method. And if you insist on using a prebuilt, I'd try the method below, instead of skipping.
Here's some good reading in the meantime: http://wiki.cyanogenmod.org/w/Doc:_...Step_4._Configuring_the_fallback_to_prebuilts
http://pastebin.com/neh14Aj4 build log
http://pastebin.com/fURqBpMQ boardCommonConfig
My device is Grouper (Nexus 7 2012 Wifi) and I follow this wiki page (grouper instead of tilapia).
Thanks
If I do "brunch" in term :
Code:
[email protected] ~/Android/Omni $ brunch
You're building on Linux
Lunch menu... pick a combo:
1. full-eng
Which would you like? [aosp_arm-eng]

Gionee smartphone secrect code

These codes is copied from a chinese forum and I had tested all codes. Some work but some not work. Sorry about my English.
Working code
"* # 8702 #" - Phone hardware testing (with Chinese language. Can anyone translate them??)
"* # 837500 #" - detect mobile version number, date, and phone system
"* # 7552 #" - to check whether the phone is ROOT
"* # * # 4636 # * # *" - check the phone information and battery information
* # * # 8255 # * # * Start GTalk Service Monitor display phone software version
* # 06 # phone original factory serial number (International Mobile Identity)
Not work on my phone
* # * # 34971539 # * # * Display Camera Camera firmware version or update the camera firmware
* # * # 7594 # * # * When long press the shutdown button, there will be a window to switch phone models, including: silent mode , flight mode and shut down, you can use the above code directly into the off button.
* # * # 273283 * 255 * 663282 * # * # * to open a place you can make backup media files, such as photos, sounds and videos
* # * # * # * # 197328640 start the service mode, you can test the phone part of the set and change the setting WLAN, GPS and Bluetooth Test code
* # * # 232338 # * # * Display WiFi MAC address
* # * # 1472365 # * # * GPS test
* # * # 1575 # * # * Other GPS test
* # * # 232331 # * # * Bluetooth test
* # * # 232337 # * # Display the Bluetooth device address
* # * # 0 * # * # * LCD test
* # * # 0842 # * # * device testing, such as vibration, brightness
* # * # 2663 # * # * Touch screen version
* # * # 2664 # * # * Touch screen test
* # * # 0588 # * # * proximity sensor test
* # * # 3264 # * # * memory version
Have fun all.
Gionee secrets
Hello,
Thanks for these codes, I am trying to disable H/H+ switch on my Gionee Dream D1. I have a lot of connection drops.
The chinese menu is:
- automatic test
- hardware test
- test report
- restore factory settings
------------------------------- exit
You can use Google Image Translate to further translate this, but you need another phone obviously.
I am trying to find the 3G settings, can someone tell me where to look?
Is there another code for the "real" hidden service menu?
Cheers.
UPDATE:
Haven't found anything useful in this chinese menu, only hardware-specific tests (lcd, sensors, wifi), no settings for 3G or network/broadband selection.
How to root my gionee s plus
Meid invelid code
Thanks for secret codes man! I must appreciate it. They work too!

[Help] Xperia SP Build error

I've been working on FFOS for Xperia SP for about 2 months now. Recently i swapped to using AOSP sources for Xperia SP , however this is the error that i get https://gist.github.com/smb237u/8bd6a180eaa464783cee
My sources are here : https://github.com/smb237u/repo-manifests/blob/dev/huashan.xml commit : 70eef1c5a647cc71e9e81a1ecba125c81e347ed5
Thanks!
I've solved that error already but stumbled upon another one :
host C: acp <= build/tools/acp/arch/x86/begin.c
build/tools/acp/arch/x86/begin.c:34:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/arch/x86/begin.o] Error 1
begin.c :
Code:
/*
* Copyright (C) 2012 The Android Open Source Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <stdint.h>
#include <sys/cdefs.h>
extern unsigned __linker_init(void* raw_args);
__LIBC_HIDDEN__ void _start() {
void (*start)(void);
void* raw_args = (void*) ((uintptr_t) __builtin_frame_address(0) + sizeof(void*));
start = (void(*)(void))__linker_init(raw_args);
/* linker init returns (%eax) the _entry address in the main image */
/* entry point expects sp to point to raw_args */
__asm__ (
"mov %0, %%esp\n\t"
"jmp *%1\n\t"
: : "r"(raw_args), "r"(start) :
);
/* Unreachable */
}
/* Since linker has its own version of crtbegin (this file) it should have */
/* own version of __stack_chk_fail_local for the case when it's built with */
/* stack protector feature */
#include "arch-x86/bionic/__stack_chk_fail_local.h"

Categories

Resources