[Q] AMI304 not happy with custom kernel - Optimus One, P500, V General

Hi,
I'm having an issue building and booting a kernel on my Optimus V. Hopefully someone here can help.
I've got the updated VM670 sources (I think), with the kernel package as:
$ md5sum LGVM670_kernel_02.tar.gz
24b000f647c919afb63d68caaf8b6202 LGVM670_kernel_02.tar.gz
I extracted and built this with the stock vendor config. Then I booted it using fastboot with the stock vendor ramdisk and the commandline "mem=477M console=ttyMSM2,115200n8 androidboot.hardware=thunderc".
It boots and runs fine but the accelerometer is unhappy. This repeats several times per second:
I/AmitDaemon( 2009): AMI304+(KR3DM & KR3DH) Middleware Tester (daemon), Version:3.0.30.39L
I/AmitDaemon( 2009): Copyright (c) 2010 all rights preserved by AMIT Technology Inc.
E/AmitDaemon( 2009): Cannot open KR3DH!!!
E/AmitDaemon( 2009): Cannot open KR3DM!!!
The config has "CONFIG_SENSOR_AMI304=y", of course.
Just to be sure, I diffed my config against the standard /proc/config.gz and it looks the same.
Any ideas what could be wrong?
Thanks!

Nevermind, I'm an idiot. The kernel commandline was wrong. It should be:
mem=477M console=ttyMSM2,115200n8 androidboot.hardware=thunderc uart_console=disable recovery=off lge.rev=10
Sorry for the spam.

Related

[ROM] Build Your Own Dell Venue Rom > Froyo > Gingerbread > Ice Cream

