GithubHelp home page GithubHelp logo

gokrazy / serial-busybox Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 8.27 MB

A bundled statically compiled standalone busybox binary, for debugging on the serial port

License: BSD 3-Clause "New" or "Revised" License

Go 35.36% Dockerfile 53.23% Makefile 11.41%

serial-busybox's Introduction

GitHub Actions CI Go Report Card

Overview

With gokrazy, you can deploy your Go programs as appliances to a Raspberry Pi or PC (→ supported platforms).

For a long time, we were unhappy with having to care about security issues and Linux distribution maintenance on our various Raspberry Pis.

Then, we had a crazy idea: what if we got rid of memory-unsafe languages and all software we don’t strictly need?

Turns out this is feasible. gokrazy is the result.

→ Learn more at gokrazy.org

GitHub Repository structure

Documentation

gokrazy.org uses hugo for creating and generating the website. You can find the hugo install instructions here: Install Hugo. With hugo you can write documentation in Markdown and generate a static website from it.

The website subdirectory is hugo’s root directory. In order to preview the documentation or to re-generate the website, switch the directory to website.

To preview the website, run the hugo webserver:

hugo serve

Generate the website:

hugo

The updated website content will be stored in the ./docs directory. Do not update anything here manually.

serial-busybox's People

Contributors

anupcshan avatar stapelberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

serial-busybox's Issues

Fix DNS resolution by linking against uclibc to avoid glibc’s NSS system

When I run strace -fvy /perm/sh -c 'nslookup google.ch' on gokrazy, I see:

[…]
[pid 14917] openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 14917] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 14917] openat(AT_FDCWD, "/lib/x86_64-linux-gnu/tls//x86_64/libnss_dns.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 14917] stat("/lib/x86_64-linux-gnu/tls//x86_64", 0x7ffedfbaf910) = -1 ENOENT (No such file or directory)
[pid 14917] openat(AT_FDCWD, "/lib/x86_64-linux-gnu/tls//libnss_dns.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 14917] stat("/lib/x86_64-linux-gnu/tls/", 0x7ffedfbaf910) = -1 ENOENT (No such file or directory)
[pid 14917] openat(AT_FDCWD, "/lib/x86_64-linux-gnu/tls/x86_64/libnss_dns.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 14917] stat("/lib/x86_64-linux-gnu/tls/x86_64", 0x7ffedfbaf910) = -1 ENOENT (No such file or directory)
[pid 14917] openat(AT_FDCWD, "/lib/x86_64-linux-gnu/tls/libnss_dns.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 14917] stat("/lib/x86_64-linux-gnu/tls", 0x7ffedfbaf910) = -1 ENOENT (No such file or directory)
[pid 14917] openat(AT_FDCWD, "/lib/x86_64-linux-gnu//x86_64/libnss_dns.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 14917] stat("/lib/x86_64-linux-gnu//x86_64", 0x7ffedfbaf910) = -1 ENOENT (No such file or directory)
[pid 14917] openat(AT_FDCWD, "/lib/x86_64-linux-gnu//libnss_dns.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 14917] stat("/lib/x86_64-linux-gnu/", 0x7ffedfbaf910) = -1 ENOENT (No such file or directory)
[pid 14917] openat(AT_FDCWD, "/lib/x86_64-linux-gnu/x86_64/libnss_dns.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 14917] stat("/lib/x86_64-linux-gnu/x86_64", 0x7ffedfbaf910) = -1 ENOENT (No such file or directory)
[pid 14917] openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libnss_dns.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 14917] stat("/lib/x86_64-linux-gnu", 0x7ffedfbaf910) = -1 ENOENT (No such file or directory)
[…]
[pid 14917] openat(AT_FDCWD, "/usr/lib//libnss_files.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 14917] openat(AT_FDCWD, "/usr/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 14917] write(1</dev/pts/1>, "Address 1: 10.22.0.1\n", 21Address 1: 10.22.0.1
) = 21
[pid 14917] write(1</dev/pts/1>, "\n", 1
) = 1
[pid 14917] stat("/etc/resolv.conf", {st_dev=makedev(0, 17), st_ino=706, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=21, st_atime=1654503033 /* 2022-06-06T10:10:33.205858008+0200 */, st_atime_nsec=205858008, st_mtime=1654502973 /* 2022-06-06T10:09:33.204860481+0200 */, st_mtime_nsec=204860481, st_ctime=1654502973 /* 2022-06-06T10:09:33.205860481+0200 */, st_ctime_nsec=205860481}) = 0
[pid 14917] write(2</dev/pts/1>, "nslookup: can't resolve 'google."..., 36nslookup: can't resolve 'google.ch'
) = 36
[pid 14917] exit_group(1)               = ?
[pid 14917] +++ exited with 1 +++

busybox applets such as nslookup just call getaddrinfo(), so one fix for this issue is to switch from glibc to uclibc.

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.