From 91bf2231a22d817d9ec663d9a76464c220adb88f Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Thu, 3 Jun 2010 17:56:52 +0200
Subject: fix instability problems on my loongson laptop

the latest binutils contains the needed options to
build a kernel with the needed workarounds.
Activate the work arounds.
---
 target/lemote/Makefile            | 7 ++++---
 target/lemote/files/boot/boot.cfg | 6 +++---
 target/lemote/kernel.config       | 8 +++++---
 toolchain/binutils/Makefile.inc   | 7 ++++---
 4 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/target/lemote/Makefile b/target/lemote/Makefile
index 59e2b84b1..d79f1e270 100644
--- a/target/lemote/Makefile
+++ b/target/lemote/Makefile
@@ -7,8 +7,10 @@ include $(TOPDIR)/mk/modules.mk
 include $(TOPDIR)/mk/kernel-build.mk
 include $(TOPDIR)/mk/image.mk
 
+KERNEL:=$(LINUX_DIR)/vmlinuz
+
 kernel-install:
-	@cp $(LINUX_DIR)/vmlinuz $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel
+	@cp $(KERNEL) $(TARGET_DIR)/boot/vmlinuz-adk
 
 createinitcrypt:
 	$(SED) 's#^CONFIG_INITRAMFS_SOURCE.*#CONFIG_INITRAMFS_SOURCE="./initramfs_list"#' $(LINUX_DIR)/.config
@@ -73,7 +75,6 @@ endif
 ifeq ($(FS),archive)
 imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
 	@echo
-	@echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel'
-	@echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL),"
+	@echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
 	@echo 'Login as user root with password linux123 via ssh or console'
 endif
diff --git a/target/lemote/files/boot/boot.cfg b/target/lemote/files/boot/boot.cfg
index 2f67fe67b..dd386032b 100644
--- a/target/lemote/files/boot/boot.cfg
+++ b/target/lemote/files/boot/boot.cfg
@@ -1,7 +1,7 @@
-timeout 4
+timeout 3
 default 0
 showmenu 1
 
 title Linux
-	kernel /dev/fs/ext2@wd0/boot/lemote-encrypted-kernel
-	args no_auto_cmd root=/dev/mapper/root resume=/dev/mapper/swap
+	kernel /dev/fs/ext2@wd0/boot/vmlinuz-adk
+	args no_auto_cmd
diff --git a/target/lemote/kernel.config b/target/lemote/kernel.config
index c109120a0..21df7a57a 100644
--- a/target/lemote/kernel.config
+++ b/target/lemote/kernel.config
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.34
-# Fri May 28 12:08:04 2010
+# Thu Jun  3 15:37:40 2010
 #
 CONFIG_MIPS=y
 
@@ -108,7 +108,9 @@ CONFIG_CPU_LOONGSON2F=y
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
 # CONFIG_CPU_CAVIUM_OCTEON is not set
-# CONFIG_CPU_LOONGSON2F_WORKAROUNDS is not set
+CONFIG_CPU_NOP_WORKAROUNDS=y
+CONFIG_CPU_JUMP_WORKAROUNDS=y
+CONFIG_CPU_LOONGSON2F_WORKAROUNDS=y
 CONFIG_SYS_SUPPORTS_ZBOOT=y
 CONFIG_SYS_SUPPORTS_ZBOOT_UART16550=y
 CONFIG_CPU_LOONGSON2=y
@@ -1386,7 +1388,7 @@ CONFIG_HAVE_ARCH_KGDB=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="console=tty0 init=/init no_auto_cmd"
-CONFIG_CMDLINE_OVERRIDE=y
+# CONFIG_CMDLINE_OVERRIDE is not set
 
 #
 # Security options
diff --git a/toolchain/binutils/Makefile.inc b/toolchain/binutils/Makefile.inc
index c38f81d7a..7a91b2a69 100644
--- a/toolchain/binutils/Makefile.inc
+++ b/toolchain/binutils/Makefile.inc
@@ -2,8 +2,9 @@
 # material, please see the LICENCE file in the top-level directory.
 
 PKG_NAME:=		binutils
-PKG_VERSION:=		2.20.1
+PKG_VERSION:=		2.20.51
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		9cdfb9d6ec0578c166d3beae5e15c4e5
-PKG_SITES:=		${MASTER_SITE_GNU:=binutils/}
+PKG_MD5SUM:=		70971093cfa11bd943e06eccb2fd8914
+PKG_SITES:=		ftp://sourceware.org/pub/binutils/snapshots/
+#PKG_SITES:=		${MASTER_SITE_GNU:=binutils/}
 DISTFILES:=		$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-- 
cgit v1.2.3