LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 06-26-2023, 09:50 AM   #1
beanthenewbieengineer
LQ Newbie
 
Registered: Jun 2023
Posts: 1

Rep: Reputation: 0
(Customised) Kernel oopsing and panicking, Aim is to host Ubuntu 22.04 on Digilent Nexy Videos FPGA with RISCV SoC using Litex toolchain


Hello!

For a bit of context, my aim is to host Ubuntu on a Rocket RISCV powered SoC using the Litex toolchain https://github.com/enjoy-digital/litex. I am using OpenSBI as my bootloader https://github.com/riscv-software-src/opensbi. The kernel which I am using is Litex's fork of the kernel https://github.com/litex-hub/linux on the litex-rebase branch. This fork has driver support for the custom peripherals and components which the Litex SoCs uses.

I am using an Ubuntu cloud image https://cloud-images.ubuntu.com/jamm...mg-riscv64.img and have modified fstab (loading dependencies into the FPGA using sdcard, one partition containing bootloader, kernel image, initrd, another containing root filesystem).

I have built a kernel image and an initrd which I side-load into the SoCs memory from SD Card, which the bootloader invokes. Please read https://www.contrib.andrew.cmu.edu/~...ng_fedora.html to see the guide which I used for configuring Ubuntu (Yes I know it is for Fedora but both use systemd as init process, maybe this is nativity)

The kernel panic which I encounter is a bit beyond me, though I did research some of the key errors I would like to ask for some support.

Please find attached bellow the console log, SoC device tree file, as well as kernel configuration file which I am using
https://github.com/enjoy-digital/lit...log_ubuntu.txt

https://github.com/enjoy-digital/lit...dts_ubuntu.txt

https://github.com/enjoy-digital/lit...552/defcon.txt


PS: I’m new to LQ so please be patient!

—Thanks
 
Old 06-26-2023, 11:01 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,453

Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
Hello, beanthenewbieengineer and wwelcome to LQ.

Let me politely suggest that you change your handle, because you won't be a newbie forever (I hope) and there are seriously qualified guys here so 'engineer' sounds like boasting.

I don't like the sound of what you're doing and am not surprised it's failing. You can't fart about with toolchains. The toolchain consists of Glibc, kernel headers & gcc generally. Every program uses /lib/ld-linux.so (which these days points to /lib/ld-<version>.so) for basic I/O. If you get your /lib/ld-linux.so from glibc-2.33, stuff compiled against glibc-2.32 & earlier won't run. When you say
Quote:
my aim is to host Ubuntu on a Rocket RISCV powered SoC
I take it you're trying to RUN ubuntu?

If so, you've got a toolchain - the Ubuntu one. So you should compile your drivers with the Ubuntu toolchain, providing they put the source code up there for you to use.

If Litex don't put the driver source online, do they have a decent RiscV OS? If they don't have either, stop and rethink. I've done the FPGA think myself, and that's a competitive space. If you look in the arch/ directory, you'll see a number of architectures in various states. Most of them are cpus specific to a FPGA manufacturer, provided to lock you in to their FPGAs. They will have plenty of in-house support for them, if not the RiscV. Also, watch the wafer fab size. As things speed up, they need to be getting the fab size down. Xilinx are the handiest for linux, but last I checked, their speed was slow. That was about 10 years back, but I settled on Quartus then.

This is now. Do the homework if Litex don't give you what you want. Another manufacturer may be better, unless, of course, you're locked into Litex.

I'm not interested in your project. Take a photo of the screen with you mobile to catch the kernel panic. It's the bit before the stack trace that we need to see.
 
  


Reply

Tags
embedded, kernel, panic, ubuntu



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Digilent embraces SYZYGY expansion with new Linux-on-Zynq SBCs LXer Syndicated Linux News 0 11-01-2019 04:25 AM
Installation (Linux) RISCV GNU Toolchain error: C compiler cannot create executables, recipe for target 'configure-target-libgomp' failed riscv Linux - Newbie 2 03-23-2017 08:36 AM
LXer: Intels ARM/FPGA Stratix 10 SoC is first 14nm FPGA LXer Syndicated Linux News 0 10-11-2016 09:06 PM
kernel panicking after putting 35 kernel rudhi Linux - Kernel 1 12-30-2010 04:06 AM
FC8 customised distro (inc customised packages) scaryAardvark Linux - Software 4 06-16-2008 08:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration