Giter Club home page Giter Club logo

Comments (11)

aaldhaher avatar aaldhaher commented on May 23, 2024

@synackd I am also experiencing this issue with the same lineup you are using. I've tried running qemu-linuxboot make run rule from the Heads cloned repo, and also by building the linuxboot cloned repo and pointing it to use the bzImage and initrd images from my Heads build. Both result in the same assert you referenced, where it just hangs:

LinuxBoot: BDS time has arrived
LinuxBoot: connect pci root brdiges
efi_visit_handles 2F707EBB
handle_count=00000001
PCI Bus First Scanning
PciBus: Discovered PCI @ [00|00|00]

PciBus: Discovered PCI @ [00|01|00]
   BAR[0]: Type = PMem32; Alignment = 0xFFFFFF;	Length = 0x1000000;	Offset = 0x10
   BAR[2]: Type =  Mem32; Alignment = 0xFFF;	Length = 0x1000;	Offset = 0x18

PciBus: Discovered PCI @ [00|02|00]
ASSERT [PciHostBridgeDxe] /localdata/linuxboot/heads/build/linuxboot-git/edk2/MdePkg/Library/BasePciCf8Lib/PciCf8Lib.c(1114): ((Address) & (~0xffff0ff | (3))) == 0

Have you been able to get past this?

from linuxboot.

synackd avatar synackd commented on May 23, 2024

The way I'm working around this now is to use an older commit that requires a patched kernel. Currently, I'm using f0ea0af.

from linuxboot.

aaldhaher avatar aaldhaher commented on May 23, 2024

Thanks for the pointer @synackd. I am using the kernel + initrd built out of HEADS, did you have to further patch the 4.14.62 kernel in HEADS to make it work with this older Linuxboot commit? I got past the ASSERT error, the kernel starts booting but I ran into a panic (Unable to mount root fs on unknown-block(0,0)). I have to dig deeper I suspect a qemu issue on my end.

from linuxboot.

synackd avatar synackd commented on May 23, 2024

The patch is essentially for allowing the kernel to act as a UEFI bootloader so that doesn't seem to be the issue for you here. Check your kernel config and make sure the path to your initramfs is correct.

from linuxboot.

synackd avatar synackd commented on May 23, 2024

Did a little more testing commit-by-commit and the problem starts at 03a592c:

commit 03a592cf14bb41abc91158993b42c32184ff99a7
Author: Trammell Hudson <[email protected]>
Date:   Thu Aug 9 10:21:13 2018 -0400

    Linux should be an application, not a DXE driver, with the BDS patch

diff --git a/Makefile.uefi b/Makefile.uefi
index 4df5e0f..337b2df 100644
--- a/Makefile.uefi
+++ b/Makefile.uefi
@@ -22,7 +22,7 @@ IntelCrystalRidgeGuid         := 626967C7-071B-4D9A-9D0C-F112CF0836E9
 LpcSomethingGuid               := 64021DFE-A62C-42A7-BF46-15078CDF9F89

 Linux-guid := DECAFBAD-6548-6461-732d-2f2d4e455246
-Linux-depex := $(RuntimeArchProtocolGuid)
+Linux-type := APPLICATION

 Initrd-type := FREEFORM
 Initrd-guid := 74696e69-6472-632e-7069-6f2f62696f73

though the actual issue might be somewhere in dxe/ which comprises the Linuxboot UEFI application.

from linuxboot.

aaldhaher avatar aaldhaher commented on May 23, 2024

Good sleuthing work. I'm still getting that kernel panic regarding it being unable to mount root fs on unknown-block(0,0). I have checked the kernel config to make sure it's pointing to the correct initramfs blob:

-bash-4.2$ pwd
/localdata/linuxboot/heads/build/linux-4.14.62/linux-linuxboot
-bash-4.2$ cat .config | grep INITRAMFS
CONFIG_INITRAMFS_SOURCE="../../../blobs/dev.cpio"
CONFIG_INITRAMFS_ROOT_UID=0
CONFIG_INITRAMFS_ROOT_GID=0
CONFIG_INITRAMFS_COMPRESSION=".xz"
-bash-4.2$ file ../../../blobs/dev.cpio 
../../../blobs/dev.cpio: ASCII cpio archive (SVR4 with no CRC)

And yet I still get the kernel panic:

