[Help] Xperia SP Build error - Firefox OS General

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"

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

[WIP]AOSP GB (compiling)

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.

Sample of Nokia.c found in cyanogenmod-sony-kernel-msm8960 for USB driver.

Was searching for Qualcomm drivers to throw at my Lumia. Same cpu and looks like it was written for PC Suite Mode. Actually there's Nokia stuff all over in the folder I downloaded. Found here http://searchcode.com/codesearch/view/42236209.
Code:
/* nokia.c -- Nokia Composite Gadget Driver
*
* Copyright (C) 2008-2010 Nokia Corporation
* Contact: Felipe Balbi <[email protected]>
*
* This gadget driver borrows from serial.c which is:
*
* Copyright (C) 2003 Al Borchers ([email protected])
* Copyright (C) 2008 by David Brownell
* Copyright (C) 2008 by Nokia Corporation
*
* This software is distributed under the terms of the GNU General
* Public License ("GPL") as published by the Free Software Foundation,
* version 2 of that License.
*/
#include <linux/kernel.h>
#include <linux/utsname.h>
#include <linux/device.h>
#include "u_serial.h"
#include "u_ether.h"
#include "u_phonet.h"
#include "gadget_chips.h"
/* Defines */
#define NOKIA_VERSION_NUM 0x0211
#define NOKIA_LONG_NAME "N900 (PC-Suite Mode)"
/*-------------------------------------------------------------------------*/
/*
* Kbuild is not very cooperative with respect to linking separately
* compiled library objects into one module. So for now we won't use
* separate compilation ... ensuring init/exit sections work to shrink
* the runtime footprint, and giving us at least some parts of what
* a "gcc --combine ... part1.c part2.c part3.c ... " build would.
*/
#include "composite.c"
#include "usbstring.c"
#include "config.c"
#include "epautoconf.c"
#include "u_serial.c"
#include "f_acm.c"
#include "f_ecm.c"
#include "f_obex.c"
#include "f_serial.c"
#include "f_phonet.c"
#include "u_ether.c"
/*-------------------------------------------------------------------------*/
#define NOKIA_VENDOR_ID 0x0421 /* Nokia */
#define NOKIA_PRODUCT_ID 0x01c8 /* Nokia Gadget */
/* string IDs are assigned dynamically */
#define STRING_MANUFACTURER_IDX 0
#define STRING_PRODUCT_IDX 1
#define STRING_DESCRIPTION_IDX 2
static char manufacturer_nokia[] = "Nokia";
static const char product_nokia[] = NOKIA_LONG_NAME;
static const char description_nokia[] = "PC-Suite Configuration";
static struct usb_string strings_dev[] = {
[STRING_MANUFACTURER_IDX].s = manufacturer_nokia,
[STRING_PRODUCT_IDX].s = NOKIA_LONG_NAME,
[STRING_DESCRIPTION_IDX].s = description_nokia,
{ } /* end of list */
};
static struct usb_gadget_strings stringtab_dev = {
.language = 0x0409, /* en-us */
.strings = strings_dev,
};
static struct usb_gadget_strings *dev_strings[] = {
&stringtab_dev,
NULL,
};
static struct usb_device_descriptor device_desc = {
.bLength = USB_DT_DEVICE_SIZE,
.bDescriptorType = USB_DT_DEVICE,
.bcdUSB = __constant_cpu_to_le16(0x0200),
.bDeviceClass = USB_CLASS_COMM,
.idVendor = __constant_cpu_to_le16(NOKIA_VENDOR_ID),
.idProduct = __constant_cpu_to_le16(NOKIA_PRODUCT_ID),
/* .iManufacturer = DYNAMIC */
/* .iProduct = DYNAMIC */
.bNumConfigurations = 1,
};
/*-------------------------------------------------------------------------*/
/* Module */
MODULE_DESCRIPTION("Nokia composite gadget driver for N900");
MODULE_AUTHOR("Felipe Balbi");
MODULE_LICENSE("GPL");
Wow. Looks interesting. Will look through it tommorow.
Don't really know whether it's useful, as I'm not a developer, but this smells like possibility of ANDROID (lol) for Lumia.
Well, N900...
"Nokia composite gadget driver for N900"
ice8lue said:
Well, N900...
"Nokia composite gadget driver for N900"
Click to expand...
Click to collapse
Yes N900 driver in the kernel for a Sony Experia running Android on the same chip used in most Lumias if I am not mistaken. In the right hands maybe useful, maybe not, but thought it interesting....
Hmmm maybe a little closer to a way to flashing unsigned firmware updates?

