(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
and continue your work there. Thank you.

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 04 Dec 2020, 15:55
All times are UTC - 4
 Forum index » Advanced Topics » Hardware
CardReader on Lenovo G50-30
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message

Joined: 03 Nov 2016
Posts: 153
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:

# 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!)

# 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)


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]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. 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.1320s ][ Queries: 11 (0.0942s) ][ GZIP on ]