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 Sun 21 Sep 2014, 12:26
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to patch/configure initrd for loading files?
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
TheNH813

Joined: 13 Nov 2013
Posts: 26

PostPosted: Fri 20 Jun 2014, 19:49    Post_subject:  How to patch/configure initrd for loading files?  

Ok, so I need to know how the save file and SFS loaders work inside the kernel so I can patch initrd for a new kernel I compiled. I want to continue using my save file but a REGULAR kernel cannot load one. I also want to know what I must patch/hack to get the fancy colored info at startup also. I need to use something that has complete support in 3.12+ (I compiled 3.15) and dod not know what needs to be done to make it a Puppy kernel. If I must recompile im fine with that too (quad core i3 dosent take too long to compile). Please help as I want to use a new capture device I bought with VLC to stream /dev/video to file (Iv done this on Xubuntu before, know it works).

Dont worry about the capture device, it works by default in 3.15, concentrate on telling me how to turn a regular kernel into a PhatSlacko 5.0.2 kernel.

PS: Sorry if this post sounds erratic or I posted i wrong place, im really stressed today and had to figure this out but failed. Forgive me for sounding like I am insane, been working on this for a few hours. Brings to mind a song I like ...'cause you had a bad day you're taking one down, you sing a sad song just to turn it around, you say you dunno you tell me don't lie... LOL
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8253

PostPosted: Fri 20 Jun 2014, 21:00    Post_subject:  

could you not simply build the driver against a working puppy?..devx/kernel sources...

mike
Back to top
View user's profile Send_private_message 
TheNH813

Joined: 13 Nov 2013
Posts: 26

PostPosted: Sat 21 Jun 2014, 12:17    Post_subject: Its not exactly like you would expect...  

The drver for USBTV007 does not work on kernels older than 3.12 and only has experimental support on 3.11. 3.10 had a alpha driver that was very buggy on Ubuntu. http://www.linuxtv.org/wiki/index.php/Easycap

I need to make a whole new kernel. I just dont understand how,,, I am on Phatslacko 5.0.2 and using the source from kernel.org (latest stable). I have the devx loaded and compiled a kernel but it cannot find my save file or load SFS files. It panics and dies saying it could not find root partition. I am assuming I need a special patch for the initrd that is what makes Puppy Linux the way it is. It has to be something simple Im completely missing.

Edited_time_total
Back to top
View user's profile Send_private_message 
TheNH813

Joined: 13 Nov 2013
Posts: 26

PostPosted: Sat 21 Jun 2014, 12:35    Post_subject: YAY!?!?  

UPDATE: The userspace driver written in python (used with V4L2Loopback) might work. It failed on LHP64 but it might work on Slacko (please let it work).

Finding the wiki page to point you to for reference gave me an idea. If I can get V4L working on Puppy this might just work. This I CAN build against the current kernel.

I would still like info on compiling a Puppy kernel the right way for future reference if possible (dont worry if you cant).

I believe the scripts provided by Barry on his site for making a kernel would not work for this new a version, plus they need to be run on a hard install.

I will not use a hard install as they are almost always buggy for me. Plus I dont want to go throught he pain of installing on my Verbatim 500GB pocket HDD. It already uses grub for the bootloader (WAY better than Syslinux) and has close to 30 live distros on it LOL. I have the others in a submenu, Puppy as default option. I sometimes set up Linux for people so I need the wide choice. I have a hand written menu that is approximately 350kB and autodetects/sets countless parameters for each OS (you dont want to know how long that took LOL). The HDD is also my backup of my Desktop, has tons of music and TV shows I DVR'd and I keep it in my pocket AT ALL TIMES in case something would happen while gone (like a fire).

I dont know why I said so much, but sometimes a better understanding of someone else's setup can allow you to help them more easily.
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8253

PostPosted: Sun 22 Jun 2014, 07:07    Post_subject:  

Hmm unfortunate driver design ... one of the drawbacks of linux is the constantly changing core.
Ok well you used to have to patch vanilla kernels for aufs/squashfs but I believe thats no longer required. What you do need is the .config file to setup a puppy based build.

Saying that did you add your new modules to initrd to replace the existing ones...will not boot without those...

You don't necessarily need .config just make sure aufs and squashfs are built mainly.... some builds include those initrd modules into the kernel rather than make separate ones... a neat approach though puppy has some hacky scripts that uses loading of usb ones to make decisions... all a bit obsolete really . Also puppy adds a lot of firmware thats not included with the standard kernel build.... mainly wireless.

I rebuild lucid recently to add kvm support so a recent dabble for me...some links I used.

http://pateo.wordpress.com/2009/12/25/how-to-updateupgrade-kernel-for-puppy-linux-dpup/
http://stackoverflow.com/questions/2720177/module-layout-version-incompatibility

Hope the v4l works out.. python can be added for a few megs and v4l libs are usually in there and of course the modules (easy to update THOSE modules against and existing kernel by the way.)

mike
Back to top
View user's profile Send_private_message 
TheNH813

Joined: 13 Nov 2013
Posts: 26

PostPosted: Sun 22 Jun 2014, 21:45    Post_subject:  

YES!!!! It I got it to work without the audio (V4L2 dosent accept the odd audio chip it uses) and simply used a RCA to 3.5mm to solve the problem. Besides I get 6X the sample rate with the real sound card anyway. I also found out by opening /dev/video you can stream the webcam in VLC and select save stream to file. I guess one does not need webcam software!

Thanks for the link, its exactly what I wanted. The guide actually links to a unlisted repo of Barry's with 3.12 sources, patches and config. I will consider that. Not sure if I need a custom kernel since V4L2 works.

Linux's core may be constantly changing, but at least old programs still run unlike another OS I know of, I think it starts with W. LOL.

I made a Ubuntu remix in 2012 (I wasnt very Linux knowledgeable then), it was a Windows 7 clone and kernel panicked whenever I canceled a bluetooth connection or unplugged a flash drive from the rear USB (not hardware issue, I assure you). Themed it like W7 using hand drawn graphics and called it Doors OS just to be the opposite of Windows hahahah, I dont know what I did wrong, but I can assure you, it was VERY VERY BAD. Still, I loved it till I found Puppy and Xubuntu, now its just junk to me. Very nostalgic though, it was the second Linux I ever used and actually learned half of what I know by hacking anything I could figure out how to. It did manage to boot in 15s on a P4 though, and only contained the drivers I used. Initrd was within the kernel or something like that.

Maybe I should make a proper working Puppy Linux version of it. I bet it would get quite a few downloads. Hmmm... summer project maybe?

Thanks for all the help, it means a lot.
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8253

PostPosted: Mon 23 Jun 2014, 03:27    Post_subject:  

no problem...so there already was a driver... was the one you had perhaps a proprietary one from the manufacturer?

Well the bonus bunny if using an existing kernel is that any additional/updated drivers from the forum will work too. My kvm build cannot work with drivers built on the same kernel as the .config has changed.

As mentioned the v4linux driver sources can be built against an existing kernel if you ever need to update that.

The windows turning point seems to be XP/vista... thats when backwards compatibility starts to tail off .. mainly for drivers it seems.

As for your build I found 3 kernels quirky when it comes to usb drivers...had some strange behaviour.

Well glad you got sorted and yes those links seems to have what you need if you want to play...

mike
Back to top
View user's profile Send_private_message 
TheNH813

Joined: 13 Nov 2013
Posts: 26

PostPosted: Mon 23 Jun 2014, 12:56    Post_subject:  

The driver I used was written in Python and preformed block reads/writes to the device and streamed them to V4L2 creating /dev/video2. Here is a link (it needs some dependanciess from pypi.python.org though. Like python-libusb1 and python-v4l2. Compiling Video4Linux was painless, all I did was make && make install. I will post a link to the python driver incase anyone wants it.

https://github.com/memeruiz/usbtv007

There is another one on the LinuxTV wiki as well, it still uses Video4Linux but has absolutely no python involved, The entire source is 12kB! It supposedly supports audio and can use 48kHz sample rate (3X better than the windows driver gets somehow). Very promising but it is C source and makes a shared object according to the Makefile. Not sure how to use it LOL. May try compiling it later. I will attach a static build of it if it works.
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8253

PostPosted: Mon 23 Jun 2014, 13:14    Post_subject:  

sounds like a kernel driver so would be modprobed/insmod and then hopefully appear as a video device.... that python does sound an intriguing workaround but a true driver in c would be much neater.

The sound part of such devices uses Windows direct media which is definately NOT direct in how it works...usually the main cause of poor performance on there... video handling just as bad.

Yeah compiling v4l is nice and straightforward..a good package.

mike
Back to top
View user's profile Send_private_message 
greengeek

Joined: 20 Jul 2010
Posts: 2547
Location: New Zealand

PostPosted: Tue 24 Jun 2014, 15:58    Post_subject:  

TheNH813 wrote:
Maybe I should make a proper working Puppy Linux version of it. I bet it would get quite a few downloads. Hmmm... summer project maybe?
Excellent idea. We love tinkering..
Smile
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0742s ][ Queries: 11 (0.0064s) ][ GZIP on ]