PDA

Bekijk de volledige versie : Trying to get IDE working on Oleg's Firmware



hugo
17-10-2004, 22:26
Hi,

After managing to install Oleg's latest version on the WL HDD, I tried to get the modules from the ide folder of a Wl HDD stock firmware.
The insmod give the following output. I don't know where to get the ide_ops symbol which looks like the starting point.



[admin@(none) /tmp]$ insmod ide-mod.o
Using ide-mod.o
insmod: unresolved symbol ide_ops
[admin@(none) /tmp]$ insmod ide-disk.o
Using ide-disk.o
insmod: unresolved symbol ide_input_data
insmod: unresolved symbol ide_wait_taskfile
insmod: unresolved symbol ide_output_data
insmod: unresolved symbol ide_wait_stat
insmod: unresolved symbol ide_handler_parser
insmod: unresolved symbol ide_register_module
insmod: unresolved symbol current_capacity
insmod: unresolved symbol ide_error
insmod: unresolved symbol task_no_data_intr
insmod: unresolved symbol proc_ide_read_geometry
insmod: unresolved symbol ide_unregister_module
insmod: unresolved symbol ide_raw_taskfile
insmod: unresolved symbol do_taskfile
insmod: unresolved symbol ide_unregister_subdriver
insmod: unresolved symbol ide_do_drive_cmd
insmod: unresolved symbol ide_scan_devices
insmod: unresolved symbol ide_remove_proc_entries
insmod: unresolved symbol ide_set_handler
insmod: unresolved symbol ide_register_subdriver
insmod: unresolved symbol ide_init_drive_cmd
insmod: unresolved symbol ide_add_setting
insmod: unresolved symbol ide_spin_wait_hwgroup
insmod: unresolved symbol drive_is_flashcard
insmod: unresolved symbol ide_end_request
[admin@(none) /tmp]$ insmod ide-pr~1.o
Using ide-pr~1.o
insmod: unresolved symbol ide_input_data
insmod: unresolved symbol do_ide_request
insmod: unresolved symbol ide_get_queue
insmod: unresolved symbol ide_hwifs
insmod: unresolved symbol ide_timer_expiry
insmod: unresolved symbol ide_add_generic_settings
insmod: unresolved symbol current_capacity
insmod: unresolved symbol ide_ops
insmod: unresolved symbol get_info_ptr
insmod: unresolved symbol ide_xlate_1024_hook
insmod: unresolved symbol ide_delay_50ms
insmod: unresolved symbol ide_probe
insmod: unresolved symbol ide_devfs_handle
insmod: unresolved symbol ide_intr
insmod: unresolved symbol ide_fops
insmod: unresolved symbol ide_fixstring
insmod: unresolved symbol create_proc_ide_interfaces
insmod: unresolved symbol drive_is_flashcard
insmod: unresolved symbol ide_unregister

Does anybody think it can be solved easily, or we have to wait fully tested firmware? What can I do to help testing this HD issue with Oleg's firmware?

JOCKYW2001
17-10-2004, 23:30
I've now a customized 1.1.2.7 available with telnetd, nfsv3 daemon, vsftpd and with harddisk drive watchdog disabled. I will inform Antiloop per PM and he will hopefully make it available on this site.

You can take that as a basis for easily running all kind of apps.

JockyW

hugo
18-10-2004, 00:07
I would be indeed very interested by this firmware, but I also would like to use most of the standard wl500g fonctionality, including firewall,pppoe and dyndns with the wl hdd.

I will for sure work from both side: ie using a firmware like yours from the wl hdd one, and trying to get from a wl500g one access to hd

Do you think it would be possible to just use the ide*.o files or it would need a full redesign?

JOCKYW2001
18-10-2004, 00:25
I'd propose the other way around. Just "pull" binaries from wl500g and run them in the 1.1.2.7. If that doesn't work (uclib missing) compile them against gclib

Oleg
18-10-2004, 09:47
Guys, my idea was to made unified firmware sources for whole wl series. At the moment I've added WL-HDD to the Makefile, all wl-500g stuff is ready.
At the moment I need someone who will take care of adding required webpages - most are just from wl-500g/gx, but this needs to be tested. ide stuff could be also added, by kernel recompilation, again there should be someone with good linux knowledge, who can made a required patch to wl500g kernel (if needed at all).
The idea is not just wl-hdd support, but also adding wl-hdd features to upcoming wl500gx (I mean samba/nfs).
Personally I do not own wl-hdd unit and I've have no plans to use it at all, that's why I'm calling for someone with wl-hdd.

