GithubHelp home page GithubHelp logo

boot error about biscuit HOT 7 OPEN

mit-pdos avatar mit-pdos commented on August 19, 2024 2
boot error

from biscuit.

Comments (7)

lixiaozhui avatar lixiaozhui commented on August 19, 2024

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.13.8 linux/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/jack/.cache/go-build" GOENV="/home/jack/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/jack/go" GOPRIVATE="" GOPROXY="https://goproxy.cn" GOROOT="/usr/lib/go-1.13" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/lib/go-1.13/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build706439729=/tmp/go-build -gno-record-gcc-switches"

What did you do?

following instructions of README.md mostly:

  1. cd into src and build golang toolkit
  2. cd into biscuit, adjusted GOPATH, QOPTS and run make qemu CPUS=2

Here's detailed modifications:

diff --git a/biscuit/GNUmakefile b/biscuit/GNUmakefile
index bb4cae8898..15b53ace54 100644
--- a/biscuit/GNUmakefile
+++ b/biscuit/GNUmakefile
@@ -8,7 +8,7 @@ ASFLAGS := $(BASEFLAGS) -nostdlib -nostdinc -I$(TOP)
 CFLAGS := $(BASEFLAGS) -ffreestanding -nostdlib -nostdinc -fno-builtin \
        -mno-red-zone -fno-stack-protector
 CXXFLAGS := $(BASEFLAGS) -ffreestanding -nostdlib -fno-builtin -mno-red-zone
-GOPATH ?= $(shell pwd)
+GOPATH := $(shell pwd)
 # bootloader sources
 ASMS := boot.S
 CS   := bootmain.c main.c chentry.c
@@ -85,7 +85,7 @@ SKELDEPS := $(shell find $(SKEL))
 
 CPUS := $(shell echo $${CPUS:-1})
 
-QOPTS := -m 8G -smp cpus=$(CPUS) -cpu Nehalem
+QOPTS := -m 2G -smp cpus=$(CPUS) -cpu Nehalem
 # for testing bhw2's configuration
 #QOPTS := -m 8G -cpu Nehalem -smp sockets=2,cores=10,threads=2

What did you expect to see?

kernel should boot without error

What did you see instead?

SeaBIOS (version 1.13.0-1ubuntu1)


iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+7FF8C9C0+7FECC9C0 CA00
                                                                               


Booting from Hard Disk...
 LAPIC Mhz: 00000000000003E7 
 CPU Mhz: 0000000000000AF8 
 no random!
Reserved 65536 pages (256MB)
              BiscuitOS
          go version: go1.10.1
  1685 MB of physical memory
CPUID: family: 6, model: 1a
sse3 true, ssse3 true, sse41 true, sse42 true, avx false
invariant TSC not supported
bmi1 false, bmi2 false
1GB pages not supported
No hardware performance monitoring
AHCI 8086 2922 (0:4:0), bara 0xfebb1000, MSI 57
ACPI CPUs 2, found 1 APs (0 hyperthreads) across 2 packages
Joining at most 4 CPUs split between packages (no hyperthreads) on 2 packages
 cpu 0000000000000001 joined
done! 1 APs found (1 joined)
Package counts:
  0:   1
  1:   1
Using MEMORY FS
FS log length 1024, maxtrans 512
no FS recovery needed: head 82
start [bin/init []]
read too few elf bytes (program headers)
panic: exec failed -1

goroutine 1 [running]:
main.main.func2(0xc000512260, 0x8, 0x8, 0x0, 0x0, 0x0)
	/home/jack/osdev/biscuit/biscuit/src/kernel/main.go:1688 +0x668
main.main()
	/home/jack/osdev/biscuit/biscuit/src/kernel/main.go:1693 +0x38a
 exit with code 0000000000000002 .
halting

I have the same problem as you,and same error output.do you have fix?

from biscuit.

wuhang-du avatar wuhang-du commented on August 19, 2024

from biscuit.

lixiaozhui avatar lixiaozhui commented on August 19, 2024

您好,邮件已收到~

Have you received the solution?

from biscuit.

h4sh5 avatar h4sh5 commented on August 19, 2024

What was the solution? Can you post it here please?

from biscuit.

wuhang-du avatar wuhang-du commented on August 19, 2024

from biscuit.

rutvora avatar rutvora commented on August 19, 2024

For me, the following solution worked:
In biscuit/src/kernel/syscall.go:3314 change 512 to 1024 (or some number larger than 512). It seems that the new init executable generated is larger than 512 bytes, but the value is hardcoded in this line.
After this change, I ran make qemu CPUS=2 again and I was dropped in their shell

from biscuit.

wuhang-du avatar wuhang-du commented on August 19, 2024

from biscuit.

Related Issues (12)

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.