Skip to content

Commit

Permalink
Update koreader; emulate ntpd with ntpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
lgeek committed Apr 3, 2017
1 parent 5fe9774 commit a9bf918
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ compile_koreader() {
chmod +x koreader/restore-wifi-async.sh

cp ../../../files/defaults.persistent.lua koreader/
# Patch lj-wpaclient to prevent excessive scanning latency
sed "s/if ev.lvl == 'INFO' and ev.msg == 'CTRL-EVENT-SCAN-RESULTS'/if ev.msg == 'CTRL-EVENT-SCAN-RESULTS'/" \
./koreader/common/lj-wpaclient/wpaclient.lua > ./koreader/common/lj-wpaclient/wpaclient_patched.lua
mv ./koreader/common/lj-wpaclient/wpaclient_patched.lua ./koreader/common/lj-wpaclient/wpaclient.lua

mkdir koreader/bin
echo "ntpdate pool.ntp.org" > koreader/bin/ntpd
chmod +x koreader/bin/ntpd

cd ../../
dpkg-deb -b koreader-pkg .
Expand Down
7 changes: 2 additions & 5 deletions build_rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ config_rootfs() {
install_packages() {
cp src/linux-okreader-modules_2.6.35.3-1_armhf.deb rootfs/
cp src/firmware-okreader_1.0-2_armhf.deb rootfs/
cp src/koreader_2017.04-2_armhf.deb rootfs/
cp src/koreader_2017.04-3_armhf.deb rootfs/
cp src/kobo_hwconfig/kobo-hwconfig_1.0-1_armhf.deb rootfs/

chroot rootfs/ bash -c "dpkg -i /*.deb"
Expand All @@ -107,16 +107,13 @@ clean_up_rootfs() {
rm -R ./rootfs/usr/share/info/*
rm -R ./rootfs/usr/share/doc/*
rm -R ./rootfs/var/log/*

# Disable the NTP daemon
chroot rootfs/ bash -c "update-rc.d ntp disable"

echo "Cleanup done."
}

build_rootfs() {
debootstrap --arch=armhf --variant=minbase \
--include=net-tools,wireless-tools,wpasupplicant,kmod,udev,openssh-server,iputils-ping,ifupdown,vim-tiny,dhcpcd,ntp \
--include=net-tools,wireless-tools,wpasupplicant,kmod,udev,openssh-server,iputils-ping,ifupdown,vim-tiny,dhcpcd,ntpdate \
wheezy ./rootfs http://http.debian.net/debian/

if [ $? -ne 0 ] ; then
Expand Down
1 change: 1 addition & 0 deletions files/okreader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ echo 0 > /sys/class/leds/pmic_ledsg/brightness

export WIFI_MODULE=brcmfmac

PATH=/opt/koreader/bin:$PATH
cd /opt/koreader
while true; do
./luajit ./reader.lua /mnt
Expand Down
2 changes: 1 addition & 1 deletion src/koreader-pkg/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: koreader
Version: 2017.04-2
Version: 2017.04-3
Maintainer: Cosmin Gorgovan <[email protected]>
Architecture: armhf
Description: An ebook viewer application.

0 comments on commit a9bf918

Please sign in to comment.