[    0.223660] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -2
[    0.225047] Please append a correct "root=" boot option; here are the available partitions:
[    0.226458] 0100           65536 ram0 
[    0.226458]  (driver?)
[    0.227500] 0101           65536 ram1 
[    0.227500]  (driver?)
[    0.228607] 0102           65536 ram2 
[    0.228607]  (driver?)
[    0.229649] 0103           65536 ram3 
[    0.229649]  (driver?)
[    0.230707] 0104           65536 ram4 
[    0.230707]  (driver?)
[    0.231733] 0105           65536 ram5 
[    0.231733]  (driver?)
[    0.232787] 0106           65536 ram6 
[    0.232787]  (driver?)
[    0.233888] 0107           65536 ram7 
[    0.233889]  (driver?)
[    0.234910] 0108           65536 ram8 
[    0.234910]  (driver?)
[    0.235934] 0109           65536 ram9 
[    0.235934]  (driver?)
[    0.237120] 010a           65536 ram10 
[    0.237121]  (driver?)
[    0.238181] 010b           65536 ram11 
[    0.238181]  (driver?)
[    0.239219] 010c           65536 ram12 
[    0.239219]  (driver?)
[    0.240320] 010d           65536 ram13 
[    0.240320]  (driver?)
[    0.241397] 010e           65536 ram14 
[    0.241402]  (driver?)
[    0.242524] 010f           65536 ram15 
[    0.242524]  (driver?)
[    0.243581] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.245066] Kernel Offset: disabled
[    0.245681] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

I've even tried booting the bzImage + initrd straight in QEMU without involving Linuxboot and I get the same issue. I thought if a kernel has been built to include an initramfs it mounts that instead and ignores any 'root=' kernel parameter.

from linuxboot.

synackd avatar synackd commented on May 23, 2024

You have xz kernel compression selected while your initramfs is uncompressed (.cpio).

from linuxboot.

aaldhaher avatar aaldhaher commented on May 23, 2024

Yes I questioned that as well, but I never explicitly set CONFIG_INITRAMFS_COMPRESSION=".xz" myself in linux-linuxboot.config. I'm not sure how it is inheriting that option. I will try recompiling with it turned off.

from linuxboot.

synackd avatar synackd commented on May 23, 2024

That config option is in Linux itself. Go to the Linux source dir, make menuconfig, and go to "General Setup" and scroll down.

Seeing as your mount issue is unrelated to this ASSERT issue, I would suggest asking on the OSFW Slack in the #linuxboot channel if you have further questions on it.

from linuxboot.

synackd avatar synackd commented on May 23, 2024

This no longer occurs since #51 was merged.

from linuxboot.

xcc-123 avatar xcc-123 commented on May 23, 2024

Transfering control to BDS 7B44408
Entry Point 7B42280 (7B42280)

LinuxBoot: BDS time has arrived
LinuxBoot: connect pci root brdiges
efi_visit_handles 2F707EBB
status=0000000E
LinuxBoot: signal root bridges connected
OnRootBridgesConnected: root bridges have been connected, installing ACPI tables
Select Item: 0x19
Select Item: 0x27
Select Item: 0x19
Select Item: 0x25
Select Item: 0x19
Select Item: 0x29
Select Item: 0x19
Select Item: 0x26
InstallQemuFwCfgTables: installed 7 tables
LinuxBoot: signal dxe end
LinuxBoot: signal smm ready to lock
InstallProtocolInterface: 60FF8964-E906-41D0-AFED-F241E974E08E 0
efi_visit_handles 00000000
handle_count=00000028
LinuxBoot: bds_main dispatch
LinuxBoot: signal ready to boot
LinuxBoot: Looking for bzimage
LinuxBoot: FFS buffer=00000000072B0018
LinuxBoot: FFS length=00127510
LinuxBoot: unable to load bzImage image
ASSERT [DxeCore] /home/xcc/linuxboot-main/edk2/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c(607): ((BOOLEAN)(0==1))
!!!! X64 Exception Type - 03(#BP - Breakpoint) CPU Apic ID - 00000000 !!!!
RIP - 0000000007F3FB6F, CS - 0000000000000018, RFLAGS - 0000000000000002
RAX - 0000000000000070, RCX - 0000000007F2BCA0, RDX - 00000000000003F8
RBX - 0000000007F2BCA0, RSP - 0000000007F2BC60, RBP - 0000000007F50260
RSI - 0000000007F4FBA8, RDI - 0000000007991218
R8 - 0000000000000001, R9 - 0000000000000000, R10 - 0000000000000000
R11 - 0000000000000000, R12 - 0000000007F50260, R13 - 0000000000000000
R14 - 0000000007A1AF98, R15 - 0000000003FDFC01
DS - 0000000000000008, ES - 0000000000000008, FS - 0000000000000008
GS - 0000000000000008, SS - 0000000000000008
CR0 - 0000000080010033, CR2 - 0000000000000000, CR3 - 0000000007C01000
CR4 - 0000000000000668, CR8 - 0000000000000000
DR0 - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000
DR3 - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400
GDTR - 00000000FFFFFF80 000000000000001F, LDTR - 0000000000000000
IDTR - 0000000003FDDD80 000000000000021F, TR - 0000000000000000
FXSAVE_STATE - 0000000007F2B8C0
!!!! Find image based on IP(0x7F3FB6F) /home/xcc/linuxboot-main/edk2/Build/MdeModule/DEBUG_GCC5/X64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll (ImageBase=0000000007F2C000, EntryPoint=0000000007F2C240) !!!!

do you know what is the reason for this problem??? @synackd

from linuxboot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.