加载论坛时出错,请强制刷新页面重试。

loongarch FreeBSD

std3lqi

那就是说可以installkernel,重启试试了?关于这部分,我在参考 https://wiki.freebsd.org/arm/crossbuild。不知道方向对不对


hitmoon

std3lqi 不用install,直接拿qemu 测试启动,debug


std3lqi

boot0,boot1,boot2 怎么弄呢?


hitmoon

std3lqi 还得编译 bootloader

make CC=/path/to/cc CPP=/path/to/cpp TARGET=loongarch TARGET_ARCH=loongarch64 KERNCONF=QEMU MACHINE=loongarch MACHINE_CPUARCH=loongarch MACHINE_ARCH=loongarch -C stand


std3lqi

仅用 -kernel 启动qemu?我指定了efi bios,直接进UEFI了,不指定bios,进qemu console了,看起来还是要boot。stand没有make target?我看你-C只是编译了一下。


hitmoon

std3lqi 没有target,我的源码里面默认就会编译出loader_simp.efi , 可以把loader 和 kernel 按照efi 引导的要求做成一个小磁盘镜像,然后你用UEFI 加载就行了


std3lqi

有一点点进展

Consoles: EFI console

Reading loader env vars from /efi/freebsd/loader.env

Setting currdev to disk0p1:

FreeBSD/loongarch EFI loader, Revision 1.1

Command line arguments: l

Image base: 0xd773000

EFI version: 2.70

EFI Firmware: EDK II (rev 1.00)

Console: efi (0x20000000)

Load Path: \EFI\BOOT\BOOTLOONGARCH64.EFI

Load Device: PciRoot(0x0)/Pci(0x3,0x0)/HD(1,GPT,48776080-8C8C-11EF-B4FC-5B158

14000FB,0x28,0x14000)

BootCurrent: 0001

BootOrder: 0000 0001[*] 0002

BootInfo Path: PciRoot(0x0)/Pci(0x3,0x0)

Ignoring Boot0001: Only one DP found

Trying ESP: PciRoot(0x0)/Pci(0x3,0x0)/HD(1,GPT,48776080-8C8C-11EF-B4FC-5B1581400

0FB,0x28,0x14000)

Setting currdev to disk0p1:

Trying: PciRoot(0x0)/Pci(0x3,0x0)/HD(2,GPT,53FB2A59-8C8C-11EF-B4FC-5B15814000FB,

0x14028,0x1EBFB0)

Setting currdev to disk0p2:

-

/boot/kernel/kernel text=0x6e8fd4 text=0x15e500 text=0x50 data=0xb5040 data=0x0+

0x1c037e 0x8+0xb2668+0x8+0xb25bb

Hit [Enter] to boot immediately, or any other key for command prompt.

Booting [/boot/kernel/kernel]...

Using DTB provided by EFI at 0xfefe000.

Failed to locate MP Service Protocol.


std3lqi

碰到panic,说是ether module not found,还没有什么头绪


hitmoon

std3lqi 截图看看,我这里没有这问题


std3lqi


std3lqi

发现kern_module.c 里modules第一次访问是好的,第二次访问时,全空了,内存被清零了。


hitmoon

std3lqi 看起来有大bug 😅


ghw

我也到这了,不过QEMU_EFI_8.2.fd起步来

FS0:\boot\> loader_sFSOpen: Open '.' Success
FSOpen: Open '\boot' Success
FSOpen: Open '.' Success
FSOpen: Open '..' Success
Consoles: EFI console   
   Reading loader env vars from /efi/freebsd/loader.env
Setting currdev to disk0p1:
FreeBSD/loongarch EFI loader, Revision 1.1

  Command line arguments: loader_simp.efi
  Image base: 0xd28a000
  EFI version: 2.70
  EFI Firmware: EDK II (rev 1.00)
  Console: efi (0x20000000)
  Load Path: \boot\loader_simp.efi
  Load Device: PciRoot(0x0)/Pci(0x3,0x0)/HD(1,GPT,389A6824-19D2-7D44-8CF3-78B1A869AC6B,0x800,0x5DC000)
  BootCurrent: 0002
  BootOrder: 0000 0001 0002[*]
  BootInfo Path: Fv(5D19A5B3-130F-459B-A292-9270A9E6BC62)/FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)
Ignoring Boot0002: Only one DP found
Trying ESP: PciRoot(0x0)/Pci(0x3,0x0)/HD(1,GPT,389A6824-19D2-7D44-8CF3-78B1A869AC6B,0x800,0x5DC000)
Setting currdev to disk0p1:
> include /boot/loader.4th
> only forth definitions
only: unknown command
only: unknown command

/boot/kernel/kernel text=0x6e8fd4 text=0x15e000 text=0x50 data=0xb5040 data=0x0+0x1c037e 0x8+0xb2668+0x8+0xb25bb
Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...                
Using DTB provided by EFI at 0xfefe000.
Total processors: 1, Enabled processors: 1
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V03101019 I0
SetUefiImageMemoryAttributes - 0x000000000E3E0000 - 0x0000000000040000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x000000000E340000 - 0x0000000000040000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x000000000E2A0000 - 0x0000000000040000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x000000000E1F0000 - 0x0000000000040000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x000000000E150000 - 0x0000000000040000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x000000000DFC0000 - 0x0000000000050000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x000000000DE20000 - 0x0000000000040000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x000000000DD80000 - 0x0000000000040000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x000000000DCE0000 - 0x0000000000040000 (0x0000000000000008)
---<<BOOT>>---
Copyright (c) 1992-2023 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
       The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 14.0-RELEASE-p4 #0 RELEASE_14_0_p4-n265434-8c653a20dca3: Wed Oct 23 22:06:52 CST 2024
   root@gehaowu.com:/usr/obj/usr/src/loongarch.loongarch64/sys/GENERIC loongarch
FreeBSD clang version 17.0.6 (https://github.com/llvm/llvm-project.git llvmorg-17.0.6-0-g6009708b4367)
VT: init without driver.
CPU 0  : Vendor=Loongson Core=Loongson-64bit  
 marchid=0x2
real memory  = 4294897664 (4095 MB)
avail memory = 4167294976 (3974 MB)
secondary cpu entry: 0x54042a0
secondary cpu entry: 0x54042a0
secondary cpu entry: 0x54042a0
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
CPU 1  : Vendor=Loongson Core=Loongson-64bit  
CPU 2  : Vendor=Loongson Core=Loongson-64bit  
CPU 3  : Vendor=Loongson Core=Loongson-64bit  
arc4random: WARNING: initial seeding bypassed the cryptographic random device because it was not yet seeded and the knob 'bypass_before
_seeding' was enabled.
random: entropy device external interface


hitmoon

ghw 你编译的是generic 配置啊


ghw

hitmoon 恩,我看QEMU配置文件里没有实质内容就没指定QEMU配置文件了

昨天后来测试过QEMU一样效果


« 上一页

知识共享许可协议
本站文章除其作者特殊声明外,一律采用CC BY-NC-SA 4.0许可协议进行授权。
进行转载或二次创作时务必以相同协议进行共享,严禁用于商业用途