Skip to content
Snippets Groups Projects
make-linux 2.38 KiB
Newer Older
#!/bin/sh
#
Ruben Rodriguez's avatar
Ruben Rodriguez committed
#    Copyright (C) 2008-2013  Rubén Rodríguez <ruben@trisquel.info>
#
#    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 St, Fifth Floor, Boston, MA  02110-1301 USA
#

for PATCH in $DATA/*.patch ; do
  patch -p1 < $PATCH
done
Ruben Rodriguez's avatar
Ruben Rodriguez committed
sh $DATA/deblob-3.13 --force
Ruben Rodriguez's avatar
Ruben Rodriguez committed
rm firmware -rf
cp -a $DATA/firmware .

# Compile with less modules and avoid abi check
echo 'skipmodule = true' >> debian.master/rules.d/0-common-vars.mk
echo 'skipabi = true' >> debian.master/rules.d/0-common-vars.mk
echo 'skipmodule = true' >> debian/rules.d/0-common-vars.mk
echo 'skipabi = true' >> debian/rules.d/0-common-vars.mk

line=$(grep -n ')-Ubuntu' debian/rules.d/0-common-vars.mk|cut -d: -f1)
sed $(expr $line - 1 ),$(expr $line + 1 )d debian/rules.d/0-common-vars.mk -i
sed s/family=ubuntu/family=trisquel/ -i debian/rules.d/0-common-vars.mk
Ruben Rodriguez's avatar
Ruben Rodriguez committed

rename s/ubuntu/trisquel/ debian.*/config/config.common.ubuntu 

sed 's/Linux/Linux-libre/g' debian/control debian/control.stub -i

sed '/^firmware/d' ./debian*/abi/*/fwinfo -i
echo > ./debian.master/d-i/firmware/nic-modules
echo > ./debian.master/d-i/firmware/scsi-modules
# Use BFQ scheduler in lowlatency kernels
cat << EOF >> debian.master/config/config.common.trisquel
CONFIG_IOSCHED_BFQ=y
CONFIG_CGROUP_BFQIO=y
# CONFIG_DEFAULT_BFQ is not set
EOF
cat << EOF >> debian.master/config/i386/config.flavour.lowlatency
CONFIG_DEFAULT_BFQ=y
CONFIG_DEFAULT_IOSCHED="BFQ"
EOF
cp debian.master/config/i386/config.flavour.lowlatency debian.master/config/amd64/config.flavour.lowlatency

sed '/%s_mc2/s@snprintf.*@snprintf(fw_name, sizeof(fw_name), "/*(DEBLOBBED)*/", chip_name);@' -i drivers/gpu/drm/radeon/si.c drivers/gpu/drm/radeon/cik.c

changelog "Removed non-free bits"

cp debian/changelog debian.master/changelog

PARALLEL=true compile