Sources Kernel Huawei Sonic U8650 + .config - Android Software/Hacking General [Developers Only]

Download Sources Huawei Sonic U8650
Download the Kernel Sources of Huawei Sonic from this link ---> Here
Direct Link ---> Here
There are about 430 mb as the source contains more Huawei terminal.
Configuration file (. Config)
This file is not present inside the Huawei's rom and not present into boot.img.
But we can find this file into the kernel that we have previously downloaded.
We can find this file in this directory ---> kernel/arch/arm/configs/hw_msm7227_defconfig of 70,4 kb
Take this file ---> hw_msm7227_deconfig copy it into the kernel directory and now change in .config.
hw_msm7227_deconfig ---> .config
Done.
Now we are ready to compile our kernel.
Good Work.
Bye

where can i download the kernel sources for sonic?

carlonchete said:
where can i download the kernel sources for sonic?
Click to expand...
Click to collapse
Try Direct link.....

Hello.
I have downloaded these sources. Setting the crossdev environment in Gentoo was a breezed, and I had no problem compiling the kernel. Well, to tell the truth, I got an error, but was able to pass through by setting CONFIG_NO_ERROR_ON_MISMATCH=y'
Code:
LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0xe474): Section mismatch in reference from the function msm_map_io.clone.0() to the (unknown reference) .init.data:(unknown)
The function msm_map_io.clone.0() references
the (unknown reference) __initdata (unknown).
This is often because msm_map_io.clone.0 lacks a __initdata
annotation or the annotation of (unknown) is wrong.
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
make[1]: *** [vmlinux.o] Error 1
make: *** [vmlinux.o] Error 2
I have no idea if that can have further implications, but that's not what I wanted to ask you anyway.
My question is, what do I do with this thing now?
I've managed to cat /dev/mtd/mtd0 to /sdcard/mtd0, but that gives me a file that is not recognized by Gentoo as an fs of any kind. It could be some kind of custom file with a kernel plus an initrd inside of it, because that's what I read some mobiles do on their boot partition, but there's really no info about this, that I can find.
I guess that if you posted to compile the kernel you also know how to disassemble this boot image. So, can you, please, give me any pointers?
PS. I also tried to mount this as yaffs2, as that seems to be the format for the other fs's inside the phone, as per the output for "mount | grep mtd". Unfortunately, in linux, it doesn't work (yes, I compile yaffs2 myself as a kernel module). I also tried mounting it in my phone, two times, the result was that the boot was corrupted and the next time I booted my phone I had to reflash it with the stock rom to get it booting again with factory settings

Related

Need help to recompe kernel for the Nordic HTC Magic to support netfilter/iptables

Hi all!
As many of you might already know we have gotten a HTC Magic here in Scandinavia without support for netfilter and iptables. I've been trying to recompile a new version of the kernel on my x86_64 Archlinux box while adding these lines to the .config which I exported from my rooted phone:
Code:
CONFIG_NETFILTER=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_STATE=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=Y
I am a n00b when it comes to compiling, booting and flashing Android stuff and not really a git wizard either. I've downloaded the source, cross-compiled it with my new .config and tried booting it with fastboot only to stare at the HTC logo for 15 minutes before giving up. I suspect that I have probably failed doing the right thing at more than one step in the process but have troubles finding a full guide for Android kernel hacking and loading on the web. I am not even sure if I really compiled the 2.6.27 version used in the daldroid build I have on the phone instead of the latest version in git.
I will provide the step-by-step details below.
1. Downloading and installing the CodeSourcery Cross-compiler from
HTML:
http://www.codesourcery.com/sgpp/lite/arm/portal/release858
2. Downloading setting up the android source code:
Code:
git clone git://android.git.kernel.org/kernel/msm.git
git checkout --track -b msm_htc origin/android-msm-2.6.27
git checkout -f
(here I noticed that the checkouts did not seem to download any extra code, is that expected?)
3. Setting up the cross compilation in the Makefile.
Code:
CROSS_COMPILE=../arm-2009q1/bin/arm-none-linux-gnueabi-
4. Using my .config when running make like this:
Code:
make zImage ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
(a few additional options not present in the .config-file need to be manually specified before the build starts)
5. Extracting the ramdisk from the nordic daldroid boot.img:
Code:
split_bootimg.pl boot.img
5. Trying the new kernel with the daldroid ramdisk:
Code:
fastboot boot arch/arm/boot/zImage ../../boot.img-ramdisk.daldroid.gz
creating boot image...
creating boot image - 1634304 bytes
downloading 'boot.img'... OKAY
booting... OKAY
6. Fail
I would really appreciate some help to get this going. How can I confirm that 2.6.27 was really used? What other gotchas I have forgotten about?
CONFIG_MACH_SAPPHIRE=y
ridli said:
CONFIG_MACH_SAPPHIRE=y
Click to expand...
Click to collapse
Hmm, unfortunately this option is already set to true.
Perhaps it is mainly a fastboot problem. I dunno.
maybe but why you dont try to make a boot.img and flash it?
did you set the system type to msm? it is important.
copy here your .config, maybe we can try to see if something is wrong or you can do this.
Code:
make ARCH=arm CROSS_COMPILE=../arm-2009q1/bin/arm-none-linux-gnueabi- msm_defconfig
for do a default msm .config.
For what I've seen, you're not making a kernel+ramdisk image, but loading them both splitted. Maybe you're missing the command line parametters?
Also, you can patch the kernel code to make it light up one of the leds so you can know if at least the kernel is actually booting or is getting stucked somewhere. To make this, you can patch, on board-sapphire.c, the init function:
Code:
static void __init sapphire_init(void)
{
int rc;
printk("sapphire_init() revision = 0x%X\n", system_rev);
/*
* Setup common MSM GPIOS
*/
config_gpios();
msm_hw_reset_hook = sapphire_reset;
msm_acpu_clock_init(&sapphire_clock_data);
/* adjust GPIOs based on bootloader request */
printk("sapphire_init: cpld_usb_hw2_sw = %d\n", cpld_usb_h2w_sw);
gpio_set_value(SAPPHIRE_GPIO_USB_H2W_SW, cpld_usb_h2w_sw);
[] INSERT HERE:
gpio_set_value(SAPPHIRE_CPLD_LED_BASE+XX, 1);
Where XX is the led number you want to enable.
Any progresses ?
shwan_3 said:
Any progresses ?
Click to expand...
Click to collapse
Not yet, but the posts above are encouraging. I'll post my .config below.
My .config
I stripped all the '#' commented lines from the file to have it go below the 1000 lines limit.
Code:
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_MMU=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_SUPPORTS_AOUT=y
CONFIG_ZONE_DMA=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_OPROFILE_ARMV6=y
CONFIG_OPROFILE_ARM11_CORE=y
CONFIG_VECTORS_BASE=0xffff0000
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_PANIC_TIMEOUT=5
CONFIG_EMBEDDED=y
CONFIG_UID16=y
CONFIG_KALLSYMS=y
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_COMPAT_BRK=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_ASHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLAB=y
CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_KMOD=y
CONFIG_BLOCK=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_DEFAULT_AS=y
CONFIG_DEFAULT_IOSCHED="anticipatory"
CONFIG_CLASSIC_RCU=y
CONFIG_ARCH_MSM7XXX=y
CONFIG_ARCH_MSM7201A=y
CONFIG_MACH_TROUT=y
CONFIG_MACH_SAPPHIRE=y
CONFIG_HTC_BATTCHG=y
CONFIG_HTC_PWRSINK=y
CONFIG_MSM_AMSS_VERSION=6225
CONFIG_MSM_AMSS_VERSION_6225=y
CONFIG_MSM_AMSS_SUPPORT_256MB_EBI1=y
CONFIG_MSM_DEBUG_UART_NONE=y
CONFIG_MSM7XXX_USE_GP_TIMER=y
CONFIG_MSM7XXX_SLEEP_MODE_POWER_COLLAPSE_SUSPEND=y
CONFIG_MSM7XXX_SLEEP_MODE=0
CONFIG_MSM7XXX_IDLE_SLEEP_MODE_POWER_COLLAPSE=y
CONFIG_MSM7XXX_IDLE_SLEEP_MODE=1
CONFIG_MSM7XXX_IDLE_SLEEP_MIN_TIME=20000000
CONFIG_MSM7XXX_IDLE_SPIN_TIME=80000
CONFIG_MSM_IDLE_STATS=y
CONFIG_MSM_IDLE_STATS_FIRST_BUCKET=62500
CONFIG_MSM_IDLE_STATS_BUCKET_SHIFT=2
CONFIG_MSM_IDLE_STATS_BUCKET_COUNT=10
CONFIG_MSM_FIQ_SUPPORT=y
CONFIG_MSM_SERIAL_DEBUGGER=y
CONFIG_MSM_SMD=y
CONFIG_MSM_ONCRPCROUTER=y
CONFIG_MSM_RPCSERVERS=y
CONFIG_MSM_CPU_FREQ=y
CONFIG_MSM_CPU_FREQ_MSM7K=y
CONFIG_MSM_CPU_FREQ_SCALING_MAX=528000
CONFIG_MSM_CPU_FREQ_SCALING_MIN=384000
CONFIG_MSM_HW3D=y
CONFIG_MSM_ADSP=y
CONFIG_HTC_HEADSET=y
CONFIG_HTC_ACOUSTIC=y
CONFIG_WIFI_CONTROL_FUNC=y
CONFIG_WIFI_MEM_PREALLOC=y
CONFIG_CPU_32=y
CONFIG_CPU_V6=y
CONFIG_CPU_32v6=y
CONFIG_CPU_ABRT_EV6=y
CONFIG_CPU_PABRT_NOIFAR=y
CONFIG_CPU_CACHE_V6=y
CONFIG_CPU_CACHE_VIPT=y
CONFIG_CPU_COPY_V6=y
CONFIG_CPU_TLB_V6=y
CONFIG_CPU_HAS_ASID=y
CONFIG_CPU_CP15=y
CONFIG_CPU_CP15_MMU=y
CONFIG_ARM_THUMB=y
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_PREEMPT=y
CONFIG_HZ=100
CONFIG_AEABI=y
CONFIG_ARCH_FLATMEM_HAS_HOLES=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_RESOURCES_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_ALIGNMENT_TRAP=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE="mem=64M console=ttyMSM,115200n8"
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_DEFAULT_GOV_MSM7K=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_MSM7K=y
CONFIG_BINFMT_ELF=y
CONFIG_PM=y
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_HAS_WAKELOCK=y
CONFIG_HAS_EARLYSUSPEND=y
CONFIG_WAKELOCK=y
CONFIG_WAKELOCK_STAT=y
CONFIG_USER_WAKELOCK=y
CONFIG_EARLYSUSPEND=y
CONFIG_FB_EARLYSUSPEND=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_NETFILTER=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_STATE=y
CONFIG_IP_NF_FILTER=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_ASK_IP_FIB_HASH=y
CONFIG_IP_FIB_HASH=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_ANDROID_PARANOID_NETWORK=y
CONFIG_BT=y
CONFIG_BT_L2CAP=y
CONFIG_BT_SCO=y
CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=y
CONFIG_BT_HIDP=y
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_H4=y
CONFIG_BT_HCIUART_LL=y
CONFIG_FIB_RULES=y
CONFIG_RFKILL=y
CONFIG_RFKILL_LEDS=y
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_EXTRA_FIRMWARE=""
CONFIG_MTD=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
CONFIG_MTD_MSM_NAND=y
CONFIG_BLK_DEV=y
CONFIG_MISC_DEVICES=y
CONFIG_ANDROID_PMEM=y
CONFIG_TIMED_OUTPUT=y
CONFIG_TIMED_GPIO=y
CONFIG_BINDER_IPC=y
CONFIG_KERNEL_DEBUGGER_CORE=y
CONFIG_LOW_MEMORY_KILLER=y
CONFIG_LOGGER=y
CONFIG_ANDROID_RAM_CONSOLE=y
CONFIG_ANDROID_RAM_CONSOLE_ENABLE_VERBOSE=y
CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION=y
CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION_DATA_SIZE=128
CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION_ECC_SIZE=16
CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION_SYMBOL_SIZE=8
CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION_POLYNOMIAL=0x11d
CONFIG_HAVE_IDE=y
CONFIG_MD=y
CONFIG_BLK_DEV_DM=y
CONFIG_DM_DEBUG=y
CONFIG_DM_CRYPT=y
CONFIG_DM_UEVENT=y
CONFIG_NETDEVICES=y
CONFIG_DUMMY=y
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
CONFIG_SMC91X=y
CONFIG_NETDEV_1000=y
CONFIG_NETDEV_10000=y
CONFIG_PPP=y
CONFIG_PPP_ASYNC=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_BSDCOMP=y
CONFIG_SLHC=y
CONFIG_MSM_RMNET=y
CONFIG_INPUT=y
CONFIG_INPUT_EVDEV=y
CONFIG_INPUT_KEYRESET=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_ELAN_I2C_8232=y
CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_UINPUT=y
CONFIG_INPUT_GPIO=y
CONFIG_INPUT_KEYCHORD=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_MSM=y
CONFIG_SERIAL_MSM_CLOCK_CONTROL=y
CONFIG_SERIAL_MSM_RX_WAKEUP=y
CONFIG_SERIAL_MSM_HS=y
CONFIG_UNIX98_PTYS=y
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_MSM=y
CONFIG_SENSORS_AKM8976=y
CONFIG_SENSORS_PCA963X=y
CONFIG_SENSORS_MT9T013=y
CONFIG_SENSORS_MT9P012=y
CONFIG_POWER_SUPPLY=y
CONFIG_SSB_POSSIBLE=y
CONFIG_DAB=y
CONFIG_VIDEO_OUTPUT_CONTROL=y
CONFIG_FB=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
CONFIG_FB_MSM=y
CONFIG_FB_MSM_LOGO=y
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_FUNCTION=y
CONFIG_USB_FUNCTION_MSM_HSUSB=y
CONFIG_USB_FUNCTION_ADB=y
CONFIG_USB_FUNCTION_MASS_STORAGE=y
CONFIG_MMC=y
CONFIG_MMC_UNSAFE_RESUME=y
CONFIG_MMC_EMBEDDED_SDIO=y
CONFIG_MMC_PARANOID_SD_INIT=y
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_PARANOID_RESUME=y
CONFIG_MMC_MSM7XXX=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_CPLD=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_SLEEP=y
CONFIG_SWITCH=y
CONFIG_SWITCH_GPIO=y
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
CONFIG_RTC_INTF_ALARM=y
CONFIG_RTC_DRV_MSM7XXX=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_JBD=y
CONFIG_FS_MBCACHE=y
CONFIG_FS_POSIX_ACL=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_FAT_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_PROC_FS=y
CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_YAFFS_FS=y
CONFIG_YAFFS_YAFFS1=y
CONFIG_YAFFS_YAFFS2=y
CONFIG_YAFFS_AUTO_YAFFS2=y
CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_PRINTK_TIME=y
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=1024
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DETECT_SOFTLOCKUP=y
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
CONFIG_SCHED_DEBUG=y
CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
CONFIG_DEBUG_PREEMPT=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_SPINLOCK_SLEEP=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_VM=y
CONFIG_DEBUG_SG=y
CONFIG_FRAME_POINTER=y
CONFIG_HAVE_FTRACE=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_TWOFISH=y
CONFIG_CRYPTO_TWOFISH_COMMON=y
CONFIG_CRYPTO_HW=y
CONFIG_BITREVERSE=y
CONFIG_CRC_CCITT=y
CONFIG_CRC32=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_REED_SOLOMON=y
CONFIG_REED_SOLOMON_ENC8=y
CONFIG_REED_SOLOMON_DEC8=y
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
biktor_gj said:
For what I've seen, you're not making a kernel+ramdisk image, but loading them both splitted. Maybe you're missing the command line parametters?
Where XX is the led number you want to enable.
Click to expand...
Click to collapse
Yeah, that could be a problem. I was under the impression that fastboot built the boot.img itself before transfering the kernel to the phone.
Interesting test with the leds. I'll check it out if I don't solve this.
I'm working on the exact same thing. can you contact me via im? pm for my screen names
I think that HTC patched some things in that are not available in the source tree... So I doubt that you'll be able to get a kernel running build from source. If you do happen to make it run let us know
Amon_RA said:
I think that HTC patched some things in that are not available in the source tree... So I doubt that you'll be able to get a kernel running build from source. If you do happen to make it run let us know
Click to expand...
Click to collapse
I would not be suprised at all if that was the case. However, since the Linux kernel is GPL, such patches, as I understand it, also need to be under the GPL and made available upon request. Is there a public HTC source tree anywhere?
And btw, how can I fix the "recompile" misspelling in the title of this thread? It is driving me insane
This might be a very stupid question, but here it goes:
Shouldn't it be possible to build all the extra netfilter/iptables support for the vanilla 2.6.27 kernel as modules and insmod them when running HTC's kernel? Or will that result in swift and horrible death?
i don't see why it wouldn't. we wouldn't need the source for htc's kernel then, right? just figure out how to build the modules? isn't that kind of how proprietary video drivers work for linux?
EDIT: Modules will work, that is certain. A little googling confirmed that's how wlan and such work (on Android)
EDIT 2: It seems like there is .config for the kernel on the phone that can be used with the standard 2.6.27 kernel source to build the android kernel.
EDIT 3: found the kernel here http://github.com/zhoukejun/android-2.6.27-yf255/tree/master
sammypwns said:
i don't see why it wouldn't. we wouldn't need the source for htc's kernel then, right? just figure out how to build the modules? isn't that kind of how proprietary video drivers work for linux?
EDIT: Modules will work, that is certain. A little googling confirmed that's how wlan and such work (on Android)
EDIT 2: It seems like there is .config for the kernel on the phone that can be used with the standard 2.6.27 kernel source to build the android kernel.
EDIT 3: found the kernel here http://github.com/zhoukejun/android-2.6.27-yf255/tree/master
Click to expand...
Click to collapse
I wonder if access to the kernel can help with the Bluetooth problems in the Hero ROM?
Bump!
Is there any news about iptables on PVT 32A based sapphire?
gboddina said:
Bump!
Is there any news about iptables on PVT 32A based sapphire?
Click to expand...
Click to collapse
Well. The kernels that we successfully have built by cross-compiling refuse to boot. Looking at the config.gz that the phone exports and trying
Code:
make oldconfig
we have learnt that HTC has a lot of parameters specified for code that appears not to be in the standard android 2.6.27 kernel source tree. We would be very very happy if someone around here could point us to the repository holding HTC specific patches and code for the Magic/Sapphire.
Based on http://www.mail-archive.com/[email protected]/msg00442.html , it seems we need to find the source of the android-msm-htc-2.6.27 kernel.
Which don't seems to be public.
gboddina said:
Based on http://www.mail-archive.com/[email protected]/msg00442.html , it seems we need to find the source of the android-msm-htc-2.6.27 kernel.
Which don't seems to be public.
Click to expand...
Click to collapse
But it has to be made public if requested. That is essence of the GPL.
i emailed them a while ago. i also talked to someone who has gotten his own kernels to boot but on the dream dev phone

Kernels!

Hi all,
I so wish I knew how to develop because I hate to ask, I would much rather do and share. But man Asus has posted the Kernel for JB and I would love for a good tweaked OC'ed Kernel. Sooooo, please!
Sadly there are no kernel developers for the 300t at the moment. Asus had all the kernel sources on the Asus website and i guess nobody tried to build their own.
Sent from my ASUS Transformer Pad TF300T using xda app-developers app
ASUS has removed the proprietary code from the kernel, you can download it
but it wont build until you remove references to the missing code then some
of the tablet hardware does not work. so you are left to reverse engineer the
missing code from the chip spec's and manual probing of the hardware.
EDIT: NVM finely got it to build, time to see what's not working.
untermensch said:
ASUS has removed the proprietary code from the kernel, you can download it
but it wont build until you remove references to the missing code then some
of the tablet hardware does not work. so you are left to reverse engineer the
missing code from the chip spec's and manual probing of the hardware.
Click to expand...
Click to collapse
Really ?
As far as I can tell the V10.4.2.9 kernel source from Asus website builds just fine (with one minor correction).
But perhaps I'm missing your point, sorry in that case.
My biggest problem so far is to successfully flash a custom kernel on JB custom ROM (ASU-JellyBean-Hydro 1.4.6).
This leads me to my actual question:
Anyone managed to successfully flash seanzscreams' modded kernel (Asu-JellyBean-HYDROKernel.zip)
on his excellent ROM ASU-JellyBean-Hydro 1.4.6 ?
As far as I can tell the entire kernel flash process seems to finish successfully (using TWRP 2.2.2.0)
but when checking kernel version in Settings it seems to be the same (stock) version as previously,
3.1.10-00003-g6293ea6 [email protected] #1 SMP PREEMPT Thu Aug 9 15:59:38 CST 2012
Looking forward for any ideas/tips.
(I know question better belongs in the Dev forum, but as I just registered at XDA I'm not allowed to post there.)
I got it to build using, tegra3_android_defconfig was trying the cardhu_defconfig before.
builds but does not boot :-<
untermensch said:
I got it to build using, tegra3_android_defconfig was trying the cardhu_defconfig before.
builds but does not boot :-<
Click to expand...
Click to collapse
OK, this indicates at least you have managed to get your custom kernel to run/load, very interesting.
Do you flash an update.zip using CWM/TWRP or using fastboot method sending blob to boot partition (LNX) ?
Care to share more details how you get from resulting zImage from build to something flashable ?
Something like this...
1. cp arch/arm/boot/zImage kernel.gz
2. repack-bootimg.pl kernel.gz ramdisk boot.blob.lnx
3. blobpack boot.blob LNX boot.blob.lnx
?
I am using the same scripts that I use to build the CWM-Touch.blob, I just replace
the stock kernel with the on I have built, then use fastboot to install the new recovery
it just stalls.
untermensch said:
I am using the same scripts that I use to build the CWM-Touch.blob, I just replace
the stock kernel with the on I have built, then use fastboot to install the new recovery
it just stalls.
Click to expand...
Click to collapse
Thanks, but I'm a bit confused...
How does kernel and recovery (CWM-Touch.blob) relate ?
I was of the impression that a recovery image is to be flashed to the recovery partition (SOS), e.g.,
fastboot.exe -i 0x0B05 flash recovery <blob>
...while kernel+ramdisk to boot partition (LNX), e.g.,
fastboot.exe -i 0x0B05 flash boot <blob>
Are the build scripts you mention publicly available and directions of where to look if that's the case ?
a recovery is just a kernel and ramdisk with the recovery executable.
the stock LNX and SOS kernel have the same md5 sum so it does not matter
which partition I test the kernel on, it was just convenient for me to test it on
the SOS partition.
I got most of the tools to pack a SOS blob here
https://github.com/skirata/android-utils
I had to build a newer version of the blob tools
https://github.com/AndroidRoot/BlobTools
gaze57 said:
Thanks, but I'm a bit confused...
How does kernel and recovery (CWM-Touch.blob) relate ?
I was of the impression that a recovery image is to be flashed to the recovery partition (SOS), e.g.,
fastboot.exe -i 0x0B05 flash recovery <blob>
...while kernel+ramdisk to boot partition (LNX), e.g.,
fastboot.exe -i 0x0B05 flash boot <blob>
Are the build scripts you mention publicly available and directions of where to look if that's the case ?
Click to expand...
Click to collapse
Probably I can answer some of my questions myself...
Obviously both recovery and boot partition each contain a kernel+ramdisk of their own.
The difference is probably that,
- in the recovery partition the ramdisk actually contains the complete filesystem, including
the recovery application (e.g. TWRP) and everything is just meant to run from RAM.
while,
-in the boot partition there is only a minimal ramdisk enabling proper loading of the
system partition (called APP if not mistaken).
Perhaps my problem is just that kernel command line is not correct or simething similar.
Also I just discovered that fastboot.exe has a command called "boot" which actually might
be a much faster way to test custom kernels. Have to try it out...
I tried the fastboot boot commands wont even boot the stock kernel, it kinda seems like ASUS does not
want custom kernels to be run on the tablet.
Has ASUS ever wanted custom kernels running on there stuff? Anyway, the did give us a unlock for the boot loader, so looks to me like they are taking the, can't beat make sure they can return'em approach.
untermensch said:
I tried the fastboot boot commands wont even boot the stock kernel, it kinda seems like ASUS does not
want custom kernels to be run on the tablet.
Click to expand...
Click to collapse
gaze57 said:
Really ?
As far as I can tell the V10.4.2.9 kernel source from Asus website builds just fine (with one minor correction).
But perhaps I'm missing your point, sorry in that case.
My biggest problem so far is to successfully flash a custom kernel on JB custom ROM (ASU-JellyBean-Hydro 1.4.6).
This leads me to my actual question:
Anyone managed to successfully flash seanzscreams' modded kernel (Asu-JellyBean-HYDROKernel.zip)
on his excellent ROM ASU-JellyBean-Hydro 1.4.6 ?
As far as I can tell the entire kernel flash process seems to finish successfully (using TWRP 2.2.2.0)
but when checking kernel version in Settings it seems to be the same (stock) version as previously,
3.1.10-00003-g6293ea6 [email protected] #1 SMP PREEMPT Thu Aug 9 15:59:38 CST 2012
Looking forward for any ideas/tips.
(I know question better belongs in the Dev forum, but as I just registered at XDA I'm not allowed to post there.)
Click to expand...
Click to collapse
I unpacked the Asu-JellyBean-HYDROKernel.zip kernel looks like the stock kernel, any changes
have probably been made to the initrd so the kernel version would not change.
Code:
43538fd617c95623ce71fa39897f4a94 zImage
43538fd617c95623ce71fa39897f4a94 ../boot.blob.lnx-kernel.gz
zImage is the stock kernel I use for the touch recovery and boot.blob.lnx-kernel.gz is
the unpacked Asu-JellyBean-HYDROKernel.zip kernel the md5 sums are the same.
Just for ****s and giggles, I unpacked the stock kernel zImage found the string
Code:
[email protected]
and changed it to
Code:
[email protected]
repacked to a zImage with a md5 sum of
Code:
727525cb198a130dfd532cfbde713d29
made a recovery and flashed via fastboot, and it booted fine. This proves that
the new bootloader is not checking the signature of the kernel against a stored
value so custom kernels are possible and I'm just not smart enough to build
a working kernel form the ASUS source.
That's funny, someone out there is, Man just an OC'ed Kernel would be awesome. Since EzOverclock doesn't work with JB you I can really tell the difference in speed on JB.
untermensch said:
Just for ****s and giggles, I unpacked the stock kernel zImage found the string
Code:
[email protected]
and changed it to
Code:
[email protected]
repacked to a zImage with a md5 sum of
Code:
727525cb198a130dfd532cfbde713d29
made a recovery and flashed via fastboot, and it booted fine. This proves that
the new bootloader is not checking the signature of the kernel against a stored
value so custom kernels are possible and I'm just not smart enough to build
a working kernel form the ASUS source.
Click to expand...
Click to collapse
I pulled the config from my tf300 and and managed to build the zImage
I get warning notices about the one of the mpu sensors
if you get it to flash that might be something that may not work
as for myself, I'll be looking into some UMS features, we'll see how far I get
it appears all the needed code is already included in the kernel download from asus,
just need to configure it
Seems I finally managed to build and flash my own JB kernel for the TF300T ! :good:
This will just be a quick and dirty wrap-up of what I did as my spare time is somewhat limited.
Hope to be able to make it more structured and with proper credits in the near future.
Anyone feel free to compile a better structured how-to with correct references and credits.
Quick credits/thanks:
seanzscreams
untermensch
Stuff needed:
- Asus kernel source (10_4_2_9_kernel.zip)
- Android NDK R8B (I'm using Linux version, android-ndk-r8b-linux-x86.tar.bz2)
- Asu-JellyBean-HYDROKernel.zip (to get a proper update package structure with update binary/script and META-INF directory)
- signing-tools.zip, BlobTools and re/unpack-bootimg.pl (can't remember where I found these will have to update post later...)
Preparations:
- Unpack kernel source, e.g. to $HOME/TF300/stock_kernel
- Unpack Android NDK, e.g. to $HOME/android-ndk-r8b
- Unzip Asu-JellyBean-HYDROKernel.zip, e.g. to $HOME/my_kernel
- Setup/install BlobTools and the other scripts
Step-by-step instructions:
1. Build kernel (zImage)
a) Fix minor issue in kernel source
> cd $HOME/TF300/stock_kernel
Change line 11 in file drivers/ril/ril.c
from,
#include <../../arch/arm/mach-tegra/include/mach/board-cardhu-misc.h>
to,
#include "../../arch/arm/mach-tegra/include/mach/board-cardhu-misc.h"
b) Setup build environment for cross compilation
> export PATH=$HOME/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin:$PATH
> export ARCH=arm
> export CROSS_COMPILE=arm-linux-androideabi-
c) Fetch /proc/config.gz from your TF300 and copy/gunzip to $HOME/TF300/stock_kernel/.config
d) Build
> make
If everything went fine you should have a new kernel under,
$HOME/TF300/stock_kernel/arch/arm/boot/zImage
2. Repack kernel
> cd $HOME/my_kernel
a) Create a 28 byte file using a hex editor for the signblob header (I named the file signblob_magic)
It should have the following contents when checked with hexdump:
> hexdump -C signblob_magic
00000000 2d 53 49 47 4e 45 44 2d 42 59 2d 53 49 47 4e 42 |-SIGNED-BY-SIGNB|
00000010 4c 4f 42 2d 00 00 00 00 00 00 00 00 |LOB-........|
0000001c
b) Unpack the boot.blob from Asu-JellyBean-HYDROKernel.zip (unzipped earlier under Preparations)
This step is just to get a proper blob directory structure and the initramfs.
> blobunpack boot.blob
> unpack-bootimg.pl boot.blob.lnx
c) Pack new kernel
Might as well post the script I made to perform this task, check comments.
#!/bin/sh
SRC_HOME=$HOME/TF300/stock_kernel
KERNEL_NAME=my_kernel
# replace kernel
cp ${SRC_HOME}/arch/arm/boot/zImage boot.blob.lnx-kernel.gz
# repack
repack-bootimg.pl boot.blob.lnx-kernel.gz boot.blob.lnx-ramdisk out.blob.lnx
blobpack out.blob LNX out.blob.lnx
# add signblob header
cat signblob_magic out.blob > boot.blob
# create zip package
zip -9 -r ${KERNEL_NAME}.zip boot.blob META-INF/
# Sign zip package using SignApk
java -Xmx1024m -jar signapk.jar -w testkey.x509.pem testkey.pk8 ${KERNEL_NAME}.zip ${KERNEL_NAME}-signed.zip
3. Flash kernel
From previous steps you should now have a signed kernel called,
my_kernel-signed.zip
Flash it using TWRP and reboot.
If flash was OK a blue status bar should appear during boot and then your TF300 will reboot again.
Confirm you have a custom kernel by checking Kernel-version under Settings once system has completed the bootup.
Confirmed! I have built a working kernel from ASUS source not sure if it was the
NDK or pulling the config from the device.
good work gaze57!
Code:
~ # uname -a
Linux localhost 3.1.10 #2 SMP PREEMPT Sat Sep 15 16:49:52 PDT 2012 armv7l GNU/Linux
link to my recovery build setup with source built kernel
http://www.mediafire.com/?hnstxi9so5970y0
EDIT:
it was the config that was causing my previous attempts to fail, I have an Android build setup
with this as the path
Code:
/home/untermensch/Android/android-4.1.1_r4/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/
then these exports
Code:
export ARCH=arm
export SUBARCH=armv7-a-neon
export CROSS_COMPILE=arm-eabi-
then pull the config from the tablet and got a working kernel.
EDIT:
I opened a source repository with the fix to ril.c and the device config saved to arch/arm/configs/tf300t_defconfig
https://github.com/untermensch/tf300t_kernel
Linux kernel
Congratulations guys!
Thanks for sharing your work.
Since you've been keeping your hands busy with the kernel for some time now, I was wondering if you have ever tried to build a Linux system (kernel + working environment) for the TF300, and whether you know it's possible or not.
I've downloaded the kernel from Asus and trying to get tegra3_defconfig to build (currently having problems with "make[1]: *** [arch/arm/mach-tegra/board-cardhu-sensors.o] Error 1". Am I using the right defconfig? Is it possible to build an Android kernel but have it boot a GNU/Linux environment.
I appreciate your help
EDIT: Regarding the error message, it was a bad reference. The file was expected to be in another folder. I fixed the reference and it went on building.
Congratulations Could you try to enable to overclock?