toolbox.c -- struct - define toolname - tool.h <==== please help me learn this!

Updated with answer: (not sure how much of this is actually needed but it gets you playing with your own custom Android 6.01 Toolbox!)
Trying to compile toolbox.c for some odd reason? Or bionic? Or the libc libraries, all this section of code is super easy.
1. I downloaded the AOSP that matched the build number of the sources for my device
2. I download the sources for my device and merged them in as described in the text file. (basically replace don't merge)
3. I copied in my device specific hardware I found from the AP file of my firmware.
4. I follow instructions both on the AOSP site and on this forum to prepare my platform for building. (stole some settings from cyanogenmod real quick)
5. make modules <==== list of modules
6. make toolbox
words
https://android.googlesource.com/platform/system/core/+/master/toolbox
Here's the code that's stumping me (compiler can't find tools.h and neither can I) It seems to be created on the fly but how does it do it?
Code:
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define TOOL(name) int name##_main(int, char**);
#include "tools.h"
#undef TOOL
static struct {
const char* name;
int (*func)(int, char**);
} tools[] = {
#define TOOL(name) { #name, name##_main },
#include "tools.h"
#undef TOOL
{ 0, 0 },
};
Here's toolbox.c Google Source
https://android.googlesource.com/platform/system/core/+/master/toolbox/toolbox.c

port BlueLightFilter at kernel?

amazing kernel port-er or mode-er are from this section so I post the question at here. I had tried for the past 2 weeks but no luck, so my last resort is to question the genius of xda.
A brief introduction: Samsung stock BlueLightFilter is not using overlay like 3rd part apps, the benefit is it will not get blur when you increase the intensity.
I see no reason why I shouldn't share the thing I already knew to everyone, sharing is caring:
I got some clue to get it working, you have to edit the kernel. I get more specific clue you have to edit the mdnie file
https://forum.xda-developers.com/showpost.php?p=74542731&postcount=327 @BlackMesa123
Which is correct when I check https://forum.xda-developers.com/samsung-a-series/development/advanced-seven-t3509237
https://github.com/jjhitel/ASKernel by @jjhitel it is indeed the mdnie.h, mdnie_lite.c and mdnie_lite_table_A7xe.h that are modified
The code are from G920FXXU5EQAC kernel code, just lucky they spot the same screen size. Not sure how these values are generated:
static unsigned char coordinate_data_2[] = {
0xff, 0xff, 0xff, /* dummy */
0xff, 0xf6, 0xec, /* Tune_1 */
0xff, 0xf7, 0xf0, /* Tune_2 */
0xff, 0xf8, 0xf4, /* Tune_3 */
0xff, 0xf9, 0xed, /* Tune_4 */
0xff, 0xfa, 0xf1, /* Tune_5 */
0xff, 0xfb, 0xf4, /* Tune_6 */
0xff, 0xfc, 0xee, /* Tune_7 */
0xff, 0xfd, 0xf0, /* Tune_8 */
0xff, 0xfe, 0xf4, /* Tune_9 */
};
Advanced Seven rom is the example that someone port it to the rom without blf. But I have no idea what is/are the framework file(s) needed to be modified
I even tried directly take Note 5's mdnie.h, mdnie_lite.c and mdnie_lite_table_ compile and boot with no error but not working.
Then I tried match mdnie_lite_table_noble to my mdnie_lite_table_j7xe.h still boot with no error but not working.
I already added BlueLightFilter apk back but when turn on and off nothing happen.
Here is my device kernel source code
https://github.com/doulcXDA/Nougat-...kernel/drivers/video/exynos/decon_7580/panels
video\exynos\decon_7580\panels\mdnie.h
video\exynos\decon_7580\panels\mdnie_lite.c
video\exynos\decon_7580\panels\mdnie_lite_table_j7xe.h
To sum the question what I want to ask, how to get BlueLightFilter working?
Question is, do both aod and blf need to mod framework.jar to get it working?
I am targeting framework.jar or services.jar but I didn't get anything when compare both jar's smali
Can those godlike experienced master take a look at this for always on display and bluelight filter please?
I have both services.jar and framework.jar from my phone(no blf and aod) and targeting phone(with blf and aod)
services.jar
https://mega.nz/#!LUUVjbxZ!KqP5W7M23PKDt5jhkAiYXjwj1h2IwvGl-cW42u4T6nE
framework.jar
https://mega.nz/#!eU8DWaIb!HEjloERDK91VpNXvYupIdEb4X-7ii-oPKXcp9huf__o
I don't mind alternative approach actually as long as it can filter blue light out like kcal but kcal only support snapdragon not exynos.

Categories

Resources