Modify

Opened 7 years ago

Closed 7 years ago

Last modified 2 years ago

#8647 closed defect (invalid)

rb711 support

Reported by: softjuanma@… Owned by:
Priority: highest Milestone: Backfire 10.03.1
Component: luci Version: Backfire 10.03.1 RC4
Keywords: rb711 Cc: softjuanma@…

Description

Has Backfire 10.03.1-rc4 support for the rb711 board? It seems like similar to rb750, both uses ar724x chip.

Attachments (1)

RB711-v2.diff (5.6 KB) - added by anonymous 2 years ago.
RB711 patch

Download all attachments as: .zip

Change History (11)

comment:1 Changed 7 years ago by acoul

  • Resolution set to invalid
  • Status changed from new to closed

Not officially, but it may be possible. Feel free to check the Hardware wanted for porting section.

Changed 2 years ago by anonymous

RB711 patch

comment:2 Changed 2 years ago by anonymous

comment:3 follow-up: Changed 2 years ago by onnuex

I tested your patch and it seems to be working fine so far! I took some notes on how to apply and use it here https://wiki.openwrt.org/toh/mikrotik/rb711
Since I'm in possession of of a RB711 I would be interested in support of the NAND flash. So if you need any information, feel free to ask!

comment:4 Changed 2 years ago by openwrtfan

I tried following the instructions at https://wiki.openwrt.org/toh/mikrotik/rb711, but couldn't get my 711 to boot via the ramdisk.

Since serial is disabled initially, I couldn't figure out what was wrong with the boot process (after the ramdisk gets accessed over tftp).

A few questions -

  1. What is the significance of this line ?

CONFIG_CMDLINE="console=ttyS0,115200 GPIO_RESET=yes gpio=790341 HZ=200000000 mem=32M board=711 boot=0 mlc=2 rootfstype=yaffs noinitrd"

Is it just needed for enabling serial or it is required to boot properly ?

  1. I can see that the patches are being made to the mach-rb750.c file. Does that module (Mikrotik RB750 support) need to be enabled via 'make kernel_menuconfig' before compiling ? Or is it compiled/included by default during make ?
  1. There are differing patch files on (https://openwrt.ayufan.eu/rb711/RB711-v2.diff) and (https://onny.project-insanity.org/files/rb711-openwrt.patch). Which patch file is the correct one ? I tried using RB711-v2.diff too, but it failed to patch cleanly.

Apologies in advance for my newbie questions, but I really want to get openwrt booting on this thing. I can help with the testing, in anyway possible.

@onnuex - will it be possible for you to upload the compiled 711 ramdisk elf somewhere. I can try booting off that and see if I missed something during compilation.

Thanks.

comment:5 Changed 2 years ago by openwrtfan

I figured out the answer to Question 3. It seems that the rb711-openwrt.patch file contains the same exact patches, but is updated for use in the latest trunk.

Still can't figure out why it's not booting though.

Last edited 2 years ago by openwrtfan (previous) (diff)

comment:6 Changed 2 years ago by openwrtfan

Alright I got it booting. I was using a defective UART module with a broken TX out, which made me think it hung after booting. Now I can access the openwrt console.

Any idea how I can get it to recognise the NAND flash ?

comment:7 in reply to: ↑ 3 Changed 2 years ago by openwrtfan

Replying to onnuex:

I tested your patch and it seems to be working fine so far! I took some notes on how to apply and use it here https://wiki.openwrt.org/toh/mikrotik/rb711
Since I'm in possession of of a RB711 I would be interested in support of the NAND flash. So if you need any information, feel free to ask!

@onnuex - I got it to recognise the NAND flash by making a few tweaks to the patched RB750 source code.

Here is the boot output -

[ 4.045731] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1A
[ 4.054424] console [ttyS0] enabled
[ 4.054424] console [ttyS0] enabled
[ 4.061381] bootconsole [early0] disabled
[ 4.061381] bootconsole [early0] disabled
[ 4.070948] NAND flash driver for the RouterBOARD 750 version 0.1.0
[ 4.077327] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xf1
[ 4.083769] nand: Toshiba NAND 128MiB 3,3V 8-bit
[ 4.088416] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB si4
[ 4.096083] Scanning device for bad blocks
[ 4.194987] Creating 3 MTD partitions on "NAND 128MiB 3,3V 8-bit":
[ 4.201281] 0x000000000000-0x000000040000 : "booter"
[ 4.207620] 0x000000040000-0x000000400000 : "kernel"
[ 4.213856] 0x000000400000-0x000008000000 : "rootfs"
[ 4.220519] mtd: device 2 (rootfs) set to be root filesystem
[ 4.226358] mtdsplit: no squashfs found in "rootfs"
[ 4.249445] libphy: ag71xx_mdio: probed

comment:8 follow-up: Changed 2 years ago by onnuex

@openwrtfan: Wow nice thank you for the research! Could you please share your patch or changes? I really would like to test it.
Further, have you tried mounting a partition with this NAND flash layout or even flashing OpenWRT on it?

comment:9 in reply to: ↑ 8 Changed 2 years ago by openwrtfan

@onnuex: Apologies for the delay in getting back. My 711r3 was being detected as a 711 during the OpenWrt Ramdisk bootup, meaning the function

static void __init rb711_setup(void)

was executed, instead of

static void __init rb711r3_setup(void)

I'm guessing the reason behind this is hardcoding 'board=711' in the config file (target/linux/ar71xx/mikrotik/config-default). I realised I had the 711r3 version, only after getting a shell on the default RouterOS install (using /nova/etc/devel-login tricks).

Anyway, I figured out that there wasn't any code executed for detecting the NAND flash. And the code which was added earlier, isn't executed either due to the rb711r3_setup function just redirecting execution to the rb711_setup function using -

static void __init rb711r3_setup(void)
{
 rb711_setup(); return;

Hence, I added the detection code to the rb711_setup function. You should probably add those changes to the other 711 functions too.

static void __init rb711_setup(void)
{
	ath79_gpio_function_disable(AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
				     AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
				     AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
				     AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
				     AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN);

//detection code start

	rb750_nand_data.nce_line = RB750_NAND_NCE;
	rb750_nand_data.enable_pins = rb750_nand_enable_pins;
	rb750_nand_data.disable_pins = rb750_nand_disable_pins;
	rb750_nand_data.latch_change = rb750_latch_change;
	platform_device_register(&rb750_nand_device);

//detection code end

	ath79_init_mac(ath79_eth0_data.mac_addr, ath79_mac_base, 0);

This will make it detect the Toshiba 128 MB NAND Flash and load the 3 partitions from it. I was successful in mounting the rootfs partition (yaffs) and writing the file /nova/etc/devel-login to it.

Let me know if you have any questions/issues replicating this.

comment:10 Changed 2 years ago by anonymous

Thank you for the reply! Are you sure you have a Toshiba 128MB NAND flash on your PCB?
Because when I look on my board I can only find the St NAND512W3A2DN6 (512MB NAND ?!).
So I'm not sure if this will work but I'll give it a try :)

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.