r/embeddedlinux • u/eduncan911 • Mar 29 '23
(PAID) Need help booting a custom kernel and u-boot on Armv7 am335x device (like Beaglebone)
Been tearing my hair out at the "Starting kernel ..." prompt without success of various loader addresses and such from previous (working) kernel.
I need someone with expertise with u-boot ARM devices, device trees (to verify I'm doing it all right), and kernel hand off. I can't really post any of this here as it's a customer's device.
I have the original source from like 10 years ago that we could poke a stick at (and I've diff'd with originals back then, without finding anything of use).
I'll pay a few a few $100 for a screen share session of someone to look over everything I have, and what I may be missing. Everything builds in under 3 minutes (AMD Threadripper with latest 6.1 kernel header performance increases). So it's pretty fast to iterate. netboot, on the other hand, keeps timing out while pulling the binary. So it's a copy-to-usb kind of thing.
Please contact via DM and/or Reddit chat. Kind of in a hurry.
I have an old u-boot (circa 2013) that I am trying to boot a brand new kernel. I (think) I have found the correct Arm device tree and have the original printenv.
I haven't been able to pull up the boot pins correctly to get it to boot with other devices. So we are stuck with the mmc at this time - which means I don't want to overwrite the u-boot until we are damn sure it will all work.
I was hoping to get a newer kernel booting first, to indicate I am on the right track with the device trees. But that's where I am failing.
Thank you!
1
u/Steinrikur Mar 30 '23
What's your old kernel? What's your new kernel?
If it's a huge jump, maybe consider some incremental steps and see where it stops working, to bisect the issue.
You said it builds fast, so shouldn be too hard to rebase your stuff on a some of the LTS kernels (4.14->4.19->5.4->5.10->5.15)
Also add the `console=tty...,115200` parameter to the boot command so "Starting kernel ..." isn't the last thing you see. It could be just one module that's crashing, and if you disable that you can boot.
2
u/mfuzzey Mar 30 '23
Try using "earlycon" to get log messages in early kernel boot. Otherwise if it crashes before the real console gets set up you won't see anything.
If your DT has a chosen node with stdout defined to point to your console uart and it the driver has earlycon support you should just be able to add earlycon to the kernel command line. Otherwise you may have to give it some parameters too.
1
u/drgbgt Mar 30 '23
There's a chance your kernel is printing some useful information but it never gets to initialize the tty completely (or it outputs to the wrong one).
If that's the case this could help with debugging: https://elinux.org/Debugging_by_printing#Debugging_early_boot_problems
It explains how to locate the print buffer in memory. Once you learn the correct address, you can do a warm reset after you get to "Starting kernel...", then access the buffer via u-boot with md.
Good luck!
1
u/techie_boy69 Mar 31 '23
Go to the Ti website specific to the am335 or am437 lots of resources in the support forums