view images/hello-world/ @ 40:ef471ef37665 draft default tip

Yank reliance on ash.
author Rob Landley <>
date Sat, 18 Jul 2015 01:39:24 -0500
parents 242a1e03ce15
line wrap: on
line source


# Simple self-contained build control image creation script.  Doesn't use
# the bootstrap skeleton, instead compiles and runs the threaded "hello world"
# program from the Aboriginal Linux /usr/src directory as a build environment
# smoketest.  Grep the output for "Hello world!" to test for success.

# Write init script via a "here" document.

cat > "$WORK"/init << 'EOF' || dienow

echo Started second stage init

cd /home &&
gcc -lpthread /usr/src/thread-hello2.c -o hello &&

# Upload our hello world file to the output directory (named hello-$HOST).
# No reason, just an example.

ftpput $FTP_SERVER -P $FTP_PORT hello-$HOST hello



chmod +x "$WORK"/init || dienow