Can not locate config file for product "full_BLU_LIFE_ONE-eng". Stop.

So I have been at my wits end the last couple days trying to figure out exactly what's going on. I have a BLU Life One 2015, (X011Q) which is unsupported on basically every custom ROM/recovery/whatever. There is no repo for it on github, (except my own, which I'm having trouble with, and is the point of this post) no released device tree (if I'm using the right word), the only source code released for it is for the kernel on Android 4.4.4.
This far, I've extracted the required files from the boot.img (I also have the recovery.img and build.prop) using a guide I found on XDA University to build CWM out of the cyanogenmod source code. (I can't post the link to this guide, unfortunately, because I'm too new a user)
Everything in that tutorial goes fine (though it might be worth noting i have to use obbtool instead of otatools) until I get to the point where I have to run "lunch full_’device_name-eng" (For me, this is: lunch full_BLU_LIFE_ONE-eng). When I do, I run into this:
Code:
build/core/product_config.mk:245: *** Can not locate config makefile for product "full_BLU_LIFE_ONE". Stop.
Device BLU_LIFE_ONE not found. Attempting to retrieve device repository from CyanogenMod Github (http //github.com/CyanogenMod).
Repository for BLU_LIFE_ONE not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
build/core/product_config.mk:245: *** Can not locate config makefile for product "full_BLU_LIFE_ONE". Stop.
build/core/product_config.mk:245: *** Can not locate config makefile for product "full_BLU_LIFE_ONE". Stop.
** Don't have a product spec for: 'full_BLU_LIFE_ONE'
** Do you have the right repo manifest?
In case this is helpful:
From build.prop
Code:
ro.product.brand=BLU
ro.product.device=BLU_LIFE_ONE
Files that were extracted with mkvendor.sh:
Code:
AndroidBoard.mk
AndroidProducts.mk
BoardConfig.mk
cm.mk
device_BLU_LIFE_ONE.mk
kernel
recovery.fstab
system.prop
My main thought is that I'm lacking a device tree, but after searching for others, I wonder what else would be in one, and if the files I've got don't constitute some part of the device tree.
TL;DR
Do I need to create a device tree myself for a device that has no support yet whatsoever for any kind of custom ROM/Recovery? And if so, how?
Any and all help is greatly appreciated.

Problem with building a Lineage OS Image (brunch zerofltexx)

Device: SM-G920
Lineage OS installable zip: lineage-17.1-20200606-UNOFFICIAL-zerofltexx (found on https://www.los-legacy.de/17.1/zerofltexx)
I follow the step by step guide on this website: https://wiki.lineageos.org/devices/zerofltexx
I extracted proprietary blobs from block-based OTAs from the zip obtained from the link: https://www.los-legacy.de/17.1/zerofltexx
The OTA doesn't include vendor.transfer.list and vendor.new.dat.br or vendor.new.dat.
During the building step I get this error:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: 'vendor/samsung/zero-common/proprietary/lib/libcamera_metadata.so', needed by '/home/louloulou/android/lineage/out/target/product/zerofltexx/system/lib/libcamera_metadata.so', missing and no known rule to make it
make: *** [build/core/ninja.mk:152 : ninja_wrapper] Erreur 1
make : on quitte le répertoire « /home/louloulou/android/lineage »
Do you have an idea of how to arrange this please?
Thanks a lot!
Cheers!
looks like it is missing some vendor LIB files, try to pull them from stock or AndroidDumps repository, then paste them in the libs folder
Tsumetaay said:
looks like it is missing some vendor LIB files, try to pull them from stock or AndroidDumps repository, then paste them in the libs folder
Click to expand...
Click to collapse
Thanks for the answer Tsumetaay!
Do you know a website where I can get them from?
(They weren't included in the installable zip)
louloui said:
Thanks for the answer Tsumetaay!
Do you know a website where I can get them from?
(They weren't included in the installable zip)
Click to expand...
Click to collapse
you can get it from AndroidDumps repo
some of them are in System/Vendor/Lib, Vendor/Lib or System/Lib, i made things easy to you, so here is the libs you need: https://dumps.tadiphone.dev/dumps/s...-NRD90M-G920FXXS6ETI6-release-keys/system/lib
also if you want to search for another phone just go to the root dir and search for the specific device.
louloui said:
Device: SM-G920
Lineage OS installable zip: lineage-17.1-20200606-UNOFFICIAL-zerofltexx (found on https://www.los-legacy.de/17.1/zerofltexx)
I follow the step by step guide on this website: https://wiki.lineageos.org/devices/zerofltexx
I extracted proprietary blobs from block-based OTAs from the zip obtained from the link: https://www.los-legacy.de/17.1/zerofltexx
The OTA doesn't include vendor.transfer.list and vendor.new.dat.br or vendor.new.dat.
During the building step I get this error:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: 'vendor/samsung/zero-common/proprietary/lib/libcamera_metadata.so', needed by '/home/louloulou/android/lineage/out/target/product/zerofltexx/system/lib/libcamera_metadata.so', missing and no known rule to make it
make: *** [build/core/ninja.mk:152 : ninja_wrapper] Erreur 1
make : on quitte le répertoire « /home/louloulou/android/lineage »
Do you have an idea of how to arrange this please?
Thanks a lot!
Cheers!
Click to expand...
Click to collapse
use the trees from here or here . That guide is out dated. Just clone the local manifest, to .repo/local_manifests and repo sync and you will have all the vendor files, device trees, and kernel.

Matching a kernel's config for compatible kernel modules

I have:
Downloaded the exact kernel version running on my device from an AOSP mirror (4.9.170) (https://github.com/aosp-mirror/kernel_common.git)
Downloaded the exact compiler used to compile the kernel from my device:
Ran `cat /proc/version`, which returns "Linaro GCC 5.3-2016.05", which I downloaded from https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/aarch64-linux-gnu/
Took the kernel configuration from `/proc/config.gz`, copied it to the kernel source directory `kernel_common` as `.config`
Ran `make ARCH=arm64 CROSS_COMPILE=xxx oldconfig`
What I'm seeing:
First, the downloaded kernel source for 4.9.170 seems to think that my `config` is incomplete, since it will prompt me to answer ~15 extra configuration questions.
Second, this old Linaro compiled doesn't appear to support `-fstack-protector-strong` despite it being explicitly enabled in the `/proc/config.gz` file. So I end up disabling it with `./scripts/config --disable CONFIG_CC_STACKPROTECTOR_STRONG`
Finally, after successfully compiling, I take `net/ipv4/tcp_westwood.ko`, just as a test module, and try to load it on my Android device, and it fails:
`insmod: failed to load tcp_westwood_5.ko: Exec format error`
And in dmesg output: `tcp_westwood: disagrees about version of symbol module_layout`
My questions:
Can I assume that the `/proc/config.gz` file is not the actual file used to compile the running kernel, considering it doesn't completely configure the 4.9.170 kernel?
Am I on the right path to getting a kernel module that my kernel will load?
Background information:
I'm hoping this isn't very relevant, but just to head off some questions
This is a T95 Android TV device running what appears to be, to this newbie's eyes, a very Frankenstein'd Android 10 install (See https://www.cnx-software.com/2020/0...-comes-with-mali-g31-gpu-supports-android-10/)
I can't find any official - or unofficial - source for this device, which is why I'm going to all the trouble above.
I really appreciate any help, thank you!

Categories

Resources