Comments (5)
Structs on ARM are fixed in the meantime btw!
from interim.
I've figured out that the rpi2-build.sh
script expects newlib in a location like on Debian, after patching it the resulting binaries grew a bit. Still a white screen. Debugging by setting the framebuffer color reveals that doing anything involving USPi avoids reaching the remaining code, so that's weird.
from interim.
I've figured out how to load Interim on a more recent QEMU than in the bundled scripts. Here's my writeup so far:
You'll need a recent QEMU for this with the raspi2 system. The
general command line for launching is:qemu-system-arm -M raspi2 -m 1024 -kernel build/interim-arm.elf -serial stdio
Note that QEMU supports running the raw binary image (located at
build/kernel7.img
), however it expects an entry point of0x10000
instead of0x8000
indevices/rpi2/arm.ld
.The built kernel will hang, to debug why you'll have to boot QEMU with
a gdb server:qemu-system-arm -M raspi2 -m 1024 -kernel build/interim-arm.elf -gdb tcp::26000
Open a suitable
gdb
from the same toolchain as what you've compiled
the kernel with:arm-none-eabi-gdb (gdb) target remote localhost:26000 (gdb) symbol-file build/interim-arm.elf (gdb) continue (gdb) ^C (gdb) bt
The backtrace suggests that hardware timers aren't working correctly.
The workaround for this is to replace the definition ofuart_init
with the commented out version that uses busy-waiting for delays.
Starting the kernel then proceeds up to a white screen and prints out
messages successfully via UART until encountering the USPi exception
handler. Fixing this requires understanding the USPi library and how
it's used...
from interim.
I eventually got around these issues by upgrading the bundled rpi-boot library and playing with the compilation flags (for some bizarre reason changing the optimization settings allows you to boot further, possibly the fault of undefined behavior and related compiler optimizations removing such code). It appears that structs don't work on ARM at all:
sledge> (struct bar slot 1)
-- clib _write called:
[(struct bar slot 1)]
-- clib _write called:
EXPR: ((struct bar slot 1) . null)
-- clib _write called:
<- compiling 1: (struct bar slot 1)
-- clib _write called:
compiled 1
-- clib _write called:
bar
-- clib _write called:
bar
-- clib _write called:
[insert_symbol] bar entry at 0x11c53a0 (cell: 0x1007d24)
-- clib _write called:
~~ expr 1 res: 0x1007d24
-- clib _write called:
~> bar
nil
-- clib _write called:
sledge> (bar)
-- clib _write called:
[(bar)]
-- clib _write called:
EXPR: ((bar ) . null)
-- clib _write called:
<- compiling 1: (bar )
-- clib _write called:
<error: non-lambda/struct symbol bar in operator position>
-- clib _write called:
compiled 1
-- clib _write called:
[platform_eval] stopped at expression 1: '((bar ) . null)'
nil
sledge>
from interim.
Oh sure, I just haven't tested yet whether booting on the Raspberry Pi works.
from interim.
Related Issues (16)
- Mailing list is inaccessible HOT 3
- Sledge graphical mode on OS X segfaults HOT 7
- Picture in README is almost entirely black HOT 2
- Glichtin' HOT 2
- SDL1 port no longer compiles on Open Pandora HOT 3
- SDL1 port segfaults on the Open Pandora (ARMv7 TI Cortex-A8) HOT 4
- Graphical Mode is not launching HOT 1
- w3m tiling wm HOT 2
- Segmentation fault running hosted on arch linux
- rpi2-build.sh fails to run
- Completion of error handling HOT 4
- Wrong stack alignment when calling out to libraries HOT 5
- rpi2-build.sh missing libuspi compilation step HOT 2
- Missing proper support for configurable keymaps HOT 1
- Divide by zero crashes HOT 1
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 interim.