From deca67b7f9c34676f0c94a76ebdf632d76b78898 Mon Sep 17 00:00:00 2001 From: parazyd Date: Tue, 18 Oct 2016 12:06:23 +0200 Subject: [PATCH 01/10] change workdir naming scheme --- lib/libdevuansdk | 2 +- sdk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libdevuansdk b/lib/libdevuansdk index d28e0a9..60ecf2a 160000 --- a/lib/libdevuansdk +++ b/lib/libdevuansdk @@ -1 +1 @@ -Subproject commit d28e0a93f4561099adc6c270027ed3331ce44489 +Subproject commit 60ecf2ada82f34d4b0e0cf652914fa6744558413 diff --git a/sdk b/sdk index 2a88e87..6dab96c 100755 --- a/sdk +++ b/sdk @@ -86,7 +86,7 @@ load() { ) os_map=( - "devuan" "$R/lib/libdevuansdk/libdevuansdk" + "devuan" "$R/lib/libdevuansdk/libdevuansdk" ) boardlib="${board_map[$dev]}" @@ -99,7 +99,7 @@ load() { export OS=$os source $oslib - workdir="$R/tmp/${device_name}-build" + workdir="$R/tmp/${os}-${arch}-build" strapdir="$workdir/bootstrap" mkdir -p $strapdir From e7048827622a33a16646ac110494ec4e9a153868 Mon Sep 17 00:00:00 2001 From: parazyd Date: Mon, 24 Oct 2016 15:51:06 +0200 Subject: [PATCH 02/10] update libdevuansdk --- lib/libdevuansdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libdevuansdk b/lib/libdevuansdk index 60ecf2a..cc56423 160000 --- a/lib/libdevuansdk +++ b/lib/libdevuansdk @@ -1 +1 @@ -Subproject commit 60ecf2ada82f34d4b0e0cf652914fa6744558413 +Subproject commit cc56423e35a499d1037b49b9d18c836cc4f3cab8 From 2a621119c3af4cb1a2988d65efa30b61397df7a5 Mon Sep 17 00:00:00 2001 From: parazyd Date: Tue, 25 Oct 2016 12:08:09 +0200 Subject: [PATCH 03/10] add blend try --- extra/blends/dowse.blend | 105 +++++++++++++++++++++++++++++++++++++++ sdk | 16 ++++-- 2 files changed, 117 insertions(+), 4 deletions(-) create mode 100644 extra/blends/dowse.blend diff --git a/extra/blends/dowse.blend b/extra/blends/dowse.blend new file mode 100644 index 0000000..415ce4e --- /dev/null +++ b/extra/blends/dowse.blend @@ -0,0 +1,105 @@ +#!/usr/bin/env zsh +# Copyright (c) 2016 Dyne.org Foundation +# arm-sdk is written and maintained by Ivan J. +# +# This file is part of arm-sdk +# +# This source code is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This software is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this source code. If not, see . + +## build script for Dowse + +blend=dowse + +extra_packages+=( + zsh + iptables + ebtables + sqlite3 + procps + gettext-base + procps + net-tools + autoconf + automake + libssl-dev + libbind-dev + libpcap-dev + unzip + wget + gcc + g++ + make + cmake + libtool + liblo-dev + libnetfilter-conntrack3 + libnetfilter-queue-dev + libsqlite3-dev + sqlite3 + libjemalloc-dev + libseccomp2 + libsodium-dev + libhiredis-dev + libkmod-dev + bind9-host + bison + gawk + libevent-dev + libjansson-dev + asciidoc + uuid-dev + libldns-dev + python-redis + python-hiredis +) + +preinst() { + fn preinst + req=(strapdir blend) + ckreq || return 1 + + notice "executing $blend preinst" + + install_extra_pkgs + + cat < Date: Wed, 26 Oct 2016 16:34:25 +0200 Subject: [PATCH 04/10] update libdevuansdk, add blendmap --- lib/libdevuansdk | 2 +- sdk | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/libdevuansdk b/lib/libdevuansdk index cc56423..eb17485 160000 --- a/lib/libdevuansdk +++ b/lib/libdevuansdk @@ -1 +1 @@ -Subproject commit cc56423e35a499d1037b49b9d18c836cc4f3cab8 +Subproject commit eb174853f16e2295dc07e071a8d33eecd0ce9d90 diff --git a/sdk b/sdk index c4e42aa..30fa58b 100755 --- a/sdk +++ b/sdk @@ -39,14 +39,14 @@ source $R/lib/zuper/zuper ## global vars vars+=(armsdk_version) vars+=(R workdir strapdir) -vars+=(os boardlib oslib) +vars+=(os boardlib oslib blendlib) vars+=(MAKEOPTS) ## global arrs arrs+=(extra_packages) ## global maps -maps+=(board_map os_map) +maps+=(board_map os_map blend_map) source $R/config source $R/lib/helpers @@ -96,16 +96,15 @@ load() { boardlib="${board_map[$dev]}" oslib="${os_map[$os]}" + blendlib="${blend_map[$blend]}" [[ -f $boardlib ]] || { die "no valid boards specified"; exit 1 } - [[ -f $oslib ]] || { die "no valid distro specified"; exit 1 } - [[ -n $blend ]] && { blendlib="${blend_map[$blend]}" } + [[ -f $oslib ]] || { die "no valid distro specified"; exit 1 } + [[ -f $blendlib ]] || { warn "no valid blend specified"; exit 1 } - [[ -f $boardlib ]] && source $boardlib \ - && act "$device_name build script loaded" - [[ -f $oslib ]] && source $oslib - [[ -f $blendlib ]] && source $blendlib \ - && act "blend $os loaded" + [[ -f $boardlib ]] && source $boardlib && act "$device_name build script loaded" + [[ -f $oslib ]] && source $oslib + [[ -f $blendlib ]] && source $blendlib && act "$os blend loaded" && export BLEND=1 workdir="$R/tmp/${os}-${arch}-build" strapdir="$workdir/bootstrap" @@ -114,7 +113,7 @@ load() { export LANG=C export LC_ALL=C export ARCH=arm - export CROSS_COMPILE=$compiler + export CROSS_COMPILE="$compiler" source $R/lib/zuper/zuper.init } From 4dcc8ff379b85e73465c0c89b32cb1e80588187a Mon Sep 17 00:00:00 2001 From: parazyd Date: Sat, 29 Oct 2016 17:03:09 +0200 Subject: [PATCH 05/10] add fake-hwclock to packages --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index ca5e9f1..4caee0b 100644 --- a/config +++ b/config @@ -51,4 +51,4 @@ qemu_bin="/usr/bin/qemu-arm-static" # Devuan ## extra_packages for all images -extra_packages=() +extra_packages=(fake-hwclock) From 421068e588b776554dcaaaa28f213e0d43d2a7cb Mon Sep 17 00:00:00 2001 From: parazyd Date: Mon, 31 Oct 2016 08:47:13 +0100 Subject: [PATCH 06/10] implement blends sourced from the web --- lib/libdevuansdk | 2 +- sdk | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/libdevuansdk b/lib/libdevuansdk index eb17485..dd5d5d9 160000 --- a/lib/libdevuansdk +++ b/lib/libdevuansdk @@ -1 +1 @@ -Subproject commit eb174853f16e2295dc07e071a8d33eecd0ce9d90 +Subproject commit dd5d5d9d368854d9493941e39f61b471eccd5762 diff --git a/sdk b/sdk index 30fa58b..cc284fa 100755 --- a/sdk +++ b/sdk @@ -98,9 +98,17 @@ load() { oslib="${os_map[$os]}" blendlib="${blend_map[$blend]}" + [[ $blendlib =~ '^http\:' ]] && { + notice "grabbing blend from the internetz" + pushd $R/extra/blends + curl -O $blendlib + popd + blendlib="$R/extra/blends/$(basename $blendlib)" + } + [[ -f $boardlib ]] || { die "no valid boards specified"; exit 1 } [[ -f $oslib ]] || { die "no valid distro specified"; exit 1 } - [[ -f $blendlib ]] || { warn "no valid blend specified"; exit 1 } + [[ -f $blendlib ]] || warn "no valid blend specified" [[ -f $boardlib ]] && source $boardlib && act "$device_name build script loaded" [[ -f $oslib ]] && source $oslib From 171f7c47428e7ed30c012490c57bcb308e89c5e6 Mon Sep 17 00:00:00 2001 From: parazyd Date: Mon, 31 Oct 2016 08:48:27 +0100 Subject: [PATCH 07/10] remove dowse blend from extra --- extra/blends/README | 1 + extra/blends/dowse.blend | 105 --------------------------------------- 2 files changed, 1 insertion(+), 105 deletions(-) create mode 100644 extra/blends/README delete mode 100644 extra/blends/dowse.blend diff --git a/extra/blends/README b/extra/blends/README new file mode 100644 index 0000000..2ab7ae4 --- /dev/null +++ b/extra/blends/README @@ -0,0 +1 @@ +see `doc/blends` for more info diff --git a/extra/blends/dowse.blend b/extra/blends/dowse.blend deleted file mode 100644 index 415ce4e..0000000 --- a/extra/blends/dowse.blend +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env zsh -# Copyright (c) 2016 Dyne.org Foundation -# arm-sdk is written and maintained by Ivan J. -# -# This file is part of arm-sdk -# -# This source code is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This software is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this source code. If not, see . - -## build script for Dowse - -blend=dowse - -extra_packages+=( - zsh - iptables - ebtables - sqlite3 - procps - gettext-base - procps - net-tools - autoconf - automake - libssl-dev - libbind-dev - libpcap-dev - unzip - wget - gcc - g++ - make - cmake - libtool - liblo-dev - libnetfilter-conntrack3 - libnetfilter-queue-dev - libsqlite3-dev - sqlite3 - libjemalloc-dev - libseccomp2 - libsodium-dev - libhiredis-dev - libkmod-dev - bind9-host - bison - gawk - libevent-dev - libjansson-dev - asciidoc - uuid-dev - libldns-dev - python-redis - python-hiredis -) - -preinst() { - fn preinst - req=(strapdir blend) - ckreq || return 1 - - notice "executing $blend preinst" - - install_extra_pkgs - - cat < Date: Mon, 31 Oct 2016 09:54:40 +0100 Subject: [PATCH 08/10] add link to dowse.blend --- lib/libdevuansdk | 2 +- sdk | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libdevuansdk b/lib/libdevuansdk index dd5d5d9..1a8a2df 160000 --- a/lib/libdevuansdk +++ b/lib/libdevuansdk @@ -1 +1 @@ -Subproject commit dd5d5d9d368854d9493941e39f61b471eccd5762 +Subproject commit 1a8a2df8095072b3553fe09306bbf4db2ab7d6b3 diff --git a/sdk b/sdk index cc284fa..61c4915 100755 --- a/sdk +++ b/sdk @@ -91,17 +91,17 @@ load() { ) blend_map=( - "dowse" "$R/extra/blends/dowse.blend" + "dowse" "https://github.com/dyne/dowse/raw/master/ops/dowse.blend" ) boardlib="${board_map[$dev]}" oslib="${os_map[$os]}" blendlib="${blend_map[$blend]}" - [[ $blendlib =~ '^http\:' ]] && { + [[ $blendlib =~ '^http' ]] && { notice "grabbing blend from the internetz" pushd $R/extra/blends - curl -O $blendlib + curl -Ls $blendlib popd blendlib="$R/extra/blends/$(basename $blendlib)" } From 26d0b284e46e8fa8923e2ee430be4170f282a619 Mon Sep 17 00:00:00 2001 From: parazyd Date: Mon, 31 Oct 2016 16:10:07 +0100 Subject: [PATCH 09/10] update lsdk to latest commit --- lib/libdevuansdk | 2 +- sdk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libdevuansdk b/lib/libdevuansdk index 1a8a2df..5f988be 160000 --- a/lib/libdevuansdk +++ b/lib/libdevuansdk @@ -1 +1 @@ -Subproject commit 1a8a2df8095072b3553fe09306bbf4db2ab7d6b3 +Subproject commit 5f988be6b8d97341e2d1bbda542f71684a4f3f26 diff --git a/sdk b/sdk index 61c4915..dec57fe 100755 --- a/sdk +++ b/sdk @@ -101,7 +101,7 @@ load() { [[ $blendlib =~ '^http' ]] && { notice "grabbing blend from the internetz" pushd $R/extra/blends - curl -Ls $blendlib + curl -Ls -O $blendlib popd blendlib="$R/extra/blends/$(basename $blendlib)" } From 924f1f6a2967c500b5acb3056924aed7feca71d6 Mon Sep 17 00:00:00 2001 From: parazyd Date: Sat, 12 Nov 2016 14:37:19 +0100 Subject: [PATCH 10/10] add raspberry pi 1 script --- boards/raspberry-pi1.sh | 130 ++++++++++++++++++++++++++++++++++++++++ config | 6 ++ init.sh | 19 ++++++ sdk | 1 + 4 files changed, 156 insertions(+) create mode 100644 boards/raspberry-pi1.sh diff --git a/boards/raspberry-pi1.sh b/boards/raspberry-pi1.sh new file mode 100644 index 0000000..4eb0dd8 --- /dev/null +++ b/boards/raspberry-pi1.sh @@ -0,0 +1,130 @@ +#!/usr/bin/env zsh +# Copyright (c) 2016 Dyne.org Foundation +# arm-sdk is written and maintained by Ivan J. +# +# This file is part of arm-sdk +# +# This source code is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This software is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this source code. If not, see . + +## kernel build script for Raspberry Pi 2/3 boards + +## settings & config +vars+=(device_name arch size parted_type parted_boot parted_root inittab) +vars+=(gitkernel gitbranch rpifirmware) +arrs+=(custmodules) + +device_name="raspi1" +arch="armel" +size=1337 +inittab="T0:23:respawn:/sbin/agetty -L ttyAMA0 115200 vt100" + +parted_type="dos" +parted_boot="fat32 0 64" +parted_root="ext4 64 -1" + +extra_packages+=() +custmodules=(snd_bcm2835) + +gitkernel="https://github.com/raspberrypi/linux.git" +gitbranch="rpi-4.4.y" +rpifirmware="https://github.com/raspberrypi/firmware.git" + + +prebuild() { + fn prebuild + req=(device_name strapdir) + ckreq || return 1 + + notice "executing $device_name prebuild" + + enablessh + write-fstab + copy-zram-init + install-custom-packages + + mkdir -p $R/tmp/kernels/$device_name +} + +postbuild() { + fn postbuild + + notice "executing $device_name postbuild" + + ## {{{ boot txts + notice "creating cmdline.txt" + cat <