This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build Chez Scheme boot files from amd64 for armhf (i.e. from a6le for arm32le) | |
./configure --workarea=crossbuilder | |
make -C crossbuilder | |
./workarea arm32le | |
make -C arm32le/s -f Mf-cross m=a6le xm=arm32le base=$PWD/crossbuilder | |
# Now copy arm32le/boot/arm32le to ChezScheme/boot/ on the ARM system and build normally | |
# On a 32-bit ARM machine the build works as usual, but on a 64-bit ARM machine some extra flags are needed: | |
sudo apt install libncurses5-dev:armhf uuid-dev:armhf libx11-dev:armhf gcc-8-arm-linux-gnueabihf | |
linux32 ./configure -m=arm32le CC=arm-linux-gnueabihf-gcc-8 LD=arm-linux-gnueabihf-ld AR=arm-linux-gnueabihf-ar CFLAGS='-marm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import | |
(rnrs) | |
(only (chezscheme) gensym pretty-print)) | |
(define (session-key->number key) | |
(define alphabet "abcdefghijklmnopqrstuvwxyz0123456789") | |
(define separator #\-) | |
(define b (string-length alphabet)) | |
(define (char->digit ch) | |
(let lp ((i 0)) |