Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
packages [2015/07/06 00:13] – Update binutils in repo to 2.25-1. Add strip option to CFLAG (27MB vs 6.3MB) snacsnocpackages [2023/11/18 17:24] – [Installing packages] snacsnoc
Line 1: Line 1:
 ===== Installing packages ====== ===== Installing packages ======
 +For a list of all packages available see: http://snacklinux.geekness.eu/repo/pub/packageslist.txt (x86)
 ''[[https://github.com/snacsnoc/fbpkg|fbpkg]]'' is the package manager for SnackLinux. ''[[https://github.com/snacsnoc/fbpkg|fbpkg]]'' is the package manager for SnackLinux.
  
 Update the packages list by running Update the packages list by running
- fbpkg update+  fbpkg update
  
 Search for packages Search for packages
- fbpkg search tetris+  fbpkg search tetris
  
 Install a package Install a package
Line 24: Line 25:
  
 ===== Non-native ===== ===== Non-native =====
-**[[http://ftp.gnu.org/gnu/gcc/gcc-4.9.2/|gcc 4.9.2]]**+**Note**: It is easier to use pre-built toolchains from here: https://musl.cc/#binaries (native builds) 
 + 
 +**[[http://ftp.gnu.org/gnu/gcc/gcc-5.2.0/|gcc 5.2.0]]**
  
  
 Required patches:  Required patches: 
-  * http://snacklinux.org/tars/patches/gcc-4.9.2/gcc-4.9.2-musl.patch +  * http://snacklinux.org/tars/patches/gcc-5.2.0/gcc-5.2.0-musl.patch 
-  * http://snacklinux.org/tars/patches/gcc-4.9.2/gmp-config.patch +  * http://snacklinux.org/tars/patches/gcc-5.2.0/gmp-config.patch 
-  * http://snacklinux.org/tars/patches/gcc-4.9.2/mpc-config.patch +  * http://snacklinux.org/tars/patches/gcc-5.2.0/mpc-config.patch 
-  * http://snacklinux.org/tars/patches/gcc-4.9.2/mpfr-config.patch+  * http://snacklinux.org/tars/patches/gcc-5.2.0/mpfr-config.patch 
 +  * http://snacklinux.org/tars/patches/gcc-5.2.0/x86.diff
  
-//Note: gcc-4.9.2-musl.patch is a merged patch from these patches: https://bitbucket.org/GregorR/musl-gcc-patches //+//Note: gcc-5.2.0-musl.patch is a merged patch from these patches: https://bitbucket.org/GregorR/musl-gcc-patches //
  
-   patch -p1 -i ./gcc-4.9.2-musl.patch+   patch -p1 -i ./gcc-5.2.0-musl.patch
    patch -p1 -i ./gmp-config.patch    patch -p1 -i ./gmp-config.patch
    patch -p1 -i ./mpc-config.patch    patch -p1 -i ./mpc-config.patch
    patch -p1 -i ./mpfr-config.patch    patch -p1 -i ./mpfr-config.patch
 +   patch -p1 -i ./x86.diff
        
 //(Out of tree build)// //(Out of tree build)//
-   $PWD/../gcc-4.9.2/configure --prefix=/usr --target=i486-linux-musl --host=i486-linux-musl \+   $PWD/../gcc-5.2.0/configure --prefix=/usr --target=x86_64-linux-musl --host=x86_64-linux-musl \
    --enable-languages=c,c++ --disable-debug --enable-threads=posix  --disable-multilib --disable-nls \    --enable-languages=c,c++ --disable-debug --enable-threads=posix  --disable-multilib --disable-nls \
    --disable-shared --disable-bootstrap  --without-cloog --disable-lto-plugin --disable-libmudflap \    --disable-shared --disable-bootstrap  --without-cloog --disable-lto-plugin --disable-libmudflap \
-   --disable-libsanitizer --with-multilib-list= --with-sysroot=/path/to/sysroot+   --disable-libsanitizer --with-sysroot=/opt/snacklinux_rootfs
        
 //Note: extracted [[docker|Docker]] images can be extracted for use as the sysroot if a full build of SnackLinux is undesireable//  //Note: extracted [[docker|Docker]] images can be extracted for use as the sysroot if a full build of SnackLinux is undesireable// 
  
-   make LDFLAGS="-static -s" CFLAGS="-s" +   make LDFLAGS="-s" CFLAGS="-s" 
  
    make DESTDIR=/path/to/staging \    make DESTDIR=/path/to/staging \
Line 56: Line 61:
      install-target-libstdc++-v3      install-target-libstdc++-v3
  
-//Note: this specs file is included by default: http://snacklinux.org/tars/patches/gcc-4.9.2/specs // +//Note: this specs file is included by default: http://snacklinux.org/tars/patches/gcc-5.2.0/specs //
- +
-**[[http://ftp.gnu.org/gnu/binutils/|binutils 2.25]]** +
-   LDFLAGS="-Wl,-static"+
-   CC="i486-musl-linux-gcc -static"+
-   CFLAGS="-D_GNU_SOURCE -D_LARGEFILE64_SOURCE -s"  +
-   ./configure --target=i486-musl-linux  --host=i486-musl-linux --disable-shared --disable-multilib --disable-nls --with-sysroot=/path/to/sysroot --prefix=/usr +
-   make +
-   make /path/for/staging install +
-   +
  
-   + 
 **linux-headers** **linux-headers**
-//[[https://github.com/snacsnoc/snacklinux/blob/master/linux-4.0/.config|Using this .config]]//+//[[https://github.com/snacsnoc/snacklinux/blob/master/configs/linux/.config|Using this .config]]//
  
-  make headers_install ARCH=x86 INSTALL_HDR_PATH=/path/to/install/headers/to+  make headers_install ARCH=x86_64 INSTALL_HDR_PATH=/path/to/install/headers/to
  
 **linux-modules** **linux-modules**
   make modules   make modules
-  make modules_install ARCH=x86 INSTALL_MOD_PATH=/path/to/install/headers/to+  make modules_install ARCH=x86_64 INSTALL_MOD_PATH=/path/to/install/headers/to
            
 +** dropbear 2022.82**
 +  CC=i486-linux-musl-gcc CROSS_COMPILE=i486-linux-musl- ./configure --disable-zlib --host=i486-linux-musl --enable-static
 +  CC=i486-linux-musl-gcc make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" MULTI=1 SCPPROGRESS=1 strip
 ===== Native ===== ===== Native =====
-**[[http://ftp.gnu.org/gnu/make/|make 4.1]]**+ 
 +**[[http://ftp.gnu.org/gnu/make/|make 4.2]]**
   ./configure --prefix=/usr   ./configure --prefix=/usr
   sh build.sh   sh build.sh
-  ./make DESTDIR=/pkg install 
  
-**[[https://matt.ucc.asn.au/dropbear/dropbear.html|dropbear 2015.67]]** +Currently a bug running ./make install 
-  ./configure --disable-zlib --disable-wtmp  + 
 +  ./make DESTDIR=/__pkg install 
 +So for now, the binary is just copied in a tarball 
 + 
 +**[[https://matt.ucc.asn.au/dropbear/dropbear.html|dropbear 2022.82]]** 
 +  ./configure --disable-zlib  --enable-static
   make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" MULTI=1 SCPPROGRESS=1 strip   make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" MULTI=1 SCPPROGRESS=1 strip
   cp dropbearmulti /path/to/staging/usr/bin && cd /path/to/staging/usr/bin   cp dropbearmulti /path/to/staging/usr/bin && cd /path/to/staging/usr/bin
Line 96: Line 100:
   dropbearkey -t dss -f dropbear_dss_host_key   dropbearkey -t dss -f dropbear_dss_host_key
   dropbear    dropbear 
 +
 +**[[https://code.google.com/p/ucpp/|ucpp 1.3.2]]** ([[https://bitbucket.org/snacsnoc/ucpp|mirror]])
 +  make CC=x86_64-linux-musl-gcc CFLAGS=-s LDFLAGS=-s
 +   
 +Example usage: ln -s /usr/bin/ucpp /lib/cpp   
 +
 +
 +** [[http://www.musl-libc.org/|musl 1.1.18]]**
 +   ./configure --prefix=/ 
 +   make
 +   make DESTDIR=/path/to/staging install 
 +
 +
 +** [[http://mama.indstate.edu/users/ice/tree/|tree 1.7.0]]**
 +   make
 +   make prefix=/path/to/staging install
 +
 +----
 +
 +
 +**[[http://ftp.gnu.org/gnu/binutils/|binutils 2.26]]**
 +//Note: binutils is first compiled using the cross compiler, so this is using the cross-compiled binutuls to compile a native binutils //
 +
 +   LDFLAGS="-Wl,-static" \
 +   CFLAGS="-D_GNU_SOURCE -D_LARGEFILE64_SOURCE -s -static" \
 +   ./configure  --disable-shared --disable-multilib --disable-nls --prefix=/usr --with-sysroot=/
 +   make
 +   make DESTDIR=/path/for/staging install
 +
 +
  
 ** [[http://v3.sk/~lkundrak/dev86/|bin86 0.16.21]]** ** [[http://v3.sk/~lkundrak/dev86/|bin86 0.16.21]]**
Line 114: Line 148:
        
        
-** [[http://lilo.alioth.debian.org/|lilo 24.1]] **+** [[http://lilo.alioth.debian.org/|lilo 24.2]] ** 
 +See: https://bugs.gentoo.org/792567 
 +   wget http://snacklinux.geekness.eu/tars/patches/lilo-geometry.patch
    sed -i 's/CC=gcc/CC=musl-gcc -static/' src/Makefile    sed -i 's/CC=gcc/CC=musl-gcc -static/' src/Makefile
    #Remove glibc specific line    #Remove glibc specific line
    sed -i '185d' src/lilo.c    sed -i '185d' src/lilo.c
 +   patch -p1 < lilo-geometry.patch
    make alles    make alles
    cp src/lilo.static /staging/bin/lilo    cp src/lilo.static /staging/bin/lilo
Line 158: Line 195:
    make DESTDIR=/path/to/staging install     make DESTDIR=/path/to/staging install 
        
-** [[http://mama.indstate.edu/users/ice/tree/|tree 1.7.0]]** 
-   make CC="musl-gcc -static" 
-   make prefix=/path/to/staging install 
  
 ** [[http://www.zlib.net/|zlib 1.2.8]]** ** [[http://www.zlib.net/|zlib 1.2.8]]**
Line 191: Line 225:
    make DESTDIR=/path/to/staging install    make DESTDIR=/path/to/staging install
  
-** [[http://www.musl-libc.org/|musl 1.1.10]]** 
-   ./configure --prefix=/  
-   make 
-   make DESTDIR=/path/to/staging install  
  
 ** [[http://www.nano-editor.org/|nano 2.4.1]]** ** [[http://www.nano-editor.org/|nano 2.4.1]]**
Line 252: Line 282:
    bz2                dl                 future_builtins     bz2                dl                 future_builtins 
    imageop            linuxaudiodev      ossaudiodev         imageop            linuxaudiodev      ossaudiodev     
-   readline           syslog      +   readline           syslog  
 +    
 +   
 + 
 +**[[http://www.gnu.org/software/tar/|tar 1.28]]** 
 +<code> 
 +   CFLAGS=-static LDFLAGS=-static CPPFLAGS="-I/include -I/usr/include"
 +   ./configure --prefix=/usr 
 +   make 
 +   make DESTDIR=/path/to/staging install    
 +   </code>