Skip to content

Instantly share code, notes, and snippets.

@necrose99
Last active April 27, 2018 18:09
Show Gist options
  • Save necrose99/11744056987ee189988670496633e085 to your computer and use it in GitHub Desktop.
Save necrose99/11744056987ee189988670496633e085 to your computer and use it in GitHub Desktop.
#arm64_gentoo #Sabayon-Linux ## crossdev
# gist , equo.sql-patch.txt & notes..
#https://raw.githubusercontent.com/mudler/docker-sabayon-base/master/ext/equo.sql
### https://github.com/sakaki-/gentoo-on-rpi3-64bit base image..
##
## docker tried for 12 weeks of fails..
## quemu arm64 on Gentoo or sabayon and docker run 75 miles hour into a woodchipper , saguaro cactus, climb a saguaro cactus , make love to wife on a pile of cacti...
## join BDSM cults .... geting it to work .... might try working debian docker [entrypoint chrooot-me.sh /gentoo-arm64]
### however docker/quemu-docker for gentoo arm64 is atm not your FIREND ... so a few dev boards or servers needs be aquired.
## sufice to say docker on sabayon/genoo.. with quemu arm64 has proved painful...
##
#notes made for arm64
# rpi3
# https://github.com/sakaki-/ If you are running on the stable branch by default,
#allow ~arm64 keyword files from this repository.
# Make sure that /etc/portage/package.accept_keywords exists, and is a directory. Then issue:
# echo "*/*::rpi3 ~arm64" >> /etc/portage/package.accept_keywords/rpi3-reporpi3-overlay
## also ::gentoo , ::pentoo ::sabayon, ::sabayon-distro , etc can be used to rig arm64 to build with much less fuss.
## layman -a repo-name , && echo "*/*::"repo-name" ~arm64" >> /etc/portage/package.accept_keywords/"repo-name" where reponame=...
## eases having to keyword ebuilds and repoman , or emerge /%path%/./././ebuild-name.ebuild... and gunpoint force portage to shut up and do..
## makes for easy emerge and done.... and happier building..
### demo clip of hacked equo sql https://asciinema.org/a/9WivoPJArKCGcuHpJyw7tb5NC demoing sabayon toys on rpi3 over ssh
### desktop works ok if not using to many apps. want more RAM ...
## eit tends to die from lack of ram but at this point summer 2017 was more about proof of conecpt. Sabayon on arm64 server/s and would a repo be feasble..
### Overkill - Frankenstein - YouTube ## perfetc soundtract too hitting the switch... on sabayon on rpi3-64bit...
# https://www.youtube.com/watch?v=beVT54OsBm4
## hosting frankie to the roof I did and hit the switch ~~~~~~`````` zap.. see what we can do.... as an engineer , try it to see whats posible even if the devoplers scowl at me after proving em wrong.. or purelly for "gits'n'shiggles"
#####My repo... bins and all.
### https://www.dropbox.com/sh/gfsfqv3p4lvnzi6/AAAE-Mb_8ko1oX3xSROVkP8ia?dl=0
## https://www.dropbox.com/sh/xrxwtoc3g3bbgvw/AABOb4ns_sS7hDX-QHL-rXEca?dl=0 kernel configs..
## https://www.dropbox.com/s/4hib5qer71bk5st/catalyst_specs.7z?dl=0 # test medelings with dev-util/catalyst , wanted a bootable arm64 gentoo iso,
# https://www.dropbox.com/sh/4u9gbhps0ek402e/AAC5VLBE32cwH2gGjkj0Yz9sa?dl=0 dev-util/catalyst specs.. need to github repo sometime..
## https://www.dropbox.com/s/69937p4b10gqm4o/make.conf_.txt?dl=0
## https://www.dropbox.com/s/v1q0wjlxy62qrjl/pi-back.sh?dl=0 ## make a stage4 image... of fs.
## fs dump https://www.dropbox.com/s/nebngz1mybua2mt/sakaki--gentoo-rpi3-ARM64bit.tar.gz?dl=0
## https://www.dropbox.com/s/x7n3vej7qxgk490/Packages.txt?dl=0 packages as of oct/nov 2017
### packages ::: https://www.dropbox.com/sh/4u9gbhps0ek402e/AAC5VLBE32cwH2gGjkj0Yz9sa?dl=0 /usr/portage/packages (2017)
## some pentoo pentesting packages included..
#### https://www.dropbox.com/sh/ri2326do0lg00ul/AABvgZ15BKF-lhdWiP9RzkQFa?dl=0 , cross toys.. gentoo_sabayon_amd-64-cross-toys aarch64-unknown-linux-gnu bit stale but should help bootstap
## wishlist script to autobuild for sabayon ... weekly cross-dev com-repo... with flags..
## https://www.dropbox.com/s/z6nma2dz7s3hxq7/init-crossdev-arm.sh?dl=0
### arm64 hackage
#https://raw.githubusercontent.com/mudler/docker-sabayon-base/master/ext/equo.sql
## grab , only single line @ amd64 hmm cut n paste , sweet ...
##
mkdir -p /var/lib/entropy/client/database/arm64
ln -s /var/lib/entropy/client/database/arm64 /var/lib/entropy/client/database/UNKONWN
## if Gentoo Etc would drop Unkown , ie arm64-rpi3 , amr64-cav2 (server with 2x 46 cores + nvidia cuda) arm64-pine targets when requied
## metadata would be less fubar'd however for now its a Linux feature for aarch64 , as well you could have repo-arm64-main and varriant mini-repos for rpi3 , etc as needed so the
## bulk of packages will work on almost everything. pretty much how debian.... however equo will skip for arm64 servers packages not ment for them , 98% of packages shared. ie kde gcc etc.
#
## SQL likely needs AARCH64 alias as arm64 , etc in addtion / more alias's
# aarch64-unknown-linux-gnu often in make file alias aarch64-unknown to arm64 wala..
#
## , my sql support enginerring fixit foo is rusty , as I try to hit the wormhole to warp foo...
## and insta-vanish.... I Leave that to a DBA...
## with sql fixed equo sql https://asciinema.org/a/9WivoPJArKCGcuHpJyw7tb5NC equo quit crashing and works. mostly...
## as mentioned prior theres still meta-data quirks...
cd /var/lib/entropy/client/database/amd64
cat /equo.sql | sqlite3 equo.db
#INSERT INTO "settings" VALUES('arch', 'amd64'); ## original moded to arm64.
INSERT INTO "settings" VALUES('arch', 'arm64'); # hot patch hack now equo least will work.
INSERT INTO "settings" VALUES('on_delete_cascade', '1');
INSERT INTO "settings" VALUES('_baseinfo_extrainfo_2010', '1');
INSERT INTO "settings" VALUES('schema_revision', '6');
COMMIT;
## sql mays well be written in Vulkan , this may add better pointers for arm64 sqllite...
### mysql foo is crude at best ,
## anycase alias/SYNONYM values pointing to "settings" VALUES('arch', 'arm64'); as to handle things for now ..
## should ease breakage , for the moment , I need better hardware and my own laptop is due for drive-refit , Sabayon/Gentoo drive has all but failed.
## could use a lager arm64 dev/tinkerboard with 8-36 gigs or workstation arm64 with far more ram.
# https://www.quora.com/What-is-the-difference-between-synonyms-and-alias-in-SQL-In-which-cases-are-synonyms-useful-instead-of-alias
### CREATE SYNONYM AARCH64
### FOR settings.arch.arm64 ## ??? might just work...
### CREATE SYNONYM aarch64
### FOR settings.arch.arm64 ## ??? might just work...
### CREATE SYNONYM aarch64-unknown-linux-gnu
### FOR settings.arch.arm64 ## ??? might just work...
### CREATE SYNONYM aarch64-unknown
### FOR settings.arch.arm64 ## ??? might just work...
############################## sabayon pc / distcc host/s ###########
## can set up as a cron task , a docker to build the toools with my useflags for gcc also a plus.
#/bin/bash
## https://github.com/sakaki-/gentoo-on-rpi3-64bit/wiki/Set-Up-Your-Gentoo-PC-for-Cross-Compilation-with-crossdev
# and a few mods as crossdev may bork shit drop symlnkys in other repos...
# @crossdev --clean
echo "INIT Arm/Arm64-crossdev targets."
echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register
### Initial INIT uncomment this crap..
mkdir -pv /usr/local/portage-crossdev/{profiles,metadata}
echo 'crossdev' > /usr/local/portage-crossdev/profiles/repo_name
echo 'masters = gentoo' > /usr/local/portage-crossdev/metadata/layout.conf
chown -R portage:portage /usr/local/portage-crossdev
gentoo_pc ~ # echo 'thin-manifests = true' >> /usr/local/portage-crossdev/metadata/layout.conf
#cat <<EOF >> /usr/local/portage-crossdev/metadata/layout.conf
#[crossdev]
#location = /usr/local/portage-crossdev
#priority = 10
#masters = gentoo
#auto-sync = no
#EOF
## recoment above Mkdir -eof if you going to re-int repo via crossdev clean/etc ie cronjob.
#
crossdev -t aarch64-unknown-linux-gnu --stable --init-target -oO /usr/local/portage-crossdev/
crossdev -t armv7a-hardfloat-linux-gnueabi --stable --init-target -oO /usr/local/portage-crossdev/
## fire up crossdev
# https://gergap.wordpress.com/2015/09/07/building-mingw-cross-compilation-toolchain-using-crossdev/
## might have perfecly married both starters..
##crossdev -t aarch64-unknown-linux-gnu --stable -oO /usr/local/mingw-crossdev/
##crossdev -t armv7a-hardfloat-linux-gnueabi --stable -oO /usr/local/mingw-crossdev/
## add windows 10 corss arm/arm64 targets soonish...
## boot strap we can more sexy later in porthole and or manual re-emerge's...
## gcc to build sometimes you may need to "Massage" it in porthole anyhow... if it fails add more opts as you go.
crossdev -v -t aarch64-unknown-linux-gnu --genv 'USE="cxx multilib fortran -mudflap nls openmp -sanitize"'
crossdev -v -t armv7a-hardfloat-linux-gnueabi --genv 'USE="cxx multilib fortran -mudflap nls openmp -sanitize"'
## bootstap however more flaggs like golang etc might be wanted which i do...
@necrose99
Copy link
Author

too do sort clean repos , and more properly add $#!^ to right places/repos , so istn quite perfect... some was mededeling... proof of concept testing etc... since arm64 servers are be'Jebuslly expensive... rpi3b+ or pine/rock64 4 gigs of ram fits the bill for testing Gentoo@ home

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment