[Q] Is gcc and cpp for familiar linux/gpe modified available? - General Questions and Answers

I'd like to be able to use Haret to boot an OpenBSD kernel and want to compile on the machine itself.

I've used a custom script to cross compile the new kernel image.
Is there a way of using the native bootloader to boot the new kernel instead of through WinCE?
Is there a way of bypassing WinCE's rebooting when a kernel causes undervolting?
This is being done with a modified OpenBSD/zaurus kernel and a bsd.rd renamed as an initrd.

I found a solution.

Related

[Q] GT-I9000M kernel compiling

I've got this side project going where I've decided to try to modify the stock kernel for my GT-I9000M.
I'm a Gentoo linux user and have cross-compiled kernels for embedded systems with or without initramfs and modules successfully many times. Rather than just grab and flash the latest mod from the net I want to understand exactly how to create my own.
I already have access via a chroot to a working Gentoo install, however that runs in a sandbox inside android userland, which can be irritating to say the least. I'm already able to create binaries for armv7a on the phone itself, which is a time and power-consuming novelty.
I setup a development environment on my main computer and made sure I could create working binaries for the armv7a.
I backed up all the bml partitions on my phone.
Next, I made sure I could access Download Mode and experimented with Heimdall until I was satisfied I was able to recover from any bad kernel flashes.
I altered the first boot logo in param.lfs with dd, but that's a whole other story.
Next, I downloaded Samsung's source for Froyo and followed the instructions to create a zImage.
aries_eur_defconfig selects the FM radio module and the Samsung TV out driver which are broken. No problem, I figured I could check that out later so I disabled those options for now. it compiles! great! But it didn't boot. I turned to the internet for ways to solve the problem.
There was a lot of conflicting information. I ended up trying a lot of different approaches, modules, firmware, version info, kernel command lines, fbcon... well I messed around.
Some time later, I find myself happily booting with my own kernel. The bootloader displayed my custom logo in param.lfs, but fbcon didn't work and I got a stock samsung gt-i9000 logo before android booted up! The phone worked, wifi worked, bluetooth worked, it was awesome (for 2.6.32.9 that is )!
So, great! Except I got overconfident and cocky. I made a slew of changes trying to get fbcon to work and to top off the evening I overwrote my working zImage with a broken kernel (without a backup of my working custom zImage or .config). I still have backups otherwise of course and haven't lost the functionality of my phone in any way, but now I'm just irritated.
Anybody else working on compiling from source on the GT-I9000M?
I pressed ahead and tried to recreate the conditions that got me a working kernel and as of yet I've been unsuccessful Luckily I've got a kmsg from the kernel when it booted. I can see the kernel command line on the custom kernel that booted was simply "console=ttySAC2,115200" although I do recall trying different values for init= ... The default init in the sources is /linuxrc which doesn't exist in initramfs.
There are also settings for the kernel command line and version information in arch/arm/mach-s5pv210/include/mach/param.h
Is there a known good method to compile from Samsung's sources?
I unpacked a known good zImage, played with it's initramfs, repacked it and it boots just fine.
I've tried again with a fresh copy of the gt-i9000 froyo-samsung branch:
- unpack initramfs from a known good 2.6.32.9 kernel
- make clean
- make aries_eur_defconfig
- make menuconfig, add initramfs, remove Samsung TV driver and FM radio module
- make
the resulting vmlinux is: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped (I know, it's zImage not vmlinux but I'm just doing sanity checks)
I have a custom logo in param.lfs which always displays on boot. A second logo is compiled into the kernel, and I do see a change in the logo when my kernel boots (it shows GT-I9000 instead of GT-I9000M after the first logo). This leads me to believe that the kernel is booting... but the phone powers off after booting.
I've tried the recommended changes to default.prop to use adb to obtain the kmsg of the new kernel. This has not worked however, which could mean that the kernel doesn't get as far as initramfs.
the kernel command line from the kmsg I have from the one time that a custom kernel of mine booted is simply: "console=ttySAC2,115200 loglevel=4" . There's no mention of init, which I think should be init=/init although aries_eur_defconfig seems to think that init=/linuxrc is appropriate (linuxrc doesn't exist?) Regardless, it doesn't seem to matter what I specify for init.
Which leaves proprietary Samsung kernel modules. If they can't load, this could explain everything I'm experiencing. It isn't clear what specific version the proprietary modules are expecting.
Maybe this will help somebody else. I've got it working now.
Attached is my working config.

[Q] stock bootloader loading custom kernel 3.1.10 help

