summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpackage/installer/src/installer98
-rw-r--r--target/linux/patches/3.3/lemote-rfkill.patch21
-rw-r--r--toolchain/eglibc/Makefile1
-rw-r--r--toolchain/eglibc/Makefile.inc6
-rw-r--r--toolchain/eglibc/patches/ip_h_bug.patch12
-rw-r--r--toolchain/eglibc/patches/make-mixed-rules.patch15
6 files changed, 116 insertions, 37 deletions
diff --git a/package/installer/src/installer b/package/installer/src/installer
index fd45c443c..3c24cb6a2 100755
--- a/package/installer/src/installer
+++ b/package/installer/src/installer
@@ -1,5 +1,11 @@
#!/bin/sh
+#set -x
+
+rootsize=1024
+usbrootsize=512
+cfgsize=16
+
create_bootcfg() {
cat << FOO > /mnt/boot/boot.cfg
default 0
@@ -10,22 +16,97 @@ title OpenADK
args root=/dev/sda1
title USB
- kernel (usb0,0)/boot/kernel
+ kernel (usb0,0)/boot/kernel-usb
args root=/dev/sdc1
FOO
}
+create_fstab() {
+ cat << FOO > /mnt/etc/fstab
+/dev/sda2 /home ext4 defaults 0 0
+/dev/sda3 none swap sw 0 0
+FOO
+
+}
+
+create_usb_fstab() {
+ cat << FOO > /mnt/etc/fstab
+/dev/sdc2 /home ext4 defaults 0 0
+FOO
+
+}
+
+create_home() {
+ mkdir -p /mnt/home
+ mkdir -p /tmp/home/lemote
+ chown 1000:1000 /tmp/home/lemote
+ echo "lemote:x:1000:1000:Linux User,,,:/home/lemote:/bin/mksh" >> /mnt/etc/passwd
+ echo "lemote:.m3Jtyyc5L4W6:15426:0:99999:7:::" >> /mnt/etc/shadow
+ echo "setxkbmap -option terminate:ctrl_alt_bksp" >> /tmp/home/lemote/.xsession
+ echo fluxbox >> /tmp/home/lemote/.xsession
+}
+
+usb_install() {
+ size=$(parted -s /dev/sdc unit mb print|awk '/Disk/ {print $3}'|sed -e "s#MB##")
+ homesize=$(($size-$usbrootsize-$cfgsize))
+ mkdir /tmp/home
+ parted -s /dev/sdc mklabel msdos
+ parted -s /dev/sdc mkpart primary ext2 0 ${usbrootsize}M 2>&1 >/dev/null
+ parted -s /dev/sdc mkpart primary ext2 ${usbrootsize}M ${homesize}M
+ parted -s /dev/sdc -- mkpart primary ext2 ${homesize}M -0
+ sfdisk --change-id /dev/sdc 3 88 2>&1 >/dev/null
+ echo "Creating filesystem on /home"
+ mke2fs -q -j /dev/sdc2
+ mount -t ext4 /dev/sdc2 /tmp/home
+ echo "Copying system to disk"
+ dd if=/dev/sdc of=/tmp/home/lemote.tar.gz bs=16384 skip=1024 count=8000 2>/dev/null
+ echo "Creating filesystem on /"
+ mke2fs -q -j /dev/sdc1
+ mount -t ext4 /dev/sdc1 /mnt
+ echo "Installing system to USB disk ..."
+ tar xzf /tmp/home/lemote.tar.gz -C /mnt
+ test -x /mnt/usr/bin/sudo && chmod u+s /mnt/usr/bin/sudo
+ test -x /mnt/usr/bin/Xorg && chmod u+s /mnt/usr/bin/Xorg
+ create_home
+ create_bootcfg
+ create_usb_fstab
+ umount /mnt
+ umount /tmp/home
+
+}
+
disk_install() {
- mke2fs -q -j /dev/sda1
- sync
+ size=$(parted -s /dev/sda unit mb print|awk '/Disk/ {print $3}'|sed -e "s#MB##")
+ swap=1024
+ homesize=$(($size-$rootsize-$cfgsize-$swap))
+ swapsize=$(($homesize+$swap))
+ mkdir /tmp/home
+ parted -s /dev/sda mklabel msdos
+ parted -s /dev/sda mkpart primary ext2 0 ${rootsize}M 2>&1 >/dev/null
+ parted -s /dev/sda mkpart primary ext2 ${rootsize}M ${homesize}M
+ parted -s /dev/sda mkpart primary ext2 ${homesize}M ${swapsize}M
+ parted -s /dev/sda -- mkpart primary ext2 ${swapsize}M -0
+ sfdisk --change-id /dev/sda 3 82 2>&1 >/dev/null
+ sfdisk --change-id /dev/sda 4 88 2>&1 >/dev/null
sleep 2
+ echo "Creating filesystem on /home"
+ mke2fs -q -j /dev/sda2
+ mkswap /dev/sda3
+ mount -t ext4 /dev/sda2 /tmp/home
+ echo "Copying system to disk"
+ dd if=/dev/sdc of=/tmp/home/lemote.tar.gz bs=16384 skip=1024 count=8000 2>/dev/null
+ mke2fs -q -j /dev/sda1
mount -t ext4 /dev/sda1 /mnt
- tar xzvf /lemote-yeelong-eglibc-archive+kernel.tar.gz -C /mnt
+ echo "Installing system to hard disk ..."
+ tar xzf /tmp/home/lemote.tar.gz -C /mnt
test -x /mnt/usr/bin/sudo && chmod u+s /mnt/usr/bin/sudo
test -x /mnt/usr/bin/Xorg && chmod u+s /mnt/usr/bin/Xorg
+ create_home
create_bootcfg
+ create_fstab
umount /mnt
+ umount /tmp/home
}
@@ -47,15 +128,18 @@ echo " |_| "
echo ""
# settle down, after module load
sleep 2
-echo "Should I install OpenADK to disk (y/n)"
+echo "Should I install OpenADK to disk (d) or usb disk (u) or do nothing (any key)"
read answer
-if [ "$answer" = "y" ];then
+if [ "$answer" = "d" ];then
disk_install
fi
+if [ "$answer" = "u" ];then
+ usb_install
+fi
echo "Should I reboot now (y/n)"
read answer
if [ "$answer" = "y" ];then
- reboot
+ /bin/busybox reboot -f
else
exit
fi
diff --git a/target/linux/patches/3.3/lemote-rfkill.patch b/target/linux/patches/3.3/lemote-rfkill.patch
new file mode 100644
index 000000000..a61488434
--- /dev/null
+++ b/target/linux/patches/3.3/lemote-rfkill.patch
@@ -0,0 +1,21 @@
+diff -Nur linux-3.3.orig/drivers/net/wireless/rtl818x/rtl8187/rfkill.c linux-3.3/drivers/net/wireless/rtl818x/rtl8187/rfkill.c
+--- linux-3.3.orig/drivers/net/wireless/rtl818x/rtl8187/rfkill.c 2012-03-19 00:15:34.000000000 +0100
++++ linux-3.3/drivers/net/wireless/rtl818x/rtl8187/rfkill.c 2012-03-27 23:29:46.000000000 +0200
+@@ -22,6 +22,9 @@
+
+ static bool rtl8187_is_radio_enabled(struct rtl8187_priv *priv)
+ {
++#ifdef CONFIG_LEMOTE_MACH2F
++ return 1;
++#else
+ u8 gpio;
+
+ gpio = rtl818x_ioread8(priv, &priv->map->GPIO0);
+@@ -29,6 +32,7 @@
+ gpio = rtl818x_ioread8(priv, &priv->map->GPIO1);
+
+ return gpio & priv->rfkill_mask;
++#endif
+ }
+
+ void rtl8187_rfkill_init(struct ieee80211_hw *hw)
diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile
index 40563bcfb..2c40238ef 100644
--- a/toolchain/eglibc/Makefile
+++ b/toolchain/eglibc/Makefile
@@ -34,6 +34,7 @@ EGLIBC_ENV:= PATH='${TARGET_PATH}' \
libc_cv_forced_unwind=yes \
libc_cv_c_cleanup=yes \
libc_cv_gnu99_inline=yes \
+ libc_cv_initfini_array=yes \
libc_cv_slibdir="/lib"
ifeq ($(ADK_TARGET_NO_FPU),y)
diff --git a/toolchain/eglibc/Makefile.inc b/toolchain/eglibc/Makefile.inc
index 42e80e858..56514d3c6 100644
--- a/toolchain/eglibc/Makefile.inc
+++ b/toolchain/eglibc/Makefile.inc
@@ -2,7 +2,7 @@
# material, please see the LICENCE file in the top-level directory.
PKG_NAME:= eglibc
-PKG_VERSION:= 2.12.1
-PKG_RELEASE:= 2
-PKG_MD5SUM:= 3668505801160785c2961df0a7ec192e
+PKG_VERSION:= 2.14.1
+PKG_RELEASE:= 1
+PKG_MD5SUM:= d01422d90c2f9ef6919949b7ad38ccd4
PKG_SITES:= http://openadk.org/distfiles/
diff --git a/toolchain/eglibc/patches/ip_h_bug.patch b/toolchain/eglibc/patches/ip_h_bug.patch
deleted file mode 100644
index 1f6274fac..000000000
--- a/toolchain/eglibc/patches/ip_h_bug.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur eglibc-2.12.orig/libc/sysdeps/generic/netinet/ip.h eglibc-2.12/libc/sysdeps/generic/netinet/ip.h
---- eglibc-2.12.orig/libc/sysdeps/generic/netinet/ip.h 2010-09-28 19:13:14.000000000 +0200
-+++ eglibc-2.12/libc/sysdeps/generic/netinet/ip.h 2010-10-10 14:41:32.000000000 +0200
-@@ -194,7 +194,7 @@
- */
-
- #define IPTOS_CLASS_MASK 0xe0
--#define IPTOS_CLASS(class) ((tos) & IPTOS_CLASS_MASK)
-+#define IPTOS_CLASS(class) ((class) & IPTOS_CLASS_MASK)
- #define IPTOS_CLASS_CS0 0x00
- #define IPTOS_CLASS_CS1 0x20
- #define IPTOS_CLASS_CS2 0x40
diff --git a/toolchain/eglibc/patches/make-mixed-rules.patch b/toolchain/eglibc/patches/make-mixed-rules.patch
deleted file mode 100644
index 06a4af3c0..000000000
--- a/toolchain/eglibc/patches/make-mixed-rules.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -Nur eglibc-2.12.1.orig/libc/manual/Makefile eglibc-2.12.1/libc/manual/Makefile
---- eglibc-2.12.1.orig/libc/manual/Makefile 2010-09-28 19:14:30.000000000 +0200
-+++ eglibc-2.12.1/libc/manual/Makefile 2010-11-06 17:05:03.000000000 +0100
-@@ -243,7 +243,10 @@
- .PHONY: stubs
- stubs: $(objpfx)stubs
- endif
--$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
-+$(objpfx)stubs ../po/manual.pot:
-+ touch $@
-+
-+$(objpfx)stamp%:
- $(make-target-directory)
- touch $@
-