-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
223 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
devuan-*-c201-libre-*GB.img | ||
open-ath9k-htc-firmware | ||
linux-* | ||
dl/* | ||
devsus-rootfs | ||
cache/* | ||
devsus-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/sh -xe | ||
|
||
# this file is part of Devsus. | ||
# | ||
# Copyright 2017, 2018, 2019 Dima Krasner | ||
# | ||
# This program 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 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program 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 program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
# MA 02110-1301, USA. | ||
|
||
[ ! -d open-ath9k-htc-firmware ] && git clone --depth 1 https://github.com/qca/open-ath9k-htc-firmware.git | ||
|
||
# build AR9271 firmware | ||
cd open-ath9k-htc-firmware | ||
if [ -d ../cache/xtensa-toolchain ] | ||
then | ||
mkdir toolchain | ||
mv ../cache/xtensa-toolchain toolchain/inst | ||
else | ||
make toolchain | ||
fi | ||
CROSS_COMPILE=`pwd`/../ci/xtensa-elf- make -C target_firmware | ||
mv toolchain/inst ../cache/xtensa-toolchain | ||
cd .. | ||
|
||
# put AR9271 firmware in /lib/firmware | ||
install -D -m 644 open-ath9k-htc-firmware/target_firmware/htc_9271.fw devsus-firmware/lib/firmware/htc_9271.fw | ||
tar -c devsus-firmware | gzip -1 > devsus-firmware.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/sh -xe | ||
|
||
# this file is part of Devsus. | ||
# | ||
# Copyright 2017, 2018, 2019 Dima Krasner | ||
# | ||
# This program 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 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program 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 program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
# MA 02110-1301, USA. | ||
|
||
create_image() { | ||
# it's a sparse file - that's how we fit a 16GB image inside a 2GB one | ||
dd if=/dev/zero of=$1 bs=$2 count=$3 conv=sparse | ||
parted --script $1 mklabel gpt | ||
cgpt create $1 | ||
cgpt add -i 1 -t kernel -b 8192 -s 65536 -l Kernel -S 1 -T 5 -P 10 $1 | ||
start=$((8192 + 65536)) | ||
end=`cgpt show $1 | grep 'Sec GPT table' | awk '{print $1}'` | ||
size=$(($end - $start)) | ||
cgpt add -i 2 -t data -b $start -s $size -l Root $1 | ||
# $size is in 512 byte blocks while ext4 uses a block size of 1024 bytes | ||
mkfs.ext4 -F -b 1024 -m 0 -O ^has_journal -E offset=$(($start * 512)) $1 $(($size / 2)) | ||
} | ||
|
||
# create 2GB and 16GB images with the Chrome OS partition layout | ||
create_image devuan-ascii-c201-libre-2GB.img 50M 40 | ||
create_image devuan-ascii-c201-libre-16GB.img 512 30785536 | ||
GZIP=-1 tar -cSzf devsus-templates.tar.gz devuan-ascii-c201-libre-2GB.img devuan-ascii-c201-libre-16GB.img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/bin/sh -xe | ||
|
||
# this file is part of Devsus. | ||
# | ||
# Copyright 2017, 2018, 2019 Dima Krasner | ||
# | ||
# This program 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 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program 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 program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
# MA 02110-1301, USA. | ||
|
||
KVER=4.9 | ||
|
||
minor=`wget -q -O- http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-$KVER.N/ | grep -F patch-$KVER-gnu | head -n 1 | cut -f 9 -d . | cut -f 1 -d -` | ||
[ ! -f dl/linux-libre-$KVER-gnu.tar.xz ] && wget -O dl/linux-libre-$KVER-gnu.tar.xz http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-$KVER.0/linux-libre-$KVER-gnu.tar.xz | ||
[ ! -f dl/patch-$KVER-gnu-$KVER.$minor-gnu ] && wget -O- https://www.linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-$KVER.N/patch-$KVER-gnu-$KVER.$minor-gnu.xz | xz -d > dl/patch-$KVER-gnu-$KVER.$minor-gnu | ||
[ ! -f dl/ath9k_htc_do_not_use_bulk_on_ep3_and_ep4.patch ] && wget -O dl/ath9k_htc_do_not_use_bulk_on_ep3_and_ep4.patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=2b721118b7821107757eb1d37af4b60e877b27e7 | ||
|
||
# build Linux-libre | ||
[ ! -d linux-$KVER ] && tar -xJf dl/linux-libre-$KVER-gnu.tar.xz | ||
cd linux-$KVER | ||
patch -p 1 < ../dl/patch-$KVER-gnu-$KVER.$minor-gnu | ||
make clean | ||
make mrproper | ||
# work around instability of ath9k_htc, see https://github.com/SolidHal/PrawnOS/issues/38 | ||
patch -R -p 1 < ../dl/ath9k_htc_do_not_use_bulk_on_ep3_and_ep4.patch | ||
# reset the minor version number, so out-of-tree drivers continue to work after | ||
# a kernel upgrade | ||
sed s/'SUBLEVEL = .*'/'SUBLEVEL = 0'/ -i Makefile | ||
cp -f ../kernel/config .config | ||
|
||
export PATH=`pwd`/ci:$PATH | ||
kmake="make -j `nproc` CROSS_COMPILE=arm-none-eabi- ARCH=arm" | ||
|
||
$kmake olddefconfig | ||
$kmake modules_prepare | ||
$kmake SUBDIRS=drivers/usb/dwc2 modules | ||
$kmake SUBDIRS=drivers/net/wireless/ath/ath9k modules | ||
$kmake SUBDIRS=drivers/bluetooth modules | ||
$kmake dtbs | ||
|
||
$kmake zImage modules | ||
|
||
[ ! -h kernel.its ] && ln -s ../kernel/kernel.its . | ||
mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg | ||
dd if=/dev/zero of=bootloader.bin bs=512 count=1 | ||
mkdir -p ../devsus-kernel/boot | ||
vbutil_kernel --pack ../devsus-kernel/boot/vmlinux.kpart \ | ||
--version 1 \ | ||
--vmlinuz vmlinux.uimg \ | ||
--arch arm \ | ||
--keyblock /usr/share/vboot/devkeys/kernel.keyblock \ | ||
--signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \ | ||
--config ../kernel/cmdline \ | ||
--bootloader bootloader.bin | ||
cd .. | ||
|
||
# put kernel modules in /lib/modules | ||
$kmake -C linux-$KVER INSTALL_MOD_PATH=devsus-kernel modules_install | ||
rm -f devsus-kernel/lib/modules/$KVER.0-gnu/{build,source} | ||
tar -c devsus-kernel | gzip -1 > devsus-kernel.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh -xe | ||
|
||
# this file is part of Devsus. | ||
# | ||
# Copyright 2017, 2018, 2019 Dima Krasner | ||
# | ||
# This program 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 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program 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 program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
# MA 02110-1301, USA. | ||
|
||
[ ! -f cache/hosts ] && wget -O- https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts | grep ^0\.0\.0\.0 | awk '{print $1" "$2}' | grep -F -v "0.0.0.0 0.0.0.0" > cache/hosts | ||
|
||
debootstrap --arch=armhf --foreign --variant=minbase --include=eudev,kmod,net-tools,inetutils-ping,traceroute,iproute2,isc-dhcp-client,wpasupplicant,iw,alsa-utils,cgpt,elvis-tiny,less,psmisc,netcat-traditional,ca-certificates,bzip2,xz-utils,unscd,dbus,dbus-x11,bluez,pulseaudio,pulseaudio-module-bluetooth,elogind,libpam-elogind,ntp,xserver-xorg-core,xserver-xorg-input-libinput,xserver-xorg-video-fbdev,libgl1-mesa-dri,xserver-xorg-input-synaptics,xinit,x11-xserver-utils,ratpoison,xbindkeys,xvkbd,rxvt-unicode,htop,firefox-esr,mupdf,locales,man-db,dmz-cursor-theme,apt-transport-https ascii devsus-rootfs http://packages.devuan.org/merged | ||
|
||
install -D -m 644 devsus/sources.list devsus-rootfs/opt/devsus/sources.list | ||
for i in 80disable-recommends 99-brightness.rules 98-mac.rules fstab .xbindkeysrc htoprc .Xresources .ratpoisonrc 99-hinting.conf index.theme devsus-settings.js devsus.cfg | ||
do | ||
install -m 644 devsus/$i devsus-rootfs/opt/devsus/$i | ||
done | ||
install -m 644 cache/hosts devsus-rootfs/opt/devsus/hosts | ||
install -m 744 devsus/.xinitrc devsus-rootfs/opt/devsus/.xinitrc | ||
install -m 755 devsus/init devsus-rootfs/opt/devsus/init | ||
|
||
tar -c devsus-rootfs | gzip -1 > devsus-rootfs.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../open-ath9k-htc-firmware/toolchain/inst/bin/xtensa-elf-ar |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../open-ath9k-htc-firmware/toolchain/inst/bin/xtensa-elf-objcopy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.