summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorMichael Lauer <mickey@vanille-media.de>2006-07-03 12:03:11 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-07-03 12:03:11 +0000
commit399f46f80855ab646143c4f3d5b65505b3cf36d0 (patch)
treef5fab6688e6c57701ee9a1d31d59478465f9967b /packages
parent154e2d11e0915bf835aee9dddf6de954de4c68e8 (diff)
parentdeb7c0557bd30de7117ac42147292c07891a85e8 (diff)
merge of 621bf027644015319adb51145e07f9d6e3195b93
and c7701984b00dc8815849c8332b5967f4c9a81ab2
Diffstat (limited to 'packages')
-rw-r--r--packages/angstrom/angstrom-bootmanager-image.bb15
-rw-r--r--packages/angstrom/angstrom-bootstrap-image.bb14
-rw-r--r--packages/angstrom/angstrom-gpe-image.bb21
-rw-r--r--packages/angstrom/task-angstrom.bb11
-rw-r--r--packages/fluxbox/fluxbox-gpe/apps.gpe50
-rw-r--r--packages/fluxbox/fluxbox-gpe/apps.gpe.akita57
-rw-r--r--packages/fluxbox/fluxbox-gpe/apps.gpe.default7
-rw-r--r--packages/fluxbox/fluxbox-gpe/fluxbox-gpe-session14
-rw-r--r--packages/fluxbox/fluxbox-gpe_1.0rc.bb10
-rwxr-xr-xpackages/initscripts/initscripts-1.0/halt6
-rwxr-xr-xpackages/initscripts/initscripts-1.0/reboot6
-rw-r--r--packages/initscripts/initscripts-1.0/save-rtc.sh16
-rw-r--r--packages/initscripts/initscripts_1.0.bb8
-rw-r--r--packages/lilo-sh/.mtn2git_empty0
-rw-r--r--packages/lilo-sh/files/.mtn2git_empty0
-rw-r--r--packages/lilo-sh/files/lilo-0.21-1.1.patch35
-rw-r--r--packages/lilo-sh/files/lilo-0.21-include.patch10
-rw-r--r--packages/lilo-sh/files/lilo-0.21-loopdev.patch11
-rw-r--r--packages/lilo-sh/files/lilo-0.21-second.patch36
-rw-r--r--packages/lilo-sh/files/lilo-linkgear.patch1039
-rw-r--r--packages/lilo-sh/files/lilo-noconfig-h.patch23
-rw-r--r--packages/lilo-sh/files/lilo-sh-linux.patch1971
-rw-r--r--packages/lilo-sh/files/lilo.patch42
-rw-r--r--packages/lilo-sh/files/lilo.raid1552
-rw-r--r--packages/lilo-sh/lilo-sh_21.bb41
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/.mtn2git_empty0
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/AsmArm-ArchSa1100-Jornada720.patch40
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/Cpu-Sa1110-Jornada720.patch32
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/Kconfig-Arch-Jornada720.patch11
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/Kconfig-Keyboard-Jornada720.patch13
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/Kconfig-Touchscreen-Jornada720.patch14
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/Kconfig-Video-Jornada720.patch20
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/Mach-Sa1100-Jornada720.patch153
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/Makefile-Keyboard-Jornada720.patch8
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/Makefile-Touchscreen-Jornada720.patch7
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/Makefile-Video-Jornada720.patch10
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/Newfile-Epson1356fb.patch344
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/Newfile-Jornada720_kbd.patch100
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/Newfile-Jornada720_ts.patch106
-rw-r--r--packages/linux/linux-jlime-arm-2.6.17/defconf_jlime1028
-rw-r--r--packages/linux/linux-jlime-arm_2.6.17.bb26
-rw-r--r--packages/mplayer/files/pld-onlyarm5.patch405
-rw-r--r--packages/mplayer/mplayer_1.0pre8.bb120
-rw-r--r--packages/psmisc/files/.mtn2git_empty0
-rw-r--r--packages/psmisc/files/libintl-link.patch (renamed from packages/psmisc/psmisc-21.8/libintl-link.patch)0
-rw-r--r--packages/psmisc/psmisc.inc42
-rw-r--r--packages/psmisc/psmisc_21.8.bb45
-rw-r--r--packages/psmisc/psmisc_22.2.bb2
-rw-r--r--packages/strace/strace-4.5.14/sh-syscall-update.patch268
-rw-r--r--packages/strace/strace_4.5.14.bb5
-rw-r--r--packages/watchdog/files/.mtn2git_empty0
-rw-r--r--packages/watchdog/files/mkinstalldirs.patch17
-rw-r--r--packages/watchdog/watchdog_5.2.bb5
53 files changed, 6730 insertions, 86 deletions
diff --git a/packages/angstrom/angstrom-bootmanager-image.bb b/packages/angstrom/angstrom-bootmanager-image.bb
index be281d72bf..b669d2b665 100644
--- a/packages/angstrom/angstrom-bootmanager-image.bb
+++ b/packages/angstrom/angstrom-bootmanager-image.bb
@@ -1,9 +1,16 @@
-export IMAGE_BASENAME = "Ångström Bootmanager Image"
+#Angstrom bootmanager image
+LICENSE = MIT
+MAINTAINER = "Koen Kooi <koen@dominion.kabel.utwente.nl>"
+PR = "r0"
+
+DEPENDS = "task-angstrom"
+RDEPENDS = "angstrom-base-depends angstrom-bootmanager"
+
+export IMAGE_BASENAME = "bootmanager-image"
export IMAGE_LINGUAS = ""
-export IPKG_INSTALL = "task-bootstrap angstrom-bootmanager"
+export IPKG_INSTALL = "angstrom-base-depends angstrom-bootmanager"
inherit image_ipk
-DEPENDS += "task-bootstrap angstrom-bootmanager"
-LICENSE = "MIT"
+
diff --git a/packages/angstrom/angstrom-bootstrap-image.bb b/packages/angstrom/angstrom-bootstrap-image.bb
new file mode 100644
index 0000000000..84a4845569
--- /dev/null
+++ b/packages/angstrom/angstrom-bootstrap-image.bb
@@ -0,0 +1,14 @@
+#Angstrom bootstrap image
+LICENSE = MIT
+MAINTAINER = "Koen Kooi <koen@dominion.kabel.utwente.nl>"
+PR = "r0"
+
+DEPENDS = "task-angstrom"
+RDEPENDS = "angstrom-base-depends"
+
+export IMAGE_BASENAME = "bootstrap-image"
+export IMAGE_LINGUAS = ""
+export IPKG_INSTALL = "angstrom-base-depends"
+
+inherit image_ipk
+
diff --git a/packages/angstrom/angstrom-gpe-image.bb b/packages/angstrom/angstrom-gpe-image.bb
new file mode 100644
index 0000000000..0419ea1b9a
--- /dev/null
+++ b/packages/angstrom/angstrom-gpe-image.bb
@@ -0,0 +1,21 @@
+#Angstrom GPE image
+LICENSE = MIT
+MAINTAINER = "Koen Kooi <koen@dominion.kabel.utwente.nl>"
+PR = "r0"
+
+export IMAGE_BASENAME = "gpe-image"
+
+DEPENDS = "task-angstrom"
+RDEPENDS = "${IPKG_INSTALL}"
+
+export IPKG_INSTALL = "\
+ angstrom-base-depends \
+ angstrom-X-base-depends \
+ angsgrom-gpe-task-base \
+ angstrom-gpe-task-settings \
+ angstrom-gpe-task-pim \
+ ${ANGSTROM_EXTRA_INSTALL}"
+
+#ROOTFS_POSTPROCESS_COMMAND += "zap_root_password; "
+
+inherit image_ipk
diff --git a/packages/angstrom/task-angstrom.bb b/packages/angstrom/task-angstrom.bb
index c7323314db..d058457e98 100644
--- a/packages/angstrom/task-angstrom.bb
+++ b/packages/angstrom/task-angstrom.bb
@@ -3,6 +3,7 @@ PR = "r0"
ALLOW_EMPTY = "1"
PACKAGES = "\
+ angstrom-base-depends \
angstrom-X-base-depends \
angsgrom-gpe-task-base \
angstrom-gpe-task-settings \
@@ -13,6 +14,16 @@ PACKAGES = "\
angstrom-task-printing \
angstrom-task-sectest"
+RDEPENDS_angstrom-base-depends = "\
+ base-files \
+ base-passwd tinylogin \
+ busybox \
+ udev \
+ sysvinit initscripts sysvinit-pidof \
+ netbase \
+ angstrom-version \
+ "
+
RDEPENDS_angstrom-X-base-depends := "\
diet-x11 \
virtual/xserver"
diff --git a/packages/fluxbox/fluxbox-gpe/apps.gpe b/packages/fluxbox/fluxbox-gpe/apps.gpe
index 24d095f0fc..7aca442752 100644
--- a/packages/fluxbox/fluxbox-gpe/apps.gpe
+++ b/packages/fluxbox/fluxbox-gpe/apps.gpe
@@ -1,5 +1,6 @@
[app] (title=Panel 0)
[Deco] {NONE}
+ [Sticky] {yes}
[end]
[app] (title=Panel 1)
[Deco] {NONE}
@@ -8,6 +9,49 @@
[Dimensions] {635 440}
[end]
[app] (title=x-terminal-emulator)
- [Dimensions] {635 440}
-[end]
-
+ [Dimensions] {635 440}
+[end]
+[app] (abiword)
+ [Dimensions] {635 440}
+ [Sticky] {no}
+[end]
+[app] (gpe-filemanager)
+ [Dimensions] {635 440}
+ [Sticky] {yes}
+[end]
+[app] (gpe-info)
+ [Dimensions] {424 336}
+[end]
+[app] (gpe-edit)
+ [Dimensions] {635 440}
+[end]
+[app] (gpe-calculator)
+ [Dimensions] {266 321}
+[end]
+[app] (main)
+ [Dimensions] {635 440}
+[end]
+[app] (Gnumeric)
+ [Dimensions] {635 440}
+[end]
+[app] (gpdf)
+ [Dimensions] {635 440}
+[end]
+[app] (main_window)
+ [Dimensions] {635 440}
+[end]
+[app] (gaim)
+ [Dimensions] {635 440}
+[end]
+[app] (gpe-calendar)
+ [Dimensions] {380 343}
+[end]
+[app] (gpe-mini-browser)
+ [Dimensions] {635 440}
+[end]
+[app] (figment)
+ [Dimensions] {635 440}
+[end]
+[app] (gpe-sketchbook)
+ [Dimensions] {471 314}
+[end]
diff --git a/packages/fluxbox/fluxbox-gpe/apps.gpe.akita b/packages/fluxbox/fluxbox-gpe/apps.gpe.akita
new file mode 100644
index 0000000000..7aca442752
--- /dev/null
+++ b/packages/fluxbox/fluxbox-gpe/apps.gpe.akita
@@ -0,0 +1,57 @@
+[app] (title=Panel 0)
+ [Deco] {NONE}
+ [Sticky] {yes}
+[end]
+[app] (title=Panel 1)
+ [Deco] {NONE}
+[end]
+[app] (title=rxvt)
+ [Dimensions] {635 440}
+[end]
+[app] (title=x-terminal-emulator)
+ [Dimensions] {635 440}
+[end]
+[app] (abiword)
+ [Dimensions] {635 440}
+ [Sticky] {no}
+[end]
+[app] (gpe-filemanager)
+ [Dimensions] {635 440}
+ [Sticky] {yes}
+[end]
+[app] (gpe-info)
+ [Dimensions] {424 336}
+[end]
+[app] (gpe-edit)
+ [Dimensions] {635 440}
+[end]
+[app] (gpe-calculator)
+ [Dimensions] {266 321}
+[end]
+[app] (main)
+ [Dimensions] {635 440}
+[end]
+[app] (Gnumeric)
+ [Dimensions] {635 440}
+[end]
+[app] (gpdf)
+ [Dimensions] {635 440}
+[end]
+[app] (main_window)
+ [Dimensions] {635 440}
+[end]
+[app] (gaim)
+ [Dimensions] {635 440}
+[end]
+[app] (gpe-calendar)
+ [Dimensions] {380 343}
+[end]
+[app] (gpe-mini-browser)
+ [Dimensions] {635 440}
+[end]
+[app] (figment)
+ [Dimensions] {635 440}
+[end]
+[app] (gpe-sketchbook)
+ [Dimensions] {471 314}
+[end]
diff --git a/packages/fluxbox/fluxbox-gpe/apps.gpe.default b/packages/fluxbox/fluxbox-gpe/apps.gpe.default
new file mode 100644
index 0000000000..d7a0a83f22
--- /dev/null
+++ b/packages/fluxbox/fluxbox-gpe/apps.gpe.default
@@ -0,0 +1,7 @@
+[app] (title=Panel 0)
+ [Deco] {NONE}
+ [Sticky] {yes}
+[end]
+[app] (title=Panel 1)
+ [Deco] {NONE}
+[end]
diff --git a/packages/fluxbox/fluxbox-gpe/fluxbox-gpe-session b/packages/fluxbox/fluxbox-gpe/fluxbox-gpe-session
index ca0afea35d..f6e03ede7e 100644
--- a/packages/fluxbox/fluxbox-gpe/fluxbox-gpe-session
+++ b/packages/fluxbox/fluxbox-gpe/fluxbox-gpe-session
@@ -4,10 +4,20 @@
#
# Install "apps" file with defaults for GPE usage
-if test -e /usr/share/fluxbox/apps.gpe
+
+MACHINE="`cat /proc/cpuinfo | sed -n "/^Hardware/s/.*\:\ \(.*\)/\1/p"`"
+
+case $MACHINE in
+*Akita | *Spitz | *Borzoi | *Terrier)
+ APPS="apps.gpe.akita";;
+*)
+ APPS="apps.gpe.default";;
+esac
+
+if test -e /usr/share/fluxbox/$APPS
then
mkdir -p $HOME/.fluxbox
- test -e $HOME/.fluxbox/apps || cp /usr/share/fluxbox/apps.gpe $HOME/.fluxbox/apps
+ test -e $HOME/.fluxbox/apps || cp /usr/share/fluxbox/$APPS $HOME/.fluxbox/apps
fi
diff --git a/packages/fluxbox/fluxbox-gpe_1.0rc.bb b/packages/fluxbox/fluxbox-gpe_1.0rc.bb
index 6becbe365d..9cf8da0217 100644
--- a/packages/fluxbox/fluxbox-gpe_1.0rc.bb
+++ b/packages/fluxbox/fluxbox-gpe_1.0rc.bb
@@ -13,21 +13,21 @@ RCONFLICTS = "fluxbox"
######################################################################################
-PR = "r0"
+PR = "r3"
S = "${WORKDIR}/fluxbox-${PV}"
######################################################################################
SRC_URI = "http://switch.dl.sourceforge.net/sourceforge/fluxbox/fluxbox-${PV}.tar.gz \
file://gpe-init.patch;patch=1\
- file://apps.gpe \
+ file://apps.gpe.* \
file://style.gpe-default \
file://fluxbox-gpe-session \
file://fluxbox-gpe.session"
######################################################################################
-PACKAGES = "${PN} ${PN}-styles"
+PACKAGES += "${PN}-styles"
DESCRIPTION_${PN}-styles = "The default styles for fluxbox"
@@ -37,7 +37,7 @@ FILES_${PN} = "/usr/bin \
/usr/share/fluxbox/init \
/usr/share/fluxbox/keys \
/usr/share/fluxbox/menu \
- /usr/share/fluxbox/apps.gpe \
+ /usr/share/fluxbox/apps.gpe* \
/usr/share/fluxbox/session \
/usr/share/fluxbox/styles/gpe-default"
@@ -59,7 +59,7 @@ do_install_append() {
install -d ${D}/usr/share/fluxbox
install -d ${D}/usr/share/fluxbox/styles
- install -m 0644 ${WORKDIR}/apps.gpe ${D}/usr/share/fluxbox
+ install -m 0644 ${WORKDIR}/apps.gpe.* ${D}/usr/share/fluxbox
install -m 0755 ${WORKDIR}/fluxbox-gpe.session ${D}/usr/share/fluxbox/session
install -m 0644 ${WORKDIR}/style.gpe-default ${D}/usr/share/fluxbox/styles/gpe-default
install -m 0755 ${WORKDIR}/fluxbox-gpe-session ${D}/usr/bin
diff --git a/packages/initscripts/initscripts-1.0/halt b/packages/initscripts/initscripts-1.0/halt
index aa1769606a..d8cab222ca 100755
--- a/packages/initscripts/initscripts-1.0/halt
+++ b/packages/initscripts/initscripts-1.0/halt
@@ -7,12 +7,6 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
-# Update the timestamp, if there is already one
-if test -e /etc/timestamp
-then
- date +%2m%2d%2H%2M%Y > /etc/timestamp
-fi
-
# See if we need to cut the power.
if test -x /etc/init.d/ups-monitor
then
diff --git a/packages/initscripts/initscripts-1.0/reboot b/packages/initscripts/initscripts-1.0/reboot
index 7f95255bd9..56278199be 100755
--- a/packages/initscripts/initscripts-1.0/reboot
+++ b/packages/initscripts/initscripts-1.0/reboot
@@ -7,11 +7,5 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
-# Update the timestamp, if there is one
-if test -e /etc/timestamp
-then
- date +%2m%2d%2H%2M%Y > /etc/timestamp
-fi
-
echo -n "Rebooting... "
reboot -d -f -i
diff --git a/packages/initscripts/initscripts-1.0/save-rtc.sh b/packages/initscripts/initscripts-1.0/save-rtc.sh
new file mode 100644
index 0000000000..d06aa6d569
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/save-rtc.sh
@@ -0,0 +1,16 @@
+#! /bin/sh
+#
+# Copyright Matthias Hentges <devel@hentges.net> (c) 2006
+# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license)
+#
+# Filename: save-rtc.sh
+# Date: 03-Jul-06
+
+
+# Update the timestamp, if there is already one
+if test -e /etc/timestamp
+then
+ echo "Will restore RCT from /etc/timestamp on next boot"
+ echo "Delete that file to disable this feature."
+ date +%2m%2d%2H%2M%Y > /etc/timestamp
+fi
diff --git a/packages/initscripts/initscripts_1.0.bb b/packages/initscripts/initscripts_1.0.bb
index eebfbca7bf..0d14403a36 100644
--- a/packages/initscripts/initscripts_1.0.bb
+++ b/packages/initscripts/initscripts_1.0.bb
@@ -6,7 +6,7 @@ DEPENDS = "makedevs"
DEPENDS_openzaurus = "makedevs virtual/kernel"
RDEPENDS = "makedevs"
LICENSE = "GPL"
-PR = "r73"
+PR = "r74"
SRC_URI = "file://halt \
file://ramdisk \
@@ -31,7 +31,8 @@ SRC_URI = "file://halt \
file://sysfs.sh \
file://device_table.txt \
file://populate-volatile.sh \
- file://volatiles "
+ file://volatiles \
+ file://save-rtc.sh"
SRC_URI_append_arm = " file://alignment.sh"
SRC_URI_append_openzaurus = " file://checkversion"
@@ -82,6 +83,7 @@ do_install () {
install -m 0755 ${WORKDIR}/devpts ${D}${sysconfdir}/default
install -m 0755 ${WORKDIR}/sysfs.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core
if [ "${TARGET_ARCH}" = "arm" ]; then
install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
@@ -119,6 +121,8 @@ do_install () {
ln -sf ../init.d/umountfs ${D}${sysconfdir}/rc0.d/S40umountfs
# udev will run at S55 if installed
ln -sf ../init.d/halt ${D}${sysconfdir}/rc0.d/S90halt
+ ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc0.d/S25save-rtc.sh
+ ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc6.d/S25save-rtc.sh
ln -sf ../init.d/banner ${D}${sysconfdir}/rcS.d/S02banner
ln -sf ../init.d/checkroot.sh ${D}${sysconfdir}/rcS.d/S10checkroot.sh
# ln -sf ../init.d/checkfs.sh ${D}${sysconfdir}/rcS.d/S30checkfs.sh
diff --git a/packages/lilo-sh/.mtn2git_empty b/packages/lilo-sh/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/lilo-sh/.mtn2git_empty
diff --git a/packages/lilo-sh/files/.mtn2git_empty b/packages/lilo-sh/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/lilo-sh/files/.mtn2git_empty
diff --git a/packages/lilo-sh/files/lilo-0.21-1.1.patch b/packages/lilo-sh/files/lilo-0.21-1.1.patch
new file mode 100644
index 0000000000..dfbab2a82c
--- /dev/null
+++ b/packages/lilo-sh/files/lilo-0.21-1.1.patch
@@ -0,0 +1,35 @@
+--- lilo/Makefile- Fri Dec 4 15:35:07 1998
++++ lilo/Makefile Wed Mar 17 01:04:07 1999
+@@ -24,7 +24,7 @@
+ # VARSETUP Enables use of variable-size setup segments.
+ # XL_SECS=n Support for extra large (non-standard) floppies.
+
+-CONFIG=-DIGNORECASE -DVARSETUP -DREWRITE_TABLE
++CONFIG=-DIGNORECASE -DVARSETUP -DREWRITE_TABLE -DLARGE_EBDA -DONE_SHOT
+
+ # End of configuration variables
+
+--- lilo/second.S- Fri Dec 4 15:20:07 1998
++++ lilo/second.S Wed Mar 17 01:03:53 1999
+@@ -830,9 +830,20 @@
+ call load1
+ seg es
+ mov CL_MAGIC_ADDR,#CL_MAGIC ! set magic number
++#ifndef LCF_LARGE_EBDA
+ seg es
+ mov word ptr CL_OFFSET,#PARMLINE+SECOND_SS
+ ! set parameter line offset
++#else
++ mov di,#0x8000
++ mov si,#PARMLINE
++ mov cx,#CL_LENGTH
++ rep
++ movsb
++ seg es
++ mov word ptr CL_OFFSET,#0x8000
++ ! set parameter line offset
++#endif
+ pop si ! restore SI
+ lodsw ! get flags bit map
+ mov bx,ax
+
diff --git a/packages/lilo-sh/files/lilo-0.21-include.patch b/packages/lilo-sh/files/lilo-0.21-include.patch
new file mode 100644
index 0000000000..61e298013c
--- /dev/null
+++ b/packages/lilo-sh/files/lilo-0.21-include.patch
@@ -0,0 +1,10 @@
+--- lilo.orig/common.h Wed Oct 14 17:44:28 1998
++++ lilo/common.h Mon Dec 7 18:05:17 1998
+@@ -7,6 +7,7 @@
+ #define COMMON_H
+
+ #include <sys/stat.h>
++#include <asm/types.h>
+ #include <linux/genhd.h>
+
+ #include "lilo.h"
diff --git a/packages/lilo-sh/files/lilo-0.21-loopdev.patch b/packages/lilo-sh/files/lilo-0.21-loopdev.patch
new file mode 100644
index 0000000000..e739c5b104
--- /dev/null
+++ b/packages/lilo-sh/files/lilo-0.21-loopdev.patch
@@ -0,0 +1,11 @@
+--- lilo/device.c.oot Mon Jan 10 09:37:00 2000
++++ lilo/device.c Mon Jan 10 09:37:37 2000
+@@ -192,4 +192,8 @@
+ sprintf(tmp,"/dev/sdb%d",i);
+ cache_add(tmp,0x810+i);
+ }
++ for (i = 0; i <= 7; i++) {
++ sprintf(tmp,"/dev/loop%d",i);
++ cache_add(tmp,0x700+i);
++ }
+ }
diff --git a/packages/lilo-sh/files/lilo-0.21-second.patch b/packages/lilo-sh/files/lilo-0.21-second.patch
new file mode 100644
index 0000000000..12a9af04c7
--- /dev/null
+++ b/packages/lilo-sh/files/lilo-0.21-second.patch
@@ -0,0 +1,36 @@
+I have a problem to report with lilo, and the fix for it. I am not sure
+whether this is the right place for it though, I am also CCing the lilo
+maintainer Werner Almesberger.
+
+When lilo gets control from the bios (whether lilo is on disk, or on the
+floppy), it is checking the wrong location when it tries to parse the
+parameter line construction area to determine whether it needs to clean
+up extra blank spaces. This is causing lilo to eat up the last character(s)
+of the command line that it passes to the kernel.
+
+Specifically, the code
+
+cpcodn: cmp byte ptr (di-1),#32 ! last was space ?
+
+is using the memory contents of ds:di-1 for the compare. It should
+really be using es:di-1. I checked, ds=0x0b00 around here, so the
+code ended up checking 0x0b00:(di-1) instead of 0x9000:(di-1). It
+is quite possible that the memory that lilo checks has garbage,
+causing it to make wrong decision. A "seg es" just before the cmp
+fixes the problem. I am attaching the patch below.
+
+Kanoj
+
+--- second.0 Mon Sep 20 13:52:01 1999
++++ second.S Tue Sep 28 10:20:54 1999
+@@ -816,7 +816,8 @@
+ je cpcodsp ! yes -> discard next
+ lodsb ! get next byte
+ jmp cpcolp
+-cpcodn: cmp byte ptr (di-1),#32 ! last was space ?
++cpcodn: seg es
++ cmp byte ptr (di-1),#32 ! last was space ?
+ jne nocopt ! no -> go on
+ dec di ! discard it
+ nocopt: mov si,options ! append variable options
+
diff --git a/packages/lilo-sh/files/lilo-linkgear.patch b/packages/lilo-sh/files/lilo-linkgear.patch
new file mode 100644
index 0000000000..598a92a7af
--- /dev/null
+++ b/packages/lilo-sh/files/lilo-linkgear.patch
@@ -0,0 +1,1039 @@
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/Makefile lilosh/Makefile
+--- lilo/Makefile 2006-02-01 21:16:29.000000000 +0000
++++ lilosh/Makefile 2006-02-01 21:23:37.000000000 +0000
+@@ -40,7 +40,6 @@
+
+ SHELL=/bin/sh
+
+-CROSS_COMPILE = sh3-linux-
+ CC =$(CROSS_COMPILE)gcc
+ LD =$(CROSS_COMPILE)ld
+ OBJCOPY =$(CROSS_COMPILE)objcopy
+@@ -72,10 +71,10 @@
+ $(OBJCOPY) -R .comment -S second.exe -O binary second.bin
+
+ first.exe: first.o
+- $(LD) -EL -e start first.o -o first.exe -Ttext 0x8c200000
++ $(LD) -EL -e start first.o -o first.exe -Ttext 0x88a00000
+
+ second.exe: second.o string.o
+- $(LD) -T second.lds -EL second.o string.o -o second.exe -Ttext 0x8c201000
++ $(LD) -T second.lds -EL second.o string.o -o second.exe -Ttext 0x88a01000
+
+ first.o: first.S
+ $(CC) $(CFLAGS) -c first.S
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/boot.c lilosh/boot.c
+--- lilo/boot.c 1997-06-20 12:48:28.000000000 +0000
++++ lilosh/boot.c 2006-01-31 19:46:21.000000000 +0000
+@@ -11,6 +11,7 @@
+ #include <errno.h>
+ #include <a.out.h>
+ #include <sys/stat.h>
++#include <asm/page.h>
+
+ #include "config.h"
+ #include "common.h"
+@@ -70,6 +71,7 @@
+ geo_close(&geo);
+ if (verbose > 1)
+ printf("Mapped %d sector%s.\n",sectors,sectors == 1 ? "" : "s");
++ memset(&descr->initrd, 0, sizeof(descr->initrd));
+ if ((initrd = cfg_get_strg(cf_kernel,"initrd")) || (initrd = cfg_get_strg(
+ cf_options,"initrd"))) {
+ if (!modern_kernel) die("Kernel doesn't support initial RAM disks");
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/bsect.c lilosh/bsect.c
+--- lilo/bsect.c 1998-10-14 20:30:32.000000000 +0000
++++ lilosh/bsect.c 2004-10-01 19:05:58.000000000 +0000
+@@ -189,11 +189,11 @@
+ }
+ }
+ bsect.par_1.prompt = cfg_get_flag(cf_options,"prompt");
+- if (delay*100/55 > 0xffff) die("Maximum delay is one hour.");
+- else bsect.par_1.delay = delay*100/55;
++ if (delay >= 36000) die("Maximum delay is one hour.");
++ else bsect.par_1.delay = delay;
+ if (timeout == -1) bsect.par_1.timeout = 0xffff;
+- else if (timeout*100/55 >= 0xffff) die("Maximum timeout is one hour.");
+- else bsect.par_1.timeout = timeout*100/55;
++ else if (timeout >= 36000) die("Maximum timeout is one hour.");
++ else bsect.par_1.timeout = timeout;
+ if (!(keytable = cfg_get_strg(cf_options,"keytable"))) {
+ int i;
+
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/defs.h lilosh/defs.h
+--- lilo/defs.h 2006-02-01 21:16:29.000000000 +0000
++++ lilosh/defs.h 2004-05-19 16:39:08.000000000 +0000
+@@ -1,2 +1,3 @@
+ extern void *memcpy (void *__dest, const void *__src, unsigned int __n);
+ extern int strlen (__const char *__s);
++extern void *memset(void *s, int c, unsigned int n);
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/first.S lilosh/first.S
+--- lilo/first.S 2006-02-01 21:16:29.000000000 +0000
++++ lilosh/first.S 2006-02-01 22:02:02.000000000 +0000
+@@ -1,4 +1,4 @@
+-/* $Id: first.S,v 1.16 2000/11/26 07:11:58 gniibe Exp $
++/* $Id: first.S,v 1.1.1.1 2002/05/15 06:44:39 bmann Exp $
+ *
+ * Primary boot loader
+ *
+@@ -54,7 +54,7 @@
+ ! /* ^--- Minor Version*/
+ #endif
+
+-/* x86 LILO parameters (Not used for SuperH... yet) */
++/* x86 LILO parameters (port and sparam not used for SuperH... yet) */
+ timeout:.word 0 ! input timeout
+ delay: .word 0 ! boot delay
+ port: .byte 0 ! COM port (0 = unused, 1 = COM1, etc.)
+@@ -67,11 +67,13 @@
+ d1_cx: .word 0
+ d1_dx: .word 0
+ d1_al: .byte 0
++ .byte 0 ! align next .word
+
+ /* Second descripter sector (Filled by LILO command) */
+ d2_cx: .word 0
+ d2_dx: .word 0
+ d2_al: .byte 0
++ .byte 0 ! align next .word
+
+ /* Default command-line sector (Filled by LILO command) */
+ dc_cx: .word 0
+@@ -87,11 +89,13 @@
+ ms_cx: .word 0
+ ms_dx: .word 0
+ ms_al: .byte 0
++ .byte 0 ! align next .word
+
+ /* Second descripter sector (Filled by LILO command) */
+ kt_cx: .word 0 ! keyboard translation table
+ kt_dx: .word 0
+ kt_al: .byte 0
++ .byte 0 ! align next .long
+
+ d_addr: ! second stage sector addresses
+
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/geometry.c lilosh/geometry.c
+--- lilo/geometry.c 2006-02-01 21:15:51.000000000 +0000
++++ lilosh/geometry.c 2006-02-01 22:13:05.000000000 +0000
+@@ -16,6 +16,7 @@
+ #include <linux/fs.h>
+ #include <linux/fd.h>
+ #include <linux/hdreg.h>
++#include <linux/kdev_t.h>
+
+ #include "config.h"
+ #include "lilo.h"
+@@ -37,7 +38,7 @@
+
+
+ DT_ENTRY *disktab = NULL;
+-int old_disktab = 0;
++static int old_disktab = 0;
+
+
+ void geo_init(char *name)
+@@ -297,6 +298,7 @@
+ case MAJOR_ESDI:
+ /* fall through */
+ case MAJOR_XT:
++ /* fall through */
+ geo->device = 0x80+(MINOR(device) >> 6)+(MAJOR(device) == MAJOR_HD ?
+ 0 : last_dev(MAJOR_HD,64));
+ if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
+@@ -353,6 +355,17 @@
+ geo->sectors = hdprm.sectors;
+ geo->start = hdprm.start;
+ break;
++ case MAJOR_NAND:
++ /* fall through */
++ geo->device = 0x80+(MINOR(device));
++ if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
++ die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device,
++ strerror(errno));
++ geo->heads = hdprm.heads;
++ geo->cylinders = hdprm.cylinders;
++ geo->sectors = hdprm.sectors;
++ geo->start = hdprm.start;
++ break;
+
+ default:
+ die("Sorry, don't know how to handle device 0x%04x",device);
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/geometry.h lilosh/geometry.h
+--- lilo/geometry.h 2006-02-01 21:15:51.000000000 +0000
++++ lilosh/geometry.h 2006-02-01 22:14:07.000000000 +0000
+@@ -8,7 +8,6 @@
+
+ #include "lilo.h"
+
+-
+ typedef struct {
+ int device,heads;
+ int cylinders,sectors;
+@@ -29,6 +28,7 @@
+
+ extern DT_ENTRY *disktab;
+
++
+ void geo_init(char *name);
+
+ /* Loads the disk geometry table. */
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/lilo.c lilosh/lilo.c
+--- lilo/lilo.c 2006-02-01 21:15:51.000000000 +0000
++++ lilosh/lilo.c 2006-02-01 21:56:56.000000000 +0000
+@@ -85,11 +85,11 @@
+ if (verbose > 0) {
+ bsect_read(cfg_get_strg(cf_options,"boot"),&boot);
+ printf("Global settings:\n");
+- tsecs = (boot.par_1.delay*55+50)/100;
++ tsecs = boot.par_1.delay;
+ printf(" Delay before booting: %d.%d seconds\n",tsecs/10,tsecs % 10);
+ if (boot.par_1.timeout == 0xffff) printf(" No command-line timeout\n");
+ else {
+- tsecs = (boot.par_1.timeout*55+50)/100;
++ tsecs = boot.par_1.timeout;
+ printf(" Command-line timeout: %d.%d seconds\n",tsecs/10,
+ tsecs % 10);
+ }
+@@ -411,11 +411,11 @@
+ else if (st.st_mode & (S_IWGRP | S_IWOTH))
+ fprintf(stderr,"Warning: %s should be writable only for "
+ "root\n",config_file);
+- else if ((cfg_get_strg(cf_all,"password") || cfg_get_strg(
+- cf_options,"password")) && (st.st_mode & (S_IRGRP |
+- S_IROTH)))
+- fprintf(stderr,"Warning: %s should be readable only "
+- "for root if using PASSWORD\n",config_file);
++ else if ((cfg_get_strg(cf_all,"password") || cfg_get_strg(
++ cf_options,"password")) && (st.st_mode & (S_IRGRP |
++ S_IROTH)))
++ fprintf(stderr,"Warning: %s should be readable only "
++ "for root if using PASSWORD\n",config_file);
+ }
+ }
+ preload_dev_cache();
+@@ -491,7 +491,7 @@
+ md_disk.cylinders = geo.cylinders;
+ md_disk.start = geo.start;
+ }
+-
++
+ pass++;
+ if (uninstall)
+ bsect_uninstall(uninst_dev ? uninst_dev : cfg_get_strg(cf_options,
+@@ -517,8 +517,8 @@
+ cf_options,"delay")) : 0,cfg_get_strg(cf_options,"timeout") ?
+ to_number(cfg_get_strg(cf_options,"timeout")) : -1);
+ if (more) {
+- cfg_init(cf_top);
+- if (cfg_parse(cf_top)) cfg_error("Syntax error");
++ cfg_init(cf_top);
++ if (cfg_parse(cf_top)) cfg_error("Syntax error");
+ }
+ if (!bsect_number()) die("No images have been defined.");
+ check_fallback();
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/lilo.h lilosh/lilo.h
+--- lilo/lilo.h 2006-02-01 21:15:44.000000000 +0000
++++ lilosh/lilo.h 2006-02-01 21:28:33.000000000 +0000
+@@ -39,6 +39,7 @@
+ #define MAJOR_DAC960 48 /* First Mylex DAC960 PCI RAID controller */
+ #define MAJOR_IDE5 55 /* IDE on fifth interface */
+ #define MAJOR_IDE6 57 /* IDE on sixth interface */
++#define MAJOR_NAND 240 /* proprietary (board-level) nand flash block device */
+ #define COMPAQ_SMART2_MAJOR 72 /* First Smart/2 Major */
+
+ #define MAX_IMAGES ((SECTOR_SIZE*2-2)/sizeof(IMAGE_DESCR))
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/md-int.h lilosh/md-int.h
+--- lilo/md-int.h 2006-02-01 21:15:51.000000000 +0000
++++ lilosh/md-int.h 2006-02-01 22:11:13.000000000 +0000
+@@ -287,4 +287,4 @@
+ #define RAID5_ALGORITHM_LEFT_SYMMETRIC 2
+ #define RAID5_ALGORITHM_RIGHT_SYMMETRIC 3
+
+-#endif _MD_H
++#endif /* _MD_H */
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/md-int.h~ lilosh/md-int.h~
+--- lilo/md-int.h~ 1970-01-01 00:00:00.000000000 +0000
++++ lilosh/md-int.h~ 2006-02-01 21:15:51.000000000 +0000
+@@ -0,0 +1,290 @@
++/*
++ md.h : Multiple Devices driver for Linux
++ Copyright (C) 1994-96 Marc ZYNGIER
++ <zyngier@ufr-info-p7.ibp.fr> or
++ <maz@gloups.fdn.fr>
++
++ 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, or (at your option)
++ any later version.
++
++ You should have received a copy of the GNU General Public License
++ (for example /usr/src/linux/COPYING); if not, write to the Free
++ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#ifndef MD_INT_H
++#define MD_INT_H
++
++/* don't include the kernel RAID header! */
++#define _MD_H
++
++typedef unsigned int md_u32;
++typedef unsigned short md_u16;
++typedef unsigned char md_u8;
++
++#include <linux/major.h>
++#include <sys/ioctl.h>
++
++/*
++ * Different major versions are not compatible.
++ * Different minor versions are only downward compatible.
++ * Different patchlevel versions are downward and upward compatible.
++ */
++
++struct md_version {
++ int major;
++ int minor;
++ int patchlevel;
++};
++
++/*
++ * default readahead
++ */
++#define MD_READAHEAD (256 * 1024)
++
++/* These are the ioctls for md versions < 0.50 */
++#define REGISTER_MD_DEV _IO (MD_MAJOR, 1)
++#define START_MD _IO (MD_MAJOR, 2)
++#define STOP_MD _IO (MD_MAJOR, 3)
++
++/* status */
++#define RAID_VERSION _IOR (MD_MAJOR, 0x10, struct md_version)
++#define GET_ARRAY_INFO _IOR (MD_MAJOR, 0x11, md_array_info_t)
++#define GET_DISK_INFO _IOR (MD_MAJOR, 0x12, md_disk_info_t)
++#define PRINT_RAID_DEBUG _IO (MD_MAJOR, 0x13)
++
++/* configuration */
++#define CLEAR_ARRAY _IO (MD_MAJOR, 0x20)
++#define ADD_NEW_DISK _IOW (MD_MAJOR, 0x21, md_disk_info_t)
++#define HOT_REMOVE_DISK _IO (MD_MAJOR, 0x22)
++#define SET_ARRAY_INFO _IOW (MD_MAJOR, 0x23, md_array_info_t)
++#define SET_DISK_INFO _IO (MD_MAJOR, 0x24)
++#define WRITE_RAID_INFO _IO (MD_MAJOR, 0x25)
++#define UNPROTECT_ARRAY _IO (MD_MAJOR, 0x26)
++#define PROTECT_ARRAY _IO (MD_MAJOR, 0x27)
++#define HOT_ADD_DISK _IO (MD_MAJOR, 0x28)
++
++/* usage */
++#define RUN_ARRAY _IOW (MD_MAJOR, 0x30, struct md_param)
++#define START_ARRAY _IO (MD_MAJOR, 0x31)
++#define STOP_ARRAY _IO (MD_MAJOR, 0x32)
++#define STOP_ARRAY_RO _IO (MD_MAJOR, 0x33)
++#define RESTART_ARRAY_RW _IO (MD_MAJOR, 0x34)
++
++
++/* for raid < 0.50 only */
++#define MD_PERSONALITY_SHIFT 16
++
++#define MD_RESERVED 0UL
++#define LINEAR 1UL
++#define STRIPED 2UL
++#define RAID0 STRIPED
++#define RAID1 3UL
++#define RAID5 4UL
++#define TRANSLUCENT 5UL
++#define LVM 6UL
++#define MAX_PERSONALITY 7UL
++
++/*
++ * MD superblock.
++ *
++ * The MD superblock maintains some statistics on each MD configuration.
++ * Each real device in the MD set contains it near the end of the device.
++ * Some of the ideas are copied from the ext2fs implementation.
++ *
++ * We currently use 4096 bytes as follows:
++ *
++ * word offset function
++ *
++ * 0 - 31 Constant generic MD device information.
++ * 32 - 63 Generic state information.
++ * 64 - 127 Personality specific information.
++ * 128 - 511 12 32-words descriptors of the disks in the raid set.
++ * 512 - 911 Reserved.
++ * 912 - 1023 Disk specific descriptor.
++ */
++
++/*
++ * If x is the real device size in bytes, we return an apparent size of:
++ *
++ * y = (x & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES
++ *
++ * and place the 4kB superblock at offset y.
++ */
++#define MD_RESERVED_BYTES (64 * 1024)
++#define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512)
++#define MD_RESERVED_BLOCKS (MD_RESERVED_BYTES / BLOCK_SIZE)
++
++#define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS)
++#define MD_NEW_SIZE_BLOCKS(x) ((x & ~(MD_RESERVED_BLOCKS - 1)) - MD_RESERVED_BLOCKS)
++
++#define MD_SB_BYTES 4096
++#define MD_SB_WORDS (MD_SB_BYTES / 4)
++#define MD_SB_BLOCKS (MD_SB_BYTES / BLOCK_SIZE)
++#define MD_SB_SECTORS (MD_SB_BYTES / 512)
++
++/*
++ * The following are counted in 32-bit words
++ */
++#define MD_SB_GENERIC_OFFSET 0
++#define MD_SB_PERSONALITY_OFFSET 64
++#define MD_SB_DISKS_OFFSET 128
++#define MD_SB_DESCRIPTOR_OFFSET 992
++
++#define MD_SB_GENERIC_CONSTANT_WORDS 32
++#define MD_SB_GENERIC_STATE_WORDS 32
++#define MD_SB_GENERIC_WORDS (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS)
++#define MD_SB_PERSONALITY_WORDS 64
++#define MD_SB_DISKS_WORDS 384
++#define MD_SB_DESCRIPTOR_WORDS 32
++#define MD_SB_RESERVED_WORDS (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS)
++#define MD_SB_EQUAL_WORDS (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS)
++#define MD_SB_DISKS (MD_SB_DISKS_WORDS / MD_SB_DESCRIPTOR_WORDS)
++
++/*
++ * Device "operational" state bits
++ */
++#define MD_DISK_FAULTY 0 /* disk is faulty / operational */
++#define MD_DISK_ACTIVE 1 /* disk is running or spare disk */
++#define MD_DISK_SYNC 2 /* disk is in sync with the raid set */
++
++typedef struct md_device_descriptor_s {
++ md_u32 number; /* 0 Device number in the entire set */
++ md_u32 major; /* 1 Device major number */
++ md_u32 minor; /* 2 Device minor number */
++ md_u32 raid_disk; /* 3 The role of the device in the raid set */
++ md_u32 state; /* 4 Operational state */
++ md_u32 reserved[MD_SB_DESCRIPTOR_WORDS - 5];
++} md_descriptor_t;
++
++#define MD_SB_MAGIC 0xa92b4efc
++
++/*
++ * Superblock state bits
++ */
++#define MD_SB_CLEAN 0
++#define MD_SB_ERRORS 1
++
++typedef struct md_superblock_s {
++ /*
++ * Constant generic information
++ */
++ md_u32 md_magic; /* 0 MD identifier */
++ md_u32 major_version; /* 1 major version to which the set conforms */
++ md_u32 minor_version; /* 2 minor version ... */
++ md_u32 patch_version; /* 3 patchlevel version ... */
++ md_u32 gvalid_words; /* 4 Number of used words in this section */
++ md_u32 set_magic; /* 5 Raid set identifier */
++ md_u32 ctime; /* 6 Creation time */
++ md_u32 level; /* 7 Raid personality */
++ md_u32 size; /* 8 Apparent size of each individual disk */
++ md_u32 nr_disks; /* 9 total disks in the raid set */
++ md_u32 raid_disks; /* 10 disks in a fully functional raid set */
++ md_u32 md_minor; /* 11 preferred MD minor device number */
++ md_u32 gstate_creserved[MD_SB_GENERIC_CONSTANT_WORDS - 12];
++
++ /*
++ * Generic state information
++ */
++ md_u32 utime; /* 0 Superblock update time */
++ md_u32 state; /* 1 State bits (clean, ...) */
++ md_u32 active_disks; /* 2 Number of currently active disks */
++ md_u32 working_disks; /* 3 Number of working disks */
++ md_u32 failed_disks; /* 4 Number of failed disks */
++ md_u32 spare_disks; /* 5 Number of spare disks */
++ md_u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 6];
++
++ /*
++ * Personality information
++ */
++ md_u32 layout; /* 0 the array's physical layout */
++ md_u32 chunk_size; /* 1 chunk size in bytes */
++ md_u32 pstate_reserved[MD_SB_PERSONALITY_WORDS - 2];
++
++ /*
++ * Disks information
++ */
++ md_descriptor_t disks[MD_SB_DISKS];
++
++ /*
++ * Reserved
++ */
++ md_u32 reserved[MD_SB_RESERVED_WORDS];
++
++ /*
++ * Active descriptor
++ */
++ md_descriptor_t descriptor;
++
++} md_superblock_t;
++
++/*
++ * options passed in raidstart:
++ */
++
++#define MAX_CHUNK_SIZE (4096*1024)
++
++struct md_param
++{
++ int personality; /* 1,2,3,4 */
++ int chunk_size; /* in bytes */
++ int max_fault; /* unused for now */
++};
++
++typedef struct md_array_info_s {
++ /*
++ * Generic constant information
++ */
++ md_u32 major_version;
++ md_u32 minor_version;
++ md_u32 patch_version;
++ md_u32 ctime;
++ md_u32 level;
++ md_u32 size;
++ md_u32 nr_disks;
++ md_u32 raid_disks;
++ md_u32 md_minor;
++ md_u32 not_persistent;
++
++ /*
++ * Generic state information
++ */
++ md_u32 utime; /* 0 Superblock update time */
++ md_u32 state; /* 1 State bits (clean, ...) */
++ md_u32 active_disks; /* 2 Number of currently active disks */
++ md_u32 working_disks; /* 3 Number of working disks */
++ md_u32 failed_disks; /* 4 Number of failed disks */
++ md_u32 spare_disks; /* 5 Number of spare disks */
++
++ /*
++ * Personality information
++ */
++ md_u32 layout; /* 0 the array's physical layout */
++ md_u32 chunk_size; /* 1 chunk size in bytes */
++
++} md_array_info_t;
++
++typedef struct md_disk_info_s {
++ /*
++ * configuration/status of one particular disk
++ */
++ md_u32 number;
++ md_u32 major;
++ md_u32 minor;
++ md_u32 raid_disk;
++ md_u32 state;
++
++} md_disk_info_t;
++
++
++/*
++ * Supported RAID5 algorithms
++ */
++#define RAID5_ALGORITHM_LEFT_ASYMMETRIC 0
++#define RAID5_ALGORITHM_RIGHT_ASYMMETRIC 1
++#define RAID5_ALGORITHM_LEFT_SYMMETRIC 2
++#define RAID5_ALGORITHM_RIGHT_SYMMETRIC 3
++
++#endif _MD_H
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/partition.c lilosh/partition.c
+--- lilo/partition.c 1998-10-14 20:12:42.000000000 +0000
++++ lilosh/partition.c 2006-01-31 19:51:58.000000000 +0000
+@@ -13,6 +13,8 @@
+ #include <sys/stat.h>
+
+ #include <linux/fs.h>
++#include <linux/genhd.h>
++#include <linux/kdev_t.h>
+
+ #include "config.h"
+ #include "lilo.h"
+@@ -23,7 +25,7 @@
+
+
+ /* For older kernels ... */
+-
++#if 0
+ #ifndef DOS_EXTENDED_PARTITION
+ #define DOS_EXTENDED_PARTITION EXTENDED_PARTITION
+ #endif
+@@ -31,6 +33,7 @@
+ #ifndef LINUX_EXTENDED_PARTITION
+ #define LINUX_EXTENDED_PARTITION EXTENDED_PARTITION
+ #endif
++#endif
+
+
+ void part_verify(int dev_nr,int type)
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/second.c lilosh/second.c
+--- lilo/second.c 2006-02-01 21:16:41.000000000 +0000
++++ lilosh/second.c 2006-02-01 20:25:07.000000000 +0000
+@@ -1,4 +1,4 @@
+-/* $Id: second.c,v 1.22 2000/11/26 07:11:16 gniibe Exp $
++/* $Id: second.c,v 1.6 2004/10/01 19:05:58 cpchen Exp $
+ *
+ * Secondary boot loader
+ *
+@@ -12,7 +12,35 @@
+ */
+
+ #include "defs.h"
++#include "common.h"
+
++#define TAB_CHAR '\t'
++#define BACKSPACE '\b'
++
++#define R64CNT 0xFFC80000
++#define RSECCNT 0xFFC80004
++#define RMINCNT 0xFFC80008
++#define RHRCNT 0xFFC8000C
++#define RSECAR 0xFFC80020
++#define RMINAR 0xFFC80024
++#define RHRAR 0xFFC80028
++#define RWKAR 0xFFC8002C
++#define RDAYAR 0xFFC80030
++#define RMONAR 0xFFC80034
++#define RTCRCR1 0xFFC80038
++#define RTCRCR2 0xFFC8003C
++
++#ifndef BCD_TO_BIN
++#define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10)
++#endif
++
++#ifndef BIN_TO_BCD
++#define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10)
++#endif
++
++static inline char get_char(void);
++static void dump_image_names(DESCR_SECTORS *);
++static IMAGE_DESCR * descr_label_match(char *);
+ static void put_string (unsigned char *);
+ static int get_sector_address (unsigned long, int *, unsigned long *);
+ static int load_sectors (unsigned long, unsigned long);
+@@ -30,19 +58,35 @@
+ static inline char highhex (int x) { return hexchars[(x >> 4) & 0xf]; }
+ static inline char lowhex (int x) { return hexchars[x & 0xf]; }
+ static void printouthex (int);
++static void set_delay(short delay);
++static inline int lilo_timeout() {
++ return *((char *) RTCRCR1) & 0x01;
++}
+
+ static unsigned long base_pointer = 0; /* Avoid BSS */
+ static unsigned long kernel_image = 0; /* Avoid BSS */
++static unsigned long initrd_start = 0;
++static unsigned long initrd_end = 0;
++
++#define INPUT_BUF_SIZE 256
++static char input_buffer[INPUT_BUF_SIZE];
+
+ /* Sector descriptor */
+ #define SD_DESCR1 24
++#define SD_DESCR1_MEM 0x3200
+ #define SD_DESCR2 29
++#define SD_DESCR2_MEM 0x3400
+ #define SD_DEFCMD 34
+ /* 39 prompt (byte) */
+ /* 40 length (word) */
+ #define SD_MSG 42
+ #define SD_KBDTBL 47
+
++/* use the section attribute and linker script to force the start function to
++ the beginning of the second stage reserved area.
++ This is where first.S will jmp */
++void start (unsigned long base) __attribute__((section(".entry")));
++
+ static inline char *string_set (char *dest, const char *str)
+ {
+ int len = strlen (str);
+@@ -53,11 +97,16 @@
+ void
+ start (unsigned long base)
+ {
+- base_pointer = base;
++ base_pointer = base;
++ unsigned char ch;
++ int input_idx;
++ IMAGE_DESCR *image_descr;
++ int desc;
++ int defer_delay=0;
+
+ put_string ("I");
+- load_sectors (SD_DESCR1, 0x3200);
+- load_sectors (SD_DESCR2, 0x3400);
++ load_sectors (SD_DESCR1, SD_DESCR1_MEM);
++ load_sectors (SD_DESCR2, SD_DESCR2_MEM);
+ put_string ("L");
+ /* XXX: checksum */
+
+@@ -73,30 +122,72 @@
+ /* XXX: check signature */
+ /* Input command line */
+ /* XXX: Is there default command line? Use it! */
+- put_string ("boot: ");
+- put_string ("first-image\n"); /* XXX: should handle input commandline... */
+
+- /* Structure of descriptor
+- [ checksum 2byte ]
+- [ DESCR_SIZE:52-byte
+- (image-name (16-byte)
+- passwd (16-byte)
+- rd_size (4-byte)
+- initrd (5-byte sector desc)
+- start (5-byte sector desc)
+- start_page (16-bit)
+- flags (16-bit)
+- vga_mode (16-bit)
+- )
+- ] * 19
+- */
++ /* Structure of descriptor
++ [ checksum 2byte ]
++ [ DESCR_SIZE:52-byte
++ (image-name (16-byte)
++ passwd (16-byte)
++ rd_size (4-byte)
++ initrd (5-byte sector desc)
++ start (5-byte sector desc)
++ start_page (16-bit)
++ flags (16-bit)
++ vga_mode (16-bit)
++ )
++ ] * 19
++ */
++
++ input_buffer[0] = '\0';
++ if (((BOOT_SECTOR *) base_pointer)->par_1.prompt) {
++ if (((BOOT_SECTOR *) base_pointer)->par_1.timeout != 0xffff)
++ set_delay(((BOOT_SECTOR *) base_pointer)->par_1.timeout);
++boot_loop:
++ input_idx = 0;
++ put_string ("boot: ");
++ while ((ch=get_char()) != 0x0d && input_idx < INPUT_BUF_SIZE-1) {
++ switch (ch) {
++ case TAB_CHAR:
++ defer_delay = 1;
++ dump_image_names((DESCR_SECTORS *) (base_pointer + SD_DESCR1_MEM));
++ goto boot_loop;
++ break;
++ case BACKSPACE:
++ defer_delay = 1;
++ if (input_idx) --input_idx;
++ break;
++ case 0x00FF:
++ break;
++ default:
++ defer_delay = 1;
++ input_buffer[input_idx++] = ch;
++ break;
++ }
++ if (!defer_delay && lilo_timeout())
++ break;
++ }
++ input_buffer[input_idx++] = ' ';
++ input_buffer[input_idx] = '\0';
++ if ( ! (image_descr = descr_label_match(input_buffer)) ) {
++ put_string("No such image. [Tab] shows a list.\n");
++ goto boot_loop;
++ }
++ }
++ else {
++ // dispatch the default image after the delayed timeout
++ // 0 or default == immediate dispatch
++ set_delay(((BOOT_SECTOR *) base_pointer)->par_1.delay);
++ do {
++ } while (!lilo_timeout()); /* NULL */
++ image_descr = descr_label_match(input_buffer);
++ }
+
+ put_string ("Loading ");
+- put_string ((char *)(base_pointer+0x3200+2)); /* Image name */
++ put_string (image_descr->name); /* Image name */
+
+ kernel_image = base_pointer + 0x10000 - 0x400;
+ {
+- int desc = 0x3200+2+16+16+4+5; /* kernel image */
++ desc = (int) image_descr+(16+16+4+5) - (int) base_pointer;
+
+ /* Skip two sectors: Fallback command line and options */
+ desc = load_sectors_with_maps (desc, 0, &kernel_image);
+@@ -108,7 +199,21 @@
+ put_string (".");
+ }
+ }
+- put_string ("done.\n");
++ put_string ("done.\n\n");
++
++ desc = (int) image_descr+(16+16+4) - (int) base_pointer;
++ initrd_start = kernel_image = 0x88000000 + memory_size() / 2;
++ desc = load_sectors_with_maps (desc, 0, &kernel_image);
++ if (desc) {
++ put_string("ramdisk image loading");
++ put_string(".");
++ while (desc != 0) {
++ desc = load_sectors_with_maps (desc, 0, &kernel_image);
++ put_string(".");
++ }
++ put_string ("done.\n\n");
++ }
++ initrd_end = kernel_image;
+
+ #if 0
+ {
+@@ -123,24 +228,39 @@
+
+ /* XXX: kernel paramerter setting */
+ {
+- unsigned long parm = base_pointer - 0x200000 + 0x1000;
++ unsigned long parm = base_pointer + (~0x9cf000+1);
+ char *cmdline = (char *)(parm+256);
+ int mem_size;
+- unsigned char *p;
++ unsigned char *p, *debug_p;
+
+ *(long *)parm = 1; /* Read only mount? */
+ *(long *)(parm+4) = 0; /* RAMDISK Flags */
+ *(long *)(parm+8) = 0x0301; /* Root device: XXX should get from cls.. */
+ *(long *)(parm+12) = 1; /* Loader type (LILO = 1) */
+- *(long *)(parm+16) = 0; /* Initrd start */
+- *(long *)(parm+20) = 0; /* Initrd size */
++ if (initrd_end - initrd_start) {
++ initrd_start += ~0x88030000 + 1;
++ *(long *)(parm+16) = initrd_start; /* Initrd start */
++ initrd_end += ~0x88030000 + 1; /* Initrd size */
++ *(long *)(parm+20) = initrd_end + (~initrd_start + 1);/* Initrd size */
++ }
++ else {
++ *(long *)(parm+16) = 0; /* Initrd start */
++ *(long *)(parm+20) = 0; /* Initrd size */
++ }
+ *(long *)(parm+24) = 0; /* Not defined yet */
+
+ /* XXX: Should take the line from command line sector... */
++ if (*input_buffer) {
++ debug_p = cmdline;
++ cmdline = string_set(cmdline, input_buffer);
++ *cmdline = '\0';
++ }
++
+ #define DC_MAGIC 0xf4f2 /* magic number of default cmd. line sector */
+ p = (unsigned char *)(base_pointer+0x3600);
+ if(p[0] == (DC_MAGIC & 0xff) && p[1] == (DC_MAGIC >> 8))
+ cmdline = string_set(cmdline, p+2);
++
+ cmdline = string_set(cmdline, (char *)(base_pointer + 0x10000 - 0x200));
+
+ #if 0
+@@ -231,7 +351,7 @@
+ /* There's next map */
+ return 0x3000+505;
+ }
+-
++
+ static int
+ machine_type (void)
+ {
+@@ -296,6 +416,77 @@
+ : "memory");
+ }
+
++static char inline
++get_char(void)
++{
++ register long __sc0 __asm__ ("r0") = 1; /* OUTPUT */
++
++ asm volatile ("trapa #0x3F"
++ : "=z" (__sc0)
++ : "0" (__sc0)
++ : "memory");
++ return __sc0;
++}
++
++static IMAGE_DESCR *
++descr_label_match(char * boot_buffer)
++{
++ IMAGE_DESCR *descr =
++ ((DESCR_SECTORS *) (base_pointer + SD_DESCR1_MEM))->d.descr;
++ char * buf_ptr=boot_buffer;
++ char * name;
++
++ while (*boot_buffer && (*boot_buffer == ' ' || *boot_buffer == '\t'))
++ ++boot_buffer;
++
++ if ( ! *boot_buffer ) {
++ return descr;
++ }
++
++ for ( buf_ptr=boot_buffer; *descr->name; ++descr, buf_ptr=boot_buffer) {
++ name = descr->name;
++ for ( ; *name == *buf_ptr; ++name, ++buf_ptr) ;
++ if (!*name && (!*buf_ptr || *buf_ptr == ' ' || *buf_ptr == '\t')) {
++ // overwrite the boot_buffer with the string after the
++ // boot image name.
++ while (*boot_buffer++ = *buf_ptr++) ;
++ return descr;
++ }
++ }
++ return NULL;
++}
++
++static void
++dump_image_names(DESCR_SECTORS *descr_area)
++{
++ int buf_idx=0, name_len;
++ char * name;
++ IMAGE_DESCR *descr = descr_area->d.descr;
++
++ put_string("\n");
++ for ( ; *descr->name; ++descr)
++ {
++ name = descr->name;
++ name_len = strlen(name);
++ memcpy(input_buffer + buf_idx, name, name_len);
++ buf_idx += name_len;
++ name_len = MAX_IMAGE_NAME+1 - name_len;
++ memset(input_buffer + buf_idx, ' ', name_len);
++ buf_idx += name_len;
++ if ( buf_idx >= 78 ) {
++ input_buffer[buf_idx++] = '\n';
++ input_buffer[buf_idx++] = '\0';
++ put_string(input_buffer);
++ buf_idx = 0;
++ }
++ }
++ if (buf_idx) {
++ input_buffer[buf_idx++] = '\n';
++ input_buffer[buf_idx] = '\0';
++ put_string(input_buffer);
++ }
++}
++
+ static void inline
+ put_string_1 (unsigned char *str, long len)
+ {
+@@ -344,15 +535,17 @@
+ unsigned char *p = (unsigned char *)(sector_desc+base_pointer);
+ int len;
+
++
+ /* Number of sectors */
+ len = (int)p[4];
+ if (len == 0)
+ return 0;
+
+ /* p[2]: drive number */
+- if ((int)p[2] < 0xc0)
++ if ((int)p[2] < 0xc0) {
+ /* XXX: should return error */
+ put_string ("ERROR: Sector address is not in LBA\n");
++ }
+
+ *devp = (int)p[2] & 0x0f;
+
+@@ -394,8 +587,56 @@
+
+ return -1;
+ }
+-
+-#if 0
++
++static void set_delay(short delay)
++{
++ char rtc_sec, rtc_min, rtc_hr;
++ int alarm_time;
++ char arm_sec, arm_min, arm_hr;
++ char regval;
++ char tenths, seconds, minutes, hour;
++
++ // Make sure the RTC is running
++ *(char*)RTCRCR2 = 0x09;
++
++ // Make sure ENB bits are off
++ *(char*)RWKAR &= 0x7f;
++ *(char*)RDAYAR &= 0x7f;
++ *(char*)RMONAR &= 0x7f;
++
++ // Read time
++ do {
++ *(char*)RTCRCR1 = 0x00; // Clear CF-bit
++ rtc_sec = *(char*)RSECCNT;
++ rtc_min = *(char*)RMINCNT;
++ rtc_hr = *(char*)RHRCNT;
++ } while ((*(char*)RTCRCR1 & 0x80) != 0);
++
++ BCD_TO_BIN(rtc_hr);
++ BCD_TO_BIN(rtc_min);
++ BCD_TO_BIN(rtc_sec);
++
++ alarm_time = ((rtc_hr * 60) + rtc_min) * 60 + rtc_sec + (delay / 10);
++
++ arm_sec = alarm_time % 60;
++ arm_min = (alarm_time / 60) % 60;
++ arm_hr = alarm_time / 3600;
++ if (arm_hr >= 24)
++ arm_hr = arm_hr - 24;
++
++ BIN_TO_BCD(arm_sec);
++ BIN_TO_BCD(arm_min);
++ BIN_TO_BCD(arm_hr);
++
++ *(char*)RSECAR = arm_sec | 0x80;
++ *(char*)RMINAR = arm_min | 0x80;
++ *(char*)RHRAR = arm_hr | 0x80;
++
++ // Clear AF bit
++ *(char*)RTCRCR1 = 0;
++}
++
++#if 1
+ static void
+ printouthex(int x)
+ {
+@@ -408,4 +649,14 @@
+
+ put_string (z);
+ }
++
++static void dump_desc(char * desc)
++{
++ printouthex((int) desc[0]);
++ printouthex((int) desc[1]);
++ printouthex((int) desc[2]);
++ printouthex((int) desc[3]);
++ printouthex((int) desc[4]);
++ put_string("\n");
++}
+ #endif
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/second.lds lilosh/second.lds
+--- lilo/second.lds 2006-02-01 21:16:41.000000000 +0000
++++ lilosh/second.lds 2006-01-31 22:44:27.000000000 +0000
+@@ -83,6 +83,7 @@
+ .plt : { *(.plt) }
+ .text :
+ {
++ *(.entry)
+ *(.text)
+ *(.text.*)
+ *(.stub)
+diff -Naur --exclude=CVS --exclude='*.orig' lilo/string.c lilosh/string.c
+--- lilo/string.c 2006-02-01 21:16:41.000000000 +0000
++++ lilosh/string.c 2004-05-19 16:39:08.000000000 +0000
+@@ -20,3 +20,8 @@
+
+ return dest;
+ }
++
++void * memset(void * dest, int val, unsigned int count)
++{
++ while (count--) *((char *)dest++) = val;
++}
diff --git a/packages/lilo-sh/files/lilo-noconfig-h.patch b/packages/lilo-sh/files/lilo-noconfig-h.patch
new file mode 100644
index 0000000000..01b6cbddd3
--- /dev/null
+++ b/packages/lilo-sh/files/lilo-noconfig-h.patch
@@ -0,0 +1,23 @@
+Stop it looking for config.h. It doesn't need it and trying to include this
+from libc-headers results in an compile time error.
+
+--- lilo/lilo.h 2006/06/28 05:40:25 1.1
++++ lilo/lilo.h 2006/06/28 05:40:36
+@@ -11,17 +11,6 @@
+ #ifndef LILO_H
+ #define LILO_H
+
+-/*
+- * Starting with 2.1.something, Linux kernels put VGA constants and segment
+- * definitions into asm/boot.h instead of linux/config.h
+- */
+-
+-#ifdef HAS_BOOT_H
+-#include <asm/boot.h>
+-#else
+-#include <linux/config.h>
+-#endif
+-
+ #define VERSION 20 /* Boot sector, map file, and chain loader format
+ revision. This number does not necessarily have
+ to correspond to the version number of the entire
diff --git a/packages/lilo-sh/files/lilo-sh-linux.patch b/packages/lilo-sh/files/lilo-sh-linux.patch
new file mode 100644
index 0000000000..0eadf26cff
--- /dev/null
+++ b/packages/lilo-sh/files/lilo-sh-linux.patch
@@ -0,0 +1,1971 @@
+This is the patch that upgrade lilo to match the version included in
+the old lilosh CVS.
+
+diff -ruN lilo.orig/ChangeLog lilo/ChangeLog
+--- lilo.orig/ChangeLog Thu Jan 1 09:00:00 1970
++++ lilo/ChangeLog Thu Dec 7 16:17:10 2000
+@@ -0,0 +1,44 @@
++2000-11-26 NIIBE Yutaka <gniibe@m17n.org>
++
++ * first.S (done): Flush the cache.
++ * second.c (start): Call cache_flush.
++ (cache_flush): New function.
++
++2000-11-25 NIIBE Yutaka <gniibe@m17n.org>
++
++ * first.S: Don't put '$' for register spec.
++ * second.c (start): Don't put '$' for register spec.
++ (machine_type, memory_size, io_base, put_string_1, read_sectors):
++ Likewise.
++ * second.lds: Use new tool chain's ldscript.
++ * defs.h: Add declaration of memcpy.
++
++2000-09-09 NIIBE Yutaka <gniibe@m17n.org>
++
++ * first.S (real_start): Set argument 0 for cache enable call.
++
++2000-08-19 NIIBE Yutaka <gniibe@m17n.org>
++
++ * second.c (get_sector_address): Bug fix for # of sector == 0.
++ (start): Support machine types of CqREEK and SolutionEngine.
++
++ * first.S (load_sector_address): Bug fix for checking LBA.
++ (real_start): Call "enable cache" BIOS feature.
++
++2000-08-05 NIIBE Yutaka <gniibe@m17n.org>
++
++ * Makefile (first.o): Added -traditional for "'" in comments.
++
++ * second.c (machine_type, serial_type, memory_size, io_base): New
++ functions.
++ (start): Implement kernel command line handling a bit.
++ (read_sectors): Emit error message.
++ (get_sector_address): Emit error message.
++
++ * first.S (read_a_sector): Implement error handling.
++ (load_sector_address): Check if it's LBA.
++
++2000-07-22 NIIBE Yutaka <gniibe@m17n.org>
++
++ * second.c (start): Don't load two magic sectors at the memory
++ of executable image.
+diff -ruN lilo.orig/Makefile lilo/Makefile
+--- lilo.orig/Makefile Fri Dec 8 10:10:02 2000
++++ lilo/Makefile Fri Dec 8 11:46:04 2000
+@@ -39,76 +39,55 @@
+ GO=-DGO=0x`sed '/go/s/^.*go 0 \(....\) A.*$$/\1/p;d' first.lis`
+
+ SHELL=/bin/sh
+-CC=cc
+-CPP=$(CC) -E
+-AS86=as86 -0 -a
+-LD86=ld86 -0
+
+-CFLAGS=-Wall -g $(PCONFIG)
+-LDFLAGS=#-Xlinker -qmagic
++CROSS_COMPILE = sh3-linux-
++CC =$(CROSS_COMPILE)gcc
++LD =$(CROSS_COMPILE)ld
++OBJCOPY =$(CROSS_COMPILE)objcopy
++STRIP =$(CROSS_COMPILE)strip
++
++CFLAGS = -O2 -I. -pipe -fPIC $(CONFIG) -DPATH_MAX=255
++CPP=$(CC) -E -traditional
++
++#CFLAGS=-Wall -g $(PCONFIG)
++#LDFLAGS=#-Xlinker -qmagic
+
+ OBJS=lilo.o map.o geometry.o boot.o device.o common.o bsect.o cfg.o temp.o \
+ partition.o identify.o
+
+-.SUFFIXES: .img .b
++.SUFFIXES: .b
+
+-all: check-config lilo boot.b dump.b os2_d.b chain.b dparam.com \
+- activate
+-
+-check-config:
+- $(CPP) check-config.cpp $(PCONFIG) >/dev/null
++all: lilo boot.b
+
+ .c.o:
+ $(CC) -c $(CFLAGS) $*.c
+
+-.s.o:
+- $(AS86) -w -o $*.o $*.s
+-
+-.o.img:
+- $(LD86) -s -o $*.img $*.o
++boot.b: first.bin second.bin
++ cat first.bin second.bin >boot.b
+
+-.img.b:
+- dd if=$*.img of=$*.b bs=32 skip=1
++first.bin: first.exe
++ $(OBJCOPY) -S first.exe -O binary first.bin
+
+-activate: activate.c
+- $(CC) -Wall -s -O -o activate activate.c $(LDFLAGS)
+-
+-dparam.com: dparam.img
+- dd if=dparam.img of=dparam.com bs=288 skip=1
+-
+-lilo: $(OBJS)
+- $(CC) -o lilo $(LDFLAGS) $(OBJS)
++second.bin: second.exe
++ $(OBJCOPY) -R .comment -S second.exe -O binary second.bin
+
+-boot.b: first.b second.b
+- (dd if=first.b bs=512 conv=sync; dd if=second.b) >boot.b
++first.exe: first.o
++ $(LD) -EL -e start first.o -o first.exe -Ttext 0x8c200000
+
+-first.s: first.S lilo.h lilo
+- $(CPP) $(PCONFIG) `./lilo -X` first.S -o first.s
++second.exe: second.o string.o
++ $(LD) -T second.lds -EL second.o string.o -o second.exe -Ttext 0x8c201000
+
+-second.s: second.S lilo.h lilo
+- $(CPP) $(PCONFIG) $(GO) `./lilo -X` second.S -o second.s
++first.o: first.S
++ $(CC) $(CFLAGS) -c first.S
+
+-chain.s: chain.S lilo.h
+- $(CPP) $(PCONFIG) $(GO) chain.S -o chain.s
++second.o: second.c
++ $(CC) $(CFLAGS) -c second.c
+
+-os2_d.s: chain.S lilo.h
+- $(CPP) $(PCONFIG) $(GO) chain.S -DDOS_D -o os2_d.s
++string.o: string.c
++ $(CC) $(CFLAGS) -c string.c
+
+-#dos_d.s: chain.S lilo.h first.lis
+-# $(CPP) $(PCONFIG) $(GO) chain.S -DDOS_D -o dos_d.s
+-
+-dump.s: dump.S lilo.h first.lis
+- $(CPP) $(PCONFIG) `./lilo -X` dump.S -DDOS_D -o dump.s \
+- -DGO=0x`sed '/go/s/^.*go 0 \(....\) A.*$$/\1/p;d' first.lis`
+-
+-xxx.s: chain.S lilo.h
+- $(CPP) chain.S -DXXX -o xxx.s
+-
+-first.o first.lis: first.s
+- $(AS86) -w -o first.o -l first.lis first.s
+-
+-second.lis: second.s
+- $(AS86) -w -l second.lis second.s
++lilo: $(OBJS)
++ $(CC) -o lilo $(LDFLAGS) $(OBJS)
+
+ install: all
+ if [ ! -d $$ROOT$(SBIN_DIR) ]; then mkdir $$ROOT$(SBIN_DIR); fi
+@@ -118,13 +97,9 @@
+ mkdir $$ROOT$(USRSBIN_DIR); fi
+ if [ -f $$ROOT$(BOOT_DIR)/boot.b ]; then \
+ mv $$ROOT$(BOOT_DIR)/boot.b $$ROOT$(BOOT_DIR)/boot.old; fi
+- if [ -f $$ROOT$(BOOT_DIR)/chain.b ]; then \
+- mv $$ROOT$(BOOT_DIR)/chain.b $$ROOT$(BOOT_DIR)/chain.old; fi
+- if [ -f $$ROOT$(BOOT_DIR)/os2_d.b ]; then \
+- mv $$ROOT$(BOOT_DIR)/os2_d.b $$ROOT$(BOOT_DIR)/os2_d.old; fi
+- cp boot.b chain.b os2_d.b $$ROOT$(BOOT_DIR)
++ cp boot.b $$ROOT$(BOOT_DIR)
+ cp lilo $$ROOT$(SBIN_DIR)
+- strip $$ROOT$(SBIN_DIR)/lilo
++ $(STRIP) $$ROOT$(SBIN_DIR)/lilo
+ cp keytab-lilo.pl $$ROOT$(USRSBIN_DIR)
+ @if [ -e $$ROOT/etc/lilo/install ]; then echo; \
+ echo -n "$$ROOT/etc/lilo/install is obsolete. LILO is now ";\
+@@ -142,11 +117,8 @@
+ && mv ../lilo ../lilo-`cat VERSION`
+
+ clean:
+- rm -f *.o *.img *.lis first.s second.s chain.s \
+- os2_d.s dump.s tmp_make first.b second.b
+-
+-spotless: clean
+- rm -f lilo activate boot.b chain.b os2_d.b dump.b dparam.com
++ rm -f *.o *.exe *.bin tmp_make
++ rm -f lilo boot.b
+
+ ### Dependencies
+ activate.o : activate.c
+diff -ruN lilo.orig/chain.S lilo/chain.S
+--- lilo.orig/chain.S Thu Oct 15 05:14:25 1998
++++ lilo/chain.S Thu Jan 1 09:00:00 1970
+@@ -1,255 +0,0 @@
+-/* chain.S - LILO boot chainer */
+-
+-/* Copyright 1992-1998 Werner Almesberger. See file COPYING for details. */
+-
+-
+-#define LILO_ASM
+-#include "lilo.h"
+-
+-
+- .text
+-
+- .globl _main
+- .org 0
+-
+-_main: jmp start
+-
+- .org 6
+-
+- .ascii "LILO"
+- .word STAGE_CHAIN
+- .word VERSION
+-
+-offset: .word 0
+-drive: .byte 0
+- .byte 0 ! head, always zero
+-
+-hint: .word drvmap ! pointer to drive map
+-
+-ptable: .blkw 0x20 ! partition table to preload
+-
+-start: cli ! set SS:SP to 0:7C00
+- xor ax,ax
+- mov ss,ax
+- mov ax,#0x7c00
+- mov sp,ax
+- sti
+- mov ax,#SETUPSEG ! move boot sector to default location
+- mov ds,ax
+- xor ax,ax
+- mov es,ax
+- mov cx,#256
+-mtmp = SETUPSECS-1 ! broken math ...
+- mov si,#mtmp*512
+- mov di,#BOOTSEG*16
+- rep
+- movsw
+-#ifdef DOS_D
+-dos4: seg es
+- mov byte ptr BOOTSEG*16+0x24,#0x81
+-#endif
+- mov cx,#0x20 ! move partition table
+- mov si,#ptable
+- mov di,#PART_TABLE
+- rep
+- movsw
+- ! mess with the partition table
+-#if defined(LCF_REWRITE_TABLE) || defined(LCF_READONLY)
+- mov si,#prtmap ! get partition table change rules
+-prtclp: lodsw ! bios == 0 indicates end
+- or al,al
+- jz pmend ! at end -> quit
+- cmp al,cache ! already in cache ?
+- je incache ! yes -> no loading required
+- push ax ! save table data
+- call flush ! flush the cache
+- pop ax
+- push ax
+- mov cache,al ! remember drive in cache
+- cmp al,drive ! boot drive ?
+- jne noc ! no -> load into scratch area
+- xor ax,ax ! load at 0000:0600
+- mov bx,#PARTS_LOAD
+- jmp loadit
+-noc: mov ax,ds
+- mov bx,#PARTS_SCR ! scratch area
+-loadit: mov es,ax ! set up pointers and remember them
+- mov ces,ax
+- mov cbx,bx
+- mov ax,#0x201 ! load partition table, one sector
+- mov dx,cache ! drive from cache (DH = 0)
+- mov cx,#1
+- int 0x13 ! load it
+- jc wrfail ! error -> abort
+- pop ax ! get BIOS and offset
+-incache:les bx,cbx ! load pointer
+- add bx,#PART_TABLE_OFFSET ! move to partition table
+- add bl,ah ! offset is always in [0x1be,0x1fd]
+- lodsw ! see what we need to do
+- seg es ! match ?
+- cmp byte ptr (bx),al
+- jne nocng ! no -> do not change
+- seg es ! change
+- mov byte ptr (bx),ah
+- mov byte ptr dirty,#1 ! mark as dirty
+-nocng: br prtclp ! next one
+-
+-flush: test byte ptr dirty,#1 ! dirty ?
+- jz noflush ! no -> do not write
+- mov ax,#0x301 ! write one sector
+- mov dx,cache ! get the drive
+- or dl,dl ! nothing cached ?
+- jz noflush ! no -> do not flush
+- les bx,cbx ! reload pointer
+- int 0x13 ! write ...
+- jc wrfail ! argl
+-noflush:ret
+-pmend: call flush ! flush table
+- br nopp ! and proceed
+-wrfail: mov si,#failmsg ! complain
+- call say
+- mov ax,#FIRSTSEG ! try to restart LILO
+- jmpi #GO,FIRSTSEG
+-
+-cache: .byte 0 ! drive, 0 means not cached
+- .byte 0 ! head, always 0
+-cbx: .blkw 1
+-ces: .blkw 1
+-dirty: .byte 0
+-
+-#endif
+-
+-nopp:
+- mov ax,drvmap ! need to install mapper ?
+- or ax,ax
+- jz noimap ! no -> go on
+- call swap13
+-noimap:
+-
+- mov si,offset ! DS:SI and ES:SI point to the partition
+- add si,#PART_TABLE
+- mov dx,drive ! initialize DX (drive and head)
+- xor ax,ax ! set DS and ES to zero
+-#ifdef XXX
+- mov ax,ds
+- mov es,ax
+- mov si,#lilosig
+- mov bx,#cmd
+- mov dl,#0xfe
+-#else
+- mov ds,ax
+- mov es,ax
+-#endif
+- mov bp,#0 ! might help some boot problems
+- mov ax,#0xaa55 ! boot signature (just in case ...)
+- jmpi #BOOTSEG*16,0 ! start boot sector
+-
+-#ifdef XXX
+-lilosig:.ascii "LILO"
+-cmd: .ascii "98"
+- .byte 0
+-#endif
+-
+-#if defined(LCF_REWRITE_TABLE)
+-
+-! Display a NUL-terminated string on the console
+-
+-say: lodsb ! get byte
+- or al,al ! NUL ?
+- jz aret ! yes -> done
+- mov ah,#14 ! display, tty-style
+- xor bh,bh
+- int 0x10
+- jmp say ! next one
+-aret: ret ! done
+-
+-failmsg:.ascii "Rewrite error."
+- .byte 13,10,0
+-
+-#endif
+-
+-swap13: seg es ! allocate 1 kB
+- dec word ptr [0x413]
+- int 0x12 ! get start segment
+- mov cl,#6
+- shl ax,cl
+- cli ! disable interrupts
+- xor bx,bx ! zero a few registers
+- mov di,bx
+- seg es ! change offset
+- xchg bx,[0x4c]
+- mov old13of,bx
+- mov bx,ax ! change segment
+- seg es
+- xchg bx,[0x4e]
+- mov old13sg,bx
+- mov es,ax ! move drive swapper
+- mov si,#new13
+- mov cx,#new13end-new13
+- rep
+- movsb
+- sti ! enable interrupts
+- ret ! done
+-
+-new13: push ax ! save AX (contains function code in AH)
+- push bp ! need BP to mess with stack
+- mov bp,sp
+- ! Stack layout:
+- !
+- ! +8 INT flags
+- ! +6 INT CS
+- ! +4 INT IP
+- ! +2 AX
+- ! BP+0 BP
+- pushf ! push flags (to act like interrupt)
+- push si
+- mov si,#drvmap-new13
+-mapfl: seg cs ! get next entry
+- lodsw
+- or ax,ax ! at end ?
+- jz nomap ! yes -> do not map
+- cmp dl,al ! match ?
+- jne mapfl ! no -> continue
+- mov dl,ah ! map drive
+-nomap: pop si ! restore SI
+- mov 8(bp),ax ! overwrite old flags (to remember mapping)
+- mov ax,2(bp) ! restore AX
+- mov bp,(bp) ! restore BP
+- .byte 0x9a ! CALL FAR
+-old13of:.word 0
+-old13sg:.word 0
+- push bp ! save BP again
+- mov bp,sp
+- ! New stack layout:
+- !
+- ! +10 mapping (was flags)
+- ! +8 INT CS
+- ! +6 INT IP
+- ! +4 AX
+- ! +2 obsolete BP
+- ! BP+0 BP
+- xchg ax,4(bp) ! save AX and get command
+- pushf ! fix driver number, if necessary
+- cmp ah,#8 ! do not fix
+- je done13
+- cmp ah,#0x15 ! do not fix
+- je done13
+- mov ax,10(bp) ! no mapping ?
+- or ax,ax
+- jz done13
+- mov dl,al ! fix mapping
+-done13: mov ax,4(bp) ! restore AX
+- pop 10(bp) ! restore flags
+- pop bp ! get BP
+- add sp,#4 ! fix SP
+- iret ! done
+-
+-drvmap: .blkw DRVMAP_SIZE+1
+-
+-new13end:
+-
+-#if defined(LCF_REWRITE_TABLE)
+-prtmap: .blkw PRTMAP_SIZE*2+1 ! only first word of last entry is read
+-#endif
+-
+-theend:
+diff -ruN lilo.orig/chain.old.S lilo/chain.old.S
+--- lilo.orig/chain.old.S Wed Jun 18 16:42:15 1997
++++ lilo/chain.old.S Thu Jan 1 09:00:00 1970
+@@ -1,260 +0,0 @@
+-/* chain.S - LILO boot chainer */
+-
+-/* Copyright 1992-1997 Werner Almesberger. See file COPYING for details. */
+-
+-
+-#define LILO_ASM
+-#include "lilo.h"
+-
+-
+- .text
+-
+- .globl _main
+- .org 0
+-
+-_main: jmp start
+-
+- .org 2
+-
+- .ascii "LILO"
+- .word STAGE_CHAIN
+- .word VERSION
+-
+-offset: .word 0
+-drive: .byte 0
+- .byte 0 ! head, always zero
+-
+-start: cli ! set SS:SP to 0:7C00
+- xor ax,ax
+- mov ss,ax
+- mov ax,#0x7c00
+- mov sp,ax
+- sti
+- mov ax,#SETUPSEG ! move boot sector to default location
+- mov ds,ax
+- xor ax,ax
+- mov es,ax
+- mov cx,#256
+- mov si,#512
+- mov di,#BOOTSEG*16
+- rep
+- movsw
+- push bx ! save secret message
+-#ifdef DOS_D
+-#if 0
+- seg es
+- cmp byte ptr BOOTSEG*16+0x26,#0x29
+- je dos4
+- mov bx,#baddos ! complain
+- call say
+- mov ax,#FIRSTSEG ! restart LILO
+- jmpi #GO,FIRSTSEG
+-#endif
+-dos4: seg es
+- mov byte ptr BOOTSEG*16+0x24,#0x81
+-#endif
+- mov cx,#0x20 ! move partition table
+- mov si,#PART_TABLE_OFFSET
+- mov di,#PART_TABLE
+- rep
+- movsw
+-#if defined(SWAP_HD) || defined(SWAP_FD)
+- call swap13
+-#endif
+- ! table entry
+- pop bx ! get secret message (active partition)
+-#ifdef LCF_REWRITE_TABLE
+- or bl,bl ! none set ?
+- jz tonopp ! yes -> do not patch
+-br tonopp
+- cmp bx,#0x81 ! valid code ?
+- jb towrfail ! no -> abort
+- cmp bx,#0x84
+- jna wrokay ! yes -> continue
+-towrfail:br wrfail
+-tonopp: br nopp
+-wrokay: push bx ! save BX
+- xor ax,ax ! ES becomes 0
+- mov es,ax
+- mov ax,#0x201 ! load partition table, one sector
+- mov dx,#0x80 ! first drive
+- mov cx,#1
+- mov bx,#PARTS_LOAD
+- int 0x13 ! load it
+- jc wrfail ! error -> abort
+- mov cx,#4 ! process all four entries
+- mov bx,#PART_TABLE
+-ptchpt: seg es ! clear all active flags
+- mov byte ptr (bx),#0
+-#if defined(LCF_FIX_TYPE) && defined(LCF_HIDE_DOS)
+- seg es
+- mov al,(bx+4) ! get partition type
+- cmp al,#PART_DOS12 ! hidden ?
+- je hideme ! no -> hide it
+- cmp al,#PART_DOS16
+- je hideme
+- cmp al,#PART_DOS32
+- jne nonrel ! already hidden -> continue
+-hideme: add al,#HIDDEN_OFF ! write back corrected value
+- seg es
+- mov (bx+4),al
+-#endif
+-nonrel: add bx,#16 ! next entry
+- loop ptchpt
+- pop bx ! compute active flag position
+- dec bx
+- shl bl,1
+- shl bx,1
+- shl bx,1
+- shl bx,1
+- cmp bx,offset ! right ?
+- jne wrfail ! no -> abort
+- seg es ! set active flag
+- mov byte ptr (bx+PART_TABLE),#0x80
+-#ifdef LCF_FIX_TYPE
+- seg es ! is this a
+- mov al,byte ptr (bx+PART_TABLE+4)
+- cmp al,#PART_HDOS12 ! hidden ?
+- je unhideme ! yes -> unhide it
+- cmp al,#PART_HDOS16
+- je unhideme
+- cmp al,#PART_HDOS32
+- jne nounhid ! not hidden -> continue
+-unhideme:sub al,#HIDDEN_OFF ! write back corrected value
+- seg es
+- mov (bx+PART_TABLE+4),al
+-#endif
+-nounhid:mov ax,#0x301 ! save it (restore all registers for
+- mov dx,#0x80 ! paranoia)
+- mov cx,#1
+- mov bx,#0x600
+- int 0x13 ! write ...
+- jc wrfail ! argl
+- mov bx,#passmsg ! confirm modification
+- call say
+- jmp nopp
+-wrfail: mov bx,#failmsg ! complain
+- call say
+- mov ax,#FIRSTSEG ! restart LILO
+- jmpi #GO,FIRSTSEG
+-#endif
+-nopp: mov si,offset ! DS:SI and ES:SI point to the partition
+- add si,#PART_TABLE
+- mov dx,drive ! initialize DX (drive and head)
+- xor ax,ax ! set DS and ES to zero
+-#ifdef XXX
+- mov ax,ds
+- mov es,ax
+- mov si,#lilosig
+- mov bx,#cmd
+- mov dl,#0xfe
+-#else
+- mov ds,ax
+- mov es,ax
+-#endif
+- mov bp,#0 ! might help some boot problems
+- mov ax,#0xaa55 ! boot signature (just in case ...)
+- jmpi #BOOTSEG*16,0 ! start boot sector
+-
+-#ifdef XXX
+-lilosig:.ascii "LILO"
+-cmd: .ascii "98"
+- .byte 0
+-#endif
+-
+-#if defined(DOS_D) || defined(LCF_REWRITE_TABLE)
+-
+-! Display a NUL-terminated string on the console
+-
+-say: mov al,(bx) ! get byte
+- or al,al ! NUL ?
+- jz aret ! yes -> done
+- push bx ! save pointer
+- mov ah,#14 ! display, tty-style
+- xor bh,bh
+- int 0x10
+- pop bx
+- inc bx ! next one
+- jmp say
+-aret: ret ! done
+-
+-#ifdef DOS_D
+-baddos: .ascii "Need DOS version 4 or newer."
+- .byte 13,10,0
+-#endif
+-
+-failmsg:.ascii "Rewrite error."
+- .byte 13,10,0
+-
+-passmsg:.ascii "Rewrote the partition table."
+- .byte 13,10,0
+-
+-#endif
+-
+-#if defined(SWAP_HD) || defined(SWAP_FD)
+-
+-swap13: seg es ! allocate 1 kB
+- dec word ptr [0x413]
+- int 0x12 ! get start segment
+- mov cl,#6
+- shl ax,cl
+- cli ! disable interrupts
+- xor bx,bx ! zero a few registers
+- mov di,bx
+- seg es ! change offset
+- xchg bx,[0x4c]
+- mov old13of,bx
+- mov bx,ax ! change segment
+- seg es
+- xchg bx,[0x4e]
+- mov old13sg,bx
+- mov es,ax ! move drive swapper
+- mov si,#new13
+- mov cx,#new13end-new13
+- rep
+- movsb
+- sti ! enable interrupts
+- ret ! done
+-
+-new13: seg cs ! save function code
+- mov fcode-new13,ah
+- test dl,#0x80 ! hard disk drive ?
+-#ifdef SWAP_FD
+- jnz noswap ! yes -> go on
+-#else
+- jz noswap ! no -> go on
+-#endif
+- xor dl,#1 ! swap drive 0 and 1
+-noswap: pushf
+- .byte 0x9a ! CALL FAR
+-old13of:.word 0
+-old13sg:.word 0
+- pushf ! fix driver number, if necessary
+- seg cs
+- cmp byte ptr fcode-new13,#8 ! do not fix
+- je done13
+- seg cs
+- cmp byte ptr fcode-new13,#0x15 ! do not fix
+- je done13
+- test dl,#0x80 ! hard disk drive ?
+-#ifdef SWAP_FD
+- jnz done13 ! yes -> go on
+-#else
+- jz done13 ! no -> go on
+-#endif
+- xor dl,#1 ! fix it
+-done13: seg cs
+- mov tmpbx-new13,bx ! restore flags
+- mov bx,sp
+- seg ss
+- pop 6(bx)
+- seg cs
+- mov bx,tmpbx-new13
+- iret ! done
+-new13end:
+-fcode: .byte 0 ! function code
+-tmpbx: .word 0
+-
+-#endif
+-
+-theend:
+diff -ruN lilo.orig/defs.h lilo/defs.h
+--- lilo.orig/defs.h Thu Jan 1 09:00:00 1970
++++ lilo/defs.h Thu Dec 7 16:17:10 2000
+@@ -0,0 +1,2 @@
++extern void *memcpy (void *__dest, const void *__src, unsigned int __n);
++extern int strlen (__const char *__s);
+diff -ruN lilo.orig/dump.S lilo/dump.S
+--- lilo.orig/dump.S Wed Jun 18 16:42:22 1997
++++ lilo/dump.S Thu Jan 1 09:00:00 1970
+@@ -1,131 +0,0 @@
+-/* dump.S - LILO register dumper */
+-
+-/* Copyright 1995-1997 Werner Almesberger. See file COPYING for details. */
+-
+-
+-#define LILO_ASM
+-#include "lilo.h"
+-
+-
+- .text
+-
+- .globl _main
+- .org 0
+-
+-_main: push sp ! push all registers
+- push ss
+- pushf
+- push es
+- push ds
+- push cs
+- push bp
+- push di
+- push si
+- push dx
+- push cx
+- push bx
+- push ax
+- mov ax,#BOOTSEG ! let DS point to where we really are
+- mov ds,ax
+- mov bx,#msgs ! set up loop
+-l: call say ! output message
+- cmp byte ptr (bx),#0 ! at end ?
+- je back ! yes -> back to LILO
+- pop ax ! get next data word
+- push bx
+- call wout ! output data word
+- pop bx
+- jmp l ! next round
+-
+-#if 0
+-back: mov ax,#FIRSTSEG
+- mov ds,ax
+- mov word ptr (CODE_START_1),#CODE_START_1+8
+- mov word ptr (CODE_START_1+2),#FIRSTSEG
+- mov word ptr (CODE_START_1+4),#CODE_START_1+12
+- mov byte ptr (CODE_START_1+6),#0xfe
+- mov es,ax ! adjust segments
+- mov ax,#BOOTSEG
+- mov ds,ax
+- mov word ptr (10),#0xffff ! no timeout
+- mov si,#haltnow ! copy string data
+- mov di,#CODE_START_1+8
+- mov cx,#6
+- rep
+- movsb
+- mov ax,#FIRSTSEG ! restart LILO
+- jmpi #GO,FIRSTSEG
+-#else
+-back: hlt ! stay here
+- jmp back
+-#endif
+-
+-! Display a NUL-terminated string on the console
+-
+-say: mov al,(bx) ! get byte
+- inc bx ! move pointer
+- or al,al ! NUL ?
+- jz aret ! yes -> done
+- push bx ! save pointer
+- mov ah,#14 ! display, tty-style
+- xor bh,bh
+- int 0x10
+- pop bx
+- jmp say ! next one
+-
+-wout: push ax ! display one word
+- mov al,ah
+- call bout
+- pop ax
+-bout: push ax ! display one byte
+- shr al,#4
+- call nout
+- pop ax
+-nout: and al,#15 ! display one nibble
+- add al,#48
+- cmp al,#58
+- jb nokay
+- add al,#7
+-nokay: xor bh,bh ! display on screen
+- mov ah,#14
+- int 0x10
+-aret: ret
+-
+-msgs: .byte 13,10
+- .ascii "Register dump:"
+- .byte 13,10,10
+- .ascii "AX="
+- .byte 0
+- .ascii " BX="
+- .byte 0
+- .ascii " CX="
+- .byte 0
+- .ascii " DX="
+- .byte 0,13,10
+- .ascii "SI="
+- .byte 0
+- .ascii " DI="
+- .byte 0
+- .ascii " BP="
+- .byte 0,13,10
+- .ascii "CS="
+- .byte 0
+- .ascii " DS="
+- .byte 0
+- .ascii " ES="
+- .byte 0,13,10
+- .ascii "F="
+- .byte 0,13,10
+- .ascii "SS:SP="
+- .byte 0
+- .ascii ":"
+- .byte 0,13,10,10
+-#if 0
+- .ascii "Restarting LILO ..."
+-#else
+- .ascii "System halted."
+-#endif
+- .byte 13,10,10,0,0
+-
+-haltnow:.ascii "LILO" ! prevent automatic reboot
+- .byte 0
+diff -ruN lilo.orig/first.S lilo/first.S
+--- lilo.orig/first.S Sat Dec 5 08:20:12 1998
++++ lilo/first.S Thu Dec 7 16:17:10 2000
+@@ -1,226 +1,257 @@
+-/* first.S - LILO first stage boot loader */
+-
+-/* Copyright 1992-1998 Werner Almesberger. See file COPYING for details. */
+-
+-
+-#define LILO_ASM
+-#include "lilo.h"
+-
+-#ifndef LCF_NO1STDIAG
+-#define CYL_CHECK
+-#endif
+-
+-
+- .text
+-
+- .globl _main
+-
+- .org 0
+-
+-_main: cli ! NT 4 blows up if this is missing
+- jmp start
+-
+- .org 6
+-
+-! Boot device parameters. They are set by the installer.
+-
++/* $Id: first.S,v 1.16 2000/11/26 07:11:58 gniibe Exp $
++ *
++ * Primary boot loader
++ *
++ * lilo/arch/sh/first.S
++ *
++ * Copyright (C) 2000 Niibe Yutaka
++ *
++ * This file is subject to the terms and conditions of the GNU General
++ * Public License.
++ *
++ */
++
++/*
++ * NOTE: Keep this code "position independent", so that this works well
++ * among machines with different memory map.
++ *
++ * Some machine starts its memmory at 0x08000000 (Area2),
++ * while others starts at 0x0c000000 (Area3).
++ */
++
++/*
++ * Memory map:
++ * [ First Loader ] 512
++ * [ Stack ] 4096-512
++ * [ Second Loader ] 4KB
++ * [ Reserved ] 4KB
++ * [ MAP load area ] 512
++ * [ Descriptor table 1/2 ] 512
++ * [ Descriptor table 2/2 ] 512
++ * [ Default Command Line ] 512
++ * [ Keyboard Translation ] 512
++ * [ Greeting Message ] 512
++ * [ Reserved ]
++ * [ Reserved ]
++ *
++ */
++ .global start
++start:
++ bra real_start
++ .byte 3 ! This becomes "mov r0, r12" with next "l"
++ !
++ .ascii "lba" ! special marker for LBA32
++ !
+ .ascii "LILO"
+- .word STAGE_FIRST
+- .word VERSION
++ .word 1
++#if 1
++ /* EDIT HERE ! */
++ ! Depends LILOs version
++ .word 20
++#else
++ /* v--- Major Version */
++ .word 4*256 + 21
++ ! /* ^--- Minor Version*/
++#endif
+
++/* x86 LILO parameters (Not used for SuperH... yet) */
+ timeout:.word 0 ! input timeout
+ delay: .word 0 ! boot delay
+ port: .byte 0 ! COM port (0 = unused, 1 = COM1, etc.)
+ sparam: .byte 0 ! serial port parameters (0 = unused)
+
+-tstamp: .long 0 ! timestamp
++/* Timestamp (Filled by LILO command) */
++tstamp: .long 0
+
+-d1_cx: .word 0 ! first descriptor sector address
++/* First descripter sector (Filled by LILO command) */
++d1_cx: .word 0
+ d1_dx: .word 0
+-d1_al: .byte 0 ! (unused)
++d1_al: .byte 0
+
+-d2_cx: .word 0 ! second descriptor sector address
++/* Second descripter sector (Filled by LILO command) */
++d2_cx: .word 0
+ d2_dx: .word 0
+-d2_al: .byte 0 ! (unused)
++d2_al: .byte 0
+
+-dc_cx: .word 0 ! default command-line sector address
++/* Default command-line sector (Filled by LILO command) */
++dc_cx: .word 0
+ dc_dx: .word 0
+-dc_al: .byte 0 ! (unused)
++dc_al: .byte 0
+
++/* Prompt? (Filled by LILO command) */
+ prompt: .byte 0 ! indicates whether to always enter prompt
+ ! (also used as alignment byte)
+
++/* Greeting message length & sector (Filled by LILO command) */
+ ms_len: .word 0 ! initial greeting message
+ ms_cx: .word 0
+ ms_dx: .word 0
+-ms_al: .byte 0 ! (unused)
++ms_al: .byte 0
+
++/* Second descripter sector (Filled by LILO command) */
+ kt_cx: .word 0 ! keyboard translation table
+ kt_dx: .word 0
+ kt_al: .byte 0
+
+ d_addr: ! second stage sector addresses
+
+- .org CODE_START_1
+-
+-ext_si: .word 0 ! external interface
+-ext_es: .word 0
+-ext_bx: .word 0
+-ext_dl: .byte 0
+-
+-start: mov ax,#BOOTSEG ! set DS
+- mov ds,ax
+- mov ext_es,es ! copy possible external parameters
+- mov ext_si,si
+- mov ext_bx,bx
+- mov ext_dl,dl
+- mov ax,#FIRSTSEG ! beam us up ...
+- mov es,ax
+- mov cx,#256
+- sub si,si
+- sub di,di
+- cld
+- rep
+- movsw
+- jmpi go,FIRSTSEG
+-
+-go: cli ! no interrupts
+- mov ds,ax ! AX is already set
+- mov es,ax ! (ES may be wrong when restarting)
+- mov sp,#STACK ! set the stack
+- mov ax,#STACKSEG
+- mov ss,ax
+- sti ! now it is safe
+-
+- mov al,#0x0d ! gimme a CR ...
+- call display
+- mov al,#0x0a ! ... an LF ...
+- call display
+- mov al,#0x4c ! ... an 'L' ...
+- call display
+-
+-lagain: mov si,#d_addr ! ready to load the second stage loader
+- mov bx,#SECOND
+- cld
+-sload: lodsw ! get CX
+- mov cx,ax
+- lodsw ! get DX
+- mov dx,ax
+- or ax,cx ! at EOF ?
+- jz done ! yes -> start it
+- inc si ! skip the length byte
+- call cread
+- jc error ! error -> start over again
+- add bx,#512 ! next sector
+- jmp sload
+-error:
+-#ifndef LCF_NO1STDIAG
+- push ax ! display a space
+- mov al,#32
+- call display
+- pop ax
+- mov al,ah ! display error code
+- call bout
+-#endif
+- xor ax,ax ! reset the FDC
+- mov dl,al
+- int 0x13
+- jmp lagain ! redo from start
+-done: mov al,#0x49 ! display an 'I'
+- call display
+- jmpi 0,SECONDSEG ! start the second stage loader
+-
+-#ifndef LCF_NO1STDIAG
+-bout: push ax ! display one byte
+- shr al,#4
+- call nout
+- pop ax
+-nout: and al,#15 ! display one nibble
+- add al,#48
+- cmp al,#58
+- jb nokay
+- add al,#7
+-nokay: ! fall through
+-#endif
+-
+-display:xor bh,bh ! display on screen
+- mov ah,#14
+- int 0x10
+- ret
+-
+-linerr: pop dx ! discard stack contents
+- pop cx
+- pop bx
+- ret ! (carry is already set)
+-
+-cread: test dl,#LINEAR_FLAG ! linear address ?
+- jz readsect ! no -> go on
+- and dl,#0xff-LINEAR_FLAG ! remove flag
+-
+-!
+-! Translate the linear address into a sector/track/cylinder address
+-!
+- push bx ! BX is used as scratch
+- push cx ! LSW
+- push dx ! MSW with drive
+- mov ah,#8 ! get drive geometry (do not clobber ES:DI)
+- int 0x13
+- jc linerr ! error -> quit
+- mov al,dh ! AL <- #heads-1
+- pop dx ! get MSW
+- mov t_drive,dl ! save drive
+- mov dl,dh ! linear address (high) into DX
+- xor dh,dh
+-#ifdef CYL_CHECK
+- push cx ! compute #cyls-1
+- xchg ch,cl
+- rol ch,1
+- rol ch,1
+- and ch,#3
+- mov n_cyl,cx ! save #cyls-1
+- pop cx
+-#endif
+- and cx,#0x3f ! CX <- #secs
+- mul cl ! AX <- #secs/cyl
+- add ax,cx
+- xchg ax,bx
+- pop ax ! linear address (low) into AX
+- div bx ! DX <- cylinder, AX <- remaining secs
+- xchg ax,dx
+- div cl ! AL <- track, AH <- sector
+- inc ah
+- mov t_sector,ah
+- xchg ax,dx ! AX <- cylinder, DL <- track
+- mov dh,dl ! set up DX (head:drive)
+- mov dl,t_drive
+-#ifdef CYL_CHECK
+- cmp ax,n_cyl ! valid cylinder number ?
+- ja linerr3 ! no -> error
+-#endif
+- xchg ah,al ! build cylinder number
+- ror al,1
+- ror al,1
+- or al,t_sector
+- mov cx,ax
+- pop bx ! restore BX
+-readsect:
+- mov ax,#0x201 ! read one sector
+- int 0x13
+- ret ! quit, possibly with errors
+-
+-#ifdef CYL_CHECK
+-linerr3:pop bx ! pop BX and linear address
+- xor ax,ax ! zero indicates internal error
+- stc ! error
+- ret
+-
+-n_cyl: .word 0 ! temporary space
+-#endif
+-t_drive:.byte 0
+-t_sector:.byte 0
+-
+-
+-/* Here are at least 66 bytes of free space. This is reserved for the
+- partition table and the boot signature. */
++ .long 0xffffffff
++ .long 0xffffffff
++ .long 0xffffffff
++ .long 0xffffffff
++ .long 0xffffffff
++ .long 0xffffffff
++ .long 0xffffffff
++ .long 0xffffffff
++ .long 0xffffffff
++ .long 0xffffffff
++ .long 0xffffffff
++
++ .word 0xffff
++
++ .align 2
++real_start:
++ /* Get base pointer, to be position independent */
++ mova next, r0
++ mov #0x02, r1
++ shll8 r1
++ sub r1, r0
++ mov r0, r12 ! Base pointer
++ !
++ mov #0x10, r1
++ shll8 r1
++ mov r12, r15
++ add r1, r15 ! Setup stack pointer
++ !
++ mov #0x10, r13 ! buffer number
++ !
++ /* Enable cache */
++ mov #6, r0 ! Cache "on"
++ mov #0, r4
++ trapa #0x3f
++ !
++ /* Output message "L" */
++ mova message, r0
++ mov r0, r4
++ mov #1, r5
++ mov #0, r0 ! Serial Output
++ trapa #0x3f
++ !
++ /* Load second stage loader */
++ mov #52, r11 ! #52: desc# of second stage loader
++loop: mov r11, r4
++ bsr load_sector_address ! get r4 (=dev) and r5 (=lba)
++ add r12, r4 ! desc# --> address of descriptor
++ bt done
++ !
++ mov r13, r6
++ shll8 r6
++ bsr read_a_sector
++ add r12, r6 ! buffer number -> buffer address
++ !
++ add #2, r13 ! buffer # += 2
++ bra loop
++ add #5, r11 ! next desc# is +5
++
++done:
++ /* Flush cache */
++ mov #6, r0 ! Cache "on"
++ mov #0, r4
++ trapa #0x3f
++
++ /* Jump to the second loader */
++ mov #0x10, r0
++ shll8 r0
++ add r12, r0 ! Get the address into r0
++ jmp @r0
++ mov r12, r4 ! First argument is base pointer
++
++ .align 2
++message:
++ .string "L"
++
++ .align 2
++/*
++ * LOAD_SECTOR_ADDRESS:
++ * Read the sector descripter (5-byte tuple), and translate
++ * it as device number and lba. Set T flag if its NULL.
++ *
++ * INPUT: r4 (pointer to descripter (5-byte long, not aligned)
++ * OUTPUT: r4 (DEVICE #), r5 (LBA) and T register (T when done)
++ * Clobbers: r0, r1, r2, r3
++ */
++load_sector_address:
++ mov.b @r4+, r0
++ extu.b r0, r0
++ mov.b @r4+, r1
++ extu.b r1, r1
++ mov.b @r4+, r2
++ extu.b r2, r2
++ mov.b @r4+, r3
++ extu.b r3, r3
++ !
++ shll8 r3
++ or r3, r1
++ shll8 r1
++ or r0, r1
++ mov r1, r5
++ mov.b @r4, r0
++ cmp/eq #0, r0
++ bt 1f ! NULL (end of descriptor)
++ !
++ /* Check if its really LBA... */
++ mov r2, r0
++ and #0x0F, r0 ! Get device number
++ mov #0xc0, r3
++ extu.b r3, r3
++ cmp/hi r2, r3
++ bf 1f ! Unset T
++ !
++ /* Its not LBA!! */
++ mova not_lba_message, r0
++ mov r0, r4
++ mov #36, r5
++ mov #0, r0 ! Serial Output
++ trapa #0x3f
++ sett ! End of descriptor
++ !
++1: rts
++ mov r0, r4 ! device number
++
++/*
++ * READ a sector
++ * INPUT: r4 (DEVICE #), r5 (LBA), r6 (BUFFER ADDRESS)
++ * OUTPUT: r0 (RESULT)
++ *
++ * Invoke BIOS call READ_SECTORS with number_of_sectors=1.
++ */
++read_a_sector:
++ mov #2, r0 ! READ SECTORS
++ mov #1, r7 ! number of sectors
++ trapa #0x3f
++ !
++ tst r0, r0
++ bt 1f
++ ! /* ERROR */
++ mova read_error_message, r0
++ mov r0, r4
++ mov #19, r5
++ mov #0, r0 ! Serial Output
++ trapa #0x3f
++ ! /* Go to the monitor */
++ mov #0, r0
++ jmp @r0
++ nop
++ !
++1: rts
++ nop
++
++ .align 2
++not_lba_message:
++ .string "ERROR: Sector address is not in LBA\n"
++ .align 2
++read_error_message:
++ .string "ERROR: Sector read\n"
+
+-theend:
++ .align 9
++next:
+--- lilo.orig/second.c Thu Jan 1 09:00:00 1970
++++ lilo/second.c Thu Dec 7 21:03:56 2000
+@@ -0,0 +1,411 @@
++/* $Id: second.c,v 1.22 2000/11/26 07:11:16 gniibe Exp $
++ *
++ * Secondary boot loader
++ *
++ * lilo/arch/sh/second.c
++ *
++ * Copyright (C) 2000 Niibe Yutaka
++ *
++ * This file is subject to the terms and conditions of the GNU General
++ * Public License.
++ *
++ */
++
++#include "defs.h"
++
++static void put_string (unsigned char *);
++static int get_sector_address (unsigned long, int *, unsigned long *);
++static int load_sectors (unsigned long, unsigned long);
++static int read_sectors (int, unsigned long, unsigned char *, int);
++static int load_sectors_with_maps (int, int, unsigned long *);
++
++static int machine_type (void);
++static int serial_type (void);
++static int memory_size (void);
++static int io_base (void);
++static void cache_flush (void);
++
++static const char hexchars[] = "0123456789abcdef";
++#define digits hexchars /* 10base is same for 16base (up to 10) */
++static inline char highhex (int x) { return hexchars[(x >> 4) & 0xf]; }
++static inline char lowhex (int x) { return hexchars[x & 0xf]; }
++static void printouthex (int);
++
++static unsigned long base_pointer = 0; /* Avoid BSS */
++static unsigned long kernel_image = 0; /* Avoid BSS */
++
++/* Sector descriptor */
++#define SD_DESCR1 24
++#define SD_DESCR2 29
++#define SD_DEFCMD 34
++/* 39 prompt (byte) */
++/* 40 length (word) */
++#define SD_MSG 42
++#define SD_KBDTBL 47
++
++static inline char *string_set (char *dest, const char *str)
++{
++ int len = strlen (str);
++ memcpy (dest, str, len);
++ return dest + len;
++}
++
++void
++start (unsigned long base)
++{
++ base_pointer = base;
++
++ put_string ("I");
++ load_sectors (SD_DESCR1, 0x3200);
++ load_sectors (SD_DESCR2, 0x3400);
++ put_string ("L");
++ /* XXX: checksum */
++
++ load_sectors (SD_DEFCMD, 0x3600);
++ load_sectors (SD_KBDTBL, 0x3800);
++ put_string ("O ");
++
++#if 0
++ load_sectors (SD_MSG, 0x3a00);
++#endif
++ /* XXX: delay, key check... */
++ /* XXX: list up images */
++ /* XXX: check signature */
++ /* Input command line */
++ /* XXX: Is there default command line? Use it! */
++ put_string ("boot: ");
++ put_string ("first-image\n"); /* XXX: should handle input commandline... */
++
++ /* Structure of descriptor
++ [ checksum 2byte ]
++ [ DESCR_SIZE:52-byte
++ (image-name (16-byte)
++ passwd (16-byte)
++ rd_size (4-byte)
++ initrd (5-byte sector desc)
++ start (5-byte sector desc)
++ start_page (16-bit)
++ flags (16-bit)
++ vga_mode (16-bit)
++ )
++ ] * 19
++ */
++
++ put_string ("Loading ");
++ put_string ((char *)(base_pointer+0x3200+2)); /* Image name */
++
++ kernel_image = base_pointer + 0x10000 - 0x400;
++ {
++ int desc = 0x3200+2+16+16+4+5; /* kernel image */
++
++ /* Skip two sectors: Fallback command line and options */
++ desc = load_sectors_with_maps (desc, 0, &kernel_image);
++ put_string (".");
++
++ while (desc != 0)
++ {
++ desc = load_sectors_with_maps (desc, 0, &kernel_image);
++ put_string (".");
++ }
++ }
++ put_string ("done.\n");
++
++#if 0
++ {
++ int i;
++
++ put_string ("DUMP: ");
++ for (i=0; i<16; i++)
++ printouthex (*(unsigned char *)(base_pointer+0x10000+i));
++ put_string ("\n");
++ }
++#endif
++
++ /* XXX: kernel paramerter setting */
++ {
++ unsigned long parm = base_pointer - 0x200000 + 0x1000;
++ char *cmdline = (char *)(parm+256);
++ int mem_size;
++ unsigned char *p;
++
++ *(long *)parm = 1; /* Read only mount? */
++ *(long *)(parm+4) = 0; /* RAMDISK Flags */
++ *(long *)(parm+8) = 0x0301; /* Root device: XXX should get from cls.. */
++ *(long *)(parm+12) = 1; /* Loader type (LILO = 1) */
++ *(long *)(parm+16) = 0; /* Initrd start */
++ *(long *)(parm+20) = 0; /* Initrd size */
++ *(long *)(parm+24) = 0; /* Not defined yet */
++
++ /* XXX: Should take the line from command line sector... */
++#define DC_MAGIC 0xf4f2 /* magic number of default cmd. line sector */
++ p = (unsigned char *)(base_pointer+0x3600);
++ if(p[0] == (DC_MAGIC & 0xff) && p[1] == (DC_MAGIC >> 8))
++ cmdline = string_set(cmdline, p+2);
++ cmdline = string_set(cmdline, (char *)(base_pointer + 0x10000 - 0x200));
++
++#if 0
++ /* Query to BIOS and build the command line string */
++ /* Build string "mem=XXM" */
++ mem_size = memory_size ();
++ mem_size >>= 20; /* In Mega-byte */
++ cmdline = string_set (cmdline, "mem=");
++ if (mem_size >= 100)
++ {
++ *cmdline++ = digits[mem_size/100];
++ mem_size = mem_size % 100;
++ }
++ if (mem_size >= 10)
++ {
++ *cmdline++ = digits[mem_size/10];
++ mem_size = mem_size % 10;
++ }
++ *cmdline++ = digits[mem_size];
++ *cmdline++ = 'M';
++ *cmdline++ = ' ';
++
++ switch (machine_type ())
++ {
++ case 0: /* Unknown board */
++ { /* Build string "sh_mv=unknown,0xXXXXXX,1" */
++ unsigned int io = io_base ();
++ int b31_24, b23_16, b15_08, b07_00;
++
++ b31_24 = (io>>24)&0xff;
++ b23_16 = (io>>16)&0xff;
++ b15_08 = (io>>8)&0xff;
++ b07_00 = (io>>0)&0xff;
++
++ cmdline = string_set (cmdline, "sh_mv=unknown,0x");
++ *cmdline++ = highhex (b31_24); *cmdline++ = lowhex (b31_24);
++ *cmdline++ = highhex (b23_16); *cmdline++ = lowhex (b23_16);
++ *cmdline++ = highhex (b15_08); *cmdline++ = lowhex (b15_08);
++ *cmdline++ = highhex (b07_00); *cmdline++ = lowhex (b07_00);
++ cmdline = string_set (cmdline, ",1 ");
++ break;
++ }
++
++ case 1:
++ cmdline = string_set (cmdline, "sh_mv=CqREEK ");
++ break;
++
++ case 3:
++ cmdline = string_set (cmdline, "sh_mv=SolutionEngine ");
++ break;
++ }
++
++ if (serial_type () == 0)
++ cmdline = string_set (cmdline, "console=ttySC0,115200");
++ else
++ cmdline = string_set (cmdline, "console=ttySC1,115200");
++#endif
++
++ *cmdline = '\0'; /* Terminate the string */
++ }
++
++ cache_flush ();
++ asm volatile ("jmp @r0; nop"
++ : /* no output */
++ : "z" (base_pointer + 0x10000));
++}
++
++static int
++load_sectors_with_maps (int desc, int offset, unsigned long *buf_p)
++{
++ int dev;
++ unsigned long lba;
++ int i, count;
++
++ /* Load the map at 0x3000 */
++ if (load_sectors (desc, 0x3000) < 0)
++ return 0;
++
++ for (i = offset*5; i<505; i+=5)
++ {
++ if ((count = get_sector_address (0x3000+i, &dev, &lba)) == 0)
++ return 0;
++
++ read_sectors (dev, lba, (unsigned char *)*buf_p, count);
++ *buf_p += count*512;
++ }
++
++ /* There's next map */
++ return 0x3000+505;
++}
++
++static int
++machine_type (void)
++{
++ register long __sc0 __asm__ ("r0") = 3; /* FEATURE QUERY */
++
++ asm volatile ("trapa #0x3F"
++ : "=z" (__sc0)
++ : "0" (__sc0)
++ : "memory");
++
++ return (__sc0 >> 8);
++}
++
++static int
++serial_type (void)
++{
++ register long __sc0 __asm__ ("r0") = 3; /* FEATURE QUERY */
++
++ asm volatile ("trapa #0x3F"
++ : "=z" (__sc0)
++ : "0" (__sc0)
++ : "memory");
++
++ return (__sc0 & 0x07);
++}
++
++static int
++memory_size (void)
++{
++ register long __sc0 __asm__ ("r0") = 4; /* MEMORY SIZE */
++
++ asm volatile ("trapa #0x3F"
++ : "=z" (__sc0)
++ : "0" (__sc0)
++ : "memory");
++
++ return (__sc0);
++}
++
++static int
++io_base (void)
++{
++ register long __sc0 __asm__ ("r0") = 5; /* IO BASE */
++
++ asm volatile ("trapa #0x3F"
++ : "=z" (__sc0)
++ : "0" (__sc0)
++ : "memory");
++
++ return (__sc0);
++}
++
++static void
++cache_flush (void)
++{
++ register long __sc0 __asm__ ("r0") = 6; /* CACHE_CONTROL */
++ register long __sc4 __asm__ ("r4") = 0; /* ENABLE */
++
++ asm volatile ("trapa #0x3F"
++ : "=z" (__sc0)
++ : "0" (__sc0), "r" (__sc4)
++ : "memory");
++}
++
++static void inline
++put_string_1 (unsigned char *str, long len)
++{
++ register long __sc0 __asm__ ("r0") = 0; /* OUTPUT */
++ register long __sc4 __asm__ ("r4") = (long) str;
++ register long __sc5 __asm__ ("r5") = (long) len; /* For New BIOS */
++
++ asm volatile ("trapa #0x3F"
++ : "=z" (__sc0)
++ : "0" (__sc0), "r" (__sc4), "r" (__sc5)
++ : "memory");
++}
++
++static void
++put_string (unsigned char *str)
++{
++ int len = strlen (str);
++ put_string_1 (str, len);
++}
++
++static int
++read_sectors (int dev, unsigned long lba, unsigned char *buf, int count)
++{
++ register long __sc0 __asm__ ("r0") = 2; /* READ SECTORS */
++ register long __sc4 __asm__ ("r4") = (long) dev;
++ register long __sc5 __asm__ ("r5") = (long) lba;
++ register long __sc6 __asm__ ("r6") = (long) buf;
++ register long __sc7 __asm__ ("r7") = (long) count;
++
++ asm volatile ("trapa #0x3F"
++ : "=z" (__sc0)
++ : "0" (__sc0), "r" (__sc4), "r" (__sc5),
++ "r" (__sc6), "r" (__sc7)
++ : "memory");
++
++ if (__sc0 < 0)
++ put_string ("ERROR: Sector read\n");
++
++ return __sc0;
++}
++
++static int
++get_sector_address (unsigned long sector_desc, int *devp, unsigned long *lbap)
++{
++ unsigned long s;
++ unsigned char *p = (unsigned char *)(sector_desc+base_pointer);
++ int len;
++
++ /* Number of sectors */
++ len = (int)p[4];
++ if (len == 0)
++ return 0;
++
++ /* p[2]: drive number */
++ if ((int)p[2] < 0xc0)
++ /* XXX: should return error */
++ put_string ("ERROR: Sector address is not in LBA\n");
++
++ *devp = (int)p[2] & 0x0f;
++
++ s = p[0] + (p[1]<<8) + (p[3]<<16);
++
++ *lbap = s;
++
++#if 0
++ {
++ unsigned long lba = *lbap;
++
++ put_string ("DEV= ");
++ printouthex ((*devp)&0xff);
++ put_string ("\n");
++ put_string ("LBA= ");
++ printouthex ((lba>>24)&0xff);
++ printouthex ((lba>>16)&0xff);
++ printouthex ((lba>>8)&0xff);
++ printouthex (lba&0xff);
++ put_string ("\n");
++ }
++#endif
++
++ return len;
++}
++
++static int
++load_sectors (unsigned long sector_desc, unsigned long mem)
++{
++ int dev;
++ unsigned long lba;
++ int count;
++ unsigned char *buf = (unsigned char *)(mem+base_pointer);
++
++ count = get_sector_address (sector_desc, &dev, &lba);
++
++ if (count)
++ return read_sectors (dev, lba, buf, count);
++
++ return -1;
++}
++
++#if 0
++static void
++printouthex(int x)
++{
++ char z[4];
++
++ z[0] = highhex (x);
++ z[1] = lowhex (x);
++ z[2] = ' ';
++ z[3] = '\0';
++
++ put_string (z);
++}
++#endif
+diff -ruN lilo.orig/second.lds lilo/second.lds
+--- lilo.orig/second.lds Thu Jan 1 09:00:00 1970
++++ lilo/second.lds Fri Dec 8 11:13:20 2000
+@@ -0,0 +1,212 @@
++OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
++OUTPUT_ARCH(sh)
++ENTRY(start)
++SECTIONS
++{
++ /* Read-only sections, merged into text segment: */
++ . = 0x400000 + SIZEOF_HEADERS;
++ .interp : { *(.interp) }
++ .hash : { *(.hash) }
++ .dynsym : { *(.dynsym) }
++ .dynstr : { *(.dynstr) }
++ .gnu.version : { *(.gnu.version) }
++ .gnu.version_d : { *(.gnu.version_d) }
++ .gnu.version_r : { *(.gnu.version_r) }
++ .rel.init : { *(.rel.init) }
++ .rela.init : { *(.rela.init) }
++ .rel.text :
++ {
++ *(.rel.text)
++ *(.rel.text.*)
++ *(.rel.gnu.linkonce.t*)
++ }
++ .rela.text :
++ {
++ *(.rela.text)
++ *(.rela.text.*)
++ *(.rela.gnu.linkonce.t*)
++ }
++ .rel.fini : { *(.rel.fini) }
++ .rela.fini : { *(.rela.fini) }
++ .rel.rodata :
++ {
++ *(.rel.rodata)
++ *(.rel.rodata.*)
++ *(.rel.gnu.linkonce.r*)
++ }
++ .rela.rodata :
++ {
++ *(.rela.rodata)
++ *(.rela.rodata.*)
++ *(.rela.gnu.linkonce.r*)
++ }
++ .rel.data :
++ {
++ *(.rel.data)
++ *(.rel.data.*)
++ *(.rel.gnu.linkonce.d*)
++ }
++ .rela.data :
++ {
++ *(.rela.data)
++ *(.rela.data.*)
++ *(.rela.gnu.linkonce.d*)
++ }
++ .rel.ctors : { *(.rel.ctors) }
++ .rela.ctors : { *(.rela.ctors) }
++ .rel.dtors : { *(.rel.dtors) }
++ .rela.dtors : { *(.rela.dtors) }
++ .rel.got : { *(.rel.got) }
++ .rela.got : { *(.rela.got) }
++ .rel.sdata :
++ {
++ *(.rel.sdata)
++ *(.rel.sdata.*)
++ *(.rel.gnu.linkonce.s*)
++ }
++ .rela.sdata :
++ {
++ *(.rela.sdata)
++ *(.rela.sdata.*)
++ *(.rela.gnu.linkonce.s*)
++ }
++ .rel.sbss : { *(.rel.sbss) }
++ .rela.sbss : { *(.rela.sbss) }
++ .rel.bss : { *(.rel.bss) }
++ .rela.bss : { *(.rela.bss) }
++ .rel.plt : { *(.rel.plt) }
++ .rela.plt : { *(.rela.plt) }
++ .init :
++ {
++ KEEP (*(.init))
++ } =0
++ .plt : { *(.plt) }
++ .text :
++ {
++ *(.text)
++ *(.text.*)
++ *(.stub)
++ /* .gnu.warning sections are handled specially by elf32.em. */
++ *(.gnu.warning)
++ *(.gnu.linkonce.t*)
++ } =0
++ _etext = .;
++ PROVIDE (etext = .);
++ .fini :
++ {
++ KEEP (*(.fini))
++ } =0
++ .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) }
++ .rodata1 : { *(.rodata1) }
++ /* Adjust the address for the data segment. We want to adjust up to
++ the same address within the page on the next page up. */
++/* . = ALIGN(0x10000) + (. & (0x10000 - 1)); */
++ .data :
++ {
++ __data_start = . ;
++ *(.data)
++ *(.data.*)
++ *(.gnu.linkonce.d*)
++ SORT(CONSTRUCTORS)
++ }
++ .data1 : { *(.data1) }
++ .eh_frame : { *(.eh_frame) }
++ .gcc_except_table : { *(.gcc_except_table) }
++ .note.ABI-tag : { *(.note.ABI-tag) }
++ .ctors :
++ {
++ /* gcc uses crtbegin.o to find the start of
++ the constructors, so we make sure it is
++ first. Because this is a wildcard, it
++ doesn't matter if the user does not
++ actually link against crtbegin.o; the
++ linker won't look for a file to match a
++ wildcard. The wildcard also means that it
++ doesn't matter which directory crtbegin.o
++ is in. */
++ KEEP (*crtbegin.o(.ctors))
++ /* We don't want to include the .ctor section from
++ from the crtend.o file until after the sorted ctors.
++ The .ctor section from the crtend file contains the
++ end of ctors marker and it must be last */
++ KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
++ KEEP (*(SORT(.ctors.*)))
++ KEEP (*(.ctors))
++ }
++ .dtors :
++ {
++ KEEP (*crtbegin.o(.dtors))
++ KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
++ KEEP (*(SORT(.dtors.*)))
++ KEEP (*(.dtors))
++ }
++ .got : { *(.got.plt) *(.got) }
++ .dynamic : { *(.dynamic) }
++ /* We want the small data sections together, so single-instruction offsets
++ can access them all, and initialized data all before uninitialized, so
++ we can shorten the on-disk segment size. */
++ .sdata :
++ {
++ *(.sdata)
++ *(.sdata.*)
++ *(.gnu.linkonce.s.*)
++ }
++ _edata = .;
++ PROVIDE (edata = .);
++ __bss_start = .;
++ .sbss :
++ {
++ *(.dynsbss)
++ *(.sbss)
++ *(.sbss.*)
++ *(.scommon)
++ }
++ .bss :
++ {
++ *(.dynbss)
++ *(.bss)
++ *(.bss.*)
++ *(COMMON)
++ /* Align here to ensure that the .bss section occupies space up to
++ _end. Align after .bss to ensure correct alignment even if the
++ .bss section disappears because there are no input sections. */
++ . = ALIGN(32 / 8);
++ }
++ . = ALIGN(32 / 8);
++ _end = .;
++ PROVIDE (end = .);
++ /* Stabs debugging sections. */
++ .stab 0 : { *(.stab) }
++ .stabstr 0 : { *(.stabstr) }
++ .stab.excl 0 : { *(.stab.excl) }
++ .stab.exclstr 0 : { *(.stab.exclstr) }
++ .stab.index 0 : { *(.stab.index) }
++ .stab.indexstr 0 : { *(.stab.indexstr) }
++ .comment 0 : { *(.comment) }
++ /* DWARF debug sections.
++ Symbols in the DWARF debugging sections are relative to the beginning
++ of the section so we begin them at 0. */
++ /* DWARF 1 */
++ .debug 0 : { *(.debug) }
++ .line 0 : { *(.line) }
++ /* GNU DWARF 1 extensions */
++ .debug_srcinfo 0 : { *(.debug_srcinfo) }
++ .debug_sfnames 0 : { *(.debug_sfnames) }
++ /* DWARF 1.1 and DWARF 2 */
++ .debug_aranges 0 : { *(.debug_aranges) }
++ .debug_pubnames 0 : { *(.debug_pubnames) }
++ /* DWARF 2 */
++ .debug_info 0 : { *(.debug_info) }
++ .debug_abbrev 0 : { *(.debug_abbrev) }
++ .debug_line 0 : { *(.debug_line) }
++ .debug_frame 0 : { *(.debug_frame) }
++ .debug_str 0 : { *(.debug_str) }
++ .debug_loc 0 : { *(.debug_loc) }
++ .debug_macinfo 0 : { *(.debug_macinfo) }
++ /* SGI/MIPS DWARF 2 extensions */
++ .debug_weaknames 0 : { *(.debug_weaknames) }
++ .debug_funcnames 0 : { *(.debug_funcnames) }
++ .debug_typenames 0 : { *(.debug_typenames) }
++ .debug_varnames 0 : { *(.debug_varnames) }
++ /* These must appear regardless of . */
++}
+diff -ruN lilo.orig/string.c lilo/string.c
+--- lilo.orig/string.c Thu Jan 1 09:00:00 1970
++++ lilo/string.c Thu Dec 7 16:17:10 2000
+@@ -0,0 +1,22 @@
++#include <stddef.h>
++
++/* Implementation taken from Linux kernel (linux/lib/string.c) */
++
++size_t strlen(const char * s)
++{
++ const char *sc;
++
++ for (sc = s; *sc != '\0'; ++sc)
++ /* nothing */;
++ return sc - s;
++}
++
++void * memcpy(void * dest,const void *src,size_t count)
++{
++ char *tmp = (char *) dest, *s = (char *) src;
++
++ while (count--)
++ *tmp++ = *s++;
++
++ return dest;
++}
diff --git a/packages/lilo-sh/files/lilo.patch b/packages/lilo-sh/files/lilo.patch
new file mode 100644
index 0000000000..227eaf69f1
--- /dev/null
+++ b/packages/lilo-sh/files/lilo.patch
@@ -0,0 +1,42 @@
+diff -u --new-file --recursive lilo.old/geometry.c lilo/geometry.c
+--- lilo.old/geometry.c Wed Oct 14 15:24:41 1998
++++ lilo/geometry.c Sat Feb 20 15:27:23 1999
+@@ -342,6 +342,27 @@
+ geo->sectors = hdprm.sectors;
+ geo->start = hdprm.start;
+ break;
++ case COMPAQ_SMART2_MAJOR+0:
++ case COMPAQ_SMART2_MAJOR+1:
++ case COMPAQ_SMART2_MAJOR+2:
++ case COMPAQ_SMART2_MAJOR+3:
++ case COMPAQ_SMART2_MAJOR+4:
++ case COMPAQ_SMART2_MAJOR+5:
++ case COMPAQ_SMART2_MAJOR+6:
++ case COMPAQ_SMART2_MAJOR+7:
++ geo->device = 0x80+last_dev(MAJOR_HD,64)+(MINOR(device) >> 4);
++ if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
++ die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device,
++ strerror(errno));
++ if (all && !hdprm.sectors)
++ die("HDIO_REQ not supported for your Array controller. Please "
++ "use a DISK section");
++ geo->heads = hdprm.heads;
++ geo->cylinders = hdprm.cylinders;
++ geo->sectors = hdprm.sectors;
++ geo->start = hdprm.start;
++ break;
++
+ default:
+ die("Sorry, don't know how to handle device 0x%04x",device);
+ }
+diff -u --new-file --recursive lilo.old/lilo.h lilo/lilo.h
+--- lilo.old/lilo.h Fri Dec 4 12:55:31 1998
++++ lilo/lilo.h Sat Feb 20 15:29:10 1999
+@@ -39,6 +39,7 @@
+ #define MAJOR_DAC960 48 /* First Mylex DAC960 PCI RAID controller */
+ #define MAJOR_IDE5 55 /* IDE on fifth interface */
+ #define MAJOR_IDE6 57 /* IDE on sixth interface */
++#define COMPAQ_SMART2_MAJOR 72 /* First Smart/2 Major */
+
+ #define MAX_IMAGES ((SECTOR_SIZE*2-2)/sizeof(IMAGE_DESCR))
+ /* maximum number of images */
diff --git a/packages/lilo-sh/files/lilo.raid1 b/packages/lilo-sh/files/lilo.raid1
new file mode 100644
index 0000000000..5f29bc9fc1
--- /dev/null
+++ b/packages/lilo-sh/files/lilo.raid1
@@ -0,0 +1,552 @@
+--- lilo.new/lilo.c.noraid Tue Sep 21 23:58:01 1999
++++ lilo.new/lilo.c Wed Sep 22 04:18:22 1999
+@@ -24,11 +24,11 @@
+ #include "cfg.h"
+ #include "identify.h"
+ #include "partition.h"
+-
++#include "md-int.h"
+
+ #define S2(x) #x
+ #define S(x) S2(x)
+-
++#define MAX_TOKEN 200
+
+ static void show_other(int fd)
+ {
+@@ -227,15 +227,21 @@
+ {
+ char *name,*config_file,*reboot_arg,*identify,*ident_opt,*new_root;
+ char *uninst_dev;
+- int query,more,version,uninstall,validate;
++ int query,more,version,uninstall,validate,do_md_install,pass;
+ BOOT_SECTOR dummy;
+ IMAGE_DESCR dummy2;
+ struct stat st;
+- int fd;
++ int fd, md_fd;
++ md_array_info_t md_array_info;
++ md_disk_info_t md_disk_info;
++ char md_boot_name[MAX_TOKEN+1];
++ char md_boot_map[MAX_TOKEN+1];
++ DT_ENTRY md_disk;
++ DT_ENTRY *disk;
+
+ config_file = DFL_CONFIG;
+ reboot_arg = identify = ident_opt = new_root = uninst_dev = NULL;
+- query = version = uninstall = validate = 0;
++ pass = do_md_install = query = version = uninstall = validate = 0;
+ name = *argv++;
+ argc--;
+ cfg_init(cf_options);
+@@ -414,43 +420,117 @@
+ }
+ preload_dev_cache();
+ if (identify) identify_image(identify,ident_opt);
+- if (uninstall)
+- bsect_uninstall(uninst_dev ? uninst_dev : cfg_get_strg(cf_options,
+- "boot"),cfg_get_strg(cf_options,"backup"),validate);
+- compact = cfg_get_flag(cf_options,"compact");
+- linear = cfg_get_flag(cf_options,"linear");
+- nowarn = cfg_get_flag(cf_options,"nowarn");
+- if (cfg_get_strg(cf_options,"verbose"))
+- verbose += to_number(cfg_get_strg(cf_options,"verbose"));
+- if (reboot_arg) {
+- map_patch_first(cfg_get_strg(cf_options,"map") ? cfg_get_strg(
+- cf_options,"map") : MAP_FILE,reboot_arg);
+- exit(0);
+- }
+- if (argc) usage(name);
+- geo_init(cfg_get_strg(cf_options,"disktab"));
+- if (query)
+- show_images(!cfg_get_strg(cf_options,"map") ? MAP_FILE :
+- cfg_get_strg(cf_options,"map"));
+- bsect_open(cfg_get_strg(cf_options,"boot"),cfg_get_strg(cf_options,"map") ?
+- cfg_get_strg(cf_options,"map") : MAP_FILE,cfg_get_strg(cf_options,
+- "install"),cfg_get_strg(cf_options,"delay") ? to_number(cfg_get_strg(
+- cf_options,"delay")) : 0,cfg_get_strg(cf_options,"timeout") ?
+- to_number(cfg_get_strg(cf_options,"timeout")) : -1);
+- if (more) {
+- cfg_init(cf_top);
+- if (cfg_parse(cf_top)) cfg_error("Syntax error");
+- }
+- if (!bsect_number()) die("No images have been defined.");
+- check_fallback();
+- if (!test)
+- if (cfg_get_strg(cf_options,"force-backup"))
+- bsect_update(cfg_get_strg(cf_options,"force-backup"),1);
+- else bsect_update(cfg_get_strg(cf_options,"backup"),0);
+- else {
+- bsect_cancel();
+- fprintf(stderr,"The boot sector and the map file have *NOT* been "
+- "altered.\n");
++ if (strncmp("/dev/md",cfg_get_strg(cf_options,"boot"),7) == 0) {
++ if ((md_fd=open(cfg_get_strg(cf_options,"boot"),O_NOACCESS)) < 0)
++ die("Unable to open %s",cfg_get_strg(cf_options,"boot"));
++ if (fstat(md_fd,&st) < 0)
++ die("Unable to stat %s",cfg_get_strg(cf_options,"boot"));
++ if (!S_ISBLK(st.st_mode))
++ die("%s is not a block device",cfg_get_strg(cf_options,"boot"));
++ if (ioctl(md_fd,GET_ARRAY_INFO,&md_array_info) < 0)
++ die("Unable to get RAID info on %s",cfg_get_strg(cf_options,"boot"));
++ if ((md_array_info.major_version == 0) && (md_array_info.minor_version < 90))
++ die("Raid versions < 0.90 are not supported");
++ if (md_array_info.level != 1)
++ die("Only RAID1 devices are supported as boot devices");
++ do_md_install = 1;
++ strcpy(md_boot_name,cfg_get_strg(cf_options,"boot"));
++ if (cfg_get_strg(cf_options,"map"))
++ strcpy(md_boot_map,cfg_get_strg(cf_options,"map"));
++ else
++ strcpy(md_boot_map,MAP_FILE);
++ md_disk.device = (MD_MAJOR << 8) | md_array_info.md_minor;
++ md_disk.bios = 0x80;
++ md_disk.next = disktab;
++ disktab = &md_disk;
++ }
++ while( (pass == 0) || (do_md_install && (pass < md_array_info.nr_disks)) ) {
++ if(do_md_install) {
++ GEOMETRY geo;
++ DEVICE dev;
++ int device,disk_fd;
++ char new_name[MAX_TOKEN+1];
++
++ if(pass > 0) {
++ close(fd);
++ cfg_init(cf_options);
++ fd = cfg_open(config_file);
++ more = cfg_parse(cf_options);
++ }
++ md_disk_info.number = pass;
++ if (ioctl(md_fd,GET_DISK_INFO,&md_disk_info) < 0)
++ die("main: GET_DISK_INFO: %s", strerror(errno));
++ device = (md_disk_info.major << 8) | md_disk_info.minor;
++ disk_fd = dev_open(&dev,device,O_NOACCESS);
++ if (md_disk_info.state == MD_DISK_FAULTY) {
++ printf("disk %s marked as faulty, skipping\n",dev.name);
++ pass++;
++ continue;
++ }
++ geo_query_dev(&geo,device,1);
++ disk = alloc_t(DT_ENTRY);
++ disk->bios = 0x80;
++ disk->device = device & 0xfff0;
++ disk->sectors = geo.sectors;
++ disk->heads = geo.heads;
++ disk->cylinders = geo.cylinders;
++ disk->start = geo.start;
++ disk->next = disktab;
++ disktab = disk;
++ if (cfg_get_strg(cf_options,"boot")) cfg_unset(cf_options,"boot");
++ if (cfg_get_strg(cf_options,"map")) cfg_unset(cf_options,"map");
++ strncpy(new_name,dev.name,8);
++ new_name[8] = '\0';
++ cfg_set(cf_options,"boot",new_name,NULL);
++ snprintf(new_name,MAX_TOKEN,"%s.%04x",md_boot_map,device);
++ cfg_set(cf_options,"map",new_name,NULL);
++ printf("boot = %s, map = %s\n", cfg_get_strg(cf_options,"boot"),
++ cfg_get_strg(cf_options,"map"));
++ md_disk.sectors = geo.sectors;
++ md_disk.heads = geo.heads;
++ md_disk.cylinders = geo.cylinders;
++ md_disk.start = geo.start;
++ }
++
++ pass++;
++ if (uninstall)
++ bsect_uninstall(uninst_dev ? uninst_dev : cfg_get_strg(cf_options,
++ "boot"),cfg_get_strg(cf_options,"backup"),validate);
++ compact = cfg_get_flag(cf_options,"compact");
++ linear = cfg_get_flag(cf_options,"linear");
++ nowarn = cfg_get_flag(cf_options,"nowarn");
++ if (cfg_get_strg(cf_options,"verbose"))
++ verbose += to_number(cfg_get_strg(cf_options,"verbose"));
++ if (reboot_arg) {
++ map_patch_first(cfg_get_strg(cf_options,"map") ? cfg_get_strg(
++ cf_options,"map") : MAP_FILE,reboot_arg);
++ exit(0);
++ }
++ if (argc) usage(name);
++ geo_init(cfg_get_strg(cf_options,"disktab"));
++ if (query)
++ show_images(!cfg_get_strg(cf_options,"map") ? MAP_FILE :
++ cfg_get_strg(cf_options,"map"));
++ bsect_open(cfg_get_strg(cf_options,"boot"),cfg_get_strg(cf_options,"map") ?
++ cfg_get_strg(cf_options,"map") : MAP_FILE,cfg_get_strg(cf_options,
++ "install"),cfg_get_strg(cf_options,"delay") ? to_number(cfg_get_strg(
++ cf_options,"delay")) : 0,cfg_get_strg(cf_options,"timeout") ?
++ to_number(cfg_get_strg(cf_options,"timeout")) : -1);
++ if (more) {
++ cfg_init(cf_top);
++ if (cfg_parse(cf_top)) cfg_error("Syntax error");
++ }
++ if (!bsect_number()) die("No images have been defined.");
++ check_fallback();
++ if (!test)
++ if (cfg_get_strg(cf_options,"force-backup"))
++ bsect_update(cfg_get_strg(cf_options,"force-backup"),1);
++ else bsect_update(cfg_get_strg(cf_options,"backup"),0);
++ else {
++ bsect_cancel();
++ fprintf(stderr,"The boot sector and the map file have *NOT* been "
++ "altered.\n");
++ }
+ }
+ return 0;
+ }
+--- lilo.new/geometry.c.noraid Wed Sep 22 00:55:32 1999
++++ lilo.new/geometry.c Wed Sep 22 03:13:29 1999
+@@ -35,18 +35,9 @@
+ struct stat st;
+ } ST_BUF;
+
+-typedef struct _dt_entry {
+- int device,bios;
+- int sectors;
+- int heads; /* 0 if inaccessible */
+- int cylinders;
+- int start;
+- struct _dt_entry *next;
+-} DT_ENTRY;
+
+-
+-static DT_ENTRY *disktab = NULL;
+-static int old_disktab = 0;
++DT_ENTRY *disktab = NULL;
++int old_disktab = 0;
+
+
+ void geo_init(char *name)
+@@ -260,7 +251,7 @@
+ }
+
+
+-static void geo_query_dev(GEOMETRY *geo,int device,int all)
++void geo_query_dev(GEOMETRY *geo,int device,int all)
+ {
+ DEVICE dev;
+ int fd,get_all;
+--- lilo.new/geometry.h.noraid Wed Sep 22 00:56:06 1999
++++ lilo.new/geometry.h Wed Sep 22 03:12:23 1999
+@@ -18,6 +18,17 @@
+ int boot; /* non-zero after geo_open_boot */
+ } GEOMETRY;
+
++typedef struct _dt_entry {
++ int device,bios;
++ int sectors;
++ int heads; /* 0 if inaccessible */
++ int cylinders;
++ int start;
++ struct _dt_entry *next;
++} DT_ENTRY;
++
++extern DT_ENTRY *disktab;
++
+ void geo_init(char *name);
+
+ /* Loads the disk geometry table. */
+@@ -59,5 +70,10 @@
+
+ /* lseeks in the file associated with GEO for the sector at address ADDR.
+ Returns a non-zero integer on success, zero on failure. */
++
++void geo_query_dev(GEOMETRY *geo,int device,int all);
++
++/* opens the specified device and gets the geometry information. That
++ information is then stored in *geo */
+
+ #endif
+--- lilo.new/md-int.h.noraid Wed Sep 22 13:06:36 1999
++++ lilo.new/md-int.h Tue Sep 21 22:57:41 1999
+@@ -0,0 +1,290 @@
++/*
++ md.h : Multiple Devices driver for Linux
++ Copyright (C) 1994-96 Marc ZYNGIER
++ <zyngier@ufr-info-p7.ibp.fr> or
++ <maz@gloups.fdn.fr>
++
++ 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, or (at your option)
++ any later version.
++
++ You should have received a copy of the GNU General Public License
++ (for example /usr/src/linux/COPYING); if not, write to the Free
++ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#ifndef MD_INT_H
++#define MD_INT_H
++
++/* don't include the kernel RAID header! */
++#define _MD_H
++
++typedef unsigned int md_u32;
++typedef unsigned short md_u16;
++typedef unsigned char md_u8;
++
++#include <linux/major.h>
++#include <sys/ioctl.h>
++
++/*
++ * Different major versions are not compatible.
++ * Different minor versions are only downward compatible.
++ * Different patchlevel versions are downward and upward compatible.
++ */
++
++struct md_version {
++ int major;
++ int minor;
++ int patchlevel;
++};
++
++/*
++ * default readahead
++ */
++#define MD_READAHEAD (256 * 1024)
++
++/* These are the ioctls for md versions < 0.50 */
++#define REGISTER_MD_DEV _IO (MD_MAJOR, 1)
++#define START_MD _IO (MD_MAJOR, 2)
++#define STOP_MD _IO (MD_MAJOR, 3)
++
++/* status */
++#define RAID_VERSION _IOR (MD_MAJOR, 0x10, struct md_version)
++#define GET_ARRAY_INFO _IOR (MD_MAJOR, 0x11, md_array_info_t)
++#define GET_DISK_INFO _IOR (MD_MAJOR, 0x12, md_disk_info_t)
++#define PRINT_RAID_DEBUG _IO (MD_MAJOR, 0x13)
++
++/* configuration */
++#define CLEAR_ARRAY _IO (MD_MAJOR, 0x20)
++#define ADD_NEW_DISK _IOW (MD_MAJOR, 0x21, md_disk_info_t)
++#define HOT_REMOVE_DISK _IO (MD_MAJOR, 0x22)
++#define SET_ARRAY_INFO _IOW (MD_MAJOR, 0x23, md_array_info_t)
++#define SET_DISK_INFO _IO (MD_MAJOR, 0x24)
++#define WRITE_RAID_INFO _IO (MD_MAJOR, 0x25)
++#define UNPROTECT_ARRAY _IO (MD_MAJOR, 0x26)
++#define PROTECT_ARRAY _IO (MD_MAJOR, 0x27)
++#define HOT_ADD_DISK _IO (MD_MAJOR, 0x28)
++
++/* usage */
++#define RUN_ARRAY _IOW (MD_MAJOR, 0x30, struct md_param)
++#define START_ARRAY _IO (MD_MAJOR, 0x31)
++#define STOP_ARRAY _IO (MD_MAJOR, 0x32)
++#define STOP_ARRAY_RO _IO (MD_MAJOR, 0x33)
++#define RESTART_ARRAY_RW _IO (MD_MAJOR, 0x34)
++
++
++/* for raid < 0.50 only */
++#define MD_PERSONALITY_SHIFT 16
++
++#define MD_RESERVED 0UL
++#define LINEAR 1UL
++#define STRIPED 2UL
++#define RAID0 STRIPED
++#define RAID1 3UL
++#define RAID5 4UL
++#define TRANSLUCENT 5UL
++#define LVM 6UL
++#define MAX_PERSONALITY 7UL
++
++/*
++ * MD superblock.
++ *
++ * The MD superblock maintains some statistics on each MD configuration.
++ * Each real device in the MD set contains it near the end of the device.
++ * Some of the ideas are copied from the ext2fs implementation.
++ *
++ * We currently use 4096 bytes as follows:
++ *
++ * word offset function
++ *
++ * 0 - 31 Constant generic MD device information.
++ * 32 - 63 Generic state information.
++ * 64 - 127 Personality specific information.
++ * 128 - 511 12 32-words descriptors of the disks in the raid set.
++ * 512 - 911 Reserved.
++ * 912 - 1023 Disk specific descriptor.
++ */
++
++/*
++ * If x is the real device size in bytes, we return an apparent size of:
++ *
++ * y = (x & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES
++ *
++ * and place the 4kB superblock at offset y.
++ */
++#define MD_RESERVED_BYTES (64 * 1024)
++#define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512)
++#define MD_RESERVED_BLOCKS (MD_RESERVED_BYTES / BLOCK_SIZE)
++
++#define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS)
++#define MD_NEW_SIZE_BLOCKS(x) ((x & ~(MD_RESERVED_BLOCKS - 1)) - MD_RESERVED_BLOCKS)
++
++#define MD_SB_BYTES 4096
++#define MD_SB_WORDS (MD_SB_BYTES / 4)
++#define MD_SB_BLOCKS (MD_SB_BYTES / BLOCK_SIZE)
++#define MD_SB_SECTORS (MD_SB_BYTES / 512)
++
++/*
++ * The following are counted in 32-bit words
++ */
++#define MD_SB_GENERIC_OFFSET 0
++#define MD_SB_PERSONALITY_OFFSET 64
++#define MD_SB_DISKS_OFFSET 128
++#define MD_SB_DESCRIPTOR_OFFSET 992
++
++#define MD_SB_GENERIC_CONSTANT_WORDS 32
++#define MD_SB_GENERIC_STATE_WORDS 32
++#define MD_SB_GENERIC_WORDS (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS)
++#define MD_SB_PERSONALITY_WORDS 64
++#define MD_SB_DISKS_WORDS 384
++#define MD_SB_DESCRIPTOR_WORDS 32
++#define MD_SB_RESERVED_WORDS (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS)
++#define MD_SB_EQUAL_WORDS (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS)
++#define MD_SB_DISKS (MD_SB_DISKS_WORDS / MD_SB_DESCRIPTOR_WORDS)
++
++/*
++ * Device "operational" state bits
++ */
++#define MD_DISK_FAULTY 0 /* disk is faulty / operational */
++#define MD_DISK_ACTIVE 1 /* disk is running or spare disk */
++#define MD_DISK_SYNC 2 /* disk is in sync with the raid set */
++
++typedef struct md_device_descriptor_s {
++ md_u32 number; /* 0 Device number in the entire set */
++ md_u32 major; /* 1 Device major number */
++ md_u32 minor; /* 2 Device minor number */
++ md_u32 raid_disk; /* 3 The role of the device in the raid set */
++ md_u32 state; /* 4 Operational state */
++ md_u32 reserved[MD_SB_DESCRIPTOR_WORDS - 5];
++} md_descriptor_t;
++
++#define MD_SB_MAGIC 0xa92b4efc
++
++/*
++ * Superblock state bits
++ */
++#define MD_SB_CLEAN 0
++#define MD_SB_ERRORS 1
++
++typedef struct md_superblock_s {
++ /*
++ * Constant generic information
++ */
++ md_u32 md_magic; /* 0 MD identifier */
++ md_u32 major_version; /* 1 major version to which the set conforms */
++ md_u32 minor_version; /* 2 minor version ... */
++ md_u32 patch_version; /* 3 patchlevel version ... */
++ md_u32 gvalid_words; /* 4 Number of used words in this section */
++ md_u32 set_magic; /* 5 Raid set identifier */
++ md_u32 ctime; /* 6 Creation time */
++ md_u32 level; /* 7 Raid personality */
++ md_u32 size; /* 8 Apparent size of each individual disk */
++ md_u32 nr_disks; /* 9 total disks in the raid set */
++ md_u32 raid_disks; /* 10 disks in a fully functional raid set */
++ md_u32 md_minor; /* 11 preferred MD minor device number */
++ md_u32 gstate_creserved[MD_SB_GENERIC_CONSTANT_WORDS - 12];
++
++ /*
++ * Generic state information
++ */
++ md_u32 utime; /* 0 Superblock update time */
++ md_u32 state; /* 1 State bits (clean, ...) */
++ md_u32 active_disks; /* 2 Number of currently active disks */
++ md_u32 working_disks; /* 3 Number of working disks */
++ md_u32 failed_disks; /* 4 Number of failed disks */
++ md_u32 spare_disks; /* 5 Number of spare disks */
++ md_u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 6];
++
++ /*
++ * Personality information
++ */
++ md_u32 layout; /* 0 the array's physical layout */
++ md_u32 chunk_size; /* 1 chunk size in bytes */
++ md_u32 pstate_reserved[MD_SB_PERSONALITY_WORDS - 2];
++
++ /*
++ * Disks information
++ */
++ md_descriptor_t disks[MD_SB_DISKS];
++
++ /*
++ * Reserved
++ */
++ md_u32 reserved[MD_SB_RESERVED_WORDS];
++
++ /*
++ * Active descriptor
++ */
++ md_descriptor_t descriptor;
++
++} md_superblock_t;
++
++/*
++ * options passed in raidstart:
++ */
++
++#define MAX_CHUNK_SIZE (4096*1024)
++
++struct md_param
++{
++ int personality; /* 1,2,3,4 */
++ int chunk_size; /* in bytes */
++ int max_fault; /* unused for now */
++};
++
++typedef struct md_array_info_s {
++ /*
++ * Generic constant information
++ */
++ md_u32 major_version;
++ md_u32 minor_version;
++ md_u32 patch_version;
++ md_u32 ctime;
++ md_u32 level;
++ md_u32 size;
++ md_u32 nr_disks;
++ md_u32 raid_disks;
++ md_u32 md_minor;
++ md_u32 not_persistent;
++
++ /*
++ * Generic state information
++ */
++ md_u32 utime; /* 0 Superblock update time */
++ md_u32 state; /* 1 State bits (clean, ...) */
++ md_u32 active_disks; /* 2 Number of currently active disks */
++ md_u32 working_disks; /* 3 Number of working disks */
++ md_u32 failed_disks; /* 4 Number of failed disks */
++ md_u32 spare_disks; /* 5 Number of spare disks */
++
++ /*
++ * Personality information
++ */
++ md_u32 layout; /* 0 the array's physical layout */
++ md_u32 chunk_size; /* 1 chunk size in bytes */
++
++} md_array_info_t;
++
++typedef struct md_disk_info_s {
++ /*
++ * configuration/status of one particular disk
++ */
++ md_u32 number;
++ md_u32 major;
++ md_u32 minor;
++ md_u32 raid_disk;
++ md_u32 state;
++
++} md_disk_info_t;
++
++
++/*
++ * Supported RAID5 algorithms
++ */
++#define RAID5_ALGORITHM_LEFT_ASYMMETRIC 0
++#define RAID5_ALGORITHM_RIGHT_ASYMMETRIC 1
++#define RAID5_ALGORITHM_LEFT_SYMMETRIC 2
++#define RAID5_ALGORITHM_RIGHT_SYMMETRIC 3
++
++#endif _MD_H
diff --git a/packages/lilo-sh/lilo-sh_21.bb b/packages/lilo-sh/lilo-sh_21.bb
new file mode 100644
index 0000000000..eb4ba0cccf
--- /dev/null
+++ b/packages/lilo-sh/lilo-sh_21.bb
@@ -0,0 +1,41 @@
+#
+# Bootloader for sh4 based devices using a HDD or block translation
+# layer over the flash. NOTE that this version has the 1024 cylinder
+# limit, so you probably need a seperate /boot partition as the first
+# partition on the disk. Tested on the NP51R (Titan) booting from the
+# onboard flash
+#
+DESCRIPTION="LILO (LInux LOader) is a basic system program which \
+boots your Linux system. LILO loads the Linux kernel from a floppy or \
+a hard drive, boots the kernel, and passes control of the system to \
+the kernel. LILO can also boot other operating systems. LILO-sh is a \
+port of LILO to the SH processor."
+SECTION="bootloader"
+MAINTAINER = "Jamie Lenehan <lenehan@twibble.org>"
+LICENSE = "MIT"
+PR = "r0"
+
+SRC_URI = "http://twibble.org/dist/sh4/src/lilosh/lilo-21.tar.gz \
+ file://lilo-0.21-include.patch;patch=1 \
+ file://lilo-0.21-1.1.patch;patch=1 \
+ file://lilo.patch;patch=1 \
+ file://lilo.raid1;patch=1 \
+ file://lilo-0.21-loopdev.patch;patch=1 \
+ file://lilo-0.21-second.patch;patch=1;pnum=0 \
+ file://lilo-sh-linux.patch;patch=1 \
+ file://lilo-linkgear.patch;patch=1 \
+ file://lilo-noconfig-h.patch;patch=1"
+S = "${WORKDIR}/lilo"
+
+EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
+
+# Include /boot in the package
+FILES_${PN} = "${base_sbindir} /boot"
+
+do_install() {
+ # Create the base directores
+ mkdir -p ${D}${sysconfdir} ${D}${sbindir}
+ oe_runmake ROOT=${D} install
+ # We don't ship this file
+ rm ${D}/usr/sbin/keytab-lilo.pl
+}
diff --git a/packages/linux/linux-jlime-arm-2.6.17/.mtn2git_empty b/packages/linux/linux-jlime-arm-2.6.17/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/.mtn2git_empty
diff --git a/packages/linux/linux-jlime-arm-2.6.17/AsmArm-ArchSa1100-Jornada720.patch b/packages/linux/linux-jlime-arm-2.6.17/AsmArm-ArchSa1100-Jornada720.patch
new file mode 100644
index 0000000000..a1bc077242
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/AsmArm-ArchSa1100-Jornada720.patch
@@ -0,0 +1,40 @@
+--- linux-2.6.17/include/asm-arm/arch-sa1100/jornada720.h_orig 2006-07-02 23:42:42.000000000 +0000
++++ linux-2.6.17/include/asm-arm/arch-sa1100/jornada720.h 2006-07-02 23:50:32.000000000 +0000
+@@ -19,9 +19,37 @@
+ #define GPIO_JORNADA720_KEYBOARD_IRQ IRQ_GPIO0
+ #define GPIO_JORNADA720_MOUSE_IRQ IRQ_GPIO9
+
++/* Epson 1356 LCD controll parameters */
++#define REGISTER_OFFSET ((unsigned char *) 0xf00000000)
++#define DISP_MEM_OFFSET ((unsigned char *) 0xf10000000)
++#define DISP_MEM_OFFSET_PHYS ((unsigned char *) 0x482000000)
++
++#define MAX_BPP 16
++#define MAX_XRES 640
++#define MAX_YRES 240
++#define MIN_XRES 64
++#define MIN_YRES 64
++
++/* MCU COMMANDS */
++#define MCU_GetBatteryData 0xc0
++#define MCU_GetScanKeyCode 0x90
++#define MCU_GetTouchSamples 0xa0
++#define MCU_GetContrast 0xD0
++#define MCU_SetContrast 0xD1
++#define MCU_GetBrightness 0xD2
++#define MCU_SetBrightness 0xD3
++#define MCU_ContrastOff 0xD8
++#define MCU_BrightnessOff 0xD9
++#define MCU_PWMOFF 0xDF
++#define MCU_TxDummy 0x11
++#define MCU_ErrorCode 0x00
++
+ #ifndef __ASSEMBLY__
+
+ void jornada720_mcu_init(void);
++int jornada720_mcu_byte(int arg_data);
++int jornada720_mcu_start(int arg_data);
++voide jornada720_mcu_end(void);
+ void jornada_contrast(int arg_contrast);
+ void jornada720_battery(void);
+ int jornada720_getkey(unsigned char *data, int size);
diff --git a/packages/linux/linux-jlime-arm-2.6.17/Cpu-Sa1110-Jornada720.patch b/packages/linux/linux-jlime-arm-2.6.17/Cpu-Sa1110-Jornada720.patch
new file mode 100644
index 0000000000..c957971629
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/Cpu-Sa1110-Jornada720.patch
@@ -0,0 +1,32 @@
+--- linux-2.6.17/arch/arm/mach-sa1100/cpu-sa1110.c_orig 2006-07-02 20:44:56.000000000 +0000
++++ linux-2.6.17/arch/arm/mach-sa1100/cpu-sa1110.c 2006-07-02 20:50:11.000000000 +0000
+@@ -70,6 +70,17 @@
+ .cas_latency = 3,
+ };
+
++static struct sdram_params samsung_k4s281632b_1h __initdata = {
++ .rows = 12,
++ .tck = 10,
++ .trcd = 20,
++ .trp = 20,
++ .twr = 10,
++ .refresh = 64000,
++ .cas_latency = 3,
++ };
++
++
+ static struct sdram_params samsung_k4s641632d_tc75 __initdata = {
+ .rows = 14,
+ .tck = 9,
+@@ -349,6 +360,11 @@
+ if (machine_is_h3100())
+ sdram = &samsung_km416s4030ct;
+
++ #if 0
++ if (machine_is_jornada720())
++ sdram = &samsung_k4s281632b_1h;
++ #endif
++
+ if (sdram) {
+ printk(KERN_DEBUG "SDRAM: tck: %d trcd: %d trp: %d"
+ " twr: %d refresh: %d cas_latency: %d\n",
diff --git a/packages/linux/linux-jlime-arm-2.6.17/Kconfig-Arch-Jornada720.patch b/packages/linux/linux-jlime-arm-2.6.17/Kconfig-Arch-Jornada720.patch
new file mode 100644
index 0000000000..61784c4040
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/Kconfig-Arch-Jornada720.patch
@@ -0,0 +1,11 @@
+--- linux-2.6.17/arch/arm/Kconfig_orig 2006-07-02 20:41:49.000000000 +0000
++++ linux-2.6.17/arch/arm/Kconfig 2006-07-02 20:42:57.000000000 +0000
+@@ -669,7 +669,7 @@
+
+ config CPU_FREQ_SA1110
+ bool
+- depends on CPU_FREQ && (SA1100_ASSABET || SA1100_CERF || SA1100_PT_SYSTEM3)
++ depends on CPU_FREQ && (SA1100_ASSABET || SA1100_CERF || SA1100_PT_SYSTEM3 || SA1100_JORNADA720)
+ default y
+
+ config CPU_FREQ_INTEGRATOR
diff --git a/packages/linux/linux-jlime-arm-2.6.17/Kconfig-Keyboard-Jornada720.patch b/packages/linux/linux-jlime-arm-2.6.17/Kconfig-Keyboard-Jornada720.patch
new file mode 100644
index 0000000000..a66aec2e98
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/Kconfig-Keyboard-Jornada720.patch
@@ -0,0 +1,13 @@
+--- linux-2.6.17/drivers/input/keyboard/Kconfig_orig 2006-07-02 23:14:40.000000000 +0000
++++ linux-2.6.17/drivers/input/keyboard/Kconfig 2006-07-02 23:16:12.000000000 +0000
+@@ -183,4 +183,10 @@
+ This driver implements support for HIL-keyboards attached
+ to your machine, so normally you should say Y here.
+
++config KEYBOARD_JORNADA720
++ tristate "HP Jornada 720 Keyboard Support"
++ depends on SA110_JORNADA720
++ default y
++ help
++ Say yes here if you want Jornada 720 keyboard support.
+ endif
diff --git a/packages/linux/linux-jlime-arm-2.6.17/Kconfig-Touchscreen-Jornada720.patch b/packages/linux/linux-jlime-arm-2.6.17/Kconfig-Touchscreen-Jornada720.patch
new file mode 100644
index 0000000000..9b7fac44d5
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/Kconfig-Touchscreen-Jornada720.patch
@@ -0,0 +1,14 @@
+--- linux-2.6.17/drivers/input/touchscreen/Kconfig_orig 2006-07-02 23:31:00.000000000 +0000
++++ linux-2.6.17/drivers/input/touchscreen/Kconfig 2006-07-02 23:32:53.000000000 +0000
+@@ -108,4 +108,11 @@
+ To compile this driver as a module, choose M here: the
+ module will be called hp680_ts_input.
+
++config TOUCHSCREEN_JORNADA720
++ tristate "HP Jornada 720 touchscreen support"
++ depends on SA1100_JORNADA720
++ help
++ Say Y here if you are using a HP Jornada 710/720/728 handheld
++ and want to user the touchscreen.
++
+ endif
diff --git a/packages/linux/linux-jlime-arm-2.6.17/Kconfig-Video-Jornada720.patch b/packages/linux/linux-jlime-arm-2.6.17/Kconfig-Video-Jornada720.patch
new file mode 100644
index 0000000000..aafcb90ecc
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/Kconfig-Video-Jornada720.patch
@@ -0,0 +1,20 @@
+--- linux-2.6.17/drivers/video/Kconfig_orig 2006-07-02 23:34:29.000000000 +0000
++++ linux-2.6.17/drivers/video/Kconfig 2006-07-02 23:38:36.000000000 +0000
+@@ -613,6 +613,17 @@
+ framebuffer. Product specs at
+ <http://www.erd.epson.com/vdc/html/products.htm>.
+
++config FB_EPSON1356
++ bool "Epson 1356 framebuffer support"
++ depends on FB && ARM && SA1100_JORNADA720
++ select FB_CFB_FILLRECT
++ select FB_CFB_COPYAREA
++ select FB_CFB_IMAGEBLIT
++ select FB_SOFT_CURSOR
++ help
++ Support for the 1356 framebuffer device on the HP Jornada
++ 710/720/728 hanheld pc.
++
+ config FB_S1D13XXX
+ tristate "Epson S1D13XXX framebuffer support"
+ depends on FB
diff --git a/packages/linux/linux-jlime-arm-2.6.17/Mach-Sa1100-Jornada720.patch b/packages/linux/linux-jlime-arm-2.6.17/Mach-Sa1100-Jornada720.patch
new file mode 100644
index 0000000000..cbbb98f2bb
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/Mach-Sa1100-Jornada720.patch
@@ -0,0 +1,153 @@
+--- linux-2.6.17/arch/arm/mach-sa1100/jornada720.c_orig 2006-07-02 20:54:55.000000000 +0000
++++ linux-2.6.17/arch/arm/mach-sa1100/jornada720.c 2006-07-02 23:12:58.000000000 +0000
+@@ -22,11 +22,139 @@
+ #include <asm/mach/map.h>
+ #include <asm/mach/serial_sa1100.h>
+
++#include <linux/lcd.h>
++#include <linux/backlight.h>
++#include <linux/fb.h>
+ #include "generic.h"
+
+
+ #define JORTUCR_VAL 0x20000400
+
++/* Jornada 720 MCU functions */
++#define MCU_REVERSE(i) ((unsigned char)(((0x80 & i) >> 7) | ((0x40 & i) >> 5) \
++ | ((0x20 & i) >> 3) | ((0x10 & i) >> 1) | ((0x08 & i) << 1) \
++ | ((0x04 & i) << 3) | ((0x02 & i) << 5) | ((0x01 & i) << 7)))
++
++void jornada720_init_ser(void)
++{
++ int i;
++
++ GPSR = GPIO_GPIO25;
++ Ser4SSCR0 = 0x0307;
++ Ser4MCCR0 = 0;
++ Ser4SSCR1 = 0x18;
++ Ser4SSCR0 = 0x0387;
++ while (Ser4SSSR & SSSR_RNE)
++ i = Ser4SSDR;
++}
++
++int jornada720_mcu_byte(int arg_data)
++{
++ int i;
++
++ while ((Ser4SSSR & SSSR_TNF) == 0);
++ i = 0;
++ while ((GPLR & 0x400) && i++ < 400000);
++ /* wait for MCU */
++
++ if (i >= 400000) {
++ printk("jornada 720_mcu_byte: timed out\n");
++ return -1;
++ }
++ Ser4SSDR = MCU_rEVERSE(arg_data) << 8;
++ udelay(100);
++ while ((Ser4SSSR & SSSR_RNE) == 0);
++ i = Ser4SSDR;
++ if (i > 0xff)
++ printk("jornada720 mcu_byte: read %x\n". i):
++ return MCU_REVERSE(i & 0xff) & 0xff;
++}
++
++int jornada720_mcu_start(int arg_data)
++{
++ int i;
++
++ GPCR = GPIO_GPIO25; /* clear -> enable */
++ udelay(100);
++ i = jornada720_mcu_byte(arg_data);
++ if (i != MCU_TxDummy)
++ {
++ printk("jornada720_mcu_start: sent %x got %x\n", arg_data, i);
++ for (i = 0; i < 256; i++)
++ if (jornada720_mcu_read() == -1)
++ break;
++
++ jornada720_init_ser();
++ return -1;
++ }
++
++ return 0;
++}
++
++
++void jornada720_mcu_end(void)
++{
++ udelay(100);
++ GPSR = GPIO_GPIO25; /* set */
++}
++
++void jornada720_mcu_init(void)
++{
++
++ int i;
++
++ if (state) {
++ PPSR &= ~PPC_LDD1;
++ PPDR &= PPC_LDD1;
++ }
++ else {
++ PPSR |= PPC_LDD1;
++ }
++ return 0;
++}
++
++static int jornada720_backlight_get_power(struct backlight_device *bd)
++{
++
++ return ~(PPSR&PPC_LDD1);
++}
++
++static int jornada720_backlight_get_brightness(struct backlight_device *bd)
++{
++ int brightness;
++ jornada720_mcu_start(MCU_GetBrightness);
++ brightness = jornada720_mcu_read();
++ jornada720_mcu_end();
++ return brightness;
++}
++
++static int jornada720_backlight_set_brightness(struct backlight_device *bd)
++{
++ int brightness = 255 - value;
++ jornada720_mcu_start(MCU_SetBrightness);
++ jornada720_mcu_byte(brightness);
++ jornada720_mcu_end();
++ return 0;
++}
++
++static struct backlight_properties jornada720_backlight_properties = {
++ .owner = THIS_MODULE,
++ .set_power = jornada720_backlight_set_power,
++ .get_power = jornada720_backlight_get_power,
++ .get_brightness = jornada720_backlight_get_brightness,
++ .set_brightness = jornada720_backlight_set_brightness,
++ .max_brightness = 255,
++}
++
++static struct lcd_properties jornada 720_lcd_properties = {
++ .owner = THIS_MODULE,
++ .set_power = jornada720_lcd_set_power,
++ .get_power = jornada720_lcd_get_power,
++ .set_contrast = jornada720_lcd_set_contrast,
++ .get_contrast = jornada720_lcd_set_contrast,
++ .max_contrast = 255,
++}
++
+ static struct resource sa1111_resources[] = {
+ [0] = {
+ .start = 0x40000000,
+@@ -77,6 +205,10 @@
+ PPDR |= PPC_LDD3 | PPC_LDD4;
+
+ ret = platform_add_devices(devices, ARRAY_SIZE(devices));
++
++ jornada720_mcu_init();
++ backlight_device_register("e1356fb", 0, &jornada720_backlight_properties);
++ ldc_device_register("e1356fb", 0, &jornada720_lcd_properties);
+ }
+ return ret;
+ }
diff --git a/packages/linux/linux-jlime-arm-2.6.17/Makefile-Keyboard-Jornada720.patch b/packages/linux/linux-jlime-arm-2.6.17/Makefile-Keyboard-Jornada720.patch
new file mode 100644
index 0000000000..b1e2ab10e7
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/Makefile-Keyboard-Jornada720.patch
@@ -0,0 +1,8 @@
+--- linux-2.6.17/drivers/input/keyboard/Makefile_orig 2006-07-02 23:22:40.000000000 +0000
++++ linux-2.6.17/drivers/input/keyboard/Makefile 2006-07-02 23:23:03.000000000 +0000
+@@ -15,4 +15,4 @@
+ obj-$(CONFIG_KEYBOARD_SPITZ) += spitzkbd.o
+ obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
+ obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
+-
++obj-$(CONFIG_KEYBOARD_JORNADA720) += jornada720_kbd.o
diff --git a/packages/linux/linux-jlime-arm-2.6.17/Makefile-Touchscreen-Jornada720.patch b/packages/linux/linux-jlime-arm-2.6.17/Makefile-Touchscreen-Jornada720.patch
new file mode 100644
index 0000000000..deabd5cded
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/Makefile-Touchscreen-Jornada720.patch
@@ -0,0 +1,7 @@
+--- linux-2.6.17/drivers/input/touchscreen/Makefile_orig 2006-07-02 23:28:02.000000000 +0000
++++ linux-2.6.17/drivers/input/touchscreen/Makefile 2006-07-02 23:29:42.000000000 +0000
+@@ -12,3 +12,4 @@
+ obj-$(CONFIG_TOUCHSCREEN_MTOUCH) += mtouch.o
+ obj-$(CONFIG_TOUCHSCREEN_MK712) += mk712.o
+ obj-$(CONFIG_TOUCHSCREEN_HP600) += hp680_ts_input.o
++obj-$(CONFIG_TOUCHSCREEN_JORNADA720) += jornada720_ts.o
diff --git a/packages/linux/linux-jlime-arm-2.6.17/Makefile-Video-Jornada720.patch b/packages/linux/linux-jlime-arm-2.6.17/Makefile-Video-Jornada720.patch
new file mode 100644
index 0000000000..ae53cce9f3
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/Makefile-Video-Jornada720.patch
@@ -0,0 +1,10 @@
+--- linux-2.6.17/drivers/video/Makefile_orig 2006-07-02 23:39:37.000000000 +0000
++++ linux-2.6.17/drivers/video/Makefile 2006-07-02 23:40:15.000000000 +0000
+@@ -75,6 +75,7 @@
+ obj-$(CONFIG_FB_SUN3) += sun3fb.o
+ obj-$(CONFIG_FB_HIT) += hitfb.o
+ obj-$(CONFIG_FB_EPSON1355) += epson1355fb.o
++obj-$(CONFIG_FB_EPSON1356) += epson1356fb.o
+ obj-$(CONFIG_FB_PVR2) += pvr2fb.o
+ obj-$(CONFIG_FB_VOODOO1) += sstfb.o
+ obj-$(CONFIG_FB_ARMCLCD) += amba-clcd.o
diff --git a/packages/linux/linux-jlime-arm-2.6.17/Newfile-Epson1356fb.patch b/packages/linux/linux-jlime-arm-2.6.17/Newfile-Epson1356fb.patch
new file mode 100644
index 0000000000..7516f06dc9
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/Newfile-Epson1356fb.patch
@@ -0,0 +1,344 @@
+--- linux-2.6.17/drivers/video/epson1356fb.c_orig 2006-07-03 00:20:43.000000000 +0000
++++ linux-2.6.17/drivers/video/epson1356fb.c 2006-07-03 00:16:37.000000000 +0000
+@@ -0,0 +1,341 @@
++/*
++ * linux/drivers/video/epson1356fb.c -- Epson 1356 LCD Controller Frame Buffer Device
++ *
++ * Copyright (C) 2001 MIT
++ *
++ * Edited from sa1100fb.c
++ * Copyright (C) 1999 Eric A. Thomas
++ * Based on acornfb.c Copyright (C) Russell King.
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive
++ * for more details.
++ *
++ * 20050203: Ported to kernel 2.6. Very basic interface for the Jornada 720 (C) Alex Lange (chicken@handhelds.org)
++ *
++ */
++
++#include <linux/config.h>
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/errno.h>
++#include <linux/string.h>
++#include <linux/interrupt.h>
++#include <linux/slab.h>
++#include <linux/fb.h>
++#include <linux/delay.h>
++#include <linux/init.h>
++#include <linux/ioport.h>
++#include <linux/device.h>
++#include <linux/dma-mapping.h>
++
++#include <asm/uaccess.h>
++#include <asm/arch/jornada720.h>
++
++u32 pseudo_pal[16];
++
++struct fb_info fb_info;
++
++static int e1356fb_setcolreg(unsigned regno, unsigned red, unsigned green,
++ unsigned blue, unsigned transp,
++ struct fb_info *fb_info)
++{
++ int bpp, m = 0;
++
++ bpp = fb_info->var.bits_per_pixel;
++ m = (bpp <= 8) ? (1 << bpp) : 256;
++ if (regno >= m) {
++ printk("regno %d out of range (max %d)\n", regno, m);
++ return -EINVAL;
++ }
++ switch (bpp) {
++ case 8:
++ break;
++ case 16:
++ /* RGB 565 */
++ pseudo_pal[regno] = ((red & 0xF800) |
++ ((green & 0xFC00) >> 5) |
++ ((blue & 0xF800) >> 11));
++ break;
++ }
++
++ return 0;
++}
++
++static int e1356fb_blank(int blank, struct fb_info *info)
++{
++ switch (blank) {
++ case FB_BLANK_POWERDOWN:
++ case FB_BLANK_VSYNC_SUSPEND:
++ case FB_BLANK_HSYNC_SUSPEND:
++ case FB_BLANK_NORMAL:
++ PPSR &= ~PPC_LDD1;
++ PPDR |= PPC_LDD1;
++ break;
++
++ case FB_BLANK_UNBLANK:
++ PPSR |= PPC_LDD1;
++ mdelay(100);
++ }
++ return 0;
++}
++
++static struct fb_var_screeninfo e1356fb_screeninfo = {
++ .xres = 640,
++ .yres = 240,
++ .xres_virtual = 640,
++ .yres_virtual = 240,
++ .bits_per_pixel = 16,
++ .red.length = 5,
++ .green.length = 6,
++ .blue.length = 5,
++ .transp.length = 0,
++ .red.offset = 11,
++ .green.offset = 5,
++ .blue.offset = 0,
++ .transp.offset = 0,
++ .activate = FB_ACTIVATE_NOW,
++ .height = -1,
++ .width = -1,
++ .vmode = FB_VMODE_NONINTERLACED,
++ .accel_flags = 0,
++ .nonstd = 0,
++};
++
++static struct fb_ops e1356fb_ops = {
++ .owner = THIS_MODULE,
++ .fb_setcolreg = e1356fb_setcolreg,
++ .fb_fillrect = cfb_fillrect,
++ .fb_copyarea = cfb_copyarea,
++ .fb_imageblit = cfb_imageblit,
++ .fb_cursor = soft_cursor,
++ .fb_blank = e1356fb_blank,
++};
++
++static struct fb_fix_screeninfo e1356fb_fix = {
++ .id = "e1356fb",
++ .smem_len = (MAX_XRES * MAX_YRES * MAX_BPP)/8,
++ .smem_start = (unsigned long)DISP_MEM_OFFSET_PHYS,
++ .type = FB_TYPE_PACKED_PIXELS,
++ .visual = FB_VISUAL_TRUECOLOR,
++ .line_length = (640 * 16) / 8,
++ .accel = FB_ACCEL_NONE,
++ .type_aux = 0,
++ .ypanstep = 0,
++ .ywrapstep = 0,
++};
++
++unsigned char LUT8[256*3] = {
++ /* Primary and secondary colors */
++ 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x00, 0xA0, 0xA0,
++ 0xA0, 0x00, 0x00, 0xA0, 0x00, 0xA0, 0xA0, 0xA0, 0x00, 0xA0, 0xA0, 0xA0,
++ 0x50, 0x50, 0x50, 0x00, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x00, 0xF0, 0xF0,
++ 0xF0, 0x00, 0x00, 0xF0, 0x00, 0xF0, 0xF0, 0xF0, 0x00, 0xF0, 0xF0, 0xF0
++};
++
++static char lut_base[] = {
++ /*red green blue rinc ginc binc */
++ 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, /* Gray shades */
++ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, /* Black to red */
++ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, /* Black to green */
++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* Black to blue */
++ 0x00, 0x00, 0xF0, 0x00, 0x10, 0x00, /* Blue to cyan (blue and green) */
++ 0x00, 0xf0, 0xf0, 0x00, 0x00, -0x10, /* Cyan (blue and green) to green */
++ 0x00, 0xf0, 0x00, 0x10, 0x00, 0x00, /* Green to yellow (red and green)*/
++ 0xf0, 0xf0, 0x00, 0x00, -0x10, 0x00, /* Yellow (red and green) to red */
++ 0xf0, 0x00, 0x00, 0x00, 0x00, 0x10, /* Red to magenta (blue and red) */
++ 0xf0, 0x00, 0xf0, -0x10, 0x00, 0x00, /* Magenta (blue and red) to blue */
++ 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, /* Black to magenta (blue and red)*/
++ 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, /* Black to cyan (blue and green) */
++ 0xf0, 0x00, 0x00, 0x00, 0x10, 0x10, /* Red to white */
++ 0x00, 0xf0, 0x00, 0x10, 0x00, 0x10, /* Green to white */
++ 0x00, 0x00, 0xf0, 0x10, 0x10, 0x00, /* Blue to white */
++};
++
++void e1356fb_init_hardware(void)
++{
++ unsigned char *pRegs = REGISTER_OFFSET;
++ unsigned char *pLUT = LUT8;
++ unsigned char *pseed = lut_base;
++ unsigned char plast[3];
++ int i, j, rgb;
++
++ /* Enable access to SED1356 by setting memory/register select bit to 0. */
++ pRegs[0x001] = 0;
++ udelay(2);
++ /* Disable display outputs during initialization) */
++ pRegs[0x1FC] = 0;
++
++ /* Set the GPIOs to input. Should GPIO bits in register [004] get switched
++ then the GPIO outputs, according to register [008], are driven low. */
++ pRegs[0x004] = 0;
++ pRegs[0x008] = 0;
++
++ /* Program the LCD panel type and panel timing registers.
++ * The horizontal and vertical non-display times have been
++ * calculated for a 78 Hz frame rate.
++ * LCD PCLK
++ * FrameRate = -----------------------------
++ * (HDP + HNDP) * (VDP/2 + VNDP)
++ *
++ * 20,000,000
++ * = ---------------------------- = 78 Hz
++ * (640 + 256) * (480 / 2 + 45)
++ */
++
++ pRegs[0x10] = 0x1; /* Memory Clock Configuration Register */
++ pRegs[0x14] = 0x11; /* LCD Pixel Clock Configuration Register */
++ pRegs[0x18] = 0x1; /* CRT/TV Pixel Clock Configuration Register */
++ pRegs[0x1c] = 0x1; /* MediaPlug Clock Configuration Register */
++ pRegs[0x1e] = 0x1; /* CPU To Memory Wait State Select Register */
++ pRegs[0x20] = 0; /* Memory Configuration Register */
++ pRegs[0x21] = 0x45; /* DRAM Refresh Rate Register */
++ pRegs[0x2a] = 0x1; /* DRAM Timings Control Register 0 */
++ pRegs[0x2b] = 0x1; /* DRAM Timings Control Register 1 */
++ pRegs[0x30] = 0x1c; /* Panel Type Register */
++ pRegs[0x31] = 0; /* MOD Rate Register */
++ pRegs[0x32] = 0x4f; /* LCD Horizontal Display Width Register */
++ pRegs[0x34] = 0x7; /* LCD Horizontal Non-Display Period Register */
++ pRegs[0x35] = 0x1; /* TFT FPLINE Start Position Register */
++ pRegs[0x36] = 0xb; /* TFT FPLINE Pulse Width Register */
++ pRegs[0x38] = 0xef; /* LCD Vertical Display Height Register 0 */
++ pRegs[0x39] = 0; /* LCD Vertical Display Height Register 1 */
++ pRegs[0x3a] = 0x13; /* LCD Vertical Non-Display Period Register */
++ pRegs[0x3b] = 0xb; /* TFT FPFRAME Start Position Register */
++ pRegs[0x3c] = 0x1; /* TFT FPFRAME Pulse Width Register */
++ pRegs[0x40] = 0x5; /* LCD Display Mode Register */
++ pRegs[0x41] = 0; /* LCD Miscellaneous Register */
++ pRegs[0x42] = 0; /* LCD Display Start Address Register 0 */
++ pRegs[0x43] = 0; /* LCD Display Start Address Register 1 */
++ pRegs[0x44] = 0; /* LCD Display Start Address Register 2 */
++ pRegs[0x46] = 0x80; /* LCD Memory Address Offset Register 0 */
++ pRegs[0x47] = 0x2; /* LCD Memory Address Offset Register 1 */
++ pRegs[0x48] = 0; /* LCD Pixel Panning Register */
++ pRegs[0x4a] = 0; /* LCD Display FIFO High Threshold Control Register */
++ pRegs[0x4b] = 0; /* LCD Display FIFO Low Threshold Control Register */
++ pRegs[0x50] = 0x4f; /* CRT/TV Horizontal Display Width Register */
++ pRegs[0x52] = 0x13; /* CRT/TV Horizontal Non-Display Period Register */
++ pRegs[0x53] = 0x1; /* CRT/TV HRTC Start Position Register */
++ pRegs[0x54] = 0xb; /* CRT/TV HRTC Pulse Width Register */
++ pRegs[0x56] = 0xdf; /* CRT/TV Vertical Display Height Register 0 */
++ pRegs[0x57] = 0x1; /* CRT/TV Vertical Display Height Register 1 */
++ pRegs[0x58] = 0x2b; /* CRT/TV Vertical Non-Display Period Register */
++ pRegs[0x59] = 0x9; /* CRT/TV VRTC Start Position Register */
++ pRegs[0x5a] = 0x1; /* CRT/TV VRTC Pulse Width Register */
++ pRegs[0x5b] = 0x10; /* TV Output Control Register */
++ pRegs[0x60] = 0x3; /* CRT/TV Display Mode Register */
++ pRegs[0x62] = 0; /* CRT/TV Display Start Address Register 0 */
++ pRegs[0x63] = 0; /* CRT/TV Display Start Address Register 1 */
++ pRegs[0x64] = 0; /* CRT/TV Display Start Address Register 2 */
++ pRegs[0x66] = 0x40; /* CRT/TV Memory Address Offset Register 0 */
++ pRegs[0x67] = 0x1; /* CRT/TV Memory Address Offset Register 1 */
++ pRegs[0x68] = 0; /* CRT/TV Pixel Panning Register */
++ pRegs[0x6a] = 0; /* CRT/TV Display FIFO High Threshold Control Register */
++ pRegs[0x6b] = 0; /* CRT/TV Display FIFO Low Threshold Control Register */
++ pRegs[0x70] = 0; /* LCD Ink/Cursor Control Register */
++ pRegs[0x71] = 0x1; /* LCD Ink/Cursor Start Address Register */
++ pRegs[0x72] = 0; /* LCD Cursor X Position Register 0 */
++ pRegs[0x73] = 0; /* LCD Cursor X Position Register 1 */
++ pRegs[0x74] = 0; /* LCD Cursor Y Position Register 0 */
++ pRegs[0x75] = 0; /* LCD Cursor Y Position Register 1 */
++ pRegs[0x76] = 0; /* LCD Ink/Cursor Blue Color 0 Register */
++ pRegs[0x77] = 0; /* LCD Ink/Cursor Green Color 0 Register */
++ pRegs[0x78] = 0; /* LCD Ink/Cursor Red Color 0 Register */
++ pRegs[0x7a] = 0x1f; /* LCD Ink/Cursor Blue Color 1 Register */
++ pRegs[0x7b] = 0x3f; /* LCD Ink/Cursor Green Color 1 Register */
++ pRegs[0x7c] = 0x1f; /* LCD Ink/Cursor Red Color 1 Register */
++ pRegs[0x7e] = 0; /* LCD Ink/Cursor FIFO Threshold Register */
++ pRegs[0x80] = 0; /* CRT/TV Ink/Cursor Control Register */
++ pRegs[0x81] = 0x1; /* CRT/TV Ink/Cursor Start Address Register */
++ pRegs[0x82] = 0; /* CRT/TV Cursor X Position Register 0 */
++ pRegs[0x83] = 0; /* CRT/TV Cursor X Position Register 1 */
++ pRegs[0x84] = 0; /* CRT/TV Cursor Y Position Register 0 */
++ pRegs[0x85] = 0; /* CRT/TV Cursor Y Position Register 1 */
++ pRegs[0x86] = 0; /* CRT/TV Ink/Cursor Blue Color 0 Register */
++ pRegs[0x87] = 0; /* CRT/TV Ink/Cursor Green Color 0 Register */
++ pRegs[0x88] = 0; /* CRT/TV Ink/Cursor Red Color 0 Register */
++ pRegs[0x8a] = 0x1f; /* CRT/TV Ink/Cursor Blue Color 1 Register */
++ pRegs[0x8b] = 0x3f; /* CRT/TV Ink/Cursor Green Color 1 Register */
++ pRegs[0x8c] = 0x1f; /* CRT/TV Ink/Cursor Red Color 1 Register */
++ pRegs[0x8e] = 0; /* CRT/TV Ink/Cursor FIFO Threshold Register */
++
++ /* Set the 2D acceleration (BitBLT) registers to a known state */
++ for (i = 0x100; i <= 0x119; i++)
++ if (i != 0x107 && i != 0x10b && i != 0x10e && i != 0x10f && i != 0x117)
++ pRegs[i] = 0x00;
++
++ /* Program the look-up table to a known state. */
++ pRegs[0x1E0] = 0x01; /* Enable the LCD LUT for read/write. */
++ pRegs[0x1E2] = 0; /* Reset the LUT address. */
++ for (i = 0; i < 16 * 3; i++)
++ pRegs[0x1E4] = *pLUT++; /* non-regular color template */
++
++ for (i = 0; i < 15; i++) {
++ for (rgb = 0; rgb < 3; rgb++) {
++ plast[rgb] = *pseed++; /* base color value */
++ pRegs[0x1E4] = plast[rgb];
++ }
++ for (j = 0; j < 15; j++)
++ for (rgb = 0; rgb < 3; rgb++) {
++ plast[rgb] += pseed[rgb]; /* increment through color values*/
++ pRegs[0x1E4] = plast[rgb];
++ }
++ pseed += 3;
++ }
++
++ pRegs[0x1e4] = 0; /* Look-Up Table Data Register */
++ pRegs[0x1f0] = 0; /* Power Save Configuration Register */
++ pRegs[0x1f1] = 0; /* Power Save Status Register */
++ pRegs[0x1f4] = 0; /* CPU-to-Memory Access Watchdog Timer Register */
++
++ PPSR |= PPC_LDD0;
++
++ mdelay(100); /* Wait for 100ms */
++ pRegs[0x1F0] = 0; /* Turn off power save mode */
++ pRegs[0x1F4] = 0; /* Disable the watchdog timer */
++ pRegs[0x1FC] = 0x01; /* Disable power save mode, enable display */
++}
++
++int __init e1356fb_init(void)
++{
++ if (fb_get_options("e1356fb", NULL))
++ return -ENODEV;
++
++ printk("Configuring the Jornada 720 screen...\n");
++
++ fb_info.screen_base = (u_char *) DISP_MEM_OFFSET;
++ fb_info.screen_size = ALLOCATED_FB_MEM_SIZE;
++ memset(&fb_info.var, 0, sizeof(fb_info.var));
++
++ PPSR &= ~(PPC_LDD0 | PPC_LDD1 | PPC_LDD2);
++ PPDR |= PPC_LDD0 | PPC_LDD1 | PPC_LDD2;
++ LCCR3 = 0;
++ LCCR2 = 0;
++ LCCR1 = 0;
++ LCCR0 = 0;
++ DBAR1 = 0;
++ DBAR2 = 0;
++
++ e1356fb_init_hardware();
++ memset ((unsigned char *)DISP_MEM_OFFSET, 0, ALLOCATED_FB_MEM_SIZE);
++
++ PPSR |= PPC_LDD1;
++ mdelay(100); /* delay again */
++ PPSR |= PPC_LDD2;
++
++ fb_info.fbops = &e1356fb_ops;
++ fb_info.var = e1356fb_screeninfo;
++ fb_info.fix = e1356fb_fix;
++ fb_info.flags = FBINFO_DEFAULT;
++
++ fb_info.pseudo_palette = &pseudo_pal;
++
++ if (register_framebuffer(&fb_info) < 0)
++ return 1;
++
++ return 0;
++}
++
++module_init(e1356fb_init);
++
diff --git a/packages/linux/linux-jlime-arm-2.6.17/Newfile-Jornada720_kbd.patch b/packages/linux/linux-jlime-arm-2.6.17/Newfile-Jornada720_kbd.patch
new file mode 100644
index 0000000000..d75cc7cd85
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/Newfile-Jornada720_kbd.patch
@@ -0,0 +1,100 @@
+--- linux-2.6.17/drivers/input/keyboard/jornada720_kbd.c_orig 2006-07-03 00:18:52.000000000 +0000
++++ linux-2.6.17/drivers/input/keyboard/jornada720_kbd.c 2006-07-03 00:16:36.000000000 +0000
+@@ -0,0 +1,97 @@
++/*
++ * Jornada 720 keyboard interface
++ */
++
++#include <linux/input.h>
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/delay.h>
++#include <linux/slab.h>
++#include <linux/errno.h>
++#include <linux/interrupt.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/jornada720.h>
++#include <asm/irq.h>
++#include <asm/mach/irq.h>
++
++MODULE_AUTHOR("Alex Lange <chicken@handhelds.org>");
++MODULE_DESCRIPTION("Jornada 720 keyboard driver");
++MODULE_LICENSE("GPL");
++
++static char jornada720_kbd_name[] = "Jornada 720 keyboard";
++
++static struct input_dev dev;
++
++static unsigned char jornada720_normal_keymap[128] = {
++ 0, 1, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 87, KEY_VOLUMEUP, KEY_VOLUMEDOWN, KEY_MUTE,
++ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 0, 0,
++ 0, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 43, 14, 0, 0, 0,
++ 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, KEY_LEFTBRACE, KEY_RIGHTBRACE, 0, 0, 0,
++ 0, 44, 45, 46, 47, 48, 49, 50, 51, 52, KEY_KPMINUS, 40, 28, 0, 0, 0,
++ 0, 15, 0, 42, 0, 40, 0, 0, 0, 0, 103, 0, 54, 0, 0, 0,
++ 0, 0, 0, 0, 0, 56, KEY_GRAVE, 0, 0, 105, 108, 106, 0, 0, 0, 0,
++ 0, 55, 29, 0, 57, 0, 0, 0, 53, 111, 0, 0, 0, 0, 0, 116,
++};
++
++static irqreturn_t jornada720_keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++{
++ int key, keycode;
++ int count, mcu_data=0;
++
++ jornada720_mcu_start(MCU_GetScanKeyCode);
++ count = jornada720_mcu_read();
++
++ while (count-- > 0) {
++ key = mcu_data = jornada720_mcu_read();
++
++ if (key > 128)
++ key = key - 128;
++
++ keycode = jornada720_normal_keymap[key];
++
++ if (mcu_data < 128) {
++ input_report_key(&dev, keycode, 1);
++ input_sync(&dev);
++ }
++ else {
++ input_report_key(&dev, keycode, 0);
++ input_sync(&dev);
++ }
++ }
++
++ jornada720_mcu_end();
++
++ return IRQ_HANDLED;
++}
++
++static int __init jornada720_kbd_init(void)
++{
++ int i;
++ printk("jorada720_kbd: Jornada 720 keyboard\n");
++
++ init_input_dev(&dev);
++ dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
++ dev.keybit[LONG(KEY_SUSPEND)] |= BIT(KEY_SUSPEND);
++
++ for ( i=0 ; i<=128 ; i++ ) {
++ if (!(jornada720_normal_keymap[i])) {
++ }
++ else
++ set_bit(jornada720_normal_keymap[i], dev.keybit);
++ }
++
++ dev.name = jornada720_kbd_name;
++
++ if (request_irq(GPIO_JORNADA720_KEYBOARD_IRQ, jornada720_keyboard_interrupt, SA_INTERRUPT, "Jornada720 Keyboard", NULL))
++ printk("Unable to grab Jornada 720 keyboard IRQ!\n");
++
++ set_irq_type(GPIO_JORNADA720_KEYBOARD_IRQ, IRQT_FALLING);
++
++ input_register_device(&dev);
++
++ return 0;
++}
++
++module_init(jornada720_kbd_init);
diff --git a/packages/linux/linux-jlime-arm-2.6.17/Newfile-Jornada720_ts.patch b/packages/linux/linux-jlime-arm-2.6.17/Newfile-Jornada720_ts.patch
new file mode 100644
index 0000000000..6cfab690f3
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/Newfile-Jornada720_ts.patch
@@ -0,0 +1,106 @@
+--- linux-2.6.17/drivers/input/touchscreen/jornada720_ts.c_orig 2006-07-03 00:17:18.000000000 +0000
++++ linux-2.6.17/drivers/input/touchscreen/jornada720_ts.c 2006-07-03 00:16:37.000000000 +0000
+@@ -0,0 +1,103 @@
++/*
++ * Jornada 720 touchscreen interface based on Jornada 56x interface
++ */
++
++#include <linux/input.h>
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/delay.h>
++#include <linux/slab.h>
++#include <linux/errno.h>
++#include <linux/interrupt.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/jornada720.h>
++#include <asm/irq.h>
++#include <asm/mach/irq.h>
++
++MODULE_AUTHOR("Alex Lange <chicken@handhelds.org>");
++MODULE_DESCRIPTION("Jornada 720 touchscreen driver");
++MODULE_LICENSE("GPL");
++
++static char jornada720_ts_name[] = "Jornada 720 touchscreen";
++
++static struct input_dev dev;
++
++static irqreturn_t jornada720_mouse_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++{
++ int down;
++ int X[3], Y[3], high_x, high_y, x, y;
++
++ udelay(1);
++
++ down = ( (GPLR & GPIO_JORNADA720_MOUSE) == 0);
++
++ if(!down) {
++ input_report_key(&dev, BTN_TOUCH, down); /* report a pen up */
++ input_report_abs(&dev, ABS_PRESSURE, 0);
++ input_sync(&dev);
++ return IRQ_HANDLED;
++ }
++
++ /* read x & y data from mcu interface and pass it on */
++
++ jornada720_mcu_start(MCU_GetTouchSamples);
++ X[0] = jornada720_mcu_read();
++ X[1] = jornada720_mcu_read();
++ X[2] = jornada720_mcu_read();
++ Y[0] = jornada720_mcu_read();
++ Y[1] = jornada720_mcu_read();
++ Y[2] = jornada720_mcu_read();
++ high_x = jornada720_mcu_read(); /* msbs of samples */
++ high_y = jornada720_mcu_read();
++ jornada720_mcu_end();
++
++ X[0] |= (high_x & 3) << 8;
++ X[1] |= (high_x & 0xc) << 6;
++ X[2] |= (high_x & 0x30) << 4;
++
++ Y[0] |= (high_y & 3) << 8;
++ Y[1] |= (high_y & 0xc) << 6;
++ Y[2] |= (high_y & 0x30) << 4;
++
++ /* simple averaging filter */
++ x = (X[0] + X[1] + X[2])/3;
++ y = (Y[0] + Y[1] + Y[2])/3;
++
++ input_report_key(&dev, BTN_TOUCH, down);
++ input_report_abs(&dev, ABS_X, x);
++ input_report_abs(&dev, ABS_Y, y);
++ input_report_abs(&dev, ABS_PRESSURE, 1);
++ input_sync(&dev);
++
++ return IRQ_HANDLED;
++
++}
++
++static int __init jornada720_ts_init(void)
++{
++ printk("jornada720_ts: Jornada 720 touchscreen\n");
++
++ init_input_dev(&dev);
++ dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
++ dev.absbit[0] = BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);
++ dev.keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH);
++
++ dev.absmin[ABS_X] = 270; dev.absmin[ABS_Y] = 180;
++ dev.absmax[ABS_X] = 3900; dev.absmax[ABS_Y] = 3700;
++
++ dev.name = jornada720_ts_name;
++
++ if (request_irq(GPIO_JORNADA720_MOUSE_IRQ, jornada720_mouse_interrupt, SA_INTERRUPT, "Jornada720 Mouse", NULL))
++ printk("Unable to grab Jornada 720 touchscreen IRQ!\n");
++
++ set_irq_type(GPIO_JORNADA720_MOUSE_IRQ, IRQT_RISING);
++
++ input_register_device(&dev);
++
++ return 0;
++}
++
++module_init(jornada720_ts_init);
++
diff --git a/packages/linux/linux-jlime-arm-2.6.17/defconf_jlime b/packages/linux/linux-jlime-arm-2.6.17/defconf_jlime
new file mode 100644
index 0000000000..d5daef4e31
--- /dev/null
+++ b/packages/linux/linux-jlime-arm-2.6.17/defconf_jlime
@@ -0,0 +1,1028 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.17
+# Mon Jul 3 00:55:03 2006
+#
+CONFIG_ARM=y
+CONFIG_MMU=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+# CONFIG_IKCONFIG_PROC is not set
+CONFIG_RELAY=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLK_DEV_IO_TRACE=y
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_IOP3XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+CONFIG_ARCH_SA1100=y
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_AT91RM9200 is not set
+CONFIG_DMABOUNCE=y
+
+#
+# SA11x0 Implementations
+#
+# CONFIG_SA1100_ASSABET is not set
+# CONFIG_SA1100_CERF is not set
+# CONFIG_SA1100_COLLIE is not set
+# CONFIG_SA1100_H3100 is not set
+# CONFIG_SA1100_H3600 is not set
+# CONFIG_SA1100_H3800 is not set
+# CONFIG_SA1100_BADGE4 is not set
+CONFIG_SA1100_JORNADA720=y
+# CONFIG_SA1100_HACKKIT is not set
+# CONFIG_SA1100_LART is not set
+# CONFIG_SA1100_PLEB is not set
+# CONFIG_SA1100_SHANNON is not set
+# CONFIG_SA1100_SIMPAD is not set
+# CONFIG_SA1100_SSP is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_SA1100=y
+CONFIG_CPU_32v4=y
+CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_CACHE_V4WB=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WB=y
+
+#
+# Processor Features
+#
+CONFIG_SA1111=y
+CONFIG_FORCE_MAX_ZONEORDER=9
+
+#
+# Bus support
+#
+CONFIG_ISA=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+# CONFIG_I82365 is not set
+# CONFIG_TCIC is not set
+# CONFIG_PCMCIA_SA1100 is not set
+CONFIG_PCMCIA_SA1111=y
+
+#
+# Kernel Features
+#
+# CONFIG_PREEMPT is not set
+# CONFIG_NO_IDLE_HZ is not set
+CONFIG_HZ=100
+# CONFIG_AEABI is not set
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_NODES_SHIFT=2
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE=""
+# CONFIG_XIP_KERNEL is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+# CONFIG_FPE_NWFPE is not set
+CONFIG_FPE_FASTFPE=y
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+CONFIG_ARTHUR=y
+
+#
+# Power management options
+#
+CONFIG_PM=y
+CONFIG_PM_LEGACY=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_APM=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_NETDEBUG=y
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+CONFIG_NET_KEY=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_MULTIPLE_TABLES is not set
+# CONFIG_IP_ROUTE_MULTIPATH is not set
+# CONFIG_IP_ROUTE_VERBOSE is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+CONFIG_ARPD=y
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=y
+CONFIG_INET_ESP=y
+CONFIG_INET_IPCOMP=y
+CONFIG_INET_XFRM_TUNNEL=y
+CONFIG_INET_TUNNEL=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+# CONFIG_IRNET is not set
+# CONFIG_IRCOMM is not set
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_SA1100_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+# CONFIG_BT_RFCOMM is not set
+CONFIG_BT_BNEP=m
+# CONFIG_BT_BNEP_MC_FILTER is not set
+# CONFIG_BT_BNEP_PROTO_FILTER is not set
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUART=m
+# CONFIG_BT_HCIUART_H4 is not set
+# CONFIG_BT_HCIUART_BCSP is not set
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+# CONFIG_BT_HCIVHCI is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+# CONFIG_IEEE80211_CRYPT_CCMP is not set
+# CONFIG_IEEE80211_CRYPT_TKIP is not set
+# CONFIG_IEEE80211_SOFTMAC is not set
+CONFIG_WIRELESS_EXT=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_FW_LOADER=y
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
+# CONFIG_ISAPNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_NET_SB1000 is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+# CONFIG_NET_WIRELESS_RTNETLINK is not set
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_ARLAN is not set
+# CONFIG_WAVELAN is not set
+CONFIG_PCMCIA_WAVELAN=m
+CONFIG_PCMCIA_NETWAVE=m
+
+#
+# Wireless 802.11 Frequency Hopping cards support
+#
+# CONFIG_PCMCIA_RAYCS is not set
+
+#
+# Wireless 802.11b ISA/PCI cards support
+#
+CONFIG_HERMES=m
+CONFIG_ATMEL=m
+
+#
+# Wireless 802.11b Pcmcia/Cardbus cards support
+#
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_PCMCIA_WL3501=m
+CONFIG_HOSTAP=m
+# CONFIG_HOSTAP_FIRMWARE is not set
+CONFIG_HOSTAP_CS=m
+CONFIG_NET_WIRELESS=y
+
+#
+# PCMCIA network device support
+#
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_TSDEV=y
+CONFIG_INPUT_TSDEV_SCREEN_X=640
+CONFIG_INPUT_TSDEV_SCREEN_Y=240
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+CONFIG_TOUCHSCREEN_JORNADA720=y
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_SA1111 is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_SA1100 is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=16
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+# CONFIG_MCP_SA11X0 is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_MACMODES is not set
+CONFIG_FB_FIRMWARE_EDID=y
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+# CONFIG_FB_SA1100 is not set
+CONFIG_FB_EPSON1356=y
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_VGACON_SOFT_SCROLLBACK is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE is not set
+
+#
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_LCD_DEVICE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+CONFIG_AUTOFS_FS=y
+CONFIG_AUTOFS4_FS=y
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+# CONFIG_NFSD_V3 is not set
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=y
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=y
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=y
+CONFIG_NLS_CODEPAGE_1251=y
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=y
+CONFIG_NLS_ISO8859_3=y
+CONFIG_NLS_ISO8859_4=y
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_FS=y
+CONFIG_FRAME_POINTER=y
+# CONFIG_UNWIND_INFO is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
diff --git a/packages/linux/linux-jlime-arm_2.6.17.bb b/packages/linux/linux-jlime-arm_2.6.17.bb
index c6d9ba8877..5db9de0d6e 100644
--- a/packages/linux/linux-jlime-arm_2.6.17.bb
+++ b/packages/linux/linux-jlime-arm_2.6.17.bb
@@ -1,14 +1,26 @@
SECTION = "kernel"
-DESCRIPTION = "Linux kernel for Hitachi SH3 based Jornada 6xx"
+DESCRIPTION = "JLime Linux kernel for Arm based Jornada 7xx"
LICENSE = "GPL"
PR = "r0"
-COMPATIBLE_HOST = "sh.*-linux"
-COMPATIBLE_MACHINE = 'jornada6xx'
+COMPATIBLE_HOST = "arm.*-linux"
+COMPATIBLE_MACHINE = 'jornada7xx'
-SRC_URI = "http://www.jlime.com/downloads/Releases/donkey/kernels/6xx/sources/jlime-2.6.16.20-patched.tar.gz \
- file://defconfig_jlime \
- file://unexpected-int-fix.patch;patch=1"
+SRC_URI = "http://www.kernel.orgm/pub/linux/kernel/v2.6/linux-2.6.17.tar.gz \
+ file://defconf_jlime \
+ file://AsmArm-ArchSa1100-Jornada720.patch;patch=0 \
+ file://Cpu-Sa1110-Jornada720.patch;patch=0 \
+ file://Kconfig-Arch-Jornada720.patch;patch=0 \
+ file://Kconfig-Keyboard-Jornada720.patch;patch=0\
+ file://Kconfig-Touchscreen-Jornada720.patch;patch=0 \
+ file://Kconfig-Video-Jornada720.patch;patch=0 \
+ file://Mach-Sa1100-Jornada720.patch;patch=0 \
+ file://Makefile-Keyboard-Jornada720.patch;patch=0 \
+ file://Makefile-Touchscreen-Jornada720.patch;patch=0 \
+ file://Makefile-Video-Jornada720.patch;patch=0 \
+ file://Newfile-Epson1356fb.patch;patch=0 \
+ file://Newfile-Jornada720_kbd.patch;patch=0 \
+ file://Newfile-Jornada720_ts.patch;patch=0"
S = "${WORKDIR}/linux-${PV}"
@@ -17,7 +29,7 @@ inherit kernel
#Lets let 3.4.x handle the compilation of this one
KERNEL_CCSUFFIX = "-3.4.4"
-ARCH = "sh"
+ARCH = "arm"
KERNEL_IMAGETYPE = "zImage"
FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
diff --git a/packages/mplayer/files/pld-onlyarm5.patch b/packages/mplayer/files/pld-onlyarm5.patch
new file mode 100644
index 0000000000..3b8c576439
--- /dev/null
+++ b/packages/mplayer/files/pld-onlyarm5.patch
@@ -0,0 +1,405 @@
+--- MPlayer-1.0pre8/libavcodec/armv4l/dsputil_arm_s.S.orig 2006-07-03 09:53:33.000000000 +0100
++++ MPlayer-1.0pre8/libavcodec/armv4l/dsputil_arm_s.S 2006-07-03 10:06:58.000000000 +0100
+@@ -16,6 +16,13 @@
+ @ License along with this library; if not, write to the Free Software
+ @ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ @
++#if defined(__ARM_ARCH_5__) || \
++ defined(__ARM_ARCH_5T__) || \
++ defined(__ARM_ARCH_5TE__)
++#define PLD(code...) code
++#else
++#define PLD(code...)
++#endif
+
+ .macro ADJ_ALIGN_QUADWORD_D shift, Rd0, Rd1, Rd2, Rd3, Rn0, Rn1, Rn2, Rn3, Rn4
+ mov \Rd0, \Rn0, lsr #(\shift * 8)
+@@ -74,7 +81,7 @@
+ put_pixels16_arm:
+ @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+ @ block = word aligned, pixles = unaligned
+- pld [r1]
++ PLD ( pld [r1] )
+ stmfd sp!, {r4-r11, lr} @ R14 is also called LR
+ adr r5, 5f
+ ands r4, r1, #3
+@@ -85,7 +92,7 @@
+ ldmia r1, {r4-r7}
+ add r1, r1, r2
+ stmia r0, {r4-r7}
+- pld [r1]
++ PLD ( pld [r1] )
+ subs r3, r3, #1
+ add r0, r0, r2
+ bne 1b
+@@ -95,7 +102,7 @@
+ ldmia r1, {r4-r8}
+ add r1, r1, r2
+ ADJ_ALIGN_QUADWORD_D 1, r9, r10, r11, r12, r4, r5, r6, r7, r8
+- pld [r1]
++ PLD ( pld [r1] )
+ subs r3, r3, #1
+ stmia r0, {r9-r12}
+ add r0, r0, r2
+@@ -106,7 +113,7 @@
+ ldmia r1, {r4-r8}
+ add r1, r1, r2
+ ADJ_ALIGN_QUADWORD_D 2, r9, r10, r11, r12, r4, r5, r6, r7, r8
+- pld [r1]
++ PLD ( pld [r1] )
+ subs r3, r3, #1
+ stmia r0, {r9-r12}
+ add r0, r0, r2
+@@ -117,7 +124,7 @@
+ ldmia r1, {r4-r8}
+ add r1, r1, r2
+ ADJ_ALIGN_QUADWORD_D 3, r9, r10, r11, r12, r4, r5, r6, r7, r8
+- pld [r1]
++ PLD ( pld [r1] )
+ subs r3, r3, #1
+ stmia r0, {r9-r12}
+ add r0, r0, r2
+@@ -136,7 +143,7 @@
+ put_pixels8_arm:
+ @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+ @ block = word aligned, pixles = unaligned
+- pld [r1]
++ PLD ( pld [r1] )
+ stmfd sp!, {r4-r5,lr} @ R14 is also called LR
+ adr r5, 5f
+ ands r4, r1, #3
+@@ -147,7 +154,7 @@
+ ldmia r1, {r4-r5}
+ add r1, r1, r2
+ subs r3, r3, #1
+- pld [r1]
++ PLD ( pld [r1] )
+ stmia r0, {r4-r5}
+ add r0, r0, r2
+ bne 1b
+@@ -157,7 +164,7 @@
+ ldmia r1, {r4-r5, r12}
+ add r1, r1, r2
+ ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r12
+- pld [r1]
++ PLD ( pld [r1] )
+ subs r3, r3, #1
+ stmia r0, {r4-r5}
+ add r0, r0, r2
+@@ -168,7 +175,7 @@
+ ldmia r1, {r4-r5, r12}
+ add r1, r1, r2
+ ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r12
+- pld [r1]
++ PLD ( pld [r1] )
+ subs r3, r3, #1
+ stmia r0, {r4-r5}
+ add r0, r0, r2
+@@ -179,7 +186,7 @@
+ ldmia r1, {r4-r5, r12}
+ add r1, r1, r2
+ ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r12
+- pld [r1]
++ PLD ( pld [r1] )
+ subs r3, r3, #1
+ stmia r0, {r4-r5}
+ add r0, r0, r2
+@@ -198,7 +205,7 @@
+ put_pixels8_x2_arm:
+ @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+ @ block = word aligned, pixles = unaligned
+- pld [r1]
++ PLD ( pld [r1] )
+ stmfd sp!, {r4-r10,lr} @ R14 is also called LR
+ adr r5, 5f
+ ands r4, r1, #3
+@@ -210,7 +217,7 @@
+ ldmia r1, {r4-r5, r10}
+ add r1, r1, r2
+ ADJ_ALIGN_DOUBLEWORD_D 1, r6, r7, r4, r5, r10
+- pld [r1]
++ PLD ( pld [r1] )
+ RND_AVG32 r8, r9, r4, r5, r6, r7, r12
+ subs r3, r3, #1
+ stmia r0, {r8-r9}
+@@ -223,7 +230,7 @@
+ add r1, r1, r2
+ ADJ_ALIGN_DOUBLEWORD_D 1, r6, r7, r4, r5, r10
+ ADJ_ALIGN_DOUBLEWORD_D 2, r8, r9, r4, r5, r10
+- pld [r1]
++ PLD ( pld [r1] )
+ RND_AVG32 r4, r5, r6, r7, r8, r9, r12
+ subs r3, r3, #1
+ stmia r0, {r4-r5}
+@@ -236,7 +243,7 @@
+ add r1, r1, r2
+ ADJ_ALIGN_DOUBLEWORD_D 2, r6, r7, r4, r5, r10
+ ADJ_ALIGN_DOUBLEWORD_D 3, r8, r9, r4, r5, r10
+- pld [r1]
++ PLD ( pld [r1] )
+ RND_AVG32 r4, r5, r6, r7, r8, r9, r12
+ subs r3, r3, #1
+ stmia r0, {r4-r5}
+@@ -248,7 +255,7 @@
+ ldmia r1, {r4-r5, r10}
+ add r1, r1, r2
+ ADJ_ALIGN_DOUBLEWORD_D 3, r6, r7, r4, r5, r10
+- pld [r1]
++ PLD ( pld [r1] )
+ RND_AVG32 r8, r9, r6, r7, r5, r10, r12
+ subs r3, r3, #1
+ stmia r0, {r8-r9}
+@@ -267,7 +274,7 @@
+ put_no_rnd_pixels8_x2_arm:
+ @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+ @ block = word aligned, pixles = unaligned
+- pld [r1]
++ PLD ( pld [r1] )
+ stmfd sp!, {r4-r10,lr} @ R14 is also called LR
+ adr r5, 5f
+ ands r4, r1, #3
+@@ -279,7 +286,7 @@
+ ldmia r1, {r4-r5, r10}
+ add r1, r1, r2
+ ADJ_ALIGN_DOUBLEWORD_D 1, r6, r7, r4, r5, r10
+- pld [r1]
++ PLD ( pld [r1] )
+ NO_RND_AVG32 r8, r9, r4, r5, r6, r7, r12
+ subs r3, r3, #1
+ stmia r0, {r8-r9}
+@@ -292,7 +299,7 @@
+ add r1, r1, r2
+ ADJ_ALIGN_DOUBLEWORD_D 1, r6, r7, r4, r5, r10
+ ADJ_ALIGN_DOUBLEWORD_D 2, r8, r9, r4, r5, r10
+- pld [r1]
++ PLD ( pld [r1] )
+ NO_RND_AVG32 r4, r5, r6, r7, r8, r9, r12
+ subs r3, r3, #1
+ stmia r0, {r4-r5}
+@@ -305,7 +312,7 @@
+ add r1, r1, r2
+ ADJ_ALIGN_DOUBLEWORD_D 2, r6, r7, r4, r5, r10
+ ADJ_ALIGN_DOUBLEWORD_D 3, r8, r9, r4, r5, r10
+- pld [r1]
++ PLD ( pld [r1] )
+ NO_RND_AVG32 r4, r5, r6, r7, r8, r9, r12
+ subs r3, r3, #1
+ stmia r0, {r4-r5}
+@@ -317,7 +324,7 @@
+ ldmia r1, {r4-r5, r10}
+ add r1, r1, r2
+ ADJ_ALIGN_DOUBLEWORD_D 3, r6, r7, r4, r5, r10
+- pld [r1]
++ PLD ( pld [r1] )
+ NO_RND_AVG32 r8, r9, r6, r7, r5, r10, r12
+ subs r3, r3, #1
+ stmia r0, {r8-r9}
+@@ -338,7 +345,7 @@
+ put_pixels8_y2_arm:
+ @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+ @ block = word aligned, pixles = unaligned
+- pld [r1]
++ PLD ( pld [r1] )
+ stmfd sp!, {r4-r11,lr} @ R14 is also called LR
+ adr r5, 5f
+ ands r4, r1, #3
+@@ -352,13 +359,13 @@
+ add r1, r1, r2
+ 6: ldmia r1, {r6-r7}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ RND_AVG32 r8, r9, r4, r5, r6, r7, r12
+ ldmia r1, {r4-r5}
+ add r1, r1, r2
+ stmia r0, {r8-r9}
+ add r0, r0, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ RND_AVG32 r8, r9, r6, r7, r4, r5, r12
+ subs r3, r3, #1
+ stmia r0, {r8-r9}
+@@ -369,18 +376,18 @@
+ 2:
+ ldmia r1, {r4-r6}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
+ 6: ldmia r1, {r7-r9}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 1, r7, r8, r9
+ RND_AVG32 r10, r11, r4, r5, r7, r8, r12
+ stmia r0, {r10-r11}
+ add r0, r0, r2
+ ldmia r1, {r4-r6}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
+ subs r3, r3, #1
+ RND_AVG32 r10, r11, r7, r8, r4, r5, r12
+@@ -392,18 +399,18 @@
+ 3:
+ ldmia r1, {r4-r6}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
+ 6: ldmia r1, {r7-r9}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 2, r7, r8, r9
+ RND_AVG32 r10, r11, r4, r5, r7, r8, r12
+ stmia r0, {r10-r11}
+ add r0, r0, r2
+ ldmia r1, {r4-r6}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
+ subs r3, r3, #1
+ RND_AVG32 r10, r11, r7, r8, r4, r5, r12
+@@ -415,18 +422,18 @@
+ 4:
+ ldmia r1, {r4-r6}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
+ 6: ldmia r1, {r7-r9}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 3, r7, r8, r9
+ RND_AVG32 r10, r11, r4, r5, r7, r8, r12
+ stmia r0, {r10-r11}
+ add r0, r0, r2
+ ldmia r1, {r4-r6}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
+ subs r3, r3, #1
+ RND_AVG32 r10, r11, r7, r8, r4, r5, r12
+@@ -447,7 +454,7 @@
+ put_no_rnd_pixels8_y2_arm:
+ @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+ @ block = word aligned, pixles = unaligned
+- pld [r1]
++ PLD ( pld [r1] )
+ stmfd sp!, {r4-r11,lr} @ R14 is also called LR
+ adr r5, 5f
+ ands r4, r1, #3
+@@ -461,13 +468,13 @@
+ add r1, r1, r2
+ 6: ldmia r1, {r6-r7}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ NO_RND_AVG32 r8, r9, r4, r5, r6, r7, r12
+ ldmia r1, {r4-r5}
+ add r1, r1, r2
+ stmia r0, {r8-r9}
+ add r0, r0, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ NO_RND_AVG32 r8, r9, r6, r7, r4, r5, r12
+ subs r3, r3, #1
+ stmia r0, {r8-r9}
+@@ -478,18 +485,18 @@
+ 2:
+ ldmia r1, {r4-r6}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
+ 6: ldmia r1, {r7-r9}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 1, r7, r8, r9
+ NO_RND_AVG32 r10, r11, r4, r5, r7, r8, r12
+ stmia r0, {r10-r11}
+ add r0, r0, r2
+ ldmia r1, {r4-r6}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
+ subs r3, r3, #1
+ NO_RND_AVG32 r10, r11, r7, r8, r4, r5, r12
+@@ -501,18 +508,18 @@
+ 3:
+ ldmia r1, {r4-r6}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
+ 6: ldmia r1, {r7-r9}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 2, r7, r8, r9
+ NO_RND_AVG32 r10, r11, r4, r5, r7, r8, r12
+ stmia r0, {r10-r11}
+ add r0, r0, r2
+ ldmia r1, {r4-r6}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
+ subs r3, r3, #1
+ NO_RND_AVG32 r10, r11, r7, r8, r4, r5, r12
+@@ -524,18 +531,18 @@
+ 4:
+ ldmia r1, {r4-r6}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
+ 6: ldmia r1, {r7-r9}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 3, r7, r8, r9
+ NO_RND_AVG32 r10, r11, r4, r5, r7, r8, r12
+ stmia r0, {r10-r11}
+ add r0, r0, r2
+ ldmia r1, {r4-r6}
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
+ subs r3, r3, #1
+ NO_RND_AVG32 r10, r11, r7, r8, r4, r5, r12
+@@ -562,7 +569,7 @@
+ ldmia r1, {r8-r10}
+ .endif
+ add r1, r1, r2
+- pld [r1]
++ PLD ( pld [r1] )
+ .if \align == 0
+ ADJ_ALIGN_DOUBLEWORD_D 1, r4, r5, r6, r7, r8
+ .elseif \align == 1
+@@ -624,7 +631,7 @@
+ put_pixels8_xy2_arm:
+ @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+ @ block = word aligned, pixles = unaligned
+- pld [r1]
++ PLD ( pld [r1] )
+ stmfd sp!, {r4-r11,lr} @ R14 is also called LR
+ adrl r12, 5f
+ ands r4, r1, #3
+@@ -661,7 +668,7 @@
+ put_no_rnd_pixels8_xy2_arm:
+ @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+ @ block = word aligned, pixles = unaligned
+- pld [r1]
++ PLD ( pld [r1] )
+ stmfd sp!, {r4-r11,lr} @ R14 is also called LR
+ adrl r12, 5f
+ ands r4, r1, #3
diff --git a/packages/mplayer/mplayer_1.0pre8.bb b/packages/mplayer/mplayer_1.0pre8.bb
index 9c66221f57..18b3ce1bd4 100644
--- a/packages/mplayer/mplayer_1.0pre8.bb
+++ b/packages/mplayer/mplayer_1.0pre8.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Open Source multimedia player."
SECTION = "opie/multimedia"
PRIORITY = "optional"
HOMEPAGE = "http://www.mplayerhq.hu/"
-DEPENDS = "virtual/libsdl libmad zlib libpng jpeg mplayer-common"
+DEPENDS = "virtual/libsdl libmad zlib libpng jpeg libungif liba52 fontconfig alsa-lib lzo ncurses mplayer-common"
RDEPENDS = "mplayer-common"
LICENSE = "GPL"
SRC_URI = "http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-${PV}.tar.bz2 \
@@ -15,12 +15,13 @@ SRC_URI = "http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-${PV}.tar.bz2 \
file://w100-video_out.patch;patch=1 \
file://w100-mplayer.patch;patch=1 \
file://libmpdemux-ogg-include.patch;patch=1 \
- file://libmpcodecs-ogg-include.patch;patch=1"
+ file://libmpcodecs-ogg-include.patch;patch=1 \
+ file://pld-onlyarm5.patch;patch=1"
MAINTAINER="Graeme Gregory <dp@xora.org.uk>"
RCONFLICTS_${PN} = "mplayer-atty"
RREPLACES_${PN} = "mplayer-atty"
-PR = "r0"
+PR = "r1"
PARALLEL_MAKE = ""
@@ -46,17 +47,126 @@ EXTRA_OECONF = " \
--disable-linux-devfs \
--disable-lirc \
--disable-lircc \
+ --disable-joystick \
+ --disable-vm \
+ --disable-xf86keysym \
--disable-tv \
+ --disable-tv-v4l \
+ --disable-tv-v4l2 \
+ --disable-tv-bsdbt848 \
--enable-rtc \
+ --enable-network \
+ --disable-winsock2 \
--disable-smb \
+ --disable-live \
+ --disable-dvdread \
+ --disable-mpdvdkit \
+ --disable-cdparanoia \
+ --disable-freetype \
+ --enable-fontconfig \
+ --disable-unrarlib \
+ --disable-menu \
+ --enable-sortsub \
+ --disable-fribidi \
+ --disable-enca \
+ --disable-macosx \
+ --disable-macosx-finder-support \
+ --disable-macosx-bundle \
+ --disable-ftp \
+ --disable-vstream \
+ \
+ --enable-gif \
+ --enable-png \
+ --enable-jpeg \
+ --disable-libcdio \
+ --enable-liblzo \
--disable-win32 \
+ --disable-dshow \
+ --disable-qtx \
+ --disable-xanim \
+ --disable-real \
+ --disable-xvid \
+ --disable-x264 \
+ --disable-divx4linux \
+ --disable-opendivx \
+ \
+ --disable-libavutil_so \
+ --disable-libavcodec_so \
+ --disable-libavformat_so \
+ --disable-libpostproc_so \
+ --disable-libfame \
\
--enable-tremor-low \
+ \
+ --disable-speex \
+ --disable-theora \
+ --disable-external-faad \
+ --disable-faac \
+ --disable-ladspa \
+ --disable-libdv \
+ --enable-mad \
+ --disable-toolame \
+ --disable-twolame \
+ --disable-xmms \
--disable-mp3lib \
+ --disable-libdts \
+ --enable-libmpeg2 \
+ --disable-musepack \
+ --disable-amr_nb \
+ --disable-amr_nb-fixed \
+ --disable-amr_wb \
\
- --disable-x11 \
+ --disable-internal-vidix \
+ --disable-external-vidix \
+ --disable-gl \
+ --disable-dga \
+ --disable-vesa \
+ --disable-svga \
--enable-sdl \
- --enable-fbdev "
+ --disable-aa \
+ --disable-caca \
+ --disable-ggi \
+ --disable-ggiwmh \
+ --disable-directx \
+ --disable-dxr2 \
+ --disable-dxr3 \
+ --disable-dvb \
+ --disable-dvbhead \
+ --disable-mga \
+ --disable-xmga \
+ --disable-xv \
+ --disable-xvmc \
+ --disable-vm \
+ --disable-xinerama \
+ --disable-x11 \
+ --enable-fbdev \
+ --disable-mlib \
+ --disable-3dfx \
+ --disable-tdfxfb \
+ --disable-s3fb \
+ --disable-directfb \
+ --disable-zr \
+ --disable-bl \
+ --disable-tdfxvid \
+ --disable-tga \
+ --disable-pnm \
+ --disable-md5sum \
+ \
+ --enable-alsa \
+ --enable-ossaudio \
+ --disable-arts \
+ --disable-esd \
+ --disable-polyp \
+ --disable-jack \
+ --disable-openal \
+ --disable-nas \
+ --disable-sgiaudio \
+ --disable-sunaudio \
+ --disable-win32waveout \
+ --enable-select \
+ \
+ --disable-runtime-cpudetection \
+ "
EXTRA_OECONF_append_c7x0 = " --enable-w100 "
diff --git a/packages/psmisc/files/.mtn2git_empty b/packages/psmisc/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/psmisc/files/.mtn2git_empty
diff --git a/packages/psmisc/psmisc-21.8/libintl-link.patch b/packages/psmisc/files/libintl-link.patch
index d9cdd90d71..d9cdd90d71 100644
--- a/packages/psmisc/psmisc-21.8/libintl-link.patch
+++ b/packages/psmisc/files/libintl-link.patch
diff --git a/packages/psmisc/psmisc.inc b/packages/psmisc/psmisc.inc
new file mode 100644
index 0000000000..31647c7b4b
--- /dev/null
+++ b/packages/psmisc/psmisc.inc
@@ -0,0 +1,42 @@
+LICENSE = "GPL"
+DESCRIPTION = "procfs tools"
+SECTION = "base"
+PRIORITY = "required"
+MAINTAINER = "Greg Gilbert <greg@treke.net>"
+DEPENDS = "ncurses virtual/libintl"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz \
+ file://libintl-link.patch;patch=1"
+S = "${WORKDIR}/psmisc-${PV}"
+
+inherit autotools gettext
+
+ALLOW_EMPTY = "1"
+
+PACKAGES = "${PN} fuser fuser-doc \
+ killall killall-doc \
+ pstree pstree-doc"
+
+FILES_${PN} = ""
+RDEPENDS_${PN} = "fuser killall pstree"
+
+FILES_fuser = "${bindir}/fuser"
+FILES_fuser-doc = "${mandir}/man1/fuser*"
+
+FILES_killall = "${bindir}/killall.${PN}"
+FILES_killall-doc = "${mandir}/man1/killall*"
+
+FILES_pstree = "${bindir}/pstree"
+FILES_pstree-doc = "${mandir}/man1/pstree*"
+
+do_install_append() {
+ mv ${D}${bindir}/killall ${D}${bindir}/killall.${PN}
+}
+
+pkg_postinst_killall() {
+ update-alternatives --install ${bindir}/killall killall killall.${PN} 90
+}
+
+pkg_postrm_killall() {
+ update-alternatives --remove ${bindir}/killall killall.${PN}
+}
diff --git a/packages/psmisc/psmisc_21.8.bb b/packages/psmisc/psmisc_21.8.bb
index f7d6828a94..085ee18a77 100644
--- a/packages/psmisc/psmisc_21.8.bb
+++ b/packages/psmisc/psmisc_21.8.bb
@@ -1,44 +1,3 @@
-LICENSE = "GPL"
-DESCRIPTION = "procfs tools"
-SECTION = "base"
-PRIORITY = "required"
-MAINTAINER = "Greg Gilbert <greg@treke.net>"
-DEPENDS = "ncurses virtual/libintl"
+include psmisc.inc
PR = "r1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz \
- file://signames-header-fix.patch;patch=1 \
- file://libintl-link.patch;patch=1"
-S = "${WORKDIR}/psmisc-${PV}"
-
-inherit autotools gettext
-
-ALLOW_EMPTY = "1"
-
-PACKAGES = "${PN} fuser fuser-doc \
- killall killall-doc \
- pstree pstree-doc"
-
-FILES_${PN} = ""
-RDEPENDS_${PN} = "fuser killall pstree"
-
-FILES_fuser = "${bindir}/fuser"
-FILES_fuser-doc = "${mandir}/man1/fuser*"
-
-FILES_killall = "${bindir}/killall.${PN}"
-FILES_killall-doc = "${mandir}/man1/killall*"
-
-FILES_pstree = "${bindir}/pstree"
-FILES_pstree-doc = "${mandir}/man1/pstree*"
-
-do_install_append() {
- mv ${D}${bindir}/killall ${D}${bindir}/killall.${PN}
-}
-
-pkg_postinst_killall() {
- update-alternatives --install ${bindir}/killall killall killall.${PN} 90
-}
-
-pkg_postrm_killall() {
- update-alternatives --remove ${bindir}/killall killall.${PN}
-}
+SRC_URI += "file://signames-header-fix.patch;patch=1"
diff --git a/packages/psmisc/psmisc_22.2.bb b/packages/psmisc/psmisc_22.2.bb
new file mode 100644
index 0000000000..6bf1780582
--- /dev/null
+++ b/packages/psmisc/psmisc_22.2.bb
@@ -0,0 +1,2 @@
+include psmisc.inc
+PR = "r0"
diff --git a/packages/strace/strace-4.5.14/sh-syscall-update.patch b/packages/strace/strace-4.5.14/sh-syscall-update.patch
new file mode 100644
index 0000000000..15102934e7
--- /dev/null
+++ b/packages/strace/strace-4.5.14/sh-syscall-update.patch
@@ -0,0 +1,268 @@
+--- strace/linux/sh/syscallent.h 2006/07/03 04:32:27 1.1
++++ strace/linux/sh/syscallent.h 2006/07/03 05:29:55
+@@ -46,7 +46,7 @@
+ { 1, 0, sys_time, "time" }, /* 13 */
+ { 3, TF, sys_mknod, "mknod" }, /* 14 */
+ { 2, TF, sys_chmod, "chmod" }, /* 15 */
+- { 3, TF, sys_chown, "lchown" }, /* 16 */
++ { 3, TF, sys_chown, "lchown" }, /* 16 */
+ { 0, 0, sys_break, "break" }, /* 17 */
+ { 2, TF, sys_oldstat, "oldstat" }, /* 18 */
+ { 3, TD, sys_lseek, "lseek" }, /* 19 */
+@@ -229,109 +229,157 @@
+ { 2, TF, sys_stat64, "stat64" }, /* 195 */
+ { 2, TF, sys_lstat64, "lstat64" }, /* 196 */
+ { 2, TD, sys_fstat64, "fstat64" }, /* 197 */
+-/*TODO*/{ 3, TF, printargs, "lchown32" }, /* 198 */
+-/*TODO*/{ 0, 0, printargs, "getuid32" }, /* 199 */
++ { 3, TF, sys_chown, "lchown32" }, /* 198 */
++ { 0, 0, sys_getuid, "getuid32" }, /* 199 */
+
+- { 0, 0, printargs, "getgid32" }, /* 200 */
+- { 0, 0, printargs, "geteuid32" }, /* 201 */
+- { 0, 0, printargs, "getegid32" }, /* 202 */
+- { 2, 0, printargs, "setreuid32" }, /* 203 */
+- { 2, 0, printargs, "setregid32" }, /* 204 */
+- { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */
+- { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */
+- { 3, 0, printargs, "fchown32" }, /* 207 */
+- { 3, 0, printargs, "setresuid32" }, /* 208 */
+- { 3, 0, printargs, "getresuid32" }, /* 209 */
+- { 3, 0, printargs, "setresgid32" }, /* 210 */
+- { 3, 0, printargs, "getsetgid32" }, /* 211 */
+- { 3, TF, printargs, "chown32" }, /* 212 */
+- { 1, 0, printargs, "setuid32" }, /* 213 */
+- { 1, 0, printargs, "setgid32" }, /* 214 */
+- { 1, 0, printargs, "setfsuid32" }, /* 215 */
+- { 1, 0, printargs, "setfsgid32" }, /* 216 */
++ { 0, 0, sys_getgid, "getgid32" }, /* 200 */
++ { 0, 0, sys_geteuid, "geteuid32" }, /* 201 */
++ { 0, 0, sys_getegid, "getegid32" }, /* 202 */
++ { 2, 0, sys_setreuid, "setreuid32" }, /* 203 */
++ { 2, 0, sys_setregid, "setregid32" }, /* 204 */
++ { 2, 0, sys_getgroups, "getgroups32" }, /* 205 */
++ { 2, 0, sys_setgroups, "setgroups32" }, /* 206 */
++ { 3, 0, sys_fchown, "fchown32" }, /* 207 */
++ { 3, 0, sys_setresuid, "setresuid32" }, /* 208 */
++ { 3, 0, sys_getresuid, "getresuid32" }, /* 209 */
++ { 3, 0, sys_setresgid, "setresgid32" }, /* 210 */
++ { 3, 0, sys_getresgid, "getsetgid32" }, /* 211 */
++ { 3, TF, sys_chown, "chown32" }, /* 212 */
++ { 1, 0, sys_setuid, "setuid32" }, /* 213 */
++ { 1, 0, sys_setgid, "setgid32" }, /* 214 */
++ { 1, 0, sys_setfsuid, "setfsuid32" }, /* 215 */
++ { 1, 0, sys_setfsgid, "setfsgid32" }, /* 216 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */
+- { 3, 0, printargs, "mincore" }, /* 218 */
++ { 3, 0, sys_mincore, "mincore" }, /* 218 */
+ { 3, 0, sys_madvise, "madvise" }, /* 219 */
+- { 4, 0, printargs, "getdents64" }, /* 220 */
++ { 4, 0, sys_getdents64, "getdents64" }, /* 220 */
+ { 3, TD, sys_fcntl, "fcntl64" }, /* 221 */
+ { 4, 0, printargs, "SYS_222" }, /* 222 */
+- { 4, 0, printargs, "SYS_223" }, /* 223 */
+- { 4, 0, printargs, "SYS_224" }, /* 224 */
+- { 5, 0, printargs, "SYS_225" }, /* 225 */
+- { 5, 0, printargs, "SYS_226" }, /* 226 */
+- { 5, 0, printargs, "SYS_227" }, /* 227 */
+- { 5, 0, printargs, "SYS_228" }, /* 228 */
+- { 5, 0, printargs, "SYS_229" }, /* 229 */
+-
+- { 8, 0, printargs, "socket_subcall"}, /* 230 */
+- { 3, TN, sys_socket, "socket" }, /* 231 */
+- { 3, TN, sys_bind, "bind" }, /* 232 */
+- { 3, TN, sys_connect, "connect" }, /* 233 */
+- { 2, TN, sys_listen, "listen" }, /* 234 */
+- { 3, TN, sys_accept, "accept" }, /* 235 */
+- { 3, TN, sys_getsockname, "getsockname" }, /* 236 */
+- { 3, TN, sys_getpeername, "getpeername" }, /* 237 */
+- { 4, TN, sys_socketpair, "socketpair" }, /* 238 */
+- { 4, TN, sys_send, "send" }, /* 239 */
+- { 4, TN, sys_recv, "recv" }, /* 240 */
+- { 6, TN, sys_sendto, "sendto" }, /* 241 */
+- { 6, TN, sys_recvfrom, "recvfrom" }, /* 242 */
+- { 2, TN, sys_shutdown, "shutdown" }, /* 243 */
+- { 5, TN, sys_setsockopt, "setsockopt" }, /* 244 */
+- { 5, TN, sys_getsockopt, "getsockopt" }, /* 245 */
+- { 5, TN, sys_sendmsg, "sendmsg" }, /* 246 */
+- { 5, TN, sys_recvmsg, "recvmsg" }, /* 247 */
+- { 5, 0, printargs, "SYS_248" }, /* 248 */
+- { 5, 0, printargs, "SYS_249" }, /* 249 */
+-
+- { 4, 0, printargs, "ipc_subcall" }, /* 250 */
+- { 4, TI, sys_semop, "semop" }, /* 251 */
+- { 4, TI, sys_semget, "semget" }, /* 252 */
+- { 4, TI, sys_semctl, "semctl" }, /* 253 */
+- { 4, 0, printargs, "ipc_subcall" }, /* 254 */
+- { 4, 0, printargs, "ipc_subcall" }, /* 255 */
+- { 4, 0, printargs, "ipc_subcall" }, /* 256 */
+- { 4, 0, printargs, "ipc_subcall" }, /* 257 */
+- { 4, 0, printargs, "ipc_subcall" }, /* 258 */
+- { 4, 0, printargs, "ipc_subcall" }, /* 259 */
+- { 4, 0, printargs, "ipc_subcall" }, /* 260 */
+- { 4, TI, sys_msgsnd, "msgsnd" }, /* 261 */
+- { 4, TI, sys_msgrcv, "msgrcv" }, /* 262 */
+- { 4, TI, sys_msgget, "msgget" }, /* 263 */
+- { 4, TI, sys_msgctl, "msgctl" }, /* 264 */
+- { 4, 0, printargs, "ipc_subcall" }, /* 265 */
+- { 4, 0, printargs, "ipc_subcall" }, /* 266 */
+- { 4, 0, printargs, "ipc_subcall" }, /* 267 */
+- { 4, 0, printargs, "ipc_subcall" }, /* 268 */
+- { 4, 0, printargs, "ipc_subcall" }, /* 269 */
+- { 4, 0, printargs, "ipc_subcall" }, /* 270 */
+- { 4, TI, sys_shmat, "shmat" }, /* 271 */
+- { 4, TI, sys_shmdt, "shmdt" }, /* 272 */
+- { 4, TI, sys_shmget, "shmget" }, /* 273 */
+- { 4, TI, sys_shmctl, "shmctl" }, /* 274 */
+- { 5, 0, printargs, "SYS_275" }, /* 275 */
+- { 5, 0, printargs, "SYS_276" }, /* 276 */
+- { 5, 0, printargs, "SYS_277" }, /* 277 */
+- { 5, 0, printargs, "SYS_278" }, /* 278 */
+- { 5, 0, printargs, "SYS_279" }, /* 279 */
+-
+- { 8, 0, printargs, "socket_subcall"}, /* 280 */
+- { 3, TN, sys_socket, "socket" }, /* 281 */
+- { 3, TN, sys_bind, "bind" }, /* 282 */
+- { 3, TN, sys_connect, "connect" }, /* 283 */
+- { 2, TN, sys_listen, "listen" }, /* 284 */
+- { 3, TN, sys_accept, "accept" }, /* 285 */
+- { 3, TN, sys_getsockname, "getsockname" }, /* 286 */
+- { 3, TN, sys_getpeername, "getpeername" }, /* 287 */
+- { 4, TN, sys_socketpair, "socketpair" }, /* 288 */
+- { 4, TN, sys_send, "send" }, /* 289 */
+- { 4, TN, sys_recv, "recv" }, /* 290 */
+- { 6, TN, sys_sendto, "sendto" }, /* 291 */
+- { 6, TN, sys_recvfrom, "recvfrom" }, /* 292 */
+- { 2, TN, sys_shutdown, "shutdown" }, /* 293 */
+- { 5, TN, sys_setsockopt, "setsockopt" }, /* 294 */
+- { 5, TN, sys_getsockopt, "getsockopt" }, /* 295 */
+- { 5, TN, sys_sendmsg, "sendmsg" }, /* 296 */
+- { 5, TN, sys_recvmsg, "recvmsg" }, /* 297 */
++ { 5, 0, printargs, "SYS_223" }, /* 223 */
++ { 0, 0, printargs, "gettid" }, /* 224 */
++ { 4, TD, sys_readahead, "readahead" }, /* 225 */
++ { 5, TF, sys_setxattr, "setxattr" }, /* 226 */
++ { 5, TF, sys_setxattr, "lsetxattr" }, /* 227 */
++ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 228 */
++ { 4, TF, sys_getxattr, "getxattr" }, /* 229 */
++ { 4, TF, sys_getxattr, "lgetxattr" }, /* 230 */
++ { 4, 0, sys_fgetxattr, "fgetxattr" }, /* 231 */
++ { 3, TF, sys_listxattr, "listxattr" }, /* 232 */
++ { 3, TF, sys_listxattr, "llistxattr" }, /* 233 */
++ { 3, 0, sys_flistxattr, "flistxattr" }, /* 234 */
++ { 2, TF, sys_removexattr, "removexattr" }, /* 235 */
++ { 2, TF, sys_removexattr, "lremovexattr" }, /* 236 */
++ { 2, 0, sys_fremovexattr, "fremovexattr" }, /* 237 */
++ { 2, TS, sys_kill, "tkill" }, /* 238 */
++ { 4, TF, sys_sendfile64, "sendfile64" }, /* 239 */
++ { 5, 0, sys_futex, "futex" }, /* 240 */
++ { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 241 */
++ { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 242 */
++ { 1, 0, printargs, "set_thread_area" }, /* 243 */
++ { 1, 0, printargs, "get_thread_area" }, /* 244 */
++ { 2, 0, sys_io_setup, "io_setup" }, /* 245 */
++ { 1, 0, sys_io_destroy, "io_destroy" }, /* 246 */
++ { 5, 0, sys_io_getevents, "io_getevents" }, /* 247 */
++ { 3, 0, sys_io_submit, "io_submit" }, /* 248 */
++ { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */
++ { 5, 0, sys_fadvise64, "fadvise64" }, /* 250 */
++ { 5, 0, printargs, "SYS_251" }, /* 251 */
++ { 1, TP, sys_exit, "exit_group" }, /* 252 */
++ { 4, 0, printargs, "lookup_dcookie"}, /* 253 */
++ { 1, 0, sys_epoll_create, "epoll_create" }, /* 254 */
++ { 4, 0, sys_epoll_ctl, "epoll_ctl" }, /* 255 */
++ { 4, 0, sys_epoll_wait, "epoll_wait" }, /* 256 */
++ { 5, 0, sys_remap_file_pages, "remap_file_pages"}, /* 257 */
++ { 1, 0, printargs, "set_tid_address"}, /* 258 */
++ { 3, 0, sys_timer_create, "timer_create" }, /* 259 */
++ { 4, 0, sys_timer_settime, "timer_settime" }, /* 260 */
++ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 261 */
++ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 262 */
++ { 1, 0, sys_timer_delete, "timer_delete" }, /* 263 */
++ { 2, 0, sys_clock_settime, "clock_settime" }, /* 264 */
++ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 265 */
++ { 2, 0, sys_clock_getres, "clock_getres" }, /* 266 */
++ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 267 */
++ { 3, TF, sys_statfs64, "statfs64" }, /* 268 */
++ { 3, 0, sys_fstatfs64, "fstatfs64" }, /* 269 */
++ { 3, TS, sys_tgkill, "tgkill" }, /* 270 */
++ { 2, TF, sys_utimes, "utimes" }, /* 271 */
++ { 6, 0, sys_fadvise64_64, "fadvise64_64" }, /* 272 */
++ { 5, 0, printargs, "vserver" }, /* 273 */
++ { 5, 0, printargs, "mbind" }, /* 274 */
++ { 5, 0, printargs, "get_mempolicy" }, /* 275 */
++ { 5, 0, printargs, "set_mempolicy" }, /* 276 */
++ { 4, 0, sys_mq_open, "mq_open" }, /* 277 */
++ { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 278 */
++ { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 279 */
++ { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 280 */
++ { 2, 0, sys_mq_notify, "mq_notify" }, /* 281 */
++ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 282 */
++ { 5, 0, printargs, "sys_kexec_load"}, /* 283 */
++ { 5, TP, sys_waitid, "waitid" }, /* 284 */
++ { 5, 0, printargs, "add_key" }, /* 285 */
++ { 5, 0, printargs, "request_key" }, /* 286 */
++ { 5, 0, printargs, "keyctl" }, /* 287 */
++ { 5, 0, printargs, "ioprio_set" }, /* 288 */
++ { 5, 0, printargs, "ioprio_get" }, /* 289 */
++ { 5, 0, printargs, "inotify_init" }, /* 290 */
++ { 5, 0, printargs, "inotify_add_watch" }, /* 291 */
++ { 5, 0, printargs, "inotify_rm_watch" }, /* 292 */
++ { 5, 0, printargs, "SYS_293" }, /* 293 */
++ { 5, 0, printargs, "SYS_294" }, /* 294 */
++ { 5, 0, printargs, "SYS_295" }, /* 295 */
++ { 5, 0, printargs, "SYS_296" }, /* 296 */
++ { 5, 0, printargs, "SYS_297" }, /* 297 */
+ { 5, 0, printargs, "SYS_298" }, /* 298 */
+ { 5, 0, printargs, "SYS_299" }, /* 299 */
++
++#if SYS_socket_subcall != 300
++ #error fix me
++#endif
++ { 8, 0, printargs, "socket_subcall"}, /* 300 */
++ { 3, TN, sys_socket, "socket" }, /* 301 */
++ { 3, TN, sys_bind, "bind" }, /* 302 */
++ { 3, TN, sys_connect, "connect" }, /* 303 */
++ { 2, TN, sys_listen, "listen" }, /* 304 */
++ { 3, TN, sys_accept, "accept" }, /* 305 */
++ { 3, TN, sys_getsockname, "getsockname" }, /* 306 */
++ { 3, TN, sys_getpeername, "getpeername" }, /* 307 */
++ { 4, TN, sys_socketpair, "socketpair" }, /* 308 */
++ { 4, TN, sys_send, "send" }, /* 309 */
++ { 4, TN, sys_recv, "recv" }, /* 310 */
++ { 6, TN, sys_sendto, "sendto" }, /* 311 */
++ { 6, TN, sys_recvfrom, "recvfrom" }, /* 312 */
++ { 2, TN, sys_shutdown, "shutdown" }, /* 313 */
++ { 5, TN, sys_setsockopt, "setsockopt" }, /* 314 */
++ { 5, TN, sys_getsockopt, "getsockopt" }, /* 315 */
++ { 5, TN, sys_sendmsg, "sendmsg" }, /* 316 */
++ { 5, TN, sys_recvmsg, "recvmsg" }, /* 317 */
++
++#if SYS_ipc_subcall != 318
++ #error fix me
++#endif
++ { 4, 0, printargs, "ipc_subcall" }, /* 318 */
++ { 4, TI, sys_semop, "semop" }, /* 319 */
++ { 4, TI, sys_semget, "semget" }, /* 320 */
++ { 4, TI, sys_semctl, "semctl" }, /* 321 */
++ { 5, TI, sys_semtimedop, "semtimedop" }, /* 322 */
++ { 4, 0, printargs, "ipc_subcall" }, /* 323 */
++ { 4, 0, printargs, "ipc_subcall" }, /* 324 */
++ { 4, 0, printargs, "ipc_subcall" }, /* 325 */
++ { 4, 0, printargs, "ipc_subcall" }, /* 326 */
++ { 4, 0, printargs, "ipc_subcall" }, /* 327 */
++ { 4, 0, printargs, "ipc_subcall" }, /* 328 */
++ { 4, TI, sys_msgsnd, "msgsnd" }, /* 329 */
++ { 4, TI, sys_msgrcv, "msgrcv" }, /* 330 */
++ { 4, TI, sys_msgget, "msgget" }, /* 331 */
++ { 4, TI, sys_msgctl, "msgctl" }, /* 332 */
++ { 4, 0, printargs, "ipc_subcall" }, /* 333 */
++ { 4, 0, printargs, "ipc_subcall" }, /* 334 */
++ { 4, 0, printargs, "ipc_subcall" }, /* 335 */
++ { 4, 0, printargs, "ipc_subcall" }, /* 336 */
++ { 4, 0, printargs, "ipc_subcall" }, /* 337 */
++ { 4, 0, printargs, "ipc_subcall" }, /* 338 */
++ { 4, TI, sys_shmat, "shmat" }, /* 339 */
++ { 4, TI, sys_shmdt, "shmdt" }, /* 340 */
++ { 4, TI, sys_shmget, "shmget" }, /* 341 */
++ { 4, TI, sys_shmctl, "shmctl" }, /* 342 */
diff --git a/packages/strace/strace_4.5.14.bb b/packages/strace/strace_4.5.14.bb
index 8f9bfb4d18..b35a267d14 100644
--- a/packages/strace/strace_4.5.14.bb
+++ b/packages/strace/strace_4.5.14.bb
@@ -1,12 +1,13 @@
LICENSE = "GPL"
SECTION = "console/utils"
-PR = "r1"
+PR = "r2"
DESCRIPTION = "strace is a system call tracing tool."
SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
file://arm-eabi.patch;patch=1 \
- file://sh-arch-update.patch;patch=1"
+ file://sh-arch-update.patch;patch=1 \
+ file://sh-syscall-update.patch;patch=1"
inherit autotools
diff --git a/packages/watchdog/files/.mtn2git_empty b/packages/watchdog/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/watchdog/files/.mtn2git_empty
diff --git a/packages/watchdog/files/mkinstalldirs.patch b/packages/watchdog/files/mkinstalldirs.patch
new file mode 100644
index 0000000000..468f269965
--- /dev/null
+++ b/packages/watchdog/files/mkinstalldirs.patch
@@ -0,0 +1,17 @@
+---
+ watchdog-5.2/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: watchdog-5.2/Makefile.am
+===================================================================
+--- watchdog-5.2.orig/Makefile.am
++++ watchdog-5.2/Makefile.am
+@@ -15,7 +15,7 @@
+ echo "NOT installing $(CONFIG_FILENAME) - exists already"; \
+ else \
+ echo "installing $(CONFIG_FILENAME)"; \
+- mkinstalldirs `dirname $(DESTDIR)$(CONFIG_FILENAME)`; \
++ $(mkinstalldirs) `dirname $(DESTDIR)$(CONFIG_FILENAME)`; \
+ $(INSTALL_DATA) watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \
+ fi
+
diff --git a/packages/watchdog/watchdog_5.2.bb b/packages/watchdog/watchdog_5.2.bb
index fc3509466a..12f41b6ee7 100644
--- a/packages/watchdog/watchdog_5.2.bb
+++ b/packages/watchdog/watchdog_5.2.bb
@@ -1,9 +1,12 @@
DESCRIPTION = "Software watchdog"
MAINTAINER = "Oyvind Repvik <nail@nslu2-linux.org>"
-PR = "r2"
+PR = "r3"
LICENSE = "GPL"
SRC_URI = "http://www.ibiblio.org/pub/Linux/system/daemons/watchdog/${PN}-${PV}.tar.gz"
+
+SRC_URI += "file://mkinstalldirs.patch;patch=1"
+
FILES = "${sysconfdir}/watchdog.conf ${sbindir}/watchdog"
#CONFFILES = "${sysconfdir}/watchdog.conf"