Building kernel 5.10 for blueline - linux-kernel

I was wondering if there's a way for me to port kernel 5.10 to my device Google Pixel 3 (blueline) as the official Google support ended with kernel 4.9, but there's features that I need of kernel 5.10 that are not present in the kernel 4.9, so can you tell me how can I build kernel 5.10 for blueline? As far as I know, it is completely possible. By the way, I'm using Ubuntu 22.04 for all of this.
I tried using a GKI (Generic Kernel Image) of the kernel 5.10 with an Android 13 ROM but it didn't boot (i used both the boot.img and the uncompressed kernel image, none of them boots). I used fastboot to flash them:
fastboot flash boot boot.img
fastboot boot boot.img

it is not that straightforward. Please take a look at PostMarketOS
https://wiki.postmarketos.org/wiki/SDM845_Mainlining
and AOSP M:
https://github.com/aospm

Related

Can we use U-Boot to boot the Linux for x86-64 system?

Is it possible to boot Linux kernel using U-Boot in x86-64 machine?
Linux can boot directly from a variety of firmware implementations including U-Boot. As for loading an OS, U-Boot supports directly booting a 32-bit or 64-bit Linux kernel as part of a FIT image. It also supports a compressed zImage.
Check the links here and here

setting up a development environment for Linux device driver

I am trying to read the LDD book by Jonathan Corbet, Greg Kroah-Hartman, Alessandro Rubini and implement the sample modules. So to begin with, I tried setting up a development system. Installed Ubuntu 16.04 Xenial. Now, I just created a directory and wrote the hello_world module with a Makefile. Got it built and run it, verified the dmesg logs.
Is that all the development setup? I searched online and found articles where they are asking to download and compile the kernel, use a VM to boot the kernel. What is the reason? Or what am I missing?
Is there any better article which clarifies this?
Thanks
hago
You can try one more way:
If you have native windows, install virtual machine software such as
Virtual box. Get your favourite Linux distribution (no bias, just
an example - Ubuntu) and install it through Virtual box.
Get the latest kernel (or of your choice) from kernel.org.
Choose the platform you want to build this kernel for. E.g arm64 or x86.
In case you do not have real boards (e.g RPi for arm variant), you can use qemu-arm64 or qemu-x86 to run your compiled kernel. This is also a good option when users do not have the boards.
Another good use case for using qemu for the newbie kernel developers is even they write some modules which crashes, then the qemu instance is crashed so no harm.
I think using qemu is a good option for people who starts to learn kernel programming and also want to try writing some of their modules and do not intend to purchase hardware at this point of time.
It depends on your target. For your case, you have made a kernel driver for your computer (it run Linux kernel).
But if you want to develop a Kernel driver for another target like Rasberry Pi, ARM board, X86-X64 board, ... you must learn to compile, edit Kernel config, boot Kernel image, ... because each target has different kernel versions.
You can refer to this training for more detail: https://bootlin.com/training/embedded-linux/

OpenGL 3.3 Ubuntu (Virtual Machine)

I need openGL 3.3 or higher to use GLSL 3.3. My problem is that I have Mac Os X which doesn't allow to use a version higher than 2.1 of OpenGL. I've installed a virtual machine of Ubuntu inside my system but also has the version 2.1 of OpenGL. I don't understand what's going on because I have an AMD Radeon HD 6490M 256 MB which is compatible with version 4.1 of OpenGL. Is there any way that I can use openGL 3.3 or higher without doing a disk partition?
I don't understand what's going on because I have an AMD Radeon HD 6490M 256 MB which is compatible with version 4.1 of OpenGL
The GPU serves the host machine. The virtual machine sees only some dumb framebuffer device, or the OpenGL API available to the VM running on the host passed through the guest.
If you want to leverage the OpenGL-4 capabilities you must install an OS that can access the GPU natively. Also, if you want to run Linux you'll have to install the proprietary fglrx drivers (also called Catalyst for Linux), as the open source drivers that ship as distribution default haven't caught up yet.
Is there any way that I can use openGL 3.3 or higher without doing a disk partition?
Upgrade to OS X 10.9 when it comes out or grab the beta.
Or find some VM software for OS X that supports VGA passthrough.
If you're willing to repartition you can install Windows or Linux natively and use the drivers from AMD.

Confused about s3c_nand.c and s3c2410.c in the Linux kernel source

Currently I am porting Linux kernel to a s3c6410 based development board, so I referred to mini6410, real6410 Linux kernel source, when it comes to the Nand Flash driver, I found s3c_nand.c file in drivers/mtd/nand/ which seems to be written by Samsung, however when I checked the official Linux kernel source, I can only find s3c2410.c file even in the newest version.
So my question is why s3c_nand.c is not included in the Linux kernel source and what is the difference between s3c_nand.c and s3c2410.c, or can I use s3c2410.c for my s3c6410board?

Qemu emulator arm for tegra2

I have Toradex Colibri t20 embedded board Linux image (U boot,kernel,roofs). Colibri t20 is based on tegra2 arm-cortex-a9 processor. I want to run this Linux kernel in Qemu emulator.How can i boot with qemu?
qemu-system-arm can run u-boot and kernel SW, only when it has support for the board that those SW were configured/built for.
ARM's versatilepb and vexpress-a9 are supported. There are good tutorials out there for using those boards, Balau on kernel, also Kumar
Bare metal simulation is less ambitious. There, roughly speaking, QEMU only has to emulate the processor. Check out Balau on bare metal. Quick search shows maybe there is support in progress for Tegra2.
I'd suggest installing current packages on your host, see what machines and cpus are supported. Not sure of the following syntax detail, but something like
qemu-system-arm -M ?
is the way to get the list of supported machines.

Resources