All Projects → ryanwoodsmall → crosware

ryanwoodsmall / crosware

Licence: other
Tools, things, stuff, miscellaneous, etc., for Chrome OS / Chromium OS

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to crosware

chromium os-tinker board
Build your Chromium OS for Asus Tinker Board
Stars: ✭ 30 (-16.67%)
Mutual labels:  chromeos, chromiumos, chromium-os
sabotage
a radical and experimental distribution based on musl libc and busybox
Stars: ✭ 502 (+1294.44%)
Mutual labels:  busybox, musl
Roboget
📦Roboget automates the process of getting apps and downloads directly
Stars: ✭ 49 (+36.11%)
Mutual labels:  package-manager, curl
Microdot
The Microdot Project guides you to create a fully functional but compact Linux system from scratch
Stars: ✭ 41 (+13.89%)
Mutual labels:  busybox, musl
Chromebrew
Package manager for Chrome OS
Stars: ✭ 1,838 (+5005.56%)
Mutual labels:  package-manager, chromeos
chromiumos-build
Scripts to build Chromium OS easily
Stars: ✭ 28 (-22.22%)
Mutual labels:  chrome-os, chromium-os
fil
😋 Unix file command written in Go
Stars: ✭ 69 (+91.67%)
Mutual labels:  busybox, toybox
natick
natickOS - A minimal, lightweight, research Linux Distribution
Stars: ✭ 33 (-8.33%)
Mutual labels:  busybox, musl
musl-wiki
A community-maintained wiki documenting the musl libc.
Stars: ✭ 61 (+69.44%)
Mutual labels:  musl, musl-libc
CMLFS
Clang-Built Musl Linux From Scratch
Stars: ✭ 51 (+41.67%)
Mutual labels:  musl, musl-libc
AmxxCurl
Curl module for amxmodx
Stars: ✭ 28 (-22.22%)
Mutual labels:  curl
inqlude
Command line client for independent Qt library archive
Stars: ✭ 30 (-16.67%)
Mutual labels:  package-manager
mcpkg
Package manager for Minecraft resource packs, datapacks and crafting tweaks, wrapped around vanillatweaks.net
Stars: ✭ 15 (-58.33%)
Mutual labels:  package-manager
lfs-me
Linux From Scratch made ( more ) easy. A simple, fakeroot based, package manager for LFS heavily inspired by Archlinux' package management.
Stars: ✭ 67 (+86.11%)
Mutual labels:  package-manager
understanding-the-python-ecosystem
This project focuses on understanding the language ecosystem
Stars: ✭ 68 (+88.89%)
Mutual labels:  package-manager
organon
This program focuses on automating the download, installation and compilation of pentest tools from source
Stars: ✭ 36 (+0%)
Mutual labels:  package-manager
chromeos-key-remapper
IME / tooling for remapping key combos to other key combos on Chrome OS
Stars: ✭ 29 (-19.44%)
Mutual labels:  chromeos
winget-create
The Windows Package Manager Manifest Creator command-line tool (aka wingetcreate)
Stars: ✭ 228 (+533.33%)
Mutual labels:  package-manager
curl-fuzzer
Quality assurance testing for the curl project
Stars: ✭ 40 (+11.11%)
Mutual labels:  curl
easysub
Fast Subdomain Enumeration Tool made with Bash only 💯
Stars: ✭ 15 (-58.33%)
Mutual labels:  curl

crosware

Tools, things, stuff, miscellaneous, detritus, junk, etc., primarily for Chrome OS / Chromium OS. This is a development-ish environment for Chrome OS on both ARM and x86 (32-bit and 64-bit for both). It should work on "normal" Linux too (Armbian, CentOS, Debian, Raspbian, Ubuntu, etc.).

bootstrap

To bootstrap, using /usr/local/crosware with initial downloads in /usr/local/tmp:

# allow your regular user to write to /usr/local
sudo chgrp ${GROUPS} /usr/local
sudo chmod 2775 /usr/local

