Old but Gold: Bringing a 15-Year-Old Kindle 4 Back to Life as an E-Ink Picture Frame with ChatGPT and GitHub

2026-11-29
#Kindle#ChatGPT#GitHub#Linux#E-Ink#DIY#3D Printing

I recently dug out an old silver Kindle 4 from 2011. No touchscreen, physical buttons, firmware 4.1.4, and even the once-popular Duokan system installed alongside Amazon's firmware. Fifteen years later, it still boots and the E-Ink screen still works.

Rather than throwing it away, I wondered whether hardware from 2011 could work with AI from 2026 to become a battery-powered electronic picture frame showing weather, tides and household reminders. No dedicated server, no permanently enabled Wi-Fi, and preferably no permanent power cable.

After two days of experimenting, the core functionality was working. I called the project 54chenKindle.

Project: https://github.com/54chen/54chenKindle

1. Architecture

My initial idea was a kiosk system with a WebView. Making a 2011 browser handle the modern web seemed like an unnecessary engineering exercise. Why render a web page when all I need is an image?

ChatGPT scheduled task
          |
Weather / Tides / Reminders
          |
     600x800 PNG
          |
        GitHub
          | HTTPS
       Kindle 4
          | eips
      E-Ink display
          |
    Suspend to RAM
          | RTC wakeup
       Next update

ChatGPT prepares the content, GitHub distributes the files, and the Kindle downloads, displays and sleeps. The interface between the two worlds is simply a PNG.

2. Getting into the Kindle's Linux system

Component Specification
Device Kindle 4
Firmware 4.1.4
Architecture ARMv7
Kernel 2.6.31-rt11-lab126
BusyBox 1.17.1
Display 600×800 E-Ink
Systems Amazon Kindle and Duokan

Connect the Kindle to a Mac over USB and create the following marker at the root of its storage:

touch /Volumes/Kindle/ENABLE_DIAGS

Safely eject and reboot. The USB networking option is not on the first Diagnostics menu. The exact navigation is:

Diagnostics Main Menu
  D. Misc individual diagnostics
    U. Utilities
      Z. Enable USBnet

In other words, enter Misc individual diagnostics, then Utilities, and finally Enable USBnet.

Configure the corresponding USB network interface on the Mac (en9 in my case) and connect:

sudo ifconfig en9 inet 192.168.15.1 netmask 255.255.255.0 up
ssh -o KexAlgorithms=+diffie-hellman-group1-sha1 \
    -o HostKeyAlgorithms=+ssh-rsa root@192.168.15.244

Modern SSH clients disable some of these old algorithms by default. Enable them only for this trusted device, not globally. Finally, the familiar prompt appeared:

[root@kindle root]#

3. A brief investigation into Duokan

/dev/mmcblk0p1    Amazon main system
/dev/mmcblk0p2    Diagnostics
/dev/mmcblk0p3    Persistent system data
/dev/mmcblk0p4    User storage

Duokan integrates with the original boot process through DK_update, DK_switch and DK_run, selecting either Amazon's framework or Duokan's KindleApp. I briefly considered adding a third boot mode, but building another operating environment just to display an image seemed excessive.

Before modifying anything, I backed up p1 and p3 using dd. At one point the Kindle failed to boot normally, although a long press of the power button brought it back. The following operations involve root access and system partitions; verify the layout and make backups before attempting them on another device.

4. Bringing Dropbear from Diagnostics into the main system

Switching into Diagnostics every time I wanted to edit a script was inconvenient. Wi-Fi SSH would be much more useful. The main system had startup scripts but lacked a usable Dropbear binary. Diagnostics already had one.

First mount the main system read-only from Diagnostics:

mkdir -p /tmp/mainroot
mount -t ext2 -o ro /dev/mmcblk0p1 /tmp/mainroot

After checking the partition and backups, temporarily remount it writable:

mount -o remount,rw /dev/mmcblk0p1 /var/tmp/mainroot
mkdir -p /tmp/mainroot/usr/local/kindle-ssh
cp /usr/local/bin/dropbearmulti /tmp/mainroot/usr/local/kindle-ssh/
cd /tmp/mainroot/usr/local/kindle-ssh
chmod 755 dropbearmulti
ln -s dropbearmulti dropbear
ln -s dropbearmulti dropbearkey
chroot /tmp/mainroot /usr/local/kindle-ssh/dropbear -h

The original /usr/local/sbin/dropbear and /usr/local/bin/dropbearkey in Diagnostics are symlinks to dropbearmulti, so only one binary needs copying. The main system already contained the necessary shared libraries and RSA host key. The chroot test worked, saving me from cross-compiling a new SSH server.