I wish to open New Thread for enable focus into developing custom rom for dell venue and expecting get some suggestion, comment, help from other members of this forum :
I have wrote brief guide to prepare build environment and build kernel & rom for dell venue HERE
I do test to emulator and device all build result before posting to this thread, but need other user/member willing to test the build and post any suggestion, comment etc.
Starting by building froyo base rom, to test and ensure the buiild process is correct and exepcting to build further base i.e gingerbread and ice cream sandwich
since I'm terrible noob in android development, help, guide, suggestions are very welcome
-update-
Kernel Build
I have been succesfully "build" a kernel HERE
I splited 408-kernel to "borrow" the ramdisk (To make it easy I renamed file boot.img of 408-kernel into boot408.img.
Code:
[[email protected] venimg-1]$ split_bootimg.pl boot408.img
Page size: 2048 (0x00000800)
Kernel size: 3092536 (0x002f3038)
Ramdisk size: 168270 (0x0002914e)
Second size: 0 (0x00000000)
Board name:
Command line: androidboot.hardware=venue
Writing boot408.img-kernel ... complete.
Writing boot408.img-ramdisk.gz ... complete.
extracted ramdisk
Code:
[[email protected] ramdisk]$ gzip -dc ../boot408.img-ramdisk.gz | cpio -i
561 blocks
edited ro.secure=1 to re.secure=0
recreate cpio archive
Code:
$ mkbootfs ./ramdisk | gzip > ramdisk-408-2.gz
recreate boot image by using new build kernel named zImage-05
Code:
$ mkbootimg --cmdline 'androidboot.hardware=venue console=null' --kernel zImage-05 --ramdisk ramdisk-408-2.gz -o boot408-2.img
flash boot408-2.img > NO LUCKS > NOT BOOTING .. I'm clueless. Anybody give an idea ?
-update-
My failed to make "succesfull build kernel" to "boot" is the absent of info : BOARD_KERNEL_BASE (address) for dell venue. Someone can appoint me where I can get this info?
please test
changkho1908 said:
please test
Click to expand...
Click to collapse
this is very early stage of development build with available source. As I found HERE available ICS Chocolate Branch Manifest for msm7627. I will personally do experiment to build this ICS branch for dell venue.
I still need help from someone to understand and appoint a clue to this information at the end of build process :
Code:
.....
APK certs list: out/target/product/msm7627_surf/obj/PACKAGING/apkcerts_intermediates/msm7627_surf-apkcerts-eng.x.txt
Package target files: out/target/product/msm7627_surf/obj/PACKAGING/target_files_intermediates/msm7627_surf-target_files-eng.x.zip
Package OTA: out/target/product/msm7627_surf/update.zip
./build/tools/releasetools/ota_from_target_files:63: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
unzipping target target-files...
using device-specific extensions in device/qcom/common
[B][I][COLOR="Red"]unable to load device-specific module; assuming none[/COLOR][/I][/B]
done.
sysmtem is alive but boot (kenel) is still NON BOOTABLE ... I believed by working together we will have "something" for this device
The 40x roms are based off of the MSM8x60 branches, as they dont implicitly list 8260 they likely used 8660 as their base.
I dont know if the 8x60 is closer to the 8x50 then the 7627, but just pointing it out.
You might be better off at least getting 2.2/2.3 to boot first, you may very well need to deal with the drivers and at least 2.2/2.3 have working binary-only drivers.
TheManii said:
The 40x roms are based off of the MSM8x60 branches, as they dont implicitly list 8260 they likely used 8660 as their base.
I dont know if the 8x60 is closer to the 8x50 then the 7627, but just pointing it out.
You might be better off at least getting 2.2/2.3 to boot first, you may very well need to deal with the drivers and at least 2.2/2.3 have working binary-only drivers.
Click to expand...
Click to collapse
Dear TheManii,
I believed you are one who having well understanding on this funky smart phone. please let me know qsd8x50 : is the name of processor isnt it > qualcom snap dragon (qsd) and how about MSM8x60 <-- this is name of BOARD of Name or Processor. When coming into building kernel I need to have correct understanding. So far I know only the ARCH. Is there any wiki or site page to refer. This is example when I was on old time with gentoo linux on compiling kernel for PC > Safe Cflags. Board understanding will help in configure config file, processor understanding will help in overclocking or set best and safe for building kernel.
binary only available driver will always make head-ache in open source community. Hopefully vendor releasing the driver copy sorry for the question, I'm really new to this embedded device
Snapdragon is the device family, 8250 is the specific SOC used in the venue.
Like I stated earlier, dell used the 8x60 branch as their base as qualcomm/CAF no longer supports 8x50 devices. I dont know if it's better or worse as the group that makes the roms pretty much does a terrible job at it, the venue has only a fraction of the issues of the streak 5 (due mainly to drivers), but there's not much you can say to defend them when it takes over a year to release GB (in fact it was just days after ICS was released) for the venue.
Dell cant and wont release the drivers to any of their devices, most of them except the streak 5 arent unusual anyway. The reason ICS has a beta for the S7 is this very fact.
You can likely base it on the nexus one/passion as it's likely not terribly different from it.
I dont expect the GB drivers to simply work in ICS, and since we dont have them you'd pretty much need to rewrite/port from a similar device using the same hardware.
At least with the current drivers, you could theoretically build the rest of the system and drop in the current ones. I've never had the time to try so myself but this is pretty much how cyanogen is ported to some devices.
That's pretty much ALL the info for the venue, as I'm the closest to a dev for it (at least on xda, there's other devs but they dont speak english much/visit xda much so it doesnt really make much of a difference in the end) and that's about as much as I can offer.
I cant really offer much more as I've never attempted to build android itself. Most I've done is build the makefiles to compile CWM. The makefiles for android is a lot more complex then merely porting CWM
dear all,
can someone appoint me out to have correct GB manifest on codeaurora ? I tried
Code:
[email protected]:~/dell-venue$ gingerbread_rel -m M7630AABBQMLZA404020.xml ^C
[email protected]:~/dell-venue$ repo init -u git://codeaurora.org/platform/manifest.git -b gingerbread_rel -m M7630AABBQMLZA404020.xml --repo-url=git://codeaurora.org/tools/repo.git
.repo/manifests/: manifest switched gingerbread_chocolate...gingerbread_rel
.repo/manifests/: discarding 70 commits removed from upstream
fatal: manifest 'M7630AABBQMLZA404020.xml' not available
fatal: cannot link manifest M7630AABBQMLZA404020.xml
I did many googling, still No lucks I agree to Guru TheManii advise to make GB kernel booting first then investigate to port ICS into dell venue.
***dell venue make me very currious (and also fustating)***
x1123 said:
dear all,
can someone appoint me out to have correct GB manifest on codeaurora ? I tried
Code:
[email protected]:~/dell-venue$ gingerbread_rel -m M7630AABBQMLZA404020.xml ^C
[email protected]:~/dell-venue$ repo init -u git://codeaurora.org/platform/manifest.git -b gingerbread_rel -m M7630AABBQMLZA404020.xml --repo-url=git://codeaurora.org/tools/repo.git
.repo/manifests/: manifest switched gingerbread_chocolate...gingerbread_rel
.repo/manifests/: discarding 70 commits removed from upstream
fatal: manifest 'M7630AABBQMLZA404020.xml' not available
fatal: cannot link manifest M7630AABBQMLZA404020.xml
I did many googling, still No lucks I agree to Guru TheManii advise to make GB kernel booting first then investigate to port ICS into dell venue.
***dell venue make me very currious (and also fustating)***
Click to expand...
Click to collapse
good luck for you, we are always support you
changkho1908 said:
good luck for you, we are always support you
Click to expand...
Click to collapse
cũng chỉ biết good luck for you àh
nguyen_vh said:
cũng chỉ biết good luck for you àh
Click to expand...
Click to collapse
đệt, chú muốn thế nào nữa
I tested to build android and using three source : codeaurora, cyanogen, aosp. To build GB on codeaurora I just can not find correct manifest. On cyanogen just wont build (for certain device) without proper propreitary binary drivers. On aosp ... well, build is easier. From TheManii advise I build GB aosp > passion and will not boot to be flashed to dell venue. I change the kernel with 408, rom is alive on device, but No wireless functionality work, either gsm or wifi. Anyone can give a clue where to get radio.img for dell venue? to build booting customs android kernel for venue still no lucks for me.
if someone want to take a look please download passion build packed with 408 kernel HERE flashable via cwm recovery. This will not brick your device.
To turn back device into normal android usage just flash TheManii StreakDroid4-250 without wipe anything. I put StreakDroid4-250 file also HERE just for make easier to download from my region (Indonesia).
split / unpack / repack boot.img
Hi Guys,
My biggest problem to determine how to pack kernel into boot image is solved. I optimistic to have booting kernel and pack into boot image. I cant determine the board kernel base address. Now I found out the base address is 0x20000000 (twenty million). I have test the coomand line and work well. This is the test procedure > download live boot.img (mean its proved bootable). I toke 408-boot image from many Streakdriod4 rom ... thanks to TheManii :
Code:
$ split_bootimage.pl 408boot.img
(I renamed boot.img to 408boot.img for easy remember)
output
Code:
Page size: 2048 (0x00000800)
Kernel size: 3092536 (0x002f3038)
Ramdisk size: 168270 (0x0002914e)
Second size: 0 (0x00000000)
Board name:
Command line: androidboot.hardware=venue
Writing 408boot.img-kernel ... complete.
Writing 408boot.img-ramdisk.gz ... complete.
...
Now I have in the folder > 3 files : 408boot.img 408boot.img-kernel 408boot.img-rakdisk.gz. We test our command line > to repack kernel and ramdisk into boot image and must be flashable to device and booting :
Code:
$ mkbootimg --kernel 408boot.img-kernel --ramdisk 408boot.img-ramdisk.gz --pagesize 2048 --cmdline "androidboot.hardware=venue" --board venue --base 0x20000000 -o new408boot.img <ENTER>
You should have new408boot.img bootable into our venue viat fastboot > test >
Code:
$sudo fastboot earse boot (to ensure existing boot is clean)
$sudo fastboot flash boot new408boot.img
$sudo fastboot reboot
...
Mu dell venue with TheManii rom booting properly.
But we need to ensure everything work well. Let us utilize second procedure well known in the world
Code:
$rm 408boot.img-kernel 408boot.img-ramdisk.gz new408boot.img [B][COLOR="Red"](to clean the folder).[/COLOR][/B]
$unpack-bootimg.pl 408boot.img [ENTER]
OUTPUT WILL BE
Code:
kernel written to 408boot.img-kernel.gz
ramdisk written to 408boot.img-ramdisk.cpio.gz
561 blocks
extracted ramdisk contents to directory 408boot.img-ramdisk/
By using UNPACK method we will have THREE file (four including 408boot.img) in folder
408boot.img 408boot.img-ramdisk 408boot-ramdisk.cpio.gz 408boot.img-kernel.gz
I choose unpack method since I wanna to test all command line available in internet is working properly. I change initlogo.rle with one I download from internet and edit default.prop file.
Code:
$nano -w 408boot.img-ramdisk/default.prop
EDIT THE text > ro.secure=1 TO ro.secure=0.
change initlogo.rle with other FILENAME.rle (You can download from internet)
Now we have ramdisk file (folder) with different default.prop file and initlogo.rle file (different image .. default is dell logo)
Create new ramdisk file to enable us create bootable image
Code:
$mkbootfs 408boot.img-ramdisk | gzip > new408-ramdisk [ENTER]
we should have file named new408-ramdisk gziped
Now repack kernel and new ramdisk >
Code:
$mkbootimg --kernel 408boot.img-kernel.gz --ramdisk new408-ramdisk --pagesize 2048 --board venue --cmdline "androidboot.hardware=venue --base 0x20000000 -o realynewboot.img [ENTER]
...
flash realynewboot.img via fastboot my boot splash changed into image attached ...
for step by step ... i put on MY BLOG
I share this to have someone try together to compile a kernel and convert into bootable image. with this kernel proble tackled ... build ROM is easier
Booting kernel
Hi Folks,
attached is booting kernel for dell venue. I tried on GB Rom (TheManii Rom) Steakdroid4-2.5.0.
Build info :
- Build from source tree : DJSteve-StreakKernel-92bf64f
- using 408config > extracted from 408boot.img
- switched off back cover awareness (I dont know what exact name) feature
- ramdisk > splitted ramdisk from 408-boot image.
- flashable via fastboot
- download atachement
- boot to fastboot
-$ sudo fastboot erase boot
-$ sudo fastboot flash boot djsteveboot.img
-$ sudo fastboot reboot
NOTE
This is development stage kernel. so please only try if you can tackle all problem. Good news flash the boot WILL NOT brick Your device
share here the result
x1123 said:
- switched off back cover awareness (I dont know what exact name) feature
Click to expand...
Click to collapse
It's redundant on the V at least, as it has no door sensor/doesnt care if the back cover is off. I do that all the time to hot swap memory cards.
Even the stock kernel will allow you to remove the door and not complain
Hi, I built a kernel too but based on Venue (4.06) sources.
http://forum.xda-developers.com/showthread.php?p=23544539#post23544539
You can check my sources here :
https://github.com/adridu59/dell-venue-kernel
The Venue codename is 'toucan'.
There are Venue-specific files and I do not know whether they are present in the Streak source you used.
I am developing a CM7 build myself. In fact, things are OK except the fact that the kernel is still stock 408 (things about setting up the working environment is here: http://forum.xda-developers.com/showthread.php?t=1687679).
After being able to build CM7 myself, I will turn back with the kernel issue for 2.3.x. Then, proceed to Android 4 ICS. God bless all of us!

[Q] Wich kernel source should I use for Kyobo ?

Hi,
I would like to add some usb devices drivers like usb serial etc
I already rooted my kyobo, with the boot.img I found on this forum
I pulled the /boot/config.gz to build my own kernel
I load the config with make menuconfig save it but after the config is very deifferent from the one I pulled
I build the msn kernel 2.6.35 downloaded from google with that config, but my zImage seems to be small against the boot.img/zImage currently installed
[email protected]****u:~/kyobo/msm$ ls -l arch/arm/boot/zImage
-rwxrwxr-x 1 jpdumont jpdumont 3103940 Dec 26 15:15 arch/arm/boot/zImage (the zImage generated with my kernel build)
[email protected]****u:~/kyobo/msm$ ls -l ../boot/zImage
-rw-rw-r-- 1 jpdumont jpdumont 3661940 Dec 26 15:04 ../boot/zImage (the zImage extracted from boot.img currently installed on my rooted device)
So i'm affraid to install my own boot.img
Is there any method to test a kernel without risk on the device itself ???
Thanks in advance
JP
Hi JP,
How is this project with the Kyobo progressing?
I've recently picked one up myself and am trying to achieve the same thing, except for sailing rather than soaring. I've overcome the first hurdle in a different manner, I've used the TetherGPS app to wifi in my gps location in from an android phone. I took a bit of fiddling as the "ACCESS MOCK LOCATION" is not available in the development menu of Kyobo. Instead I've edited the settings.db and changed a 0 to 1 next to MOCK LOCATION to get it working.
I'd still like to get other NMEA data in from various instruments in the future and will possibly continue down the wifi route rather that the usb option you are attempting.
regards Simo

Kernel compiled from Sony sources won't boot...help

I'm not an active developer but I'm also not a *total* noob -- I've successfully compiled usable kernels for Nexus 4, Moto G, HP TouchPad -- but I'm not making much headway on my Z5C kernel.
I want to run an otherwise stock Sony ROM on my phone, but make a couple of minor tweaks to the kernel. With that in view, I downloaded the source tree from Sony's dev site for the kernel that matches the one that shipped with the ROM I am currently running (at the moment, for Reasons, it's a Lollipop one, and I'm not really interested in debating that point anyway), and then I started by building a kernel with ZERO changes applied first. But it will not boot. Instead, with my first attempt at a kernel compiled from scratch, after the Sony Xperia boot logo and before the boot animation would normally kick in, the screen goes black and the notification LED blinks red 4 times, and then it reboots and starts over (bootloop).
I'm not sure what I am supposed to do to diagnose the problem since the screen doesn't display anything and it never gets far along enough in the boot process to where the USB port is initialized. And, yes, the bootloader is unlocked (I can flash a stock kernel to the phone with the DRM fix applied, and that boots and works just fine).
Here is what I have done so far:
Downloaded the kernel sources that match my ROM's kernel at https://developer.sonymobile.com/do...rchives/open-source-archive-for-32-0-a-6-200/
Downloaded the GCC 4.9 for ARM64 cross-compiler / toolchain from https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/
Applied kitakami_defconfig and suzuran_diffconfig, and built the kernel. It compiled cleanly without any errors.
Extracted kernel.elf from my ROM's kernel.sin, and then unpacked the binary image, initramfs, and device tree blob from that.
Re-packaged a new kernel into .img format for Fastboot flash by substituting in my kernel image binary for the official Sony one, but keeping the original ramdisk and DTB.
Flashed image to boot partition with Fastboot == bootloop
Flashed original kernel back == works fine
Decided to try creating a new DTB instead of reusing the one from the original kernel...but dtbTool spits out this:
Code:
Found file: msm8994-v2.0-kitakami_suzuran_generic.dtb ... skip, failed to scan for 'qcom,msm-id = <' tag
Found file: msm8994-v2.1-kitakami_suzuran_generic.dtb ... skip, failed to scan for 'qcom,msm-id = <' tag
Grabbed dtbToolCM from https://github.com/xiaolu/mkbootimg_tools instead, which seems to work.
Substituted in the new DTB image for the original Sony one, repackaged up a new boot.img, flashed that == bootloop
Tested my mkbootimg and the parameters I was using by extracting kernel, ramdisk, and DTB from original kernel.elf, then repackaging them all together into a boot.img and flashing that to the phone with Fastboot == works just fine
Hypothesized that perhaps my kernel didn't like the Sony kernel modules on the system partition because of version magic mismatch, so I changed CONFIG_LOCALVERSION from "-perf" to "-perf-g75e6207" in .config and rebuilt kernel, repackaged, reflashed with Fastboot == bootloop ... ARGH
So at this point, I'm at a loss. I've proven that it's not the way I am packaging up the boot image because if I repack the original Sony kernel binary up with the original ramdisk and DTB and then flash that file to the boot partition, that has no problem booting the phone. Is there some modification that I need to make to the contents of the ramdisk? I'd think I should just be able to use the stock Sony ramdisk unmodified, especially if the kernel itself doesn't differ at all (same sources, same .config) from the one Sony compiled, but...?
Any leads that any experienced Xperia Z-series kernel hackers out there can supply before I end up tearing my hair out would be greatly appreciated.
Thanks so so so much,
-- Nathan
[UPDATE]: Just tried assembling with mkqcdtbootimg instead. No go. Also unpacked the image made by that utility and verified that everything (e.g. offsets, etc.) looked sane. GARGH.
Oh, good grief...I answered my own question.
The version of the compiler has to match EXACTLY with what was used to build the rest of the system. I'm guessing because the compiler version has to match between kernel and kernel modules.
The git repo on googlesource.com that contains the prebuilt arm64 x-chain has been updated since the release of 32.0.A.6.200. Version string for gcc of most recent pull was "4.9.x-google 20150123 (prerelease)", but original kernel binary built by Sony had been compiled by gcc version "4.9.x-google 20140827 (prerelease)".
I finally found a version I could roll back to that contained that version string (commit hash 4b341df712969ca2ac0c3cf6294260d406b9d9be), and it worked.
Hopefully this helps someone else out someday,
-- Nathan
nlra said:
Oh, good grief...I answered my own question.
The version of the compiler has to match EXACTLY with what was used to build the rest of the system. I'm guessing because the compiler version has to match between kernel and kernel modules.
The git repo on googlesource.com that contains the prebuilt arm64 x-chain has been updated since the release of 32.0.A.6.200. Version string for gcc of most recent pull was "4.9.x-google 20150123 (prerelease)", but original kernel binary built by Sony had been compiled by gcc version "4.9.x-google 20140827 (prerelease)".
I finally found a version I could roll back to that contained that version string (commit hash 4b341df712969ca2ac0c3cf6294260d406b9d9be), and it worked.
Hopefully this helps someone else out someday,
-- Nathan
Click to expand...
Click to collapse
I think that cannot be possible. There are lots of kernels out there compiled with toolchains different than the stock one (e.g. Androplus kernel is compiled with UBERTC 4.9)
I am in the same situation as you, but with the Xperia X Compact:
-Untouched copyleft source code
-Untouched ramdisk
-Using AOSP mkbootimg (the new one written in Python: https://android.googlesource.com/platform/system/core/+/nougat-release/mkbootimg/mkbootimg) with arguments specified in README_Xperia (https://github.com/bamsbamx/BMSBMX_kernel_kugo/blob/master/README_Xperia)
And still no boot... I am about to give up on this as I cannot find any other solution...
You can see my build script here for reference: https://github.com/bamsbamx/BMSBMX_kernel_kugo/blob/master/utils/build.sh
bamsbamx said:
I think that cannot be possible.
Click to expand...
Click to collapse
*shrug* I don't know what to tell you. All I know is that I changed one variable at a time, and then when I finally changed the version of the compiler I was using, eureka.
That's not to say that there couldn't have been more than one variable in the equation, and that I happened to knock each pin down one at a time without knowing it. For example, I can tell you that the size of the DTB varied slightly between what dtbToolCM came up with, and what mkqcdbootimg generated, and that the DTB that was generated by mkqcdbootimg was EXACTLY the same size as the one in Sony's official kernel image while dtbToolCM's was not. But changing to mkqcdbootimg alone did not fix my issue.
My theory in the end -- which could be completely wrong -- was that maybe the kernel module version magic includes either part or all of the compiler version string, so until I found the compiler that matched the one that Sony used, the kernel modules that Sony built were unable to load when my kernel was booting. If that wasn't the problem, then maybe there was some other reason the kernel modules couldn't load...maybe a subtle GCC bug that was fixed between the version Sony used and the latest binaries on Google's git server that ended up generating code that is slightly incompatible between binaries produced by the two versions. Or maybe I'm completely cold and it had nothing to do with the kernel modules at all. I guess we will never know unless someone else feels like soldering serial console leads on their Z5's system board, 'cause I sure ain't gonna...
I can tell you that, in the end, I retained all of the following changes, and that with my build environment I no longer have problems producing kernels that will boot a stock Sony ROM:
- I still use what I believe to be the same compiler Sony used
- I still build kernels with CONFIG_LOCALVERSION set to match the exact version string that the stock Sony kernel for my ROM has
- I still continue to use mkqcdbootimg to assemble my DTB + my final image instead of any version of mkbootimg and dtbTool
I haven't tried changing out things other than the GCC version to see if that ends up breaking things again. If I manage to find some spare time to kill in the future, I may do so in order to satisfy my curiosity. If I ever get around to doing that, I'll be sure to update this thread with my results.
FWIW, the Z5 boot image is assembled slightly differently than it appears the X Compact's is for whatever reason. I can tell you, for example, that the Z5's bootloader (at least the stock one...I hear that there is an updated version obtainable through Sony's AOSP program) does not support gzipped kernels. Also, the DTB is assembled and kept separately from the kernel up until the final mkbootimg stage, whereas it appears that the DTB and kernel are concatenated together somehow during the build for the X Compact. The fact that differences like these exist may mean that none of my findings or experiences are necessarily applicable to you and your situation.
I also will note that although you said you are using the Python mkbootimg utility, your build script that you linked to claims otherwise...
Good luck, and if you happen to figure out what the problem ended up being in your case, I'd be very interested to get an update from you!
-- Nathan
nlra said:
*shrug* I don't know what to tell you. All I know is that I changed one variable at a time, and then when I finally changed the version of the compiler I was using, eureka.
That's not to say that there couldn't have been more than one variable in the equation, and that I happened to knock each pin down one at a time without knowing it. For example, I can tell you that the size of the DTB varied slightly between what dtbToolCM came up with, and what mkqcdbootimg generated, and that the DTB that was generated by mkqcdbootimg was EXACTLY the same size as the one in Sony's official kernel image while dtbToolCM's was not. But changing to mkqcdbootimg alone did not fix my issue.
My theory in the end -- which could be completely wrong -- was that maybe the kernel module version magic includes either part or all of the compiler version string, so until I found the compiler that matched the one that Sony used, the kernel modules that Sony built were unable to load when my kernel was booting. If that wasn't the problem, then maybe there was some other reason the kernel modules couldn't load...maybe a subtle GCC bug that was fixed between the version Sony used and the latest binaries on Google's git server that ended up generating code that is slightly incompatible between binaries produced by the two versions. Or maybe I'm completely cold and it had nothing to do with the kernel modules at all. I guess we will never know unless someone else feels like soldering serial console leads on their Z5's system board, 'cause I sure ain't gonna...
I can tell you that, in the end, I retained all of the following changes, and that with my build environment I no longer have problems producing kernels that will boot a stock Sony ROM:
- I still use what I believe to be the same compiler Sony used
- I still build kernels with CONFIG_LOCALVERSION set to match the exact version string that the stock Sony kernel for my ROM has
- I still continue to use mkqcdbootimg to assemble my DTB + my final image instead of any version of mkbootimg and dtbTool
I haven't tried changing out things other than the GCC version to see if that ends up breaking things again. If I manage to find some spare time to kill in the future, I may do so in order to satisfy my curiosity. If I ever get around to doing that, I'll be sure to update this thread with my results.
FWIW, the Z5 boot image is assembled slightly differently than it appears the X Compact's is for whatever reason. I can tell you, for example, that the Z5's bootloader (at least the stock one...I hear that there is an updated version obtainable through Sony's AOSP program) does not support gzipped kernels. Also, the DTB is assembled and kept separately from the kernel up until the final mkbootimg stage, whereas it appears that the DTB and kernel are concatenated together somehow during the build for the X Compact. The fact that differences like these exist may mean that none of my findings or experiences are necessarily applicable to you and your situation.
I also will note that although you said you are using the Python mkbootimg utility, your build script that you linked to claims otherwise...
Good luck, and if you happen to figure out what the problem ended up being in your case, I'd be very interested to get an update from you!
-- Nathan
Click to expand...
Click to collapse
Yeah, sorry about that, I didnt push the new commits to Github yet because of the kernel not booting, the current script I am using is this one:
Code:
#!/bin/bash
RED=1
GREEN=2
BLUE=4
colorPrint() {
tput setaf $2
echo $1
tput sgr0
}
colorPrint "Initializing workspace..." $BLUE
#Device config
device=kugo
#Workspace directories
workdir="$(pwd)"
outputfolder=${workdir}/OUTPUT
outputdir=${outputfolder}/${device}
toolchains=${workdir}/toolchains
ramdisk=${workdir}/ramdisks/${device}/ramdisk
export ARCH=arm64
export CROSS_COMPILE=${toolchains}/aarch64-linux-android-4.9-kernel/bin/aarch64-linux-android-
export KBUILD_DIFFCONFIG=kugo_diffconfig
colorPrint "Cleaning previous builds..." $BLUE
rm -rf $outputdir
mkdir -p $outputdir
colorPrint "Configuring kernel..." $BLUE
make msm-perf_defconfig O=$outputdir
colorPrint "Building kernel..." $BLUE
time make -j8 O=$outputdir 2>&1
if [ ! -f $outputdir/arch/arm64/boot/Image.gz-dtb ]; then
colorPrint "ERROR: kernel image not found. Kernel build failed" $RED
exit 1
fi
if [ ! -e $outputdir/ramdisk.cpio.gz ]; then
colorPrint "ERROR: ramdisk image file not found. Compression failed" $RED
exit 1
fi
colorPrint "Packaging boot image file" $BLUE
${workdir}/utils/mkbootimg \
--kernel $outputdir/arch/arm64/boot/Image.gz-dtb \
--ramdisk $outputdir/ramdisk.cpio.gz \
--base 0x20000000 \
--ramdisk_offset 0x02000000 \
--pagesize 2048 \
--tags_offset 0x01E00000 \
--cmdline "androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 zram.backend=z3fold earlyprintk" \
--output $outputdir/boot.img
if [ ! -f $outputdir/boot.img ]; then
colorPrint "ERROR: boot image file not found. boot packaging failed" $RED
exit 1
fi
colorPrint "DONE" $GREEN
colorPrint "boot image file can be found at ${outputdir}/boot.img" $GREEN
This one is for the build 34.3.A.0.217... However, I already had managed to boot copyleft kernel builds in other versions (such as 34.2.A.0.XXX) using the Github script, the UBERTC 4.9 Toolchain and not changing the GCC version, although I had to set # CONFIG_MODULE_SIG_FORCE is not set There must be something strange here
I think there must be something with kernel files permissions, or... maybe this? https://forum.xda-developers.com/an...signing-boot-images-android-verified-t3600606
@bamsbamx as usual, you have dm verity and sony RIC / security disabled, right ?
also hackery is possible to block modules from loading but since it comes at a later stage that most likely is not responsible for the kernel not booting
As alternative you could try https://github.com/sonyxperiadev/mkqcdtbootimg
Usually the instructions don't work with the copyleft kernel source, some fixes or adjustments are normally needed (at least my experience)
zacharias.maladroit said:
@bamsbamx as usual, you have dm verity and sony RIC / security disabled, right ?
also hackery is possible to block modules from loading but since it comes at a later stage that most likely is not responsible for the kernel not booting
As alternative you could try https://github.com/sonyxperiadev/mkqcdtbootimg
Usually the instructions don't work with the copyleft kernel source, some fixes or adjustments are normally needed (at least my experience)
Click to expand...
Click to collapse
Hi,
Nope, I didnt disable RIC neither dm-verity, the only thing I changed was CONFIG_MODULE_SIG_FORCE to 'is not set'. But I guess that wasnt the cause of kernel not booting since my /system partition is untouched. I tried both with mkqcdtbootimg and mkbootimg but still nothing
Hey @nlra, I figured out the problem (finally). The ramdisk I was using had been extracted from a .elf file (obtained via Flashtool through an .ftf file's kernel.sin). Somehow the extraction from the kernel.elf file is broken (resulting in a 7.0MB ramdisk.cpio.gz file)
I managed to pull up the boot.img from the device (via dd if=/dev/block/mmcplk0p33 of=/sdcard/boot.img) and then extract the ramdisk from it, resulting in a 11.4MB file
Then, I was able to boot it BOTH USING mkqcdtbootimg file and mkbootimg python script from AOSP nougat-release branch
Thats it
bamsbamx said:
The ramdisk I was using had been extracted from a .elf file (obtained via Flashtool through an .ftf file's kernel.sin). Somehow the extraction from the kernel.elf file is broken
Click to expand...
Click to collapse
Nice! Glad you figured out what was going on in your case, and thanks for confirming that both mkqcdbootimg and mkbootimg both work for building the X Compact boot image.
-- Nathan

ArnoldTheBat r72 booting to blank screen on Acer Chromebook C720P

I am thinking of starting a new thread to solve the issue of ArnoldTheBat r72 booting to blank screen on Acer Chromebook C720P
oops I just did -
Building Chromium/Chrome OS r71 or r72 Kernel RFC
It seems the only way to tackle drivers issues is to build the Kernel.
So, trying to build a Chrome OS r72 Kernel to use on ATB r72 to address these drivers issues, particularly the inability to boot Acer Chromebook C720P -
As I have never done this before, I need some pointers as documentation for this is very sketchy on Google groups. RFC alesimula...
What I have available is Ubuntu Bionic, & necessary storage to build (over 100 GB) -
I also have a chromefied Nocturne then eve 73/swtpm.tar SSD (on top of ABT r72) with Bionic crouton with same over 100 GB storage available.
First steps to build Kernel
Build chrome os kernel and kernel modules
In a Chrome OS box (like Nocturne r71 with kernel 4.14) - install crouton Bionic
$ sudo sh ~/Downloads/crouton -r bionic -t xfce,xiwi,touch,extension,keyboard,cli-extra,chromium
after installation enter chroot
$ sudo enter-chroot
$ sudo apt-get install git-core make kernel-package bc nano
$ git clone https://chromium.googlesource.com/chromiumos/third_party/kernel -b chromeos-4.14
TBC after download
adapted from https://github.com/dnschneid/crouton/wiki/Build-chrome-os-kernel-and-kernel-modules
Kernel download Chrome OS Kernel 4.14
After issuing the git clone command - I received some errors...
such as
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
...
& after several tries succeeded with the message:
remote: Sending approximately 2.11 GiB ...
remote: Counting objects: 24648, done
remote: Total 7215674 (delta 5927776), reused 7215674 (delta 5927776)
Receiving objects: 100% (7215674/7215674), 2.10 GiB | 1.59 MiB/s, done.
Resolving deltas: 100% (5927776/5927776), done.
Checking out files: 100% (62736/62736), done.
So now the next business after securing the source code is to compile the kernel adding the modules/drivers needed to resolve issues such as camera & graphics, etc.
Hopefully this info is in here too
https://github.com/dnschneid/crouton/wiki/Build-chrome-os-kernel-and-kernel-modules
I am using Acer Iconia W700 with chromefied nocturne on top of arnoldthebat r72...
crouton bionic with xfce4 is my chroot environment to compile the kernel...
I guess I need to dig in, get the proper commands, it should not be different from compiling other Kernels for Android, Ubuntu, Arch Linux...
What I know is that it takes time...
hopefully if I get drivers, it will be worth the effort
Extra refs to solve cloning issues
https://devopscube.com/gnutls-handshake-failed-aws-codecommit/
https://stackoverflow.com/questions/38378914/git-error-rpc-failed-curl-56-gnutls
Compressed Chrome OS Kernel 4.14 using tar/xz is bleeming 2.4 GB!
$ tar cJvf kernel.tar.xz kernel
References for setting up configuration to build the Chrome OS kernel -
https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/kernel-configuration
https://www.chromium.org/chromium-o...n-snow#TOC-Building-and-installing-the-kernel
Building Chrome OS kernel 4.14
Putting it together - trial & improvement (PC of trial & error)
in bionic chroot
sudo enter-chroot
go to kernel source code (folder where cloned)
$ cd kernel
$ ls chromeos/scripts/
generate-its-script.sh kernelconfig prepareconfig README splitconfig update_smatch_whitelist
challenge - how to generate .config to build kernel - & what are the commands to build it - I know how to with Ubuntu & Arch Linux, even done it a few time for Android Jelly Bean...
scratch - here goes...
from bionic chroot - kernel folder source code kernel/
sh ./chromeos/scripts/prepareconfig chromeos-intel-pineview
sudo modprobe configs; zless /proc/config.gz
cat /proc/config.gz | gunzip > ~/Downloads/base.config
base.config contains all the current configuration of ATB v72 kernel. This file should replace the current file on path kernel/chromeos/config/base.config
Editing base.config - to get extra kernel modules
I use nano
cd ~/Downloads/
nano base.config
it starts like this:
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 4.14.83 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
...
First change is Apple backlight keyboard replacing where it says is not set by:
CONFIG_BACKLIGHT_APPLE=m
Improving Kernel 4.14.83 from ATB v72 Methodology
Methodology
Extract base.config from FydeOS 5.3.1 (Chromium OS v70) & merge in its settings into base.config extracted from ATB Chromium OS v72...
Busy doing this, as I am not good at coding, so cannot devise an automated script, doing it manually is a long bummer
My comment in Telegram, frustration included -
Modifying kernel basic.config of ATB v72 to incorporate all settings/modules of FydeOS 5.31 (v70) is so tedious, it's a nightmare - I wish there was a way to automate this with a script that merges in FydeOS basic.config entries that are not present in ATB v72 - I am crap at coding & scripting, so doing it manually, it takes forever, & I keep making mistakes :stuck_out_tongue_closed_eyes: - as I am not sure what stops ATB v72 Acer C720P from booting, I have to include all missing settings in basic.config before building the kernel.
Chrome OS Kernel 4.14.96 built with extra modules for ATB v72
It does generate .config after all as usual for Linux kernels - got some issues from enter-chroot - had to do it from Ubuntu bionic proper with (from kernel source folder):
$ sh ./chromeos/scripts/prepareconfig chromeos-intel-pineview
$ make oldconfig
$ make -j4
Just now...
Finished compiling Chrome OS 4.14.96 for ATB v72 (which has Kernel 4.14.83), got vmlinux & modules - now need to find out how to deploy them on a Chrome OS installation...
After some struggle, managed to boot the new kernel as 4.14.96-09859-ga5c3f2f0428a-dirty
installed extra modules
by doing in crosh shell (not chroot)
in kernel compiled source code folder:
$ sudo make modules_install
it creates a new folder /lib/modules/4.14.96-09859-ga5c3f2f0428a-dirty
to get the kernel I just overwrite vmlinuz.A in /dev/sdb12 by kernel/arch/x86/boot/bzImage
(backup vmlinuz.A as vmlinuz.C)
to get to this:
$ mkdir efi
$ sudo mount /dev/sdb12 efi
$ cd efi
$ cd syslinux
$ sudo cp vmlinuz.A vmlinuz.C
$ sudo cp bzImage vmlinuz.A
../..
It boots great on Acer Iconia W700 & MacBook Air mid-2011
the joke is despite modules still no WiFi & no trackpad for MacBook Air
other joke does not boot Acer Chromebook C720P
well at least I tinkered with building this darn Chrome OS kernel - not much documentation on it (apart from how to do this in arm architecture)
Linux localhost 4.14.96-09859-ga5c3f2f0428a-dirty #1 SMP PREEMPT Wed Feb 13 08:04:55 GMT 2019 x86_64 Intel(R) Core(TM) i3-2365M CPU @ 1.40GHz GenuineIntel GNU/Linux
As I do not know how to proceed from this due to lack of Google documentation - I will stop.
I think to get it working, I need to install Chromium OS from scratch, but documentation is unclear, & arnoldthebat has no instructions on how to do this.
So I am starting an effort to build a full Chromium OS from scratch - as
the best way to learn is to share know how.
New thread - https://forum.xda-developers.com/hardware-hacking/chromebooks/chromium-os-building-t3900245
Chromium OS building effort here -
https://forum.xda-developers.com/hardware-hacking/chromebooks/chromium-os-building-t3900245
Rebuilding Chromium OS kernel - a little extra...
Small improvement - removing dirty label from kernel name -
in scripts/setlocalversion # comment out:
if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then
printf '%s' -dirty
fi
will rebuild it again to see if this helps for deployment
Rebuilt successfully - works OK on Acer Iconia W700, including camera & camera migration...
Notes -
in chroot
sudo enter-chroot
in kernel/
sudo make modules_install
sudo make install
outside chroot
in kernel/
sudo mkdir /boot
sudo make modules_install
sudo make install
in ~/Downloads
sudo mount /dev/sdb12 efi
sudo cp efi/syslinux/vmlinuz.A efi/syslinux/vmlinuz.A.83
sudo cp kernel/arch/x86/boot/bzImage efi/syslinux/vmlinuz.A
& for backup
sudo cp efi/syslinux/vmlinuz.A efi/syslinux/vmlinuz.A .96
I think this wraps it up - sadly still not booting Acer CB C720P
Linux localhost 4.14.96-09859-ga5c3f2f0428a #4 SMP PREEMPT Sun Feb 17 11:02:41 GMT 2019 x86_64 Intel(R) Core(TM) i3-2365M CPU @ 1.40GHz GenuineIntel GNU/Linux
Not exactly... always something
Installing Chrome OS Kernel 4.1.4.96 removes crostini, wonder why that is...
solution might be flags - as new kernel, some flags might have been lost
chrome://flags
will check
crostini already there - must be some settings lost with new kernel, or dependencies unmet
NB - all previous commands presuppose you have r/w privilege as root, i.e. issue:
$ sudo mount -o remount,rw /
$ sudo mount -o remount,exec /mnt/stateful_partition
Note - my gripe after all this is that drivers I needed do not seem to load, or I did not select the proper entries in base.config / .config
What's the point of building a kernel if modules cannot be loaded
Google Chrome OS is well protected, & Chromium OS does not seem to bypass kernel protection.
nabil2000 said:
Methodology
Extract base.config from FydeOS 5.3.1 (Chromium OS v70) & merge in its settings into base.config extracted from ATB Chromium OS v72...
Busy doing this, as I am not good at coding, so cannot devise an automated script, doing it manually is a long bummer
My comment in Telegram, frustration included -
Modifying kernel basic.config of ATB v72 to incorporate all settings/modules of FydeOS 5.31 (v70) is so tedious, it's a nightmare - I wish there was a way to automate this with a script that merges in FydeOS basic.config entries that are not present in ATB v72 - I am crap at coding & scripting, so doing it manually, it takes forever, & I keep making mistakes :stuck_out_tongue_closed_eyes: - as I am not sure what stops ATB v72 Acer C720P from booting, I have to include all missing settings in basic.config before building the kernel.
Click to expand...
Click to collapse
hi, how did you extracted fydeos base.config ? if possible, can you provide me with a dropbox link to fydeos 5.3.1 base.config. Thanks
improving kernel 4.14.96
Hello2Clans said:
hi, how did you extracted fydeos base.config ? if possible, can you provide me with a dropbox link to fydeos 5.3.1 base.config. Thanks
Click to expand...
Click to collapse
Here is the dropbox link
[dropbox.com/s/esr407ybr5tev1u/configs.zip?dl=0](https://www.dropbox.com/s/esr407ybr5tev1u/configs.zip?dl=0)
it has the FydeOS 5.3.1 base config I extracted & your ATB v72 which I merged Fydeos 5.3.1 entries into - it updates to 4.14.96 from your 4.14.83 (replace z.config by .config)
It does compile a kernel OK - I did this manually, still learning how to do it signed. As I said details in my XDA thread.
I added all LCD panels modules, maybe it will finally allow to boot Chromebook C720P to GUI.
Oddly, I lose crostini, maybe unsigned kernels do that.
Linux localhost 4.14.96-09859-ga5c3f2f0428a #4 SMP PREEMPT Sun Feb 17 11:02:41 GMT 2019 x86_64 Intel(R) Core(TM) i3-2365M CPU @ 1.40GHz GenuineIntel GNU/Linux
You are welcome to improve on it - it builds, but modules I thought added did not work on MacBook Air nor graphics of Acer CB C720P
Hello2Clans said:
hi, how did you extracted fydeos base.config ? if possible, can you provide me with a dropbox link to fydeos 5.3.1 base.config. Thanks
Click to expand...
Click to collapse
I show how to do it in a previous post - but you need to be in a running FydeOS box, same with ATB.
sudo modprobe configs; zless /proc/config.gz
cat /proc/config.gz | gunzip > ~/Downloads/base.config
.config for Acer CB C720P
Still no luck with Acer Chromebook C720P - tried several changes to .config with make menuconfig & manually - boots to a blank screen still
Fydeos 5.3.1 does not have this problem.
Also tried just the .config of FydeOS on its own, & strangely no luck - there must be something else -
will now try this
# Display Panels
CONFIG_DRM_PANEL_LVDS=y
scratch - learning about kernel blobs /dev/sdx2 & /dev/sdx4
Just building the kernel & forcing in vmlinuz.A in /dev/sdx12 syslinux using bzImage (& modules in /lib/modules)
is apparently not enough...
It seems I also need to generate a new blob for the kernel which is /dev/sdx2
From documentation -
https://chromium.googlesource.com/chromiumos/docs/+/master/kernel_faq.md
we have
Kernel Root
pair A /dev/sda2 /dev/sda3
pair B /dev/sda4 /dev/sda5
in my case (as installed to usb)
Kernel Root
pair A /dev/sdb2 /dev/sdb3
pair B /dev/sdb4 /dev/sdb5
Some pointers here:
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-os-dev/zmaziTddu5E
Major learning curve for me here...
what I need to do is upgrade the Arnoldthebat kernel blob KERN-A (4.14.83) with a new one for the new kernel (4.14.96).
I would appreciate if someone knew how to do this - that might be the cause issue of losing crostini when loading the new 4.14.96 instead of the original ATB.v72 4.14.83 one.
Share knowledge if you know how to do this, thanks.
Cooking -
I just flashed FydeOS 5.3.1 ROOT-A /dev/sdx2 blob which is 16MB over ATB v72 ROOT-A /dev/sdx2 blob which is 64MB & it booted, might be the solution I was looking for...
FydeOS (v70) is more compatible than ATB (v72) for many things. If the blob is involved, then it could be good news, easier than producing a new blob from scratch (don't know how either).
If so, working on blobs is an addition to-do list for hacking Chrome OS.
Hello. I am really glad someone is trying to build and install a custom kernel for ChromiumOS, as it will help fix *many* compatibility issues as well as it will make possible to add support for some hardware and features (for instance, audio over Bluetooth doesn't work as of now because the support library needed for BlueZ isn't included).
My computer isn't working properly and I don't have much space to build the kernel by my own, but I can help with testing and research. If you could share the binaries online (maybe a Git with releases?), this would be great.
What I have found and read about kernel on ChromiumOS so far:
1. Official documentation, it explains about the partition pairs:
http://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format
2. More info (I think you have it already) but I think it is outdated as "console=tty1" doesn't work anymore (ChromiumOS now uses Frecon):
https://chromium.googlesource.com/chromiumos/docs/+/master/kernel_faq.md
3. This is a nice repo, it explains a lot, specially about kernel modules (drivers):
https://github.com/dnschneid/crouton/wiki/Build-chrome-os-kernel-and-kernel-modules
From what I have used and tested, you can use GRIB to either boot from the vmlinuz.A/B image or use the partition with the kernel, using the partition is much complicated as you found out because it would need some blobs/keys.
lfom said:
Hello. I am really glad someone is trying to build and install a custom kernel for ChromiumOS, as it will help fix *many* compatibility issues as well as it will make possible to add support for some hardware and features (for instance, audio over Bluetooth doesn't work as of now because the support library needed for BlueZ isn't included).
My computer isn't working properly and I don't have much space to build the kernel by my own, but I can help with testing and research. If you could share the binaries online (maybe a Git with releases?), this would be great.
What I have found and read about kernel on ChromiumOS so far:
1. Official documentation, it explains about the partition pairs:
http://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format
2. More info (I think you have it already) but I think it is outdated as "console=tty1" doesn't work anymore (ChromiumOS now uses Frecon):
https://chromium.googlesource.com/chromiumos/docs/+/master/kernel_faq.md
3. This is a nice repo, it explains a lot, specially about kernel modules (drivers):
https://github.com/dnschneid/crouton/wiki/Build-chrome-os-kernel-and-kernel-modules
From what I have used and tested, you can use GRIB to either boot from the vmlinuz.A/B image or use the partition with the kernel, using the partition is much complicated as you found out because it would need some blobs/keys.
Click to expand...
Click to collapse
Thanks for the resources, I am getting old, so rather hard to learn & deal with new stuff - tinkering OSes & software is a hobby for me, but I usually do test stuff, not create - I had nice experience with Hackintosh, before I owned my own Macbook Air, still use it from USB's & PC when needed.
So far, I find out blob does not improve matters, it just gets used, like above blob from ATB or FydeOS does same thing.
The way I started in this was just to get Acer Chromebook C720P to load Android, chromefy carried on better than where I started.
The most successful outcome for me is Acer Iconia W700 which works with eve 73 (leaked on Telegram)...
I have the resources to build the kernel - but it is not doing what I want, like booting ATB v72 in Acer CB C720P - it i not vital, C720P works well with FydeOS & cyan or eve 71, just a challenge - why is ATB v72 not booting properly - i's a graphics VESA or LVDS bios issue I believe (C720P board uses LVDS for graphics), but where does it get loaded, I believe it's before loading modules...
FydeOS 5.31 boots to a black screen on my Miix320 but I have to wait until it loads everything then I must hit Ctrl+Alt+F2 then go back to main screen and then it works properly thereafter. Is your Acer the one bellow? Maybe it's related?
http://www.chromebookspecs.com/acer-c720p-chromebook
By the other hand, I cannot enable clicking for the detachable touchpad (+keyboard), what is almost a dealbreaker... Neither it goes to tablet mode when I detach it from the keyboard (not a big deal).
By the other hand, it boots correctly on a ThinkPad 8 tablet, but if freezes after a few seconds unless I use acpi=off or noacpi as kernel parameters, what makes it usesless since it only detects USB hardware.
From the text I linked it seems that the extra data added to the kernel before flashing it to a disk partition is both its signature and kernel paramenters, so you may want to check if there is any special paramenter needed for the kernel to boot correctly on your C720P.
FydeOS base upgrading kernel from 4.14.67 to 4.14.96
Kernel 4.14.96 upgrade progress -
I allowed
CONFIG_TCG_VTPM_PROXY=m
in .config
& this allowed me to update a chromefied FydeOS with eve/caroline 71 to eve 73 dev by using chromefy2!
this in turn allowed me to use an edimax Wifi USB dongle in MacBook Air -
the onboard WiFi still not loading, no trackpad but still progress :relaxed:
so modules do get loaded unlike my concern, it's just a matter to identify the proper entry in .config to load them when compiling the kernel...
now what are the proper entries for internal WiFi & trackpad?
Extra - Icing on the cake -
FydeOS 5.3.1 with eve dev 73 - putting the correct files in place allows to load kernel 4.14.83 & its modules to get crostini -
of course loading FydeOS kernel which is 4.14.67 stops Android 9.
This amended chromefy.sh script might help with MacBooks for trackpad & WiFi.
https://github.com/youngyou/chromefy/blob/master/chromefy.sh
*** Important note ***
To install the kernel modules in the Chrome OS box, you need to install Chromebrew to have access to the necessary commands -
$ curl -Ls http://git.io/vddgY | bash
In kernel source code folder:
$ sudo make modules_install
then copy bzImage over vmlinuz.A (after backing up the original)
I am planning to release an archive with kernels & modules including the one I built, it will be
vmlinuz.A.67(4.14.67); vmlinuz.A.83 (4.14.83); vmlinuz.A.96 (4.14.96); & corresponding /lib/modules folder
FydeOS 5.3.1 - ATB v72 - my built kernel
Notes -
Kernel 4.14.96 upgrade progress - I allowed CONFIG_TCG_VTPM_PROXY=m so this allowed me to update a chromefied FydeOS to eve 73 dev by using chromefy2! this in turn allowed me to use an edimax Wifi USB dongle in MacBook Air - the onboard WiFi still not loading, no trackpad but still progress :relaxed:
Icing on the cake - FydeOS 5.3.1 with eve dev 73 - putting the correct files in place allows to load kernel 4.14.83 & its modules to get crostini - of course loading FydeOS kernel which is 4.14.67 stops Android 9.
Cool progress - I managed to boot to the GUI of Acer CB C720P with eve dev v73 - still need to iron out something, but could get into guest mode, & to linux prompt - this is great :stuck_out_tongue_winking_eye: this is using kernel 4.14.83 on top of FydeOS 5.3.1
Finally managed to log into my google account in Acer CB C720P- next hurdle, will Android 9 work? - crostini back in the menu -
hurdle - despite changing vmlinuz.A to 4.14.83 or 4.14.96 - it still only loads FydeOS 4.14.67
so
I learnt something new, which means I need to learn more -
when you boot to a real chromebook from usb or internal, it will look for the kernel in the blob KERN-A /dev/sdx2, & will not use the vmlinuz.A in /dev/sdx12 -
so with FydeOS stuck with kernel 4.14.67 -
if I boot from other laptop, blob is not used, vmlinuz.A instead -
so I need to produce new KERN-A /dev/sdx2 blob for new kernel,
FydeOS blob is 16MB, ATB v72 blob is 64MB,
so to flash I need to play with partitions, tricky, & did not work...
still didn't figure out how to make a new blob for a new kernel...
RFC - how to produce a blob for loading a new kernel?
RFC - how to produce a blob for loading a new kernel?
If there is a way to find out how to produce a blob of an updated kernel for a genuine vanilla chromebook such as Acer Chromebook C720P - I will post it here...
Google open source documentation is very confusing about this - it might also be generated when setting up a Chromium OS from scratch (my thread on this is halted for now, but I have all the setup foundation to build)...
What I gather is that vmlinuz.A is the kernel, but for chromebooks, the kernel is also contained in the blob which is in partition /dev/sdx2 labelled KERN-A -
so I need to produce an image kern-a.bin which I then flash to /dev/sdx2 - with FydeOS 5.3.1 the KERN-A blob contains Kernel 4.14.67, with ATB v72 Kernel 4.14.83...
the dilemma is that KERN-A size for FydeOS 5.3.1 is 16 MB & for ATB v72 it is 64MB, so I cannot flash the latter onto the former.
I need to find out how to create a 64MB image for KERN-A from a given kernel, such as ATB v72 or my compiled one which is 4.14.96 -
Anyone who has a clue, & better has the correct instructions to do so, please help...
Actually, you don't need to: you can use the compressed image with GRUB2, and it will boot using your system and state (data) partition.
lfom said:
Actually, you don't need to: you can use the compressed image with GRUB2, and it will boot using your system and state (data) partition.
Click to expand...
Click to collapse
Using a modified FydeOS 5.3.1 as base, no matter I change the kernel, it boots its own 4.14.67 kernel on Acer CB C720P - however using non chromebook devices such as macbook, allow me to boot vmlinuz.A & its associated /lib/modules/...
Care to share how to use grub2 to override the above?

Matching a kernel's config for compatible kernel modules

(I'm cross-posting from "General Discussion", I think I picked the wrong forum. Sorry!)
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