# run the bootstrap
# use curl to download the primary shell script
# this in turn downloads a jdk, jgit and a toolchain
bash <(curl -kLs https://raw.githubusercontent.com/ryanwoodsmall/crosware/master/bin/crosware) bootstrap

# source the environment
source /usr/local/crosware/etc/profile
which crosware

install some packages

# install some stuff
crosware install busybox toybox

# update environment
source /usr/local/crosware/etc/profile

# see what we just installed
which -a make busybox toybox \
| xargs realpath \
| xargs toybox file

update

To get new recipes:

crosware update

And to re-bootstrap (for any updated zulu, jgitsh, statictoolchain installs):

crosware bootstrap

further usage

Run crosware without any arguments to see usage; i.e, a (possibly outdated) example:

usage: crosware [command]

commands:
  bootstrap : bootstrap crosware
  check-installed : given a package name, check if it's installed
  env : dump source-/eval-able crosware etc/profile
  help : show help
  install : attempt to build/install a package from a known recipe
  list-available : list available recipes which are not installed
  list-funcs : list crosware shell functions
  list-installed : list installed recipes
  list-installed-reqs : list installed recipes with their requirements
  list-recipe-deps : list recipes with their declared dependencies
  list-recipe-files : list recipes with their source file
  list-recipe-reqs : list recipes with their requirements
  list-recipe-reqs-expanded : list recipes with their expanded requirements
  list-recipes : list build recipes
  list-recipe-transitive-reqs : list recipes with only transitive requirements
  list-recipe-versions : list recipes with version number
  list-upgradable : list installed packages with available upgrades
  profile : show .profile addition
  reinstall : uninstall then install given packages without chasing upgrades
  run-func : run crosware shell function
  set : run 'set' to show full crosware environment
  show-arch : show kernel and userspace architecture
  show-env : run 'env' to show crosware environment
  show-func : show the given function name
  show-karch : show kernel architecture
  show-uarch : show userspace architecture
  uninstall : uninstall some packages
  update : attempt to update existing install of crosware
  update-upgrade-all : update crosware and upgrade out-of-date recipes
  upgrade : uninstall then install a recipe
  upgrade-all : upgrade all packages with different recipe versions
  upgrade-all-with-deps : upgrade all out-of-date packages and installed dependents
  upgrade-deps : upgrade any installed deps of a package
  upgrade-with-deps : upgrade a package and installed depdendents

use external or disable java and jgit

A few user environment variables are available to control how crosware checks itself out and updates recipes.

var default purpose
CW_GIT_CMD jgitsh which "git" command to use for checkout/update
CW_USE_JAVA true use java for bootstrap, jgit
CW_EXT_JAVA false use system java instead of zulu recipe
CW_USE_JGIT true use jgit.sh for checkout/update
CW_EXT_JGIT false use system jgit.sh instead of jgitsh recipe
CW_UPDATE_USE_GIT true use a git client to update
CW_UPDATE_USE_ZIP true use update-crosware-from-zip.sh to update
CW_IGNORE_MISSING false set to "true" ot ignore any missing prereqs

alpine

Alpine (https://alpinelinux.org/) uses musl libc (http://musl-libc.org) and as such cannot use the Zulu JDK as distributed. To bootstrap using the system-supplied OpenJDK from Alpine repos:

export CW_EXT_JAVA=true
apk update
apk upgrade
apk add bash curl openjdk8
cd /tmp
curl -kLO https://raw.githubusercontent.com/ryanwoodsmall/crosware/master/bin/crosware
bash crosware bootstrap

Make sure the environment variable CW_EXT_JAVA is set to true (or just something other than false) to use system Java. Please note that /usr/local/crosware/etc/profile contains bashisms, and does not work on BusyBox ash, so set your SHELL accordingly.

If Zulu is installed on a non-glibc distro, run crosware uninstall zulu and make sure CW_EXT_JAVA and JAVA_HOME environment variables are configured.

To manually remove the Zulu install directory, environment script and installation flag, remove these paths:

  • /usr/local/crosware/etc/profile.d/zulu.sh
  • /usr/local/crosware/var/inst/zulu
  • /usr/local/crosware/software/zulu/

container

A container suitable for bootstrapping is available:

Run with:

docker run -it ryanwoodsmall/crosware

An interactive bash shell session will start, and any crosware C/C++ packages should build and run out of the box.

Build with something like:

docker build --tag crosware https://raw.githubusercontent.com/ryanwoodsmall/dockerfiles/master/crosware/Dockerfile
docker run -it crosware

Inside the container, install git to enable updates and list any upgradable packages:

# note: this installs git and its prereqs from source, it might take awhile
crosware install git
. /usr/local/crosware/etc/profile
crosware update
crosware list-upgradable

notes

Ultimately I'd like this to be a self-hosting virtual distribution of sorts, targeting all variations of 32-/64-bit x86 and ARM on Chrome OS. A static-only GCC compiler using musl-libc (with musl-cross-make) is installed as part of the bootstrap; this sort of precludes things like emacs, but doesn't stop anyone from using a musl toolchain to build a glibc-based shared toolchain.

My initial bootstrap looks something like:

  • scripted, i.e., crosware bootstrap:
    • get a JDK (Azul Zulu OpenJDK)
    • get jgit.sh (standalone)
    • get static bootstrapped compiler
    • checkout rest of project
  • manually install some packages, i.e, crosware install vim git ...:
    • build GNU make
    • build native busybox, toolbox, sed, etc.
    • build a few libs / support (ncurses, openssl, slang, zlib, bzip2, lzma, libevent, pkg-config)
    • build a few packages (curl, vim w/syntax hightlighting, screen, tmux, links, lynx - mostly because I use them)

environment

Environment stuff to figure out how to handle:

  • PATH (working)
  • PKG_CONFIG_LIBDIR/PKG_CONFIG_PATH (working)
  • CC (working)
  • CFLAGS (working)
  • CPP (working)
  • CPPFLAGS (working)
  • CXX (working)
  • INFOPATH
  • LDFLAGS (working)
  • MANPAGER (working)
  • MANPATH
  • ACLOCAL_PATH
  • EDITOR (vim?)
  • PAGER (working, set to less (gnu or busybox))

stuff to figure out

See the to-do list

links

Chromebrew looks nice and exists now: https://github.com/skycocker/chromebrew

Alpine and Sabotage are good sources of inspiration and patches:

The Alpine folks distribute a chroot installer (untested):

And I wrote a little quick/dirty Alpine chroot creator that works on Chrome/Chromium OS; no Docker or other software necessary.

The musl wiki has some pointers on patches and compatibility:

Mes (and m2) might be useful at some point.

Suckless has a list of good stuff:

Mark Williams Company open sourced Coherent; might be a good source for SUSv3/SUSv4/POSIX stuff:

9p implementations:

Eltanin tools may be useful:

C/C++ compiler

Static musl GCC compiler(s) are done, and should work to compile (static-only, some shared lib support) binaries on Chrome OS:

Based on Rich Felker's musl-cross-make:

recipes

bootstrap recipes

These recipes are included in the main bin/crosware script, as they're the foundation of the tool and are distributed as binaries. There are a handful of other binary recipes that are not necessary for bootstrapping. The statictoolchain recipe could theoretically be pulled into a normal standalone recipe, but is bedrock enough that it fits in the main script. A smaller, more supportable, preferably single-binary static Git client would/will hopefully also find its way to the main script for bootstrap purposes.

working recipes

recipes to consider

git grep -ril '#.*define.*off64_t' . | xargs sed -i '/define/s/off64_t/off_t/g'
git grep -ril '#.*undef.*off_t' | xargs sed -i '/undef/s/off_t/off64_t/g'
time \
  env -i \
    PATH=${cwsw}/ccache/current/bin:${cwsw}/mksh/current/bin:${cwsw}/bash/current/bin:${cwsw}/statictoolchain/current/bin:${cwsw}/byacc/current/bin:${cwsw}/reflex/current/bin:${cwsw}/busybox/current/bin:${cwsw}/bison/current/bin:${cwsw}/flex/current/bin \
    mksh -x ./bin/package make \
      CFLAGS= \
      LDFLAGS= \
      CPPFLAGS= \
      CCFLAGS="-D_GNU_SOURCE -D_BSD_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_USE_GNU -D__GLIBC__" 2>&1 | tee /tmp/astbuild.out
wc -l /tmp/astbuild.out

deprecated/broken/disabled recipes

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].