I'm currently trying to build minimal samba-2.0.9 to mimic wl-hdd functionality. But I need someone to help me with other stuff if there any interest at all...

JOCKYW2001
18-10-2004, 10:01
...
The idea is not just wl-hdd support, but also adding wl-hdd features to upcoming wl500gx (I mean samba/nfs).
Personally I do not own wl-hdd unit and I've have no plans to use it at all, that's why I'm calling for someone with wl-hdd.
...

Hi Oleg, you can alway call on me to test things

JockyW

hugo
18-10-2004, 10:02
I'm ready to test as I'm dedicated to this right now. As I said in previous posts, I'm rusty on Linux, but I'm expert in network field and on Windows operating system.

I'm ready to install a linux version on my PC if cygwin is not enough, and I've got time to dedicate for this at least this week at full time.

Oleg
18-10-2004, 10:09
hugo, the problem is that I do not have free time to work with wl-hdd also, I need someone who will start digging with sources.
If you've experience in development, then probably you can start playing with it. But this is more than testing... If you're ready, then start with Fedora Core 2 installation on your PC.

hugo
19-10-2004, 21:09
At the moment I need someone who will take care of adding required webpages - most are just from wl-500g/gx, but this needs to be tested. ide stuff could be also added, by kernel recompilation

I'm actualy download and installing fedora core 2. This will take some time, but i'll report as soon as I'm able to compilate your own firmware from my computer.

As for the web pages, it seems to me that the wl-hdd already has some equivalent, if you browse the www folder. They are definitly setting nvram value that are similar (if not the same) than the one from wl500g. I think they either stripped down a wl 500g firmware, or they wanted at some stage to add the wl 500 fonctionnality in the wl hdd before backing away from the idea.

I think the only thing missing is a full menu to access all this pages, but it could be a good idea to create one simpler to be able to use this from a PDA for example.

I will not be able to help for the ide thing soon, although I think this is really the only feature needed, as we can then easily add samba and ftp support to mimic the wl hd stock firmware.

Tell me what kind of work you need for the webpages, and I'll take care of that.

Oleg
19-10-2004, 21:50
As for the web pages, it seems to me that the wl-hdd already has some equivalent, if you browse the www folder.

Tell me what kind of work you need for the webpages, and I'll take care of that.
Well, in fact Antiloop also started looking into them, so you will probably need to cooperate with him.

hugo
24-10-2004, 00:03
hugo, the problem is that I do not have free time to work with wl-hdd also, I need someone who will start digging with sources.
If you've experience in development, then probably you can start playing with it. But this is more than testing... If you're ready, then start with Fedora Core 2 installation on your PC.


Ok, I'm ready. I've setup the build environment, made my first test, and I can properly build the wl500g firmware.

I have the wlhdd source at hand too, so I can start to add the ide support to the kernel.

Do you have some tracks for me to follow to add ide support? should I compile a new kernel, or try to make specific ide module? Just point me to the right direction and I will go as far as I can using my time and some google ;-)

JOCKYW2001
24-10-2004, 02:56
Do a 'make menuconfig' in both 500g and wl-hdd linux/linux sourcetree and compare the kernel configs.

Furthermore in rc.c afaik there is a IDE define and the IDE module stuff is insmodded. You can probably copy paste that in the 500g sourcecode.

But as I wrote before, it's easier to work in the other direction and "import" Oleg's stuff in the wl-hdd sourcetree. Anyway, whatever way you choose you'll learn a lot for sure :)

Oleg
24-10-2004, 09:28
Yes, just like the JockyW wrote. You need to enable ide support in the kernel and compile as modules.
You can also compare .config files on the kernel dir - they contains all options enabled/disabled in the kernel. Try to figure out minimalistic options to reduce size of the kernel module (we do not need tape or floppy support, etc) - ASUS guys do not care about this.
So, modify kernel config by adding new modules, compile firmware and check that they're insmoded ok and hdd could be manually mounted. Once done we can modify remaining parts of the firmware to do automatic insmoding.

hugo
24-10-2004, 13:20
Ok,
So I found the ide support in the .config from hdd and tryed to paste it in .config from wl500g.

I also copied the pci and ide driver subfolders from hdd source.
I tryed a make dep from linux folder, it worked
I tryed a make from linux folder, it worked also

but if i try a make from gateway folder, I get this:


make -C ide modules
make[3]: Entering directory `/root/broadcom/src/linux/linux/drivers/ide'
mipsel-linux-gcc -D__KERNEL__ -I/root/broadcom/src/linux/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I/root/broadcom/src/linux/linux/../../include -I /root/broadcom/src/linux/linux/include/asm/gcc -G 0 -mno-abicalls -fno-pic -pipe -mcpu=r4600 -mips2 -Wa,--trap -m4710a0kern -DMODULE -mlong-calls -fno-common -nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_dma -c -o ide-dma.o ide-dma.c
ide-dma.c: In function `ide_build_sglist':
ide-dma.c:303: structure has no member named `pci_dev'
ide-dma.c: In function `ide_raw_build_sglist':
ide-dma.c:334: structure has no member named `pci_dev'
ide-dma.c: In function `ide_build_dmatable':
ide-dma.c:419: structure has no member named `pci_dev'
ide-dma.c: In function `ide_destroy_dmatable':
ide-dma.c:430: structure has no member named `pci_dev'
ide-dma.c: In function `config_drive_for_dma':
ide-dma.c:531: warning: implicit declaration of function `ide_dmaproc'
ide-dma.c: In function `ide_toggle_bounce':
ide-dma.c:607: structure has no member named `pci_dev'
ide-dma.c:614: structure has no member named `pci_dev'
ide-dma.c: In function `ide_release_dma':
ide-dma.c:761: structure has no member named `pci_dev'
ide-dma.c: In function `ide_setup_dma':
ide-dma.c:790: structure has no member named `pci_dev'
ide-dma.c:799: structure has no member named `pci_dev'
ide-dma.c: In function `ide_get_or_set_dma_base':
ide-dma.c:825: structure has no member named `pci_dev'
make[3]: *** [ide-dma.o] Error 1
make[3]: Leaving directory `/root/broadcom/src/linux/linux/drivers/ide'
make[2]: *** [_modsubdir_ide] Error 2
make[2]: Leaving directory `/root/broadcom/src/linux/linux/drivers'
make[1]: *** [_mod_drivers] Error 2
make[1]: Leaving directory `/root/broadcom/src/linux/linux'
make: *** [all] Erreur 2


I don't know what's missing for getting pci_dev

A search for it in the hdd source give me pages of result, so I suppose this is a standard library. Do you think it can be a file missing, or a bad compiling procedure?


EDIT: here is what is for me the ide support in the .config from hdd . I also added scsi entry as they are also different. I used this section in the .config of wl500g


# ATA/IDE/MFM/RLL support
#
CONFIG_IDE=m

#
# IDE, ATA and ATAPI Block devices
#
CONFIG_BLK_DEV_IDE=m
CONFIG_BLK_DEV_HD_IDE=y
CONFIG_BLK_DEV_HD=y
CONFIG_BLK_DEV_IDEDISK=m
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_IDEDISK_STROKE=y
# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set
# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set
# CONFIG_BLK_DEV_IDEDISK_IBM is not set
# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set
# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set
# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set
# CONFIG_BLK_DEV_IDEDISK_WD is not set
# CONFIG_BLK_DEV_COMMERIAL is not set
# CONFIG_BLK_DEV_TIVO is not set
# CONFIG_BLK_DEV_IDECS is not set
# CONFIG_BLK_DEV_IDECD is not set
CONFIG_BLK_DEV_IDETAPE=m
CONFIG_BLK_DEV_IDEFLOPPY=m
CONFIG_BLK_DEV_IDESCSI=m
CONFIG_IDE_TASK_IOCTL=y
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_BLK_DEV_OFFBOARD=y
CONFIG_BLK_DEV_IDEDMA_FORCED=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_IDEDMA_ONLYDISK=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_PCI_WIP=y
CONFIG_BLK_DEV_IDEDMA_TIMEOUT=y
CONFIG_IDEDMA_NEW_DRIVE_LISTINGS=y
CONFIG_BLK_DEV_ADMA=y
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_AEC62XX_TUNING is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_WDC_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_AMD74XX_OVERRIDE is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_CMD680 is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_HPT34X_AUTODMA is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_PIIX_TUNING is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_OPTI621 is not set
CONFIG_BLK_DEV_PDC202XX=y
CONFIG_PDC202XX_BURST=y
CONFIG_PDC202XX_FORCE=y
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_IDE_CHIPSETS is not set
CONFIG_IDEDMA_AUTO=y
CONFIG_IDEDMA_IVB=y
# CONFIG_DMA_NONPCI is not set
CONFIG_BLK_DEV_IDE_MODES=y
CONFIG_BLK_DEV_ATARAID=m
CONFIG_BLK_DEV_ATARAID_PDC=m
# CONFIG_BLK_DEV_ATARAID_HPT is not set