So im currently dual booting Ubuntu and Android using Olife package. I would like to run kernelverison 3.1.10 with the lnux for tegra accelerated drivers. but i have sum questions/issues
1. I guess regular linux kernels wouldnt boot on the transformer (the chrome os kernel was needed for accelerated drivers) but what little bit i could find about what was needed for stock bootlader to load a kernel was sum info in the mach-ventena board section and 3.1.10 from nv has that, so hopefully it woud boot.
2. the area where the kernel and initrd are stored is around 10mb's the kernel compiles to around 4mb, the stock initrd that works is around 7mb makeing my boot.img to big for the partition, creating a initrd using mkinitramfs the initrd comes out small enuff but wont boot presumably because of tegra's strange partitioning (it cannot find the root partition)
so one possible fix is to remove any bloat from the stock initrd, the main size difference between my user generated initrd and stock is library files, does anyone know if i can safely remove any of those?
Another option is to compress my initrd using bzip2 or lmza but ive never done that before and have no idea if it requires the bootloader to have sum sort of bzip2 or lmza supprt.
So i have my 3.1.10 kernel compiled with all necesary drivers builtin so i need no modules in my initrd, i just need a small initrd capable of seeing and booting mmcblk7, and also if anyone knows if the stock bootloader cannot load 3.1.10 that would be helpfull especially the reason why.

Need a little help to get a self compiled kernel running

Hello,
Since a while, i'm trying to get a self compiled kernel running on my TF300T but with no success. The kernel sources that i have built are the one from cb22. (github.com/cb22/tf300tg_jb_kernel). My toolchain is built with the musl libc (arm-linux-musleabihf) like described in the CLFS book.
I configured the kernel with the cb22_tf300tg_defconfig and added the boot logo and the framebuffer device. The kernel builds without problems and i got a zImage in arch/arm/boot.
After this i created a tiny initrd like in the scripts of this GitHub project: (github.com/hach-que/Linux-On-TF300T) but with my own built busybox.
After that i created a boot blob with mkbootimg and blobpack and flashed the blob to staging. After reboot the only things that i am seeing are four Tuxes.
Now the questions: What i am doing wrong? How can i debug this problen? How do i get messages from the kernel?
At the end of the day i will have a system with just a shell.

Compile stock kernel for SM-G950F / SM-G955F

Hello,
I am participating in the thread to try to get DeX working without the station. I have the kernel source for SM-G950F (the one I rooted is S8, my main phone, official status, is the S8+).
I used stock Ubuntu 17.04.
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
export CROSS_COMPILE=..../aarch64-linux-android-4.9/bin/aarch64-linux-android- # Also hardcoded CROSS_COMPILE into Makefile as a futile attempt
export ANDROID_MAJOR_VERSION=7
make ARCH=arm64 exynos8895-dreamlte_eur_open_defconfig
make ARCH=arm64 -j8
It compiles, but with section mismatch. When flashed, it did not boot. Just hangs. No blue light.
I complained to Samsung. They instantly refused to have anything to do with it because of "root". I wasn't asking for support with the phone. I wanted to know why the source code does not work.
I verified that I was packing the boot.img properly after all with Windows Android Kitchen - I unpacked stock boot.img, repacked, flashed, and it worked.
The aim is to have a 100% custom kernel, but with CONFIG_DISPLAYPORT_ENG=y. And perhaps kill SE always enforcing.
But I am losing my mind right now. Nobody can help. They just say use a custom kernel. There are two things wrong with this. Custom kernels might cause other issues with Samsung DeX, and also, the developer of the custom kernel must have made the original source code compile successfully from source to make their custom kernel.
Maybe the section mismatch has nothing to do with it. But it is all I have right now. I tried other versions of toolchain, as well as UberTC or something. They all don't compile at all - they error partway through.
If anybody could show me how to take a stock boot.img and kernel source code from the SM-G950F, and repack the boot.img with the freshly compiled kernel, I would be most appreciative.
PS: My screen is completely stuffed, that is how I bought the phone so cheaply. So in TWRP, I can only see ghost images and have to guess where to tap to install the boot.img. Once it has booted, I use screen mirroring or DeX to a monitor.
Please let me know if you have any ideas. I can provide more information on request.
Did you ever resolve this?

UBERTC vs Linaro - Compile Problem

Hello all,
So I'm compiling a kernel from source. Everything goes well, no problem at all. However,
If I compile the kernel with Linaro 4.9.4-2017.01 toolchain (EXACTLY THE SAME CONFIG) my phone freezes during "Optimising Android" and reboots itself. This cycle goes on and on, never finishes creating the files. (toolchain = https://releases.linaro.org/compone...c-linaro-4.9.4-2017.01-x86_64_arm-eabi.tar.xz)
But, if I compile the kernel with UBERTC-arm-eabi-4.9, everything goes good and I don't have any problem. (toolchain = https://bitbucket.org/UBERTC/arm-eabi-4.9/downloads/)
So, what might the problem be? Why is this happening?
Please note that NO ERRORS come up during compilation and zImage is created successfully without any ERRORS, WARNING, etc, with both toolchains.
I'm using Android Image Kitchen for packing the zImage with a ramdisk I found from a custom kernel.
My regards.
Bump.

Categories

Resources