Tiny Core Linux

General TC => Programming & Scripting - Unofficial => Topic started by: Sashank999 on November 08, 2020, 05:50:41 AM

Title: ahwd - A sh alternative to lsusb and lspci
Post by: Sashank999 on November 08, 2020, 05:50:41 AM
Hi !

ahwd - Auto HardWare Detection

ahwd script has these features :
100% Safe - No "rm" command or other similar commands used.
Needs NO DEPENDENCIES - It has absolutely no dependencies. Needs only pci.ids and usb.ids files.
Doesn't need an internet connection - Yes.
Tiny - Only 5KB in size rather than 200s of KBs of usb-utils.tcz and pci utils.tcz .
Checks dmesg for files required - Dmesg may contains some logs which may show us required files to be loaded. And ahwd shows those.
Only 4 Command Line options - They are :
--pci-ids="Absolute path of pci.ids file(~ accepted)"
--usb-ids="Absolute path of usb.ids file(~ accepted)"
--pci="A PCI ID for which you want the Vendor and Product names(Format XXXX:XXXX)"
--usb="A USB ID for which you want the Vendor and Product names(Format XXXX:XXXX)"

Completely tested on TCL v11 x64.

How to use ahwd ?
Just get the script, download http://www.linux-usb.org/usb.ids and https://pci-ids.ucw.cz/v2.2/pci.ids.
Keep these 3 in same dir and see the magic happen.

Output Format
It has 3 parts :
1. Some lines of dmesg which show possible files required for device to load.
2. Get the Vendor and Product Names of the PCI devices attached.
3. Get the Vendor and Product Names of the USB devices attached.

Thanks to :
TCL Team for creating such an amazing distro.
xor for this http://forum.tinycorelinux.net/index.php/topic,24088.30.html thread.

Request :
Please also add this to the base TCL ISO.
Title: Re: ahwd - A sh alternative to lsusb and lspci
Post by: xor on November 08, 2020, 08:21:30 AM
even though I could not see myself as a complete team member with my lack of technical knowledge.

for true minimalism; Thank you for your help in the transition from abstract philosophy to concrete physical reality. :)
Title: Re: ahwd - A sh alternative to lsusb and lspci
Post by: Sashank999 on November 08, 2020, 07:45:18 PM
Hi !

@xor You are welcome.

I just want the TCL Team to test it and include it in the base Tiny Core ISO. I will also modify ahwd if needed.
I actually named it tchwd(Tiny Core HardWare Detection), insipred from Mhwd(Manjaro hardware detection) but I just didn't decide to that. Once it gets accepted into the base TCL, I will change its name. And also, its free for TCL Team to copyright it.
Title: Re: ahwd - A sh alternative to lsusb and lspci
Post by: curaga on November 08, 2020, 11:29:26 PM
We appreciate the contribution, but I don't see this as useful in the base iso. If you check the sizes of those extensions, the very same ids files take the most.
Title: Re: ahwd - A sh alternative to lsusb and lspci
Post by: Sashank999 on November 09, 2020, 02:17:26 AM
Hi !

@curaga I think you are saying that this script is not very useful to the TCL as much as I thought. Do you have any suggestions so that it can be eligible enough to join the base ISO ?
Or is there any other area I can help you ?
Title: Re: ahwd - A sh alternative to lsusb and lspci
Post by: curaga on November 09, 2020, 09:35:35 AM
The base should be kept minimal, leaving most things extensions. This would be useful to a minority of users; advanced users can already read dmesg and use lspci/lsusb themselves.

Accordingly, we need help with extensions mostly. Maintaining the apps that you use would be useful.
Title: Re: ahwd - A sh alternative to lsusb and lspci
Post by: xor on November 10, 2020, 12:05:13 AM
my utopian idea! philosophically; on the system information screen;
"info; updated drivers for hardware were automatically downloaded!"
I wish he could write.

of course not in the basic kernel version of this one. !
It makes more sense to add it to a parent group distribution. :)

Of course, for now, this project has a few more steps to progress.
For now, maybe the name "ihwdrv.tcz" (info; hardware driver) might be a more universal name.

Hi !

@curaga I think you are saying that this script is not very useful to the TCL as much as I thought. Do you have any suggestions so that it can be eligible enough to join the base ISO ?
Or is there any other area I can help you ?
Title: Re: ahwd - A sh alternative to lsusb and lspci
Post by: xor on December 06, 2020, 05:03:24 AM
installation guide
can you write a script like this!?

Code: [Select]
$ VGADRV
> AMD [1];
> Nvidia [2];
> intel [3]
$ - 1 (enter)
> Radeon HD [1] firmware-radeon.tcz & xf86-video-ati.tcz
> AMD-PRO [2] firmware-amdgpu.tcz & xf86-video-amdgpu.tcz

If an installation script is created to direct the user,
more efficient loading conditions occur.

Hi !

@xor You are welcome.

I just want the TCL Team to test it and include it in the base Tiny Core ISO. I will also modify ahwd if needed.
I actually named it tchwd(Tiny Core HardWare Detection), insipred from Mhwd(Manjaro hardware detection) but I just didn't decide to that. Once it gets accepted into the base TCL, I will change its name. And also, its free for TCL Team to copyright it.
Title: Re: ahwd - A sh alternative to lsusb and lspci
Post by: mocore on January 27, 2021, 04:41:55 AM
my utopian idea! philosophically; on the system information screen;
"info; updated drivers for hardware were automatically downloaded!"


hi *

right now this sounds ideal to me , as im currently trying to detect/enable a touch-pad 
while doing so i found this Scan.sh script

http://forum.tinycorelinux.net/index.php/topic,23582.msg147801.html#msg147801

could the methods in the Scan.sh , and discussion in the linked thread
 provide any insight / inspiration
 wrt automation of hw detection ( as i guess things must be "detected" before they can be downloaded/installed!! )





Title: Re: ahwd - A sh alternative to lsusb and lspci
Post by: Juanito on January 27, 2021, 06:06:55 AM
You could try this:
Code: [Select]
$ sudo /usr/local/lib/libinput/libinput-list-devices
Title: Working On An Improved Installer, Better Driver Detection
Post by: xor on January 27, 2021, 10:57:03 PM
NomadBSD 1.4 Working On An Improved Installer, Better Driver Detection
https://www.phoronix.com/scan.php?page=news_item&px=NomadBSD-1.4-RC1

Quote
The suitable graphics card driver will now be installed and setup, instead of using the auto-detection on the installed system.
https://nomadbsd.org/#1.4-RC1