From 153b9e3af84f275e21d9e34e7c8afd90f5294da5 Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Tue, 25 Oct 2011 14:26:04 +0800 Subject: [PATCH 1/4] INSTALL-Ben: update --- install/INSTALL-Ben | 8 ++++- install/openwrt-preinit-hack.patch | 12 ------- install/qi_lb60-NAND-add-data-partition.patch | 31 +++++++++++++++++++ 3 files changed, 38 insertions(+), 13 deletions(-) delete mode 100644 install/openwrt-preinit-hack.patch create mode 100644 install/qi_lb60-NAND-add-data-partition.patch diff --git a/install/INSTALL-Ben b/install/INSTALL-Ben index f6daea5..2d160a7 100644 --- a/install/INSTALL-Ben +++ b/install/INSTALL-Ben @@ -14,7 +14,7 @@ cd qi-kernel git checkout ben-wpan cp ../ben-wpan-config-2.6.38 .config - patch -p1 -s <../openwrt-preinit-hack.patch + patch -p1 -s < ../qi_lb60-NAND-add-data-partition.patch OWRT make ARCH=mips CROSS_COMPILE=mipsel-openwrt-linux- vmlinux.bin Jlime make ARCH=mips CROSS_COMPILE=mipsel-linux- vmlinux.bin gzip -9 -f arch/mips/boot/vmlinux.bin @@ -32,6 +32,12 @@ 3. Install the kernel + Using u-boot without reflash: + + - set up TCP/IP networking with the Ben + - copy uImage to Ben /boot/uImage + - hold F4 when poweron + Using usbboot: - remove battery and USB diff --git a/install/openwrt-preinit-hack.patch b/install/openwrt-preinit-hack.patch deleted file mode 100644 index f70eae3..0000000 --- a/install/openwrt-preinit-hack.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git qi-kernel.orig/init/main.c qi-kernel/init/main.c -index 33c37c3..7be645f 100644 ---- a/init/main.c -+++ b/init/main.c -@@ -852,6 +852,7 @@ static noinline int init_post(void) - printk(KERN_WARNING "Failed to execute %s. Attempting " - "defaults...\n", execute_command); - } -+ run_init_process("/etc/preinit"); - run_init_process("/sbin/init"); - run_init_process("/etc/init"); - run_init_process("/bin/init"); diff --git a/install/qi_lb60-NAND-add-data-partition.patch b/install/qi_lb60-NAND-add-data-partition.patch new file mode 100644 index 0000000..bca8db3 --- /dev/null +++ b/install/qi_lb60-NAND-add-data-partition.patch @@ -0,0 +1,31 @@ +From 1878b22649c3ecde1795d6695b92ca02fa9110c2 Mon Sep 17 00:00:00 2001 +From: Xiangfu Liu +Date: Fri, 19 Aug 2011 15:46:52 +0800 +Subject: [PATCH 23/29] qi_lb60: NAND: add data partition + +--- + arch/mips/jz4740/board-qi_lb60.c | 7 ++++++- + 1 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/arch/mips/jz4740/board-qi_lb60.c b/arch/mips/jz4740/board-qi_lb60.c +index b622941..0bc4caa 100644 +--- a/arch/mips/jz4740/board-qi_lb60.c ++++ b/arch/mips/jz4740/board-qi_lb60.c +@@ -118,8 +118,13 @@ static struct mtd_partition qi_lb60_partitions_2gb[] = { + { + .name = "NAND ROOTFS partition", + .offset = 8 * 0x100000, +- .size = (504 + 512 + 1024) * 0x100000, ++ .size = 512 * 0x100000, + }, ++ { ++ .name = "NAND DATA partition", ++ .offset = 520 * 0x100000, ++ .size = 1528 * 0x100000, ++ }, + }; + + static void qi_lb60_nand_ident(struct platform_device *pdev, +-- +1.7.4.1 + From d7bd1b97b5876c32e6e9c603b80c58190e30b56d Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Tue, 25 Oct 2011 14:50:44 +0800 Subject: [PATCH 2/4] INSTALL-PC: fix typo, install libnl-dev for zigbee --- install/INSTALL-PC | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/INSTALL-PC b/install/INSTALL-PC index d7c4c83..b01b340 100644 --- a/install/INSTALL-PC +++ b/install/INSTALL-PC @@ -14,11 +14,12 @@ 2. Set up the user space # iproute - probably already installed - aptiude install libnl1 + aptitude install libnl1 mkdir -p /usr/local/var/run 3. Build the user space tools of the linux-zigbee project + aptitude install libnl-dev git clone git://linux-zigbee.git.sourceforge.net/gitroot/linux-zigbee/linux-zigbee cd linux-zigbee ./autogen.sh From 0e351780cb342adc680ee64c9148fc0fcc7e8e70 Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Tue, 25 Oct 2011 15:37:43 +0800 Subject: [PATCH 3/4] INSTALL-Ben: libnl-1 include in upstream packages --- install/INSTALL-Ben | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/INSTALL-Ben b/install/INSTALL-Ben index 2d160a7..164c785 100644 --- a/install/INSTALL-Ben +++ b/install/INSTALL-Ben @@ -73,8 +73,10 @@ - connect to the Ben ssh $NN - run the following commands: + OWRT opkg update OWRT opkg install ip OWRT opkg install ldconfig + OWRT opkg install libnl-1 mkdir -p /usr/local/var/run exit From ac76df901d347c1cdb414644ad33120fd262729f Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Tue, 25 Oct 2011 15:51:16 +0800 Subject: [PATCH 4/4] INSTALL-Ben: dirtpan also included in upstream. small cleanup --- install/INSTALL-Ben | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/install/INSTALL-Ben b/install/INSTALL-Ben index 164c785..9543701 100644 --- a/install/INSTALL-Ben +++ b/install/INSTALL-Ben @@ -77,6 +77,8 @@ OWRT opkg install ip OWRT opkg install ldconfig OWRT opkg install libnl-1 + OWRT opkg install lowpan-tools + OWRT opkg install dirtpan mkdir -p /usr/local/var/run exit @@ -85,8 +87,6 @@ wget http://www.infradead.org/~tgr/libnl/files/libnl-1.1.tar.gz tar xfz libnl-1.1.tar.gz cd libnl-1.1 - OWRT gcc=`readlink -f \`which mipsel-openwrt-linux-gcc\`` - OWRT ./configure --prefix=${gcc%/bin/*} --host=mipsel-openwrt-linux Jlime patch -p1 -s <../libnl-1.1-limits.patch Jlime inc=`mipsel-linux-cpp -v &1 | grep usr/include | tr -d \ ` Jlime ./configure --prefix=${inc%/include} --host=mipsel-linux @@ -101,7 +101,6 @@ git clone git://linux-zigbee.git.sourceforge.net/gitroot/linux-zigbee/linux-zigbee cd linux-zigbee - OWRT ./autogen.sh --host=mipsel-openwrt-linux JLime ./autogen.sh --host=mipsel-linux make @@ -118,8 +117,6 @@ cp lowpan-tools-0.2.2/include/ieee802154.h tools/dirtpan/ cd ben-wpan/tools - OWRT make TARGET=ben_openwrt - OWRT make -C dirtpan TARGET=ben_openwrt JLime make TARGET=ben_jlime JLime make -C dirtpan TARGET=ben_jlime scp dirtpan/dirtpan $NN:/usr/sbin