Comments (7)
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:
cd
into src and build golang toolkitcd
into biscuit, adjusted GOPATH, QOPTS and runmake 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.
from biscuit.
您好,邮件已收到~
Have you received the solution?
from biscuit.
What was the solution? Can you post it here please?
from biscuit.
from biscuit.
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.
from biscuit.
Related Issues (12)
- How to build Redis to run in biscuit? HOT 1
- Got "64bit addressess not supported" when "make qemu CPUS=2" HOT 1
- how build the project?
- Userland binaries - How was redis and nginx compiled?
- `syscall` instruction unsupported
- how can I exit from biscuit? HOT 2
- Fails to build if GOPATH is set in parent shell HOT 1
- Unexpected runtime output HOT 1
- Memory Allocation/Free unexpected behavior HOT 1
- Networking HOT 1
- Write User-space Go for biscuit HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from biscuit.