How can I replace the system driver?

If you dont know where the driver is, how did you built it? A step-by-step list would help to understand your problem.

This is what I did.
1.Get r1beta2 source codes from git (git clone -b r1beta2 …).
2.Build them.
3.Blacklist the original driver,and put newly built driver in …/non-packaged/add-ons/…
4.Reboot the haiku.
5.System is halted!

**If I put the original driver in same place(…/non-packaged/…),
The system is NOT halted.

So,I can’t build the driver same as the original.

But how did you built it exactly?

1.Following the guide here and here,
I configured my build environment.

2.Use “jam -q -j2 @nightly-anyboot” command to build.

3.After that,I got a build module(binary) from
/haiku/generated/objects/haiku/x86_64/release/add-ons/kernel/drivers/network/wlan/idualwifi7260

These sequences above are the my method to get build module.

It is worth nothing that Haiku beta builds are configured with KDEBUG_LEVEL = 1, and nightly builds (of the master branch) are configured with KDEBUG_LEVEL = 2, and kernel add-ons built with KDEBUG_LEVEL = 1 are not compatible with KDEBUG_LEVEL = 2 kernels!

2 Likes

Thank you for information,waddlesplash!
I set KDEBUG_LEVELto 1, built & tested.
It works well(behavior same as the original).
Although it sounds funny for me,anyway I can stand the start line of debugging.

You should probably work with the master branch, as newer changes from FreeBSD have been merged in since beta2, I think. Feel free to ask me any questions here or on IRC about the compatibility layer, as I have worked on it the most in recent years.

I’m using the latest master brunch.
And replace codes to the latest FreeBSD’s one.
But same result comes again.
It seems that this problem has NOT solved yet even in FreeBSD.
Of course,I will keep trying to fix it!

You can try GhostBSD on liveUSB to check FreeBSD support of your hardware.

Thank you for advice.
I got the GhostBSD, and tested it via UEFI boot.
The wifi(iwm driver) does work well!!
I will check the source codes again,also the codes of GhostBSD.

According to my investigation,this problem is NOT caused by the driver but somewhere else(the boot loader and so on).

Reason:

  • The iwm driver on GhostBSD via UEFI boot -> works well
  • The similar(almost same logic) driver on Haiku via UEFI boot -> won’t work
  • The similar(almost same logic) driver on Haiku via BIOS boot -> works well

So,I will check the boot process first.
It maybe hard to fix although,I will try that!

4 Likes

Yes, the ticket PulkoMandy linked above describes this exact issue (works under BIOS boot, not under UEFI boot.) I never did manage to figure out the problem, and the systems I have that use this driver work OK under EFI boot, so it is pretty hard for me to investigate.

I use the same driver on my tablet (UEFI boot, MBR boot not supported) and it may not work depending on combination of plugged USB devices including boot USB drive. Some related information: https://dev.haiku-os.org/ticket/15708#comment:3.

For debugging,I’d like to replace the module smbios
(/boot/system/add-ons/kernel/generic/smbios) to my module.
It can be blacklisted using “/boot/system/settings/packages” method.
But, I have no idea that where should my module be put.
I tried to put it on “/boot/system/non-packaged/add-ons/kernel/generic”,
But It didn’t take effect.
Please help me,tell me how to replace the smbios.

At first glance, I’d say it was the right place. There’s probably another reason why it didn’t work.

According to my investigations,I think the problems are included in pci module.
(Its process booting from BIOS is different from that booting from UEFI.)
So,I’d like to replace the pci module(/boot/system/add-ons/kernel/bus_manager/pci) to my module.
The blacklist method can not be used because the kernel requires pci module before applying user’s add-ons.
Anybody knows how to replace it?
I have to prepare the hpkg file?
Please tell me!

Build an own Haiku hpkg?

1 Like

I could build a Haiku hpkg.
So,I can replace whole pkg.
But, if possible,I’d like to replace pci module only.
Are there any way to create hpkg file including the only specified files.

Hpkgcreator

You can build and install your own Haiku packages:

Build (x86_64):

time jam -j4 -q @nightly-raw haiku_loader.hpkg haiku.hpkg haiku_devel.hpkg makefile_engine.hpkg webpositive.hpkg haiku_extras.hpkg userland_fs.hpkg netfs.hpkg

Install:

(cd objects/haiku/x86_64/packaging/packages; pkgman install haiku_loader.hpkg haiku.hpkg haiku_devel.hpkg makefile_engine.hpkg webpositive.hpkg haiku_extras.hpkg userland_fs.hpkg netfs.hpkg)
2 Likes