Does oss support MIPS arch??

OSS related discussion in general (i.e. not limited to Linux/Solaris/BSD)

Moderators: hannu, dev, cesium

tearring
New Member
Posts: 8
Joined: Mon Jul 31, 2017 5:57 am
Sound Card: ATI SB700
OS: Linux

Does oss support MIPS arch??

Postby tearring » Mon Jul 31, 2017 6:02 am

Recently, i tried to compile OSS v4.2 build 2017 for Linux with kernel 3.10 and mips64el arch
but i got the error:
cc: error: Unrecognized command line option '-mregparm=3'

With the default sound driver alsa, it works well.

i want to replace alsa with oss, anyone can help me?
Last edited by tearring on Fri Apr 06, 2018 3:53 pm, edited 1 time in total.

dev
Developer
Posts: 585
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA
Contact:

Re: Does oss support MIPS arch??

Postby dev » Mon Nov 06, 2017 9:41 pm

mregperm=3 is an x86 setting. You should look at the Sparc or AlphaLinux settings.

tearring
New Member
Posts: 8
Joined: Mon Jul 31, 2017 5:57 am
Sound Card: ATI SB700
OS: Linux

Re: Does oss support MIPS arch??

Postby tearring » Thu Apr 05, 2018 1:45 am

How could i add support for mips64el arch ?
i found many scripts coresponding to platfom or cpu arch
i don't know how to modify these files to support mips64el :?
Is there any suggestion for me?

tearring
New Member
Posts: 8
Joined: Mon Jul 31, 2017 5:57 am
Sound Card: ATI SB700
OS: Linux

Re: Does oss support MIPS arch??

Postby tearring » Thu Apr 05, 2018 2:07 am

now i can compile the oss source tree with the following modifications:

tar -xvf oss-v4.2-build2017-src-gpl.tar.gz

1. modify the file oss-v4.2-build2017-src-gpl\setup\Linux\oss\build\install.sh
- if /usr/sbin/ossvermagic -r || /sbin/modinfo ext3|grep -q REGPARM
+"if /sbin/modinfo nfs|grep -q REGPARM"

2. modify the file oss-v4.2-build2017-src-gpl\os_cmd\Linux\ossvermagic\ossvermagic.c
-"#ifdef __x86_64__"
+#if defined(__x86_64__) || defined(__mips__)

3. modify the file oss-v4.2-build2017-src-gpl\setup\elflib.inc
change the 64bit version of funtion valid_elf_file
add the following code fragment
+#elif __mips__
+/* Check for MIPS machine type */
+ if ((hdr->e_machine != EM_MIPS))
+ {
+ fprintf (stderr, "e_machine=%x\n", hdr->e_machine);
+ return 0;
+ }

4. modify the file oss-v4.2-build2017-src-gpl\setup\Linux\oss\build\osscore.c
change the MARCOS "__arm__" to "__mips__"

5. then i do the following steps:

mkdir oss
cd oss
../oss-v4.2-build2017-src-gpl/configure --no-regparm --config-vmix=NO --only-drv=oss_hdaudio
make -j 4
make install


Finally i got some warning like this:
ld: Warning: /lib/modules/3.10.84/kernel/oss/osscore.ko uses -msoft-float (set by osscore.ko), osscore_mainline.o uses -mhard-float
ld: osscore_mainline.o: warning: linking abicalls files with non-abicalls files


and i got the segmentation fault by modprobe osscore

the partial "make install" output infomation is as follows:

.........
sh build.sh
Check devices for oss_hdaudio
cp: cannot stat"lib/libsalsa/.libs/libsalsa.so.2.0.0" : no such file or directory
Warning: No libsalsa library compiled
done ossinfo
done ossmix
done osspartysh
done ossphone
done ossplay
done ossrecord
done osstest
done ossdevlinks
done savemixer
done vmixctl
done ossdetect
#rm -f "/usr/lib/oss"/modules/*.o
(cd prototype; find -L . -type d | xargs -i{} mkdir -p /{})
(cd prototype; find -L . -type f | xargs -i{} cp {} /{})
cd "/usr/lib/oss"/build && sh install.sh

OSS build environment set up for NOREGPARM kernels

Building module osscore
ld: Warning: /lib/modules/3.10.84/kernel/oss/osscore.ko uses -msoft-float (set by osscore.ko), osscore_mainline.o uses -mhard-float
ld: osscore_mainline.o: warning: linking abicalls files with non-abicalls files
Building module oss_hdaudio
ld: Warning: /lib/modules/3.10.84/kernel/oss/oss_hdaudio.ko uses -msoft-float (set by oss_hdaudio.ko), .o uses -mhard-float
ld: .o: warning: linking abicalls files with non-abicalls files
make[1]: Entering directory '/usr/lib/oss/build'
make[1]: Leaving directory '/usr/lib/oss/build'
depmod -a
-----------------------------
Detected ATI High Definition Audio (SB600)
USB support available in the system, adding USB driver
-----------------------------

sync
soundoff && sync && soundon && echo "OSS has started OK"
OSS not loaded.
/sbin/soundon: line 170: 8058 segmentation fault /sbin/modprobe osscore $OPTIONS
Loading the osscore module failed
setup/Linux/make.local:19: recipe for target 'install' failed
make: *** [install] Error 60
Last edited by tearring on Fri Apr 06, 2018 3:58 pm, edited 2 times in total.

tearring
New Member
Posts: 8
Joined: Mon Jul 31, 2017 5:57 am
Sound Card: ATI SB700
OS: Linux

Re: Does oss support MIPS arch??

Postby tearring » Fri Apr 06, 2018 3:50 pm

Here is the detail info logged by soundon.log


Open Sound System starting 2018 04月日 fri 23:42:51 CST
OSS version: 4.2 (b 2017/201804061535)
Kernel version: 3.10.84
Kernel vermagic:
OSS vermagic:

*** Loading OSS kernel modules ***

Loading the osscore module failed
[ 3.390625] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 3.390625] e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
[ 3.390625] e1000e: Copyright(c) 1999 - 2013 Intel Corporation.
[ 3.390625] e1000e 0000:04:00.0: Disabling ASPM L0s L1
[ 3.390625] e1000e 0000:04:00.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[ 3.507812] e1000e 0000:04:00.0 eth0: registered PHC clock
[ 3.507812] e1000e 0000:04:00.0 eth0: (PCI Express:2.5GT/s:Width x1) 00:1b:96:6c:ef:34
[ 3.507812] e1000e 0000:04:00.0 eth0: Intel(R) PRO/1000 Network Connection
[ 3.507812] e1000e 0000:04:00.0 eth0: MAC: 3, PHY: 8, PBA No: E46981-003
[ 3.507812] e1000e 0000:05:00.0: Disabling ASPM L0s L1
[ 3.507812] e1000e 0000:05:00.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[ 3.632812] e1000e 0000:05:00.0 eth1: registered PHC clock
[ 3.632812] e1000e 0000:05:00.0 eth1: (PCI Express:2.5GT/s:Width x1) 00:1b:29:bc:cf:71
[ 3.632812] e1000e 0000:05:00.0 eth1: Intel(R) PRO/1000 Network Connection
[ 3.632812] e1000e 0000:05:00.0 eth1: MAC: 3, PHY: 8, PBA No: E46981-003
[ 3.632812] e1000e 0000:06:00.0: Disabling ASPM L0s L1
[ 3.632812] e1000e 0000:06:00.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[ 3.710937] ata1: SATA link down (SStatus 0 SControl 300)
[ 3.710937] ata2: SATA link down (SStatus 0 SControl 300)
[ 3.710937] ata4: SATA link down (SStatus 0 SControl 300)
[ 3.750000] e1000e 0000:06:00.0 eth2: registered PHC clock
[ 3.750000] e1000e 0000:06:00.0 eth2: (PCI Express:2.5GT/s:Width x1) 00:1b:5b:9a:7d:72
[ 3.750000] e1000e 0000:06:00.0 eth2: Intel(R) PRO/1000 Network Connection
[ 3.750000] e1000e 0000:06:00.0 eth2: MAC: 3, PHY: 8, PBA No: E46981-003
[ 3.750000] e1000e 0000:07:00.0: Disabling ASPM L0s L1
[ 3.750000] e1000e 0000:07:00.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[ 3.863281] e1000e 0000:07:00.0 eth3: registered PHC clock
[ 3.863281] e1000e 0000:07:00.0 eth3: (PCI Express:2.5GT/s:Width x1) 00:1b:d8:a0:48:79
[ 3.863281] e1000e 0000:07:00.0 eth3: Intel(R) PRO/1000 Network Connection
[ 3.863281] e1000e 0000:07:00.0 eth3: MAC: 3, PHY: 8, PBA No: E46981-003
[ 3.863281] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.0.3-k
[ 3.863281] igb: Copyright (c) 2007-2013 Intel Corporation.
[ 3.863281] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver - version 3.13.10-k
[ 3.863281] ixgbe: Copyright (c) 1999-2013 Intel Corporation.
[ 3.863281] ixgb: Intel(R) PRO/10GbE Network Driver - version 1.0.135-k2-NAPI
[ 3.863281] ixgb: Copyright (c) 1999-2008 Intel Corporation.
[ 3.863281] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 3.863281] ehci-pci: EHCI PCI platform driver
[ 3.863281] ehci-pci 0000:00:12.2: EHCI Host Controller
[ 3.863281] ehci-pci 0000:00:12.2: new USB bus registered, assigned bus number 1
[ 3.863281] ehci-pci 0000:00:12.2: applying AMD SB700/SB800/Hudson-2/3 EHCI dummy qh workaround
[ 3.863281] ehci-pci 0000:00:12.2: debug port 1
[ 3.863281] ehci-pci 0000:00:12.2: irq 6, io mem 0x44909400
[ 3.875000] ehci-pci 0000:00:12.2: USB 2.0 started, EHCI 1.00
[ 3.875000] hub 1-0:1.0: USB hub found
[ 3.875000] hub 1-0:1.0: 6 ports detected
[ 3.875000] ehci-pci 0000:00:13.2: EHCI Host Controller
[ 3.875000] ehci-pci 0000:00:13.2: new USB bus registered, assigned bus number 2
[ 3.875000] ehci-pci 0000:00:13.2: applying AMD SB700/SB800/Hudson-2/3 EHCI dummy qh workaround
[ 3.875000] ehci-pci 0000:00:13.2: debug port 1
[ 3.875000] ehci-pci 0000:00:13.2: irq 6, io mem 0x44909500
[ 3.882812] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 3.886718] ehci-pci 0000:00:13.2: USB 2.0 started, EHCI 1.00
[ 3.886718] hub 2-0:1.0: USB hub found
[ 3.886718] hub 2-0:1.0: 6 ports detected
[ 3.886718] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 3.886718] ohci_hcd 0000:00:12.0: OHCI Host Controller
[ 3.886718] ohci_hcd 0000:00:12.0: new USB bus registered, assigned bus number 3
[ 3.886718] ohci_hcd 0000:00:12.0: irq 6, io mem 0x44904000
[ 3.890625] ata3.00: ATA-8: KINGSTON SV300S37A120G, 60AABBF0, max UDMA/133
[ 3.890625] ata3.00: 234441648 sectors, multi 1: LBA48 NCQ (depth 31/32), AA
[ 3.894531] ata3.00: configured for UDMA/133
[ 3.894531] scsi 2:0:0:0: Direct-Access ATA KINGSTON SV300S3 60AA PQ: 0 ANSI: 5
[ 3.894531] sd 2:0:0:0: Attached scsi generic sg0 type 0
[ 3.898437] sd 2:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/111 GiB)
[ 3.898437] sd 2:0:0:0: [sda] Write Protect is off
[ 3.898437] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 3.898437] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 3.898437] sda: sda1 sda2 sda3 sda4 < sda5 >
[ 3.898437] sd 2:0:0:0: [sda] Attached SCSI disk
[ 3.945312] hub 3-0:1.0: USB hub found
[ 3.945312] hub 3-0:1.0: 3 ports detected
[ 3.945312] ohci_hcd 0000:00:12.1: OHCI Host Controller
[ 3.945312] ohci_hcd 0000:00:12.1: new USB bus registered, assigned bus number 4
[ 3.945312] ohci_hcd 0000:00:12.1: irq 6, io mem 0x44905000
[ 4.003906] hub 4-0:1.0: USB hub found
[ 4.003906] hub 4-0:1.0: 3 ports detected
[ 4.003906] ohci_hcd 0000:00:13.0: OHCI Host Controller
[ 4.003906] ohci_hcd 0000:00:13.0: new USB bus registered, assigned bus number 5
[ 4.003906] ohci_hcd 0000:00:13.0: irq 6, io mem 0x44906000
[ 4.062500] hub 5-0:1.0: USB hub found
[ 4.062500] hub 5-0:1.0: 3 ports detected
[ 4.062500] ohci_hcd 0000:00:13.1: OHCI Host Controller
[ 4.062500] ohci_hcd 0000:00:13.1: new USB bus registered, assigned bus number 6
[ 4.062500] ohci_hcd 0000:00:13.1: irq 6, io mem 0x44907000
[ 4.121093] hub 6-0:1.0: USB hub found
[ 4.121093] hub 6-0:1.0: 3 ports detected
[ 4.121093] ohci_hcd 0000:00:14.5: OHCI Host Controller
[ 4.121093] ohci_hcd 0000:00:14.5: new USB bus registered, assigned bus number 7
[ 4.121093] ohci_hcd 0000:00:14.5: irq 6, io mem 0x44908000
[ 4.179687] hub 7-0:1.0: USB hub found
[ 4.179687] hub 7-0:1.0: 2 ports detected
[ 4.179687] usbcore: registered new interface driver usb-storage
[ 4.179687] Module dwc_common_port init
[ 4.179687] dwc_otg: version 2.93a 15-MAY-2011
[ 4.203125] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 4.203125] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 4.203125] mousedev: PS/2 mouse device common for all mice
[ 4.207031] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
[ 4.207031] rtc_cmos rtc_cmos: alarms up to one day, 114 bytes nvram
[ 4.207031] i2c /dev entries driver
[ 4.207031] piix4_smbus 0000:00:14.0: SMBus Host Controller at 0x1000, revision 0
[ 4.207031] device-mapper: ioctl: 4.24.0-ioctl (2013-01-15) initialised: dm-devel@redhat.com
[ 4.207031] device-mapper: multipath: version 1.6.0 loaded
[ 4.207031] device-mapper: multipath round-robin: version 1.0.0 loaded
[ 4.207031] usbcore: registered new interface driver usbhid
[ 4.207031] usbhid: USB HID core driver
[ 4.207031] TCP: cubic registered
[ 4.207031] Initializing XFRM netlink socket
[ 4.207031] NET: Registered protocol family 17
[ 4.207031] NET: Registered protocol family 15
[ 4.207031] registered taskstats version 1
[ 4.210937] rtc_cmos rtc_cmos: setting system clock to 2018-04-06 23:41:19 UTC (1523058079)
[ 4.285156] atkbd serio0: keyboard reset failed on isa0060/serio0
[ 4.535156] atkbd serio1: keyboard reset failed on isa0060/serio1
[ 4.570312] usb 3-2: new low-speed USB device number 2 using ohci_hcd
[ 4.734375] input: HID 04b3:3107 as /devices/pci0000:00/0000:00:12.0/usb3/3-2/3-2:1.0/input/input0
[ 4.734375] hid-generic 0003:04B3:3107.0001: input: USB HID v11.10 Mouse [HID 04b3:3107] on usb-0000:00:12.0-2/input0
[ 4.867187] usb 3-3: new low-speed USB device number 3 using ohci_hcd
[ 4.875000] EXT4-fs (sda1): warning: mounting fs with errors, running e2fsck is recommended
[ 4.875000] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 4.875000] VFS: Mounted root (ext4 filesystem) on device 8:1.
[ 4.875000] devtmpfs: mounted
[ 4.875000] Freeing unused kernel memory: 336K (ffffffff80e0c000 - ffffffff80e60000)
[ 4.949218] systemd[1]: RTC configured in localtime, applying delta of 480 minutes to system time.
[ 4.988281] NET: Registered protocol family 10
[ 5.039062] input: Logitech Logitech USB Keyboard as /devices/pci0000:00/0000:00:12.0/usb3/3-3/3-3:1.0/input/input1
[ 5.039062] hid-generic 0003:046D:C315.0002: input: USB HID v1.10 Keyboard [Logitech Logitech USB Keyboard] on usb-0000:00:12.0-3/input0
[ 5.230468] systemd-readahead[92]: Bumped block_nr parameter of 8:0 to 20480. This is a temporary hack and should be removed one day.
[ 5.425781] EXT4-fs (sda1): re-mounted. Opts: (null)
[ 5.468750] systemd-journald[95]: Received request to flush runtime journal from PID 1
[ 5.816406] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 6.007812] Adding 4194288k swap on /dev/sda2. Priority:-1 extents:1 across:4194288k SS
[ 6.218750] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
[ 6.312500] type=1305 audit(1523029281.600:2): audit_pid=216 old=0 auid=4294967295 ses=4294967295
res=1
[ 9.863281] IPv6: ADDRCONF(NETDEV_UP): enp4s0: link is not ready
[ 9.945312] IPv6: ADDRCONF(NETDEV_UP): enp5s0: link is not ready
[ 10.027343] IPv6: ADDRCONF(NETDEV_UP): enp6s0: link is not ready
[ 10.101562] IPv6: ADDRCONF(NETDEV_UP): enp7s0: link is not ready
[ 13.722656] fuse init (API version 7.22)
[ 96.050781] CPU 2 Unable to handle kernel paging request at virtual address 0000000000000000, epc == 0000000000000000, ra == ffffffff8020e69c
[ 96.050781] Oops[#1]:
[ 96.050781] CPU: 2 PID: 2480 Comm: modprobe Tainted: G O 3.10.84 #49
[ 96.050781] task: 98000001716f5340 ti: 9800000171b14000 task.ti: 9800000171b14000
[ 96.050781] $ 0 : 0000000000000000 0000000000000008 0000000000000000 c000000000d5c730
[ 96.050781] $ 4 : ffffffffc01dea10 ffffffffc0165e08 ffffffffc015de10 ffffffffffff9e10
[ 96.050781] $ 8 : ffffffffc01dea10 0000000000000007 0000000000000048 0000000000000000
[ 96.050781] $12 : 0000000000000010 ffffffff804e12d4 0000000000000000 79625f636e695f6f
[ 96.050781] $16 : c000000000d5bfb0 c000000000d5beb0 c000000000d98a38 0000000000000018
[ 96.050781] $20 : 00000000000001bd 0000000000000002 0000000000000018 c000000000d5c7b0
[ 96.050781] $24 : 0000000000000000 0000000000000100
[ 96.050781] $28 : 9800000171b14000 9800000171b17cf0 ffffffff80953f70 ffffffff8020e69c
[ 96.050781] Hi : 0000000000000000
[ 96.050781] Lo : 0000000000000048
[ 96.050781] epc : 0000000000000000 (null)
[ 96.050781] Tainted: G O
[ 96.050781] ra : ffffffff8020e69c apply_relocate_add+0x118/0x180
[ 96.050781] Status: b500cce3 KX SX UX KERNEL EXL IE
[ 96.050781] Cause : 10000008
[ 96.050781] BadVA : 0000000000000000
[ 96.050781] PrId : 00146308 (ICT Loongson-3A2000)
[ 96.050781] Modules linked in: fuse serio_raw shpchp ipv6
[ 96.050781] Process modprobe (pid: 2480, threadinfo=9800000171b14000, task=98000001716f5340, tls=000000ffecb23700)
[ 96.050781] Stack : c000000000d5c730 ffffffffc01dea10 ffffffffc01dea10 9800000171b17e30
ffffffffc01dea28 ffffffff8095c498 0000000000000004 0000000000000004
0000000000000009 ffffffff80dbe360 0000000000000003 ffffffff802841c4
ffffffff80d69848 ffffffff80324110 00000000000c3c68 980000014e50c800
9800000171b17e30 0000000000000000 0000000000040000 ffffffff802816f4
c000000000d57954 0000000120023138 0000000000000000 0000000000000000
00000000000c3c68 000000005ac7957a 000000000bdb9ac6 000000005ac79576
0000000000000006 000000000000053f 0000000000000003 0000000120023138
0000000000000000 0000000120038330 0000000000040000 0000000000000000
0000000120038370 000000012001f2b8 0000000120038210 ffffffff80284a58
...
[ 96.050781] Call Trace:
[ 96.050781] [<ffffffff802841c4>] load_module+0xf9c/0x17b8
[ 96.050781] [<ffffffff80324110>] fput+0x28/0x218
[ 96.050781] [<ffffffff802816f4>] copy_module_from_fd+0xe4/0x104
[ 96.050781] [<ffffffff80284a58>] SyS_finit_module+0x78/0xb0
[ 96.050781] [<ffffffff8020f8a4>] handle_sys64+0x44/0x64

[ 96.050781]
Code: (Bad address in epc)

[ 96.050781] ---[ end trace 86334e283d1cf019 ]---


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest