mirror of
https://github.com/0Nera/BMOSP.git
synced 2024-12-22 22:06:56 +03:00
Модуль данных PCI добавлен
This commit is contained in:
parent
292d1bd560
commit
fe64d1ddee
1
build.sh
1
build.sh
@ -7,5 +7,6 @@ dos2unix */*.sh
|
||||
cd simd/ && chmod +x build.sh && ./build.sh && cd ..
|
||||
cd cpubench/ && chmod +x build.sh && ./build.sh && cd ..
|
||||
cd pci/ && chmod +x build.sh && ./build.sh && cd ..
|
||||
cd pci_data/ && chmod +x build.sh && ./build.sh && cd ..
|
||||
cd ..
|
||||
python3 pbuild.py
|
@ -25,5 +25,8 @@ TERM_WALLPAPER=boot:///boot.jpg
|
||||
MODULE_PATH=boot:///mod/cpubench.ko
|
||||
MODULE_CMDLINE=[MOD]cpubench.ko
|
||||
|
||||
MODULE_PATH=boot:///mod/pci_data.ko
|
||||
MODULE_CMDLINE=[MOD]pci_data.ko
|
||||
|
||||
MODULE_PATH=boot:///mod/pci.ko
|
||||
MODULE_CMDLINE=[MOD]pci.ko
|
7
modules/pci_data/build.sh
Normal file
7
modules/pci_data/build.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#/bin/sh
|
||||
echo "Название: список устройств и производителей для PCI"
|
||||
echo "Лицензия: Публичное достояние"
|
||||
gcc -I../../modlib -O0 -finput-charset=UTF-8 -fexec-charset=cp1251 -c -fPIC -nostdlib main.c -o pci_data.o
|
||||
gcc -Wl,--entry=init -fPIC -shared -nostdlib pci_data.o -o pci_data.ko
|
||||
cp pci_data.ko ../bin/
|
||||
echo "Сборка завершена, файл: pci_data.ko"
|
18
modules/pci_data/main.c
Normal file
18
modules/pci_data/main.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include <system.h>
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
uint16_t id;
|
||||
} vendor_t;
|
||||
|
||||
vendor_t vendor_list[] = { { "Intel", 0x8086 },
|
||||
{ "AMD", 0x1002 },
|
||||
{ "AMD", 0x1002 } };
|
||||
|
||||
module_info_t init(env_t *env) {
|
||||
init_env(env);
|
||||
return (module_info_t){ .name = (char *)"[PCI][DATA]",
|
||||
.message = (char *)"PCI данные",
|
||||
.data_size = 3,
|
||||
.data = &vendor_list };
|
||||
}
|
Loading…
Reference in New Issue
Block a user