Generate a dedicated RSA key on the Mac and transfer its public key:

ssh-keygen -t rsa -b 2048 -f ~/.ssh/kindle4_rsa
scp -O -o KexAlgorithms=+diffie-hellman-group1-sha1 \
    -o HostKeyAlgorithms=+ssh-rsa \
    ~/.ssh/kindle4_rsa.pub root@192.168.15.244:/mnt/us/

The -O option is necessary because modern SCP uses SFTP by default, which this old server does not support.

Back in Diagnostics:

cp /mnt/us/kindle4_rsa.pub /tmp/mainroot/usr/local/kindle-ssh/authorized_keys
chmod 600 /tmp/mainroot/usr/local/kindle-ssh/authorized_keys
mkdir -p /tmp/mainroot/usr/local/bin

Inspecting /etc/init.d/dropbear, /etc/init.d/usbnetd and /usr/sbin/usbnetwork revealed an existing hook that invokes /usr/local/bin/usbnetwork. I reused it without replacing the original startup scripts or permanently switching USB into networking mode.

Save the following startup script as /tmp/mainroot/usr/local/bin/usbnetwork:

#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
BASE=/usr/local/kindle-ssh
PID=/var/run/kindle-ssh.pid
LOG=/mnt/us/kindle-ssh.log
case "$1" in
start)
 (
 trap '' HUP
 echo "===== WIFI SSH START ====="; date
 mkdir -p /tmp/root/.ssh || exit 1
 chmod 700 /tmp/root /tmp/root/.ssh
 cp "$BASE/authorized_keys" /tmp/root/.ssh/authorized_keys || exit 1
 chmod 600 /tmp/root/.ssh/authorized_keys
 COUNT=0
 while [ "$COUNT" -lt 60 ]; do
   IP=$(ifconfig wlan0 2>/dev/null | sed -n 's/.*inet addr:\([0-9.]*\).*/\1/p')
   if [ -n "$IP" ] && [ "$IP" != "0.0.0.0" ]; then
     echo "WiFi IP: $IP"
     "$BASE/dropbear" -r /etc/dropbear/dropbear_rsa_host_key -p "$IP:22" -s -j -k -P "$PID" || exit 1
     echo "WiFi SSH started"; sync; exit 0
   fi
   sleep 5; COUNT=$((COUNT + 1))
 done
 echo "WiFi connection timeout"; sync
 ) </dev/null >> "$LOG" 2>&1 &
 ;;
stop) if [ -f "$PID" ]; then kill "$(cat "$PID")"; rm -f "$PID"; fi;;
status) [ -f "$PID" ] || exit 1; kill -0 "$(cat "$PID")" 2>/dev/null; exit $?;;
*) exit 1;;
esac
exit 0

Set permissions, enable persistence and restore the main system to read-only:

chmod 755 /tmp/mainroot/usr/local/bin/usbnetwork
echo persist > /mnt/us/ENABLE_USBNET
cd /
sync
mount -o remount,ro /dev/mmcblk0p1 /var/tmp/mainroot

The files added to the device were:

/usr/local/kindle-ssh/dropbearmulti
/usr/local/kindle-ssh/dropbear -> dropbearmulti
/usr/local/kindle-ssh/dropbearkey -> dropbearmulti
/usr/local/kindle-ssh/authorized_keys
/usr/local/bin/usbnetwork
/mnt/us/ENABLE_USBNET

Reboot into Amazon's system, wait for Wi-Fi and connect from the Mac:

ssh -i ~/.ssh/kindle4_rsa -o IdentitiesOnly=yes \
    -o KexAlgorithms=+diffie-hellman-group1-sha1 \
    -o HostKeyAlgorithms=+ssh-rsa \
    -o PubkeyAcceptedAlgorithms=+ssh-rsa root@KINDLE_IP

These options can be placed in a dedicated Host entry in ~/.ssh/config. Keep the legacy SSH server on a trusted local network, never expose it to the internet. Removing ENABLE_USBNET and rebooting disables automatic SSH startup.

5. When curl from 2011 meets HTTPS from 2026

The original curl 7.21.4 with OpenSSL/0.9.8j failed to connect to GitHub:

tlsv1 alert protocol version

Plain HTTP worked, but modern HTTPS did not. Instead of introducing a local HTTP proxy, I found a statically compiled ARM binary from static-curl.

Download on the Mac:

curl -fL https://github.com/moparisthebest/static-curl/releases/download/v8.17.0/curl-armhf -o curl-armhf
curl -fL https://curl.se/ca/cacert.pem -o cacert.pem

Transfer the files to /mnt/us/kindle-display/bin/curl and bin/cacert.pem on the Kindle and make curl executable. The test returned:

curl 8.17.0 (armv7l-unknown-linux-musleabihf)
OpenSSL/3.5.4
SSL connection using TLSv1.3
SSL certificate verify ok.
HTTP/2 200

A device from 2011 communicating with GitHub over TLS 1.3 in 2026. Open-source software is rather wonderful sometimes.

6. Displaying an image

Amazon already provides a utility called eips:

eips -g /mnt/us/display.png

The first attempt failed with 8bit only. The following format worked:

Property Value
Width 600 px
Height 800 px
Format PNG
Bit depth 8-bit
Colour mode Grayscale
Alpha None
Interlacing None

I simply asked ChatGPT to generate a PNG meeting these requirements. The actual file encoding must be correct, not just its visual appearance. The physical grayscale levels of the display and the encoded PNG bit depth are different things.

eips -f -g /mnt/us/display.png

That solved the display part.

7. ChatGPT as the CMS, GitHub as the distribution platform

I configured a scheduled ChatGPT task for 2 AM in the Pacific/Auckland timezone. A simplified prompt is:

Generate today's Kindle display for Pacific/Auckland.
Include date, local weather, high and low tide times and heights,
and household reminders. Use verified sources and reference stations.
Produce a 600x800 PNG, 8-bit grayscale, no alpha, no interlacing.
Publish to GitHub as YYYY-MM-DD/display.png.

Weather data uses references around Wellington Airport and tide predictions use LINZ Wellington Harbour, with the reference stations identified. If there is a household activity tomorrow, I can simply mention it in ChatGPT and let the scheduled task prepare the image.

The source project is 54chenKindle. Daily images can live in a separate repository. Household schedules should not be published publicly; the prototype uses public-file downloads, and private repository authentication remains to be configured separately.

8. The download script: update.sh

The public project is called 54chenKindle, while the tested installation path on the device remains /mnt/us/kindle-display. The following is the publication-ready version of update.sh with a configurable image repository:

#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
BASE=/mnt/us/kindle-display
CURL=$BASE/bin/curl
CA=$BASE/bin/cacert.pem
IMAGE=$BASE/display.png
TEMP=$BASE/display.tmp.png
LOG=$BASE/display.log
REPO=OWNER/IMAGE_REPO
BRANCH=main
TZ='NZST-12NZDT,M9.5.0/2,M4.1.0/3'
export TZ
TODAY=$(date +%Y-%m-%d)
URL=https://raw.githubusercontent.com/$REPO/$BRANCH/$TODAY/display.png
exec >> "$LOG" 2>&1
echo "================================"
echo "$(date) Update started"
echo "Date: $TODAY"
echo "URL: $URL"
if ! "$CURL" -V >/dev/null 2>&1; then
    cp "$CURL" /tmp/kindle-curl || exit 1
    chmod 755 /tmp/kindle-curl
    CURL=/tmp/kindle-curl
fi
rm -f "$TEMP"
"$CURL" --cacert "$CA" --connect-timeout 15 --max-time 90 \
    --retry 2 -fLsS -o "$TEMP" "$URL"
if [ "$?" -ne 0 ] || [ ! -s "$TEMP" ]; then
    echo "ERROR: Download failed"
    rm -f "$TEMP"
    exit 1
fi
SIGNATURE=$(hexdump -n 8 -v -e '1/1 "%02x"' "$TEMP")
if [ "$SIGNATURE" != "89504e470d0a1a0a" ]; then
    echo "ERROR: Invalid PNG file"
    rm -f "$TEMP"
    exit 1
fi
if ! eips -g "$TEMP"; then
    echo "ERROR: Display refresh failed"
    rm -f "$TEMP"
    exit 1
fi
mv "$TEMP" "$IMAGE" || exit 1
echo "$TODAY" > "$BASE/last-update"
echo "$(date) Update successful"
sync
exit 0

Even od was missing from the old system, but hexdump was available. The PNG signature is a basic sanity check, not full decoding validation. Failed downloads preserve the previous local image. The last-update file records the successful date to avoid repeated downloads. Running sh update.sh manually forces an update for the current day.

9. The hardest part: waking the Kindle after suspend

Amazon's LIPC interfaces provide control over the original screensaver and Wi-Fi:

lipc-set-prop com.lab126.powerd preventScreenSaver 1
lipc-set-prop com.lab126.wifid enable 1
lipc-set-prop com.lab126.wifid enable 0
cat /sys/power/state

The available power states are standby mem. The latter is Suspend to RAM. But what wakes the device?

I referred to kindle4-weather-display and kindle-weather-stand-alone. My Kindle exposes two RTCs: rtc0 (mxc_rtc) and rtc1 (pmic_rtc). Their observed since_epoch values were 1795856976 and 14959 respectively, so they clearly use different time bases.

Set a 120-second alarm relative to RTC1's own clock:

RTC=/sys/class/rtc/rtc1
NOW=$(cat "$RTC/since_epoch")
ALARM=$((NOW + 120))
echo 0 > "$RTC/wakealarm"
echo "$ALARM" > "$RTC/wakealarm"
sync
echo mem > /sys/power/state

Strangely, reading wakealarm after setting it returned nothing. Initially the script refused to suspend whenever the readback was empty, which meant it never went to sleep. Eventually I ran two short tests without requiring successful readback:

22:23:25 Entering deep sleep
22:25:19 Resumed
22:25:42 Entering deep sleep
22:27:44 Resumed
22:28:05 Restoring normal mode

The suspend intervals lasted 114 and 122 seconds. Wi-Fi recovered and image downloads succeeded after both wakeups. These results support the RTC approach, although the driver-level reason for the empty readback remains unknown. Full-day suspend and long-term battery life still need real-world testing.

10. Life without nohup

Disabling Wi-Fi disconnects SSH, but the daemon needs to survive. The old environment did not have nohup, so basic shell functionality came to the rescue:

trap '' HUP
sh daemon.sh </dev/null >/dev/null 2>&1 &

The daemon itself ignores SIGHUP and writes to a log file. It continued execution through both suspend tests.

11. Automatic startup and project files

54chenKindle/
  config.sh
  daemon.sh
  disable-autostart.sh
  enable-autostart.sh
  install.sh
  power.sh
  README.txt
  start.sh
  stop.sh
  watchdog.sh
  update.sh

The static curl binary, CA certificate bundle and Wi-Fi SSH startup script are also needed. Refer to the actual published GitHub version for the project files. SSH keys, system backups, private images and runtime logs should not be committed.

The intended schedule is for ChatGPT to generate the image at 2 AM and the Kindle to wake at 3 AM, retry failed downloads after 30 minutes, and stop the daemon at or below 15% battery. Cron watches the process; it does not wake the device from suspend.

The original crond runs as /usr/sbin/crond -c /etc/crontab/, so the relevant configuration file is /etc/crontab/root:

* * * * * /bin/sh /mnt/us/kindle-display/watchdog.sh

Installing the autostart entry requires temporarily making the main system writable and restoring it to read-only afterwards. Creating /mnt/us/kindle-display/disable through USB storage and rebooting prevents the watchdog from starting the daemon. Cron has been configured on the prototype, but long-term operation, day-boundary scheduling and daylight-saving transitions still need further verification.

12. Amazon's header bar: solved

Occasionally Amazon's original status bar appeared across the top of the image. The likely cause was a framework redraw triggered by Wi-Fi state changes. The old sequence refreshed the image before shutting down Wi-Fi, leaving the final refresh too early.

The solution is to disable Wi-Fi, allow the original UI to settle, and then refresh the entire screen:

wifi_off || exit 1
sleep 5
if [ -s "$BASE/display.png" ]; then
    eips -f -g "$BASE/display.png"
    sleep 5
fi

The device then enters suspend. The visible header-bar issue has been resolved without stopping Amazon's entire framework.

One remaining improvement is same-day image changes. The current date-based deduplication means an afternoon change is not immediately downloaded. HTTP ETag polling could help, at the cost of additional wakeups and battery consumption.

Summary

SSH, shell scripts, cron, RTC alarms and framebuffers have existed for decades. What changed is the other end of the architecture. Previously I might have needed to write weather and tide integrations, layout code and a backend service. Now ChatGPT handles the content, GitHub distributes it, and the Kindle displays it.

Perhaps hardware becomes obsolete not because of its manufacturing date, but because we stop finding useful jobs for it.

Postscript: next stop, 3D printing

The next step is to set up a 3D printer and design a white enclosure for the Kindle 4, hiding the original silver bezel and physical buttons while keeping the charging port accessible. Ideally, it will be wall-mountable.

As for how long the fifteen-year-old battery will actually last, I will collect some real-world measurements before drawing conclusions.

Kindle 4 is back in business. Old but gold. :)

References