#
# SCSI support
#
CONFIG_SCSI=m
CONFIG_BLK_DEV_SD=m
CONFIG_SD_EXTRA_DEVS=40
CONFIG_CHR_DEV_ST=m
CONFIG_CHR_DEV_OSST=m
CONFIG_BLK_DEV_SR=m
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_SR_EXTRA_DEVS=2
CONFIG_CHR_DEV_SG=m
CONFIG_SCSI_DEBUG_QUEUES=y
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y

Oleg
24-10-2004, 15:00
I also copied the pci and ide driver subfolders from hdd source.

Wl-hdd kernel is outdated version of one used in the wl500g. Do not mix kernel sources, try compiling wl500g kernel playing with .config only.

hugo
24-10-2004, 17:01
With your source it compile ok, but I get a file a tad too big (3842048 bytes). Of course, after flashing, I get a wl hdd in recovery mode.

What would be my best option to reduce a little bit the size to something the wl hdd would accept?

Oleg
24-10-2004, 17:38
With your source it compile ok, but I get a file a tad too big (3842048 bytes). Of course, after flashing, I get a wl hdd in recovery mode.

What would be my best option to reduce a little bit the size to something the wl hdd would accept?
Disable ide stuff which is not used (like tapes, floppies, etc) in the kernel config.

Your trx should not exceed 3801088 bytes.

JOCKYW2001
24-10-2004, 17:39
Or drop some application modules from the flash. Build them separately and install them on the hdd. You can start them automatically by adding some startup code in services.c

hugo
24-10-2004, 18:03
ok I think i've been as far as I can go for now:

I have been able to create a working firmware, and it started correctly.

I have not disabled anything, except NTFS support (not need for my disk ATM) and webcam drivers.

The wl hdd boot correctly, and work correctly, but a lsmod doesn't show my ide, as planned. If I go to the /lib.....2.40.../ide folder and try an insmod ide-mod.o, the router automaticaly reboot.

I don't want to run it automaticaly as it will probably put the router in an infinite reboot loop.

Problem is that I cannot get any error message due to the reboot.

Any idea?

hugo
24-10-2004, 21:06
I got better: Using the ide-mod.o and ide-disk.o from the compiled hdd firmware, I can insmod.

I still cannot do an insmod ide-probe-mod.o as I get the HDD light always on, and the wlhdd hang from that.

I don't know if the first 2 mods are enough to get access to hdd. I think I have to try a makedevs? but I cannot find the syntax for the command. Is there a way to see if I have access to hd if I don't have any /dev/hdxx ?


EDIt: I can make the devs, but it's not enough

If I insmod the compiled ide-probe-mod.o, i get the error "segmentation fault", probably because they haven't been compiled at the same time. I have this module marked as loading if I lsmod.

Here are some other result:


[admin@(none) ide]$ cat drivers
ide-disk version 1.12
[admin@(none) ide]$ cat pdc202xx

PROMISE Ultra series driver Ver 1.20.0.7 2002-05-23 Adapter: Ultra100 on M/B
--------------- Primary Channel ---------------- Secondary Channel -------------
enabled enabled
66 Clocking disabled disabled
Mode PCI PCI
--------------- drive0 --------- drive1 -------- drive0 ---------- drive1 ------
DMA enabled: no no no no
UDMA Mode: 0 0 0 0
PIO Mode: 0 0 0 0

I have also a ide device in my dev folder but nothing else

Oleg
25-10-2004, 16:43
Check /proc/partitions content.

hugo
25-10-2004, 20:27
nope, I only get my USB pendrive.

What I do not understand is why the modules from the wlhdd firmware do work, and not the one from the wl500g. Looking at the source, there is no difference between the ide folder from hdd kernel and the one from wl500. What other file could then be involved in the making of ide-mod.o or ide-probe-mod.o?

hugo
25-10-2004, 21:41
I also tried ALL non network related lines from the wlhdd .config file. Same result. I don't know where it could be a difference now between the 2 kernels.

hugo
31-10-2004, 21:50
Could somebody give me some help on where to look to find how to make the ide work?

Here are some questions:

does the ide support depend on something outside the kernel folder?

Does it depend on any other file than .config , if the source are the same?

If the /driver/ide folder is the same, can there be a difference in the compilation options that would make it work?


Also, I would like to understand why an ide-mod.o from wl hdd firmware can install under oleg's firmware modification, but not the one from the normal make process (ie from oleg's make)

Is anybody working on the same thing than me right now so we could share some info?

