Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 24 Oct 2017, 04:09
All times are UTC - 4
 Forum index » Advanced Topics » Hardware
CardReader on Lenovo G50-30
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
HerrBert

Joined: 03 Nov 2016
Posts: 5
Location: NRW, Germany

PostPosted: Wed 14 Jun 2017, 18:28    Post subject:  CardReader on Lenovo G50-30
Subject description: How to compile a single module from kernel-source
 

Struggled around with non-working sd-card-reader on this machine:
Code:

# inxi -Fxx
System:    Host: puppypc16986 Kernel: 4.1.11 x86_64 (64 bit, gcc: 4.8.2)
           Desktop: JWM 2.3.2 dm: N/A Distro: Slacko64 Puppy 6.3.2
Machine:   System: LENOVO (portable) product: 80G0 version: Lenovo G50-30 serial: <removed>
           Mobo: LENOVO model: Lancer 5A6 version: SDK0F82993WIN serial: <removed>
           Bios: LENOVO version: A7CN48WW date: 08/03/2015
           Chassis: type: 10 version: Lenovo G50-30 serial: <removed>
CPU:       Dual core Intel Celeron CPU N2830 (-MCP-) cache: 1024 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 8657.32
           Clock Speeds: 1: 1708.528 MHz 2: 1134.083 MHz
Graphics:  Card: Intel ValleyView Gen7 bus-ID: 00:02.0 chip-ID: 8086:0f31
           X.org: 1.14.3 drivers: intel (unloaded: fbdev,vesa) tty size: 80x25 Advanced Data: N/A for root
Audio:     Card: Intel ValleyView High Definition Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0 chip-ID: 8086:0f04
           Sound: Advanced Linux Sound Architecture ver: k4.1.11
Network:   Card-1: Atheros AR9565 Wireless Network Adapter driver: ath9k bus-ID: 02:00.0 chip-ID: 168c:0036
           IF: wlan0 state: up mac: <removed>
           Card-2: Realtek RTL8111/8168 PCI Express Gigabit Ethernet controller
           driver: r8169 ver: 2.3LK-NAPI port: 1000 bus-ID: 03:00.0 chip-ID: 10ec:8168
           IF: eth0 state: down mac: <removed>
Drives:    HDD Total Size: 500.1GB (0.5% used)
           1: id: /dev/sda model: ST500LT012 size: 500.1GB serial: N/A
Partition: ID: swap-1 size: 4.29GB used: 0.00GB (0%) fs: swap
RAID:      System: supported: linear raid0 raid1 raid10 raid6 raid5 raid4
           No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
           Unused Devices: none
Sensors:   None detected - is lm-sensors installed and configured?
Info:      Processes: 106 Uptime: 1:11 Memory: 357.3/3834.1MB Runlevel: 5 Gcc sys: 4.8.2
           Client: Shell (bash 4.2.53 running in urxvt) inxi: 1.9.17

Took some time to find out, that i don't need external drivers, just a module in the kernel has to be compiled.

But how do i compile a single module???

Did a lot of reading about that. As english is not my native language, it took longer to understand, how things work.

After several attempts, here is my final solution: (written as for the records. DON'T copy & paste!)
Code:

# devx and kernel_source..sfs downloaded and loaded via sfs_load
rox /usr/src/linux
# open terminal there
mkdir ../output
cp .config Module.symvers ../output/
make mrproper
make O=../output menuconfig
make O=../output prepare
make O=../output scripts
make O=../output M=drivers/mmc/host
cp ../output/drivers/mmc/host/rtsx_usb_sdmmc.ko /lib/modules/4.1.11/kernel/drivers/mmc/host/
# modprobe rtsx_usb_sdmmc works, but after reboot, i get:
# rtsx_usb_sdmmc: module verification failed: signature and/or  required key missing - tainting kernel
# found this: https://stackoverflow.com/questions/24975377/kvm-module-verification-failed-signature-and-or-required-key-missing-taintin#32194268
# but i can not sign module for doing a make mrproper before compiling...
# so i unloaded kernel_source..sfs, rm -rf /usr/src/linux, loaded kernel_source..sfs
./scripts/sign-file sha1 ./signing_key.priv ./signing_key.x509 /lib/modules/4.1.11/kernel/drivers/mmc/host/rtsx_usb_sdmmc.ko
depmod -a
modprobe rtsx_usb_sdmmc
# isolated /lib/modules/4.1.11/kernel/drivers/mmc/host/rtsx_usb_sdmmc.ko to a temp-directory with full folder-structure and mksquashfs'd it to ydrv_slacko64_6.3.2.sfs

Also i added missing firmware for ath3k (bluetooth-thing i guess - never tried, but msg on dmesg disappeared)

Question:

Is there an easy(er) way to do this?
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Hardware
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0308s ][ Queries: 14 (0.0053s) ][ GZIP on ]