LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Custom Kernel, Custom Loader (https://www.linuxquestions.org/questions/linux-kernel-70/custom-kernel-custom-loader-4175668979/)

xenon360linux 02-04-2020 12:57 PM

Custom Kernel, Custom Loader
 
Hello world,

Long time reader, first time poster here. I’ve been working to compile the latest Linux kernel for the PowerPC64 big endian Xenon platform - the Xbox 360. I have a functioning cross compiler which can generate executable ELFs, loader by a customer loader. This loader, the XeLL or Xenon Linux Loader, as the name suggests is capable of loading a Linux kernel into memory and executing it.

When I use cross-objdump to compare my kernel to the last known-working 360 linux kernel, I get identical outputs in regards to the elf32 format and the same entry point. I’ve built a PowerPC Ubuntu image to test with, and imported my kernel and updated the initramfs via QEMU. When I attempt to load my kernel however, I get an error stating the rootfs could not be found. The kernel attempts to tell me what the available partitions are, but none are listed even though I have a drive connected and it seems to be recognized looking at the kernel debug output.

Not sure where else to turn. It seems silly that I’ve been able to cross compile and successfully execute the latest kernel, but I can’t get the dang rootfs problem solved! Any help would be greatly appreciated! Let me know if kernel debug output needs to be garnished.

hazel 02-05-2020 10:13 AM

Failure to find the root filesystem suggests a driver problem to me. You need to have available the scsi driver, the ahci driver for sata drives, and the appropriate driver for your root filesystem. They should all be on your initramfs and the initramfs driver built in.

xenon360linux 02-05-2020 11:38 AM

Hello Hazel,

Thanks for your reply! That makes sense to me. It seems I’ve made a silly mistake as I expected. I do in fact have a SATA driver patched for the Xenon platform. I am however trying to boot from a USB had disk, which evidentially I do not have a driver enabled for. I trimmed a great deal of drivers and functionality while configuring the kernel, as the config file I started from was created some years ago for kernel 3.5.

I’ll relocate my distribution to a SATA hard disk tonight and attempt to boot from it. This should confirm the driver I’m using for the SATA is functioning, and I’ll go from there and report results.

Edit note: I do see the kernel debug output recognize the usb disk with an sd prefix. However, booting an old Ubuntu 10.10 livecd image with a 2.x kernel from the same usb disk reports dready errors. It’s a Walmart special usb hard disk, highly possible it doesn’t play nice with Linux in general.

Thanks again!


All times are GMT -5. The time now is 09:53 AM.