Thanks for any help.

Antiloop
31-10-2004, 22:56
Could somebody give me some help on where to look to find how to make the ide work?

Here are some questions:

does the ide support depend on something outside the kernel folder?

Does it depend on any other file than .config , if the source are the same?

If the /driver/ide folder is the same, can there be a difference in the compilation options that would make it work?


Also, I would like to understand why an ide-mod.o from wl hdd firmware can install under oleg's firmware modification, but not the one from the normal make process (ie from oleg's make)

Is anybody working on the same thing than me right now so we could share some info?

Thanks for any help.


Oleg is trying to implement the ide stuff, but at this time my wl-hdd hangs everytime at insmodding ide-mod.o

hugo
01-11-2004, 10:49
Oleg is trying to implement the ide stuff, but at this time my wl-hdd hangs everytime at insmodding ide-mod.o

I've been further than the ide-mod.o by using the one from the wl hdd firmware copied on a USB pendrive. Don't know if it can help?

Antiloop
01-11-2004, 11:18
I've been further than the ide-mod.o by using the one from the wl hdd firmware copied on a USB pendrive. Don't know if it can help?
I got unresolved symbol shit when trying that (few weeks ago that is at 1.8.1.7-1 custom)

but it's not really an option to do it like that IMO

hugo
01-11-2004, 11:22
I got unresolved symbol shit when trying that (few weeks ago that is at 1.8.1.7-1 custom)

but it's not really an option to do it like that IMO

Sorry, I have'nt been clear enough. I've been trying to create a new kernel using all the IDE parts from the .config of wl hdd, and all other parts from wl500g modified by oleg. The final result was a working wl500g, with no ide support. insmod ide-mod.o would hang the router, but using the one from the wl hdd stock firmware is ok. It is hanging on another insmod (ide-probe-mod.o)

Oleg
01-11-2004, 12:37
Yes, I've no idea what happens, cause I'm debugging my code remotely (thanks to Antiloop)...
I can probably prepare firmware with netconsole support which can unveil the things.
The basic firmware for the WLHDD (including all the stuff from wl500gx, including afterburner, is mostly ready - thanks for Antiloop for digging with web pages), and it's already seems to work (except hotplug?).
So, the main problem is ide for now... Seems kernel panics at some point.

hugo
01-11-2004, 12:46
Yes, I've no idea what happens, cause I'm debugging my code remotely (thanks to Antiloop)...
I can probably prepare firmware with netconsole support which can unveil the things.
The basic firmware for the WLHDD (including all the stuff from wl500gx, including afterburner, is mostly ready - thanks for Antiloop for digging with web pages), and it's already seems to work (except hotplug?).
So, the main problem is ide for now... Seems kernel panics at some point.


Hotplug always had problem for me: I usually have to mount my external usb devices by hand when it should be automaticaly monted, even if they are plugged at boot time.

For the kernel panic, I'm sure there is something changed in the code in wlhdd that does make it work. The fact it does hang at ide probe is probably a hidden patch in the kernel that avoid this in asus firmware.

I'm trying to file compare both linux subfolders to try to get something, and also to use wl hdd .config file on your version but it doesn't boot up.

I'm going to wait for your work and maybe help to find the cause of the kernel panic?

Oleg
01-11-2004, 12:59
Hotplug always had problem for me: I usually have to mount my external usb devices by hand when it should be automaticaly monted, even if they are plugged at boot time.

For the kernel panic, I'm sure there is something changed in the code in wlhdd that does make it work. The fact it does hang at ide probe is probably a hidden patch in the kernel that avoid this in asus firmware.

I'm trying to file compare both linux subfolders to try to get something, and also to use wl hdd .config file on your version but it doesn't boot up.

I'm going to wait for your work and maybe help to find the cause of the kernel panic?
Well, I've already diffed the kernels and there is only one relevant part, that was changed. I've not tried to do exactly like ASUS has done this, probably I will try this tonight.

Styno
01-11-2004, 13:08
How do you test IDE on WL-500g if there's no IDE chip/support available? :confused:

Oleg
01-11-2004, 13:10
How do you test IDE on WL-500g if there's no IDE chip/support available? :confused:
Remotely, using Antiloop as connection. :D

hugo
01-11-2004, 17:44
Just a though: is modprobe better than insmod to mount a file like ide-probe-mod.o or ide-mod.o?

Oleg
01-11-2004, 18:06
Just a though: is modprobe better than insmod to mount a file like ide-probe-mod.o or ide-mod.o?
modprobe just loads all dependcies (internally it calls insmod)