Skip to content

Commit

Permalink
Address mmc issue
Browse files Browse the repository at this point in the history
Added three patches to fix the mmc issue as described here:
#17
Source for the patches is the chrome os kernel. Links to
the commits can be found in the issue.

Locking into version 4.17.2 for the time being.

Better organized patches.
Added logic to only apply tested patches on fresh kernel.

Moved some debian build improvements in from my devsus
master branch, including switching from xfce to lxqt.

May be able to add option between the two in the future,
as the issue that led to switching DEs may have been with
the xorg video drivers that are now skipped by the script
and not xfce itself.

Cleaned up uneeded old configs
  • Loading branch information
SolidHal committed Aug 23, 2018
1 parent 246c8b5 commit cad1891
Show file tree
Hide file tree
Showing 31 changed files with 521 additions and 9,961 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ devuan-jessie-c201-libre-*GB.img
linux-*
open-ath9k-htc-firmware
debian-stretch-c201-libre-*GB.img
librean-stretch-c201-libre-*GB.img

4 changes: 2 additions & 2 deletions Install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#Setup locales
apt install -y locales
#Install xfce, wicd
apt install -y task-xfce-desktop wicd wicd-curses wicd-gtk xserver-xorg-input-synaptics acpi
apt install -y xorg acpi-support lightdm tasksel dpkg librsvg2-common xorg xserver-xorg-input-libinput alsa-utils anacron avahi-daemon eject iw libnss-mdns xdg-utils lxqt wicd-daemon wicd wicd-curses wicd-gtk xserver-xorg-input-synaptics
#Copy in acpi, pulse audio, trackpad settings, funtion key settings
cp -rf /os_configs/default.pa /etc/pulse/default.pa
mkdir /etc/acpi
Expand All @@ -15,7 +15,7 @@ cp -rf /os_configs/50-synaptics.conf /etc/X11/xorg.conf.d/

locale-gen

echo "Username: "
echo " Enter new username: "
read username
adduser $username
usermod -a -G sudo,netdev $username
Expand Down
12 changes: 6 additions & 6 deletions buildDebianFs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Build fs, image


KVER=4.17.8
KVER=4.17.2

outmnt=$(mktemp -d -p `pwd`)
inmnt=$(mktemp -d -p `pwd`)
Expand Down Expand Up @@ -53,7 +53,7 @@ create_image() {
}

# create a 2GB image with the Chrome OS partition layout
create_image debian-stretch-c201-libre-2GB.img $outdev 50M 40 $outmnt
create_image librean-stretch-c201-libre-2GB.img $outdev 50M 40 $outmnt

# INCLUDES=apt-utils,libc6,libdebconfclient0,awk,libz2-1.0,libblzma5,libselinux1,tar,libtinfo5,zlib1g,udev,kmod,net-tools,traceroute,iproute2,isc-dhcp-client,wpasupplicant,iw,alsa-utils,cgpt,vim-tiny,less,psmisc,netcat-openbsd,ca-certificates,bzip2,xz-utils,unscd,lightdm,lightdm-gtk-greeter,xfce4,xorg,ifupdown,nano,wicd,wicd-curses

Expand All @@ -75,10 +75,10 @@ cp sources.list $outmount/etc/apt/sources.list
cp /etc/locale.gen $outmnt/etc/
# chroot $outmnt locale-gen
chroot $outmnt apt update
chroot $outmnt apt install -y initscripts udev kmod net-tools inetutils-ping traceroute iproute2 isc-dhcp-client wpasupplicant iw alsa-utils cgpt vim-tiny less psmisc netcat-openbsd ca-certificates bzip2 xz-utils ifupdown nano apt-utils python python-urwid pciutils usbutils
chroot $outmnt apt install -y initscripts udev kmod net-tools inetutils-ping traceroute iproute2 isc-dhcp-client wpasupplicant iw alsa-utils cgpt vim-tiny less psmisc netcat-openbsd ca-certificates bzip2 xz-utils ifupdown nano apt-utils python python-urwid
chroot $outmnt apt-get autoremove --purge
chroot $outmnt apt-get clean
chroot $outmnt apt-get install -y -d acpi-support task-xfce-desktop wicd-daemon wicd wicd-curses wicd-gtk xserver-xorg-input-synaptics
chroot $outmnt apt-get install -y -d xorg acpi-support lightdm tasksel dpkg librsvg2-common xorg xserver-xorg-input-libinput alsa-utils anacron avahi-daemon eject iw libnss-mdns xdg-utils lxqt wicd-daemon wicd wicd-curses wicd-gtk xserver-xorg-input-synaptics
#sed -i s/'enable-cache hosts no'/'enable-cache hosts yes'/ -i $outmnt/etc/nscd.conf
#rm -f $outmnt/etc/resolv.conf
rm -rf $outmnt/etc/hosts #This is what https://wiki.debian.org/EmDebian/CrossDebootstrap suggests
Expand All @@ -92,7 +92,7 @@ rm -f $outmnt/lib/modules/3.14.0/{build,source}
install -D -m 644 open-ath9k-htc-firmware/target_firmware/htc_9271.fw $outmnt/lib/firmware/ath9k_htc/htc_9271-1.4.0.fw

# create a 15GB image
create_image debian-stretch-c201-libre-15GB.img $indev 512 30777343 $inmnt
create_image librean-stretch-c201-libre-15GB.img $indev 512 30777343 $inmnt

# copy the kernel and / of the 2GB image to the 15GB one
dd if=${outdev}p1 of=${indev}p1 conv=notrunc
Expand All @@ -103,7 +103,7 @@ rmdir $inmnt
losetup -d $indev

# move the 15GB image inside the 2GB one
cp -f debian-stretch-c201-libre-15GB.img $outmnt/
cp -f Librean-stretch-c201-libre-15GB.img $outmnt/
echo "DONE!"
cleanup

7 changes: 4 additions & 3 deletions buildKernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
#Build kenerl, wifi firmware


KVER=4.17.8
KVER=4.17.2

# build Linux-libre, with ath9k_htc, dwc2 from Chrome OS and without many useless drivers
[ ! -f linux-libre-$KVER-gnu.tar.lz ] && wget https://www.linux-libre.fsfla.org/pub/linux-libre/releases/$KVER-gnu/linux-libre-$KVER-gnu.tar.lz
[ ! -d linux-$KVER ] && tar --lzip -xvf linux-libre-$KVER-gnu.tar.lz
[ ! -d linux-$KVER ] && tar --lzip -xvf linux-libre-$KVER-gnu.tar.lz && FRESH=true
cd linux-$KVER
make clean
make mrproper
#Apply the usb patch, quietly so
[ "$FRESH" = true ] && git apply ../patches-tested/*
#Apply the usb patch, quietly so
# git apply ../chromeos-dwc2-glue.patch
# git apply ../rockchip-dwc2-usb-partial-power-down.patch
#Apply all of the rockMyy patches that make sense
Expand Down
2 changes: 1 addition & 1 deletion buildNewKernelIntoFS.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh -xe


KVER=4.17.5
KVER=4.17.2

outmnt=$(mktemp -d -p `pwd`)
outdev=/dev/loop7
Expand Down
Loading

0 comments on commit cad1891

Please sign in to comment.