Re: [OpenWrt-Devel] [PATCH v2][RFC] uboot-kirkwood: upgrade to 2012.04.01
On 06/27/2012 04:11 PM, Luka Perkov wrote: Hi Wojciech, On Wed, Jun 27, 2012 at 02:17:32PM +0200, Wojciech Dubowik wrote: I have tested it on iconnect and it works from NAND. Older version used to work from openocd but new one doesn't. Can you please explain how did you test old version with OpenOCD? I have used attached board config for openocd. Just use iconnect_load_uboot function after connecting the board. As far as I know, u-boot shouldn't work becasue you need to set sys base so that it doesn't relocate. Maybe new one works differently and you need to recompile it with different sys base or some other compile flag. I could have a look but at the moment I am really busy. Br, Wojtek Maybe there is problem somewhere in configuration. U-Boot 2012.04.01 (Jun 27 2012 - 14:11:30) Iomega iConnect Wireless SoC: Kirkwood 88F6281_A0 DRAM: 256 MiB WARNING: Caches not enabled NAND: 512 MiB In:serial Out: serial Err: serial Net: egiga0 Hit any key to stop autoboot: 0 iconnect = ping 192.168.1.3 Using egiga0 device host 192.168.1.3 is alive iconnect = reset resetting ... Thank you for testing. We'll do something about the upgrade soon. Luka ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel # iomega Iconnect # based on sheevaplug/dockstar source [find target/feroceon.cfg] jtag_rclk 6000 $_TARGETNAME configure \ -work-area-phys 0x1000 \ -work-area-size 65536 \ -work-area-backup 0 # Disabled for the dockstar #arm7_9 dcc_downloads enable # this assumes the hardware default peripherals location before u-Boot moves it set _FLASHNAME $_CHIPNAME.flash nand device $_FLASHNAME orion 0 0xd800 proc iconnect_init { } { # We need to assert DBGRQ while holding nSRST down. # However DBGACK will be set only when nSRST is released. # Furthermore, the JTAG interface doesn't respond at all when # the CPU is in the WFI (wait for interrupts) state, so it is # possible that initial tap examination failed. So let's # re-examine the target again here when nSRST is asserted which # should then succeed. jtag_reset 0 1 feroceon.cpu arp_examine halt 0 jtag_reset 0 0 wait_halt arm mcr 15 0 0 1 0 0x00052078 #iconnect mww phys 0xD0001400 0x43000400 mww phys 0xD0001404 0x36343040 mww phys 0xD0001408 0x1101333b mww phys 0xD000140C 0x0034 mww phys 0xD0001410 0x00cc mww phys 0xD0001414 0x mww phys 0xD0001418 0x mww phys 0xD000141C 0x0642 mww phys 0xD0001420 0x0004 mww phys 0xD0001424 0xF07F mww phys 0xD0001428 0x00074410 mww phys 0xD000147c 0x7441 # 1st bank is 128 MB mww phys 0xD0001504 0x07F1 # 2nd bank is 128 MB mww phys 0xD0001508 0x1000 mww phys 0xD000150C 0x07F5 mww phys 0xD0001514 0x mww phys 0xD000151C 0x mww phys 0xD0001494 0x00120012 mww phys 0xD0001498 0x mww phys 0xD000149C 0xE40F mww phys 0xD0001480 0x0001 mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD0020204 0x mww phys 0xD001 0x0111 mww phys 0xD0010004 0x3322 mww phys 0xD0010008 0x mww phys 0xD0010418 0x003E07CF mww phys 0xD001041C 0x000F0F0F mww phys 0xD0010470 0x01C7D941 } proc iconnect_load_uboot { } {
Re: [OpenWrt-Devel] WNDR4500: OpenWRT freezing at Starting program at 0x80001000
2012/6/27 Florian Fainelli flor...@openwrt.org: Hello Rafal, On Wednesday 27 June 2012 09:56:32 Rafał Miłecki wrote: GOOD NEWS guys! :) 1) First of all, WNDR4500's CFE can run lzma compressed vmlinux. You can know that for example from earlier-attached official.analyze.txt. My analyze of trx header has shown there are only 2 images. offset0 is 0x1C, offset1 is 0x141a78 and offset2 is ZERO (yes!). And as explained earlier, at 0x1C we have hexes: 5D 00 00 01 which are early bytes of lzma-compressed vmlinux. So I've stared generating images skipping loader (small decompressor of lzma). Unfortunately it didn't result in any success directly. Then I've started hacking Netgear's vmlinuz-lzma. I've decompressed it and compressed again using my system's lzma. Guess what? My CFE started panicking with chk containing such a recompressed vmlinux: Checking crc...Loader:raw Filesys:raw Dev:nflash0.os File: Options:(null) Loading: PANIC: out of memory! raw_fileop_uninit: warning: refcnt not zero Entry at 0x So it gave me a tip, lzma compression is very sensitive! Yes it is, we have had some similar issues with bcm63xx images in order to find the right LZMA parameters, since both platforms use CFE, I suggest you give them a try and see if that fixes anything for you: https://dev.openwrt.org/browser/trunk/target/linux/brcm63xx/image/Makefile#L117 I can see you had to remove some parts of lzma file for bcm63xx. Really ugly. Fortunately it's a little nicer with my brcm47xx WNDR4500. After multiple test I've discovered my CFE doesn't like two things: 1) Dictionary 2) End Of Stream marker So using some low -dVALUE and *not* using -eos results in a working image. I've tried few random lc/lp/pb values but CFE seems to support all variations. -- Rafał -d12goodDictionary size: 0 MB (2^12 bytes) -d13goodDictionary size: 0 MB (2^13 bytes) -d14goodDictionary size: 0 MB (2^14 bytes) -d15goodDictionary size: 0 MB (2^15 bytes) -d16goodDictionary size: 0 MB (2^16 bytes) -d17goodDictionary size: 0 MB (2^17 bytes) -d18goodDictionary size: 0 MB (2^18 bytes) -d19bad Dictionary size: 1 MB (2^19 bytes) Loading PANIC: out of memory! raw_fileop_uninit: warning: refcnt not zero -d20bad Dictionary size: 1 MB (2^20 bytes) Loading PANIC: out of memory! raw_fileop_uninit: warning: refcnt not zero -d21bad Dictionary size: 2 MB (2^21 bytes) Loading PANIC: out of memory! raw_fileop_uninit: warning: refcnt not zero -d22bad Dictionary size: 4 MB (2^22 bytes) Loading PANIC: out of memory! raw_fileop_uninit: warning: refcnt not zero -d12 -eos bad Dictionary size: 0 MB (2^12 bytes) Loading: ...PANIC: out of memory! -d16 -eos bad Dictionary size: 0 MB (2^16 bytes) Loading: ...PANIC: out of memory! -d22 -eos bad Dictionary size: 4 MB (2^22 bytes) Loading PANIC: out of memory! raw_fileop_uninit: warning: refcnt not zero -d16 -lc1 -lp2 -pb2 good ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ar71xx: remove the built-in MTD map of the ALL0258N
ar71xx: remove the built-in MTD map of the ALL0258N Pass the mtd_layout via the kernel command line instead. Also increase the kernel partition size to 1024k, so current kernel can fit in. Signed-off-by: Daniel Golle dgo...@allnet.de --- .../ar71xx/files/arch/mips/ath79/mach-all0258n.c | 50 +- target/linux/ar71xx/image/Makefile | 11 ++--- 2 files changed, 7 insertions(+), 54 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-all0258n.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-all0258n.c index fa3cefb..2495bcb 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-all0258n.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-all0258n.c @@ -8,9 +8,6 @@ * by the Free Software Foundation. */ -#include linux/mtd/mtd.h -#include linux/mtd/partitions.h - #include asm/mach-ath79/ath79.h #include dev-eth.h @@ -33,51 +30,6 @@ /* showed up in the original firmware's bootlog */ #define ALL0258N_SEC_PHYMASK BIT(3) -/* - * from U-Boot bootargs of original firmware: - * mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),320k(custom),1024k(kernel),4928k(rootfs),1536k(failsafe),64k(ART) - * we use a more OpenWrt-friendly layout now: - * mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),896k(kernel),5376k(rootfs),1536k(failsafe),64k(ART) - */ -static struct mtd_partition all0258n_partitions[] = { - { - .name = u-boot, - .offset = 0, - .size = 0x04, - .mask_flags = MTD_WRITEABLE, - }, { - .name = u-boot-env, - .offset = 0x04, - .size = 0x01, - }, { - .name = kernel, - .offset = 0x05, - .size = 0x0E, - }, { - .name = rootfs, - .offset = 0x13, - .size = 0x54, - }, { - .name = failsafe, - .offset = 0x67, - .size = 0x18, - }, { - .name = firmware, - .offset = 0x05, - .size = 0x62, - }, { - .name = art, - .offset = 0x7F, - .size = 0x01, - .mask_flags = MTD_WRITEABLE, - } -}; - -static struct flash_platform_data all0258n_flash_data = { - .parts = all0258n_partitions, - .nr_parts = ARRAY_SIZE(all0258n_partitions), -}; - static struct gpio_led all0258n_leds_gpio[] __initdata = { { .name = all0258n:green:rssihigh, @@ -110,7 +62,7 @@ static void __init all0258n_setup(void) u8 *mac = (u8 *) KSEG1ADDR(0x1f7f); u8 *ee = (u8 *) KSEG1ADDR(0x1f7f1000); - ath79_register_m25p80(all0258n_flash_data); + ath79_register_m25p80(NULL); ath79_register_leds_gpio(-1, ARRAY_SIZE(all0258n_leds_gpio), all0258n_leds_gpio); diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 06e3956..13fb0ae 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -655,6 +655,12 @@ define Image/Build/Profile/ALFAAP96 $(call Image/Build/Template/$(fs_128k)/$(1),AthLzma,alfa-ap96,$(alfa_ap96_cmdline),$(alfa_ap96_mtdlayout),2097152,13631488,RKuImage) endef +all0258n_cmdline=board=ALL0258N console=ttyS0,115200 +all0258n_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),1024k(kernel),5248k(rootfs),1536k(failsafe),64k(art),6272k@0x5(firmware) +define Image/Build/Profile/ALL0258N + $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,all0258n,$(all0258n_cmdline),$(all0258n_mtdlayout),1048576,5373952,KRuImage) +endef + ap113_mtd_layout=64k(u-boot),3008k(rootfs),896k(uImage),64k(NVRAM),64k(ART),3904k@0x1(firmware) ap113_cmdline=board=AP113 console=ttyS0,115200 define Image/Build/Profile/AP113 @@ -1057,11 +1063,6 @@ define Image/Build/Profile/ZCN1523H516 $(call Image/Build/Template/$(fs_64k)/$(1),Zcomax,zcn-1523h-5-16,$(zcn1523h516_cmdline)) endef -all0258n_cmdline=board=ALL0258N console=ttyS0,115200 -define Image/Build/Profile/ALL0258N - $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,all0258n,$(all0258n_cmdline),,917504,5505024,KRuImage) -endef - define Image/Build/Profile/Default $(call Image/Build/Profile/ALFAAP96,$(1)) $(call Image/Build/Profile/ALFANX,$(1)) -- 1.7.11 pgp8dNHf8oz36.pgp Description: PGP signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [RFC][PATCH] brcm47xx: prepare code generating Netgear WNDR4500 image
Comment it out until we get the device really working. --- I've tried to comment all decisions I've made. For now images (vmlinuz, trx) include wndr4500 in their names. If we detect which devices need similar tricks, we can unify it. --- target/linux/brcm47xx/image/Makefile | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/target/linux/brcm47xx/image/Makefile b/target/linux/brcm47xx/image/Makefile index b247571..ea776a1 100644 --- a/target/linux/brcm47xx/image/Makefile +++ b/target/linux/brcm47xx/image/Makefile @@ -12,13 +12,23 @@ define Build/Clean endef define Image/Prepare + # Standard LZMA kernel cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 $(KDIR)/vmlinux.lzma + + # WNDR4500 requires specific LZMA compression for vmlinux + # It must not use dictionary (so use some small value for -d). It also PANICs when using -eos. + # Using -si results in 5B bigger binary - that again - PANICs! + $(STAGING_DIR_HOST)/bin/lzma e -so -d16 $(KDIR)/vmlinux $(KDIR)/vmlinux-wndr4500.lzma + + # Build the LZMA loader rm -f $(KDIR)/loader.gz $(MAKE) -C lzma-loader \ BUILD_DIR=$(KDIR) \ TARGET=$(KDIR) \ clean install echo -ne \\x00 $(KDIR)/loader.gz + + # Build fs_mark rm -f $(KDIR)/fs_mark echo -ne '\xde\xad\xc0\xde' $(KDIR)/fs_mark $(call prepare_generic_squashfs,$(KDIR)/fs_mark) @@ -104,10 +114,21 @@ define Image/Build/Chk $(STAGING_DIR_HOST)/bin/mkchkimg -o $(BIN_DIR)/openwrt-$(2)-$(5).chk -k $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx -b $(3) -r $(4) endef +define Image/Build/ChkWNDR4500 + $(STAGING_DIR_HOST)/bin/mkchkimg -o $(BIN_DIR)/openwrt-$(2)-$(5).chk -k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-noloader-wndr4500.trx -b $(3) -r $(4) +endef + define Image/Build + # Standard trx including loader decompressing LZMA $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \ -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \ $(call trxalign/$(1),$(1)) + + # Smaller trx, without the loader, with WNDR4500 specific LZMA compression + $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1)-noloader-wndr4500.trx \ + -f $(KDIR)/vmlinux-wndr4500.lzma \ + $(call trxalign/$(1),$(1)) + $(call Image/Build/$(1),$(1)) $(call Image/Build/Motorola,$(1),wr850g,1,$(1)) $(call Image/Build/USR,$(1),usr5461,$(1)) @@ -117,6 +138,7 @@ define Image/Build # $(call Image/Build/Chk,$(1),wndr3400_v1,U12H155T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1))) # $(call Image/Build/Chk,$(1),wndr3400_vcna,U12H155T01_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1))) # $(call Image/Build/Chk,$(1),wndr4000,U12H181T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1))) +# $(call Image/Build/ChkWNDR4500,$(1),wndr4500,U12H189T00_NETGEAR,1,$(patsubst jffs2-%,jffs2,$(1))) $(call Image/Build/Chk,$(1),wnr834b_v2,U12H081T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1))) # $(call Image/Build/Chk,$(1),wnr2000v2,U12H114T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1))) # $(call Image/Build/Chk,$(1),wnr3500L,U12H136T99_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1))) -- 1.7.7 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [BUG?] lzma: different output for stdin vs. inputFile
I've noticed that OpenWRT's Makefile-s tend to use -si and -so together with pipe (|) and output redirecting (). It was causing problem for my WNDR4500 image - the one generated from stdin didn't work. I've started comparing output of that two methods and I'm attaching results. 1) Using stdin cat vmlinux | ~/openwrt.git/staging_dir/host/bin/lzma e -d16 -si vmlinux-from-si.lzma 2) Using inputFile ~/openwrt.git/staging_dir/host/bin/lzma e -d16 vmlinux vmlinux-from-file.lzma The one generated from stdin has some 0xFF-s in LZMA header and is longer by 5 bytes visible at the end 1) stdin: hexdump -C vmlinux-from-si.lzma | head 5d 00 00 01 00 ff ff ff ff ff ff ff ff 00 30 09 |].0.| hexdump -C vmlinux-from-si.lzma | tail 0010db00 3a 39 d8 2f e2 d9 cf ac 62 ff fb 14 38 48|:9./b...8H 2) inputFile hexdump -C vmlinux-from-file.lzma | head 5d 00 00 01 00 f4 04 30 00 00 00 00 00 00 30 09 |]..0..0.| hexdump -C vmlinux-from-file.lzma | tail 0010db00 3a 39 d8 2f e2 b1 89 f0 16 |:9./.| Honestly, I'm not really going to analyze that anytime soon. I want to focus on different bugs first. If someone has time for this - would be great. At least, I feel better as it's something reported now. Maybe will make day easier for someone adding support for new device. -- Rafał ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [BUG?] lzma: different output for stdin vs. inputFile
On 2012-06-28 12:41 PM, Rafał Miłecki wrote: I've noticed that OpenWRT's Makefile-s tend to use -si and -so together with pipe (|) and output redirecting (). It was causing problem for my WNDR4500 image - the one generated from stdin didn't work. I've started comparing output of that two methods and I'm attaching results. 1) Using stdin cat vmlinux | ~/openwrt.git/staging_dir/host/bin/lzma e -d16 -si vmlinux-from-si.lzma 2) Using inputFile ~/openwrt.git/staging_dir/host/bin/lzma e -d16 vmlinux vmlinux-from-file.lzma The one generated from stdin has some 0xFF-s in LZMA header and is longer by 5 bytes visible at the end 1) stdin: hexdump -C vmlinux-from-si.lzma | head 5d 00 00 01 00 ff ff ff ff ff ff ff ff 00 30 09 |].0.| hexdump -C vmlinux-from-si.lzma | tail 0010db00 3a 39 d8 2f e2 d9 cf ac 62 ff fb 14 38 48|:9./b...8H 2) inputFile hexdump -C vmlinux-from-file.lzma | head 5d 00 00 01 00 f4 04 30 00 00 00 00 00 00 30 09 |]..0..0.| hexdump -C vmlinux-from-file.lzma | tail 0010db00 3a 39 d8 2f e2 b1 89 f0 16 |:9./.| Honestly, I'm not really going to analyze that anytime soon. I want to focus on different bugs first. If someone has time for this - would be great. The LZMA header has a field that contains the uncompressed size. The LZMA tool only fills this if it knows the filesize ahead of time (which does not work with stdin). If it can't know the uncompressed size, it fills the field with 0xff and generates an end-of-stream tag in the compressed bitstream instead. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Bounty: /overlay on x86
Hello everyone, I've been struggling to get /overlay to work on x86. I'm using an initramfs filesystem and I want my changes to persist across reboot. For some reason I've been completely unable to get /overlay to work. I've tried asking here before, I've tried asking on the forum, and I've tried it myself - all to no avail. This post to the forum (from October) is a good summary of what I'm trying to do: https://forum.openwrt.org/viewtopic.php?pid=169868 To verify I've tried a native ext2 filesystem and bind. I can't get either to work. I'm offering $500 to someone who can get this configuration to work (bind fs) using openwrt trunk with an initramfs filesystem on x86 as cleanly (/overlay UCI config) as possible. Any changes made to OpenWRT sources (scripts, functions, etc) must be contributed back and accepted into openwrt trunk. Payment to be delivered via PayPal or some other means we can agree upon. Any takers? -- Kristian Kielhofner ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] WNDR4500: OpenWRT freezing at Starting program at 0x80001000
2012/6/28 Hauke Mehrtens ha...@hauke-m.de: On 06/27/2012 10:14 PM, Rafał Miłecki wrote: 2012/6/27 Hauke Mehrtens ha...@hauke-m.de: On 06/27/2012 12:21 PM, Rafał Miłecki wrote: Is there any open driver available for this controller? GPL license? Or some different? We have support for the older NAND flash controller, but this one is different. I could try to write the driver but for now the Ethernet driver has a higher priority for me. The Broadcom SDK contains code for the NAND flash controller licensed under a GPL compatible license. For me hacking ethernet is impossible until I get bootable router. I can't get that without NAND driver :/ This code is also licensed under the ISC license. 4) Driver for GBit MAC We don't have GPL one yet. I can fix that with a proper amount of time. A permissive licensed version of this driver is included in the GPL source tar of the Asus RT-AC66U. Does this license allow modifying the driver and putting it in kernel? This is the ISC license [0], it is also used by Atheros in ath9k. Attached is a patch to read out the clock rates. This patch is not even compile tested, Rafał could you test it and report back. I've no idea how to apply that. It doesn't apply on OpenWRT-patched 3.3.8. Do you have some patch moving OpenWRT to more recent kernel? But even in wireless-testing I can't see defines for chip ids. -- Rafał ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] WNDR4500: OpenWRT freezing at Starting program at 0x80001000
2012/6/28 Rafał Miłecki zaj...@gmail.com: 2012/6/28 Hauke Mehrtens ha...@hauke-m.de: On 06/27/2012 10:14 PM, Rafał Miłecki wrote: 2012/6/27 Hauke Mehrtens ha...@hauke-m.de: On 06/27/2012 12:21 PM, Rafał Miłecki wrote: Is there any open driver available for this controller? GPL license? Or some different? We have support for the older NAND flash controller, but this one is different. I could try to write the driver but for now the Ethernet driver has a higher priority for me. The Broadcom SDK contains code for the NAND flash controller licensed under a GPL compatible license. For me hacking ethernet is impossible until I get bootable router. I can't get that without NAND driver :/ This code is also licensed under the ISC license. 4) Driver for GBit MAC We don't have GPL one yet. I can fix that with a proper amount of time. A permissive licensed version of this driver is included in the GPL source tar of the Asus RT-AC66U. Does this license allow modifying the driver and putting it in kernel? This is the ISC license [0], it is also used by Atheros in ath9k. Attached is a patch to read out the clock rates. This patch is not even compile tested, Rafał could you test it and report back. I've no idea how to apply that. It doesn't apply on OpenWRT-patched 3.3.8. Do you have some patch moving OpenWRT to more recent kernel? But even in wireless-testing I can't see defines for chip ids. OK, I've found that patch posted on linux-wireless. Still, some trick to move OpenWRT to more recent kernel? P.S. Is there some hack to make build_dir/linux-brcm47xx/linux-X.Y.Z a git repository? So I can modify kernel source in that directory and use git diff, git commit etc? -- Rafał ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [RFC][PATCH] brcm47xx: prepare code generating Netgear WNDR4500 image
On 06/28/2012 10:01 AM, Rafał Miłecki wrote: Comment it out until we get the device really working. --- I've tried to comment all decisions I've made. For now images (vmlinuz, trx) include wndr4500 in their names. If we detect which devices need similar tricks, we can unify it. --- target/linux/brcm47xx/image/Makefile | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/target/linux/brcm47xx/image/Makefile b/target/linux/brcm47xx/image/Makefile index b247571..ea776a1 100644 --- a/target/linux/brcm47xx/image/Makefile +++ b/target/linux/brcm47xx/image/Makefile @@ -12,13 +12,23 @@ define Build/Clean endef define Image/Prepare + # Standard LZMA kernel cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 $(KDIR)/vmlinux.lzma + + # WNDR4500 requires specific LZMA compression for vmlinux + # It must not use dictionary (so use some small value for -d). It also PANICs when using -eos. + # Using -si results in 5B bigger binary - that again - PANICs! + $(STAGING_DIR_HOST)/bin/lzma e -so -d16 $(KDIR)/vmlinux $(KDIR)/vmlinux-wndr4500.lzma + + # Build the LZMA loader rm -f $(KDIR)/loader.gz $(MAKE) -C lzma-loader \ BUILD_DIR=$(KDIR) \ TARGET=$(KDIR) \ clean install echo -ne \\x00 $(KDIR)/loader.gz + + # Build fs_mark rm -f $(KDIR)/fs_mark echo -ne '\xde\xad\xc0\xde' $(KDIR)/fs_mark $(call prepare_generic_squashfs,$(KDIR)/fs_mark) @@ -104,10 +114,21 @@ define Image/Build/Chk $(STAGING_DIR_HOST)/bin/mkchkimg -o $(BIN_DIR)/openwrt-$(2)-$(5).chk -k $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx -b $(3) -r $(4) endef +define Image/Build/ChkWNDR4500 + $(STAGING_DIR_HOST)/bin/mkchkimg -o $(BIN_DIR)/openwrt-$(2)-$(5).chk -k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-noloader-wndr4500.trx -b $(3) -r $(4) +endef + define Image/Build + # Standard trx including loader decompressing LZMA $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \ -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \ $(call trxalign/$(1),$(1)) + + # Smaller trx, without the loader, with WNDR4500 specific LZMA compression + $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1)-noloader-wndr4500.trx \ + -f $(KDIR)/vmlinux-wndr4500.lzma \ + $(call trxalign/$(1),$(1)) + $(call Image/Build/$(1),$(1)) $(call Image/Build/Motorola,$(1),wr850g,1,$(1)) $(call Image/Build/USR,$(1),usr5461,$(1)) @@ -117,6 +138,7 @@ define Image/Build #$(call Image/Build/Chk,$(1),wndr3400_v1,U12H155T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1))) #$(call Image/Build/Chk,$(1),wndr3400_vcna,U12H155T01_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1))) #$(call Image/Build/Chk,$(1),wndr4000,U12H181T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1))) +#$(call Image/Build/ChkWNDR4500,$(1),wndr4500,U12H189T00_NETGEAR,1,$(patsubst jffs2-%,jffs2,$(1))) $(call Image/Build/Chk,$(1),wnr834b_v2,U12H081T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1))) #$(call Image/Build/Chk,$(1),wnr2000v2,U12H114T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1))) #$(call Image/Build/Chk,$(1),wnr3500L,U12H136T99_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1))) This looks good. Would it be possible to just compress the loader.gz different and let this load the real kernel image? The lzma compressed kernel image for the wndr4500 is 85 KBytes bigger than the one compressed with the other parameters. For this device this does not matter as it has 128MB of flash, but this new CFE version will probably also be used in other devices with less flash. Could you rename ChkWNDR4500 to ChkLZMA for example, as this will probably also be used for there devices later. Hauke ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/1] lsof: use environment variables correctly to prime Configure
Rewrite of the configure and compile stages as per the suggestions in the packages 00XCONFIG instructions. Note that this is required to get eglibc working, as eglibc doesn't include the RPC functions as part of libc. Signed-off-by: Philip Prindeville phil...@redfish-solutions.com Index: feeds/packages/utils/lsof/Makefile === --- feeds/packages/utils/lsof/Makefile (revision 32520) +++ feeds/packages/utils/lsof/Makefile (working copy) @@ -20,7 +20,6 @@ include $(INCLUDE_DIR)/package.mk -TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include TARGET_LDFLAGS += $(LIBRPC) define Package/lsof @@ -35,17 +34,17 @@ cd $(PKG_BUILD_DIR); \ LINUX_CLIB=-DGLIBCV=2 \ LSOF_CC=$(TARGET_CC) \ + LSOF_INCLUDE=-I$(STAGING_DIR)/usr/include \ LSOF_VSTR=$(LINUX_VERSION) \ + LSOF_CFGC=$(TARGET_CFLAGS) \ + LSOF_CFGL=$(TARGET_LDFLAGS) \ + LSOF_AR=$(TARGET_CROSS)ar cr \ + LSOF_RANLIB=$(TARGET_CROSS)ranlib \ ./Configure -n linux endef define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC=$(TARGET_CC) \ - AR=$(TARGET_CROSS)ar cr \ - RANLIB=$(TARGET_CROSS)ranlib \ - DEBUG=$(TARGET_CFLAGS) \ - LDFLAGS=$(TARGET_LDFLAGS) + $(MAKE) -C $(PKG_BUILD_DIR) endef define Package/lsof/install ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel