Need help making a decision

Non release banter
quotaholic
Black ninja
Black ninja
Posts: 72
Joined: 15 May 2011, 16:20
Location: denver
Contact:

Need help making a decision

Post#1 by quotaholic » 21 May 2011, 00:12

Hi All!

Thank you for continuing the Slax effort! My name is daryl and I operate http://webdt.org. We use Slax. Its a community forum centralized around a given hardware set. Most of us there have these little x86 based industrial tablet pc's. As I am an old home automation and home theater installer I recognized these things as smarthome controllers costing big bucks back in the day. Well a hundred bucks gets one now and for some reason I started the forum supporting the community of owners.

The decision I need to make is do I elect an existing live linux distro to modify for this hardware or do I make my own live distro? Although I have been hobbying with linux for ten years the second of the two options is slightly daunting. I currently have slackware 1337 in vmware with a custom kernel I configured however I am on the Aufs2 part and cant seem to find the resources to get it compiled or patching the kernel. As these tablets come with 500mb disk on module nand flash ide adapters they would be perfect for Porteus.

Porteus is beautiful work. I was really impressed with the right click menus in KDE. Ability to install from source as well as from deb AND rpm? Come on. Someone is showing off over there. Its beautiful! How hard is it to recompile or switch out the kernels in a live distro? I would love to use it for the WebDT's as it has most of what I need already installed. I would have to nuke KDE and bring in blueman + wicd +xvkbd to add to LXDE. Actually I use a similar script to the olpc keyboard, a if / else polling memory for an instance and killing it or starting a new instance at a given geometry. As these tablets have a single buttons for keyboard and three other functions it makes sense to do it that way. Oh yeah thats an x86 acpi atlas button controller kernel module needed for those buttons too. I dont have much to add or subtract really I just know so little about live distros that I need to ask for help making this decision.

The hardware in question is AMD geode based. GX and LX series, or i486 and i586 respectfully. I have to get a touchscreen driver and calibration utility in there from Penmount. (I know the kernel has one but it has no way to be calibrated and Penmount is weird with having to distribute both). VIA has a vt6656 wifi card in some of the models. Intel2200 pcie or Cisco Air0 (350) pcmcia are the other wireless options depending on age of unit. Someone good with slackware told me once that I have to use a huge.s kernel for the GX or 486 series or patch a generic kernel. Is this true for 586 hardware as well? I have to throw a vga=ofonly for the 586 on the kernel at boot, vga=771 seems to work on the GX series.

Reasons for wanting to compile kernel: These have 400 or 500mhz cpu's and most have 256mb of ram. Newer 586 or lx models have 512mb or ram and the 500mhz cpu. We have saved about 130mb of installed size by simply erasing unused kernel modules. Why not make the kernel a little lighter and just trim them out at compile time? We need all the ram and disk space we can get.

So if anyone can help me make this decision I would be happier. I owe the WebDT community a distro and need to make efforts in one direction or the other. If Porteus can be modified in the ways we need to that would really make me happy. If so and anyone can help me out with how to go about making some changes to Porteus like adding on screen keyboard, touchscreen drivers and recompiling the kernel then I would be king as we would make the WebDT community happy.

Again thanks to all for continuing the effort! Thanks in advance.
daryl
aka quotaholic on my forum.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5456
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Need help making a decision

Post#2 by brokenman » 21 May 2011, 19:05

Thanks for your post Daryl.

The decision I need to make is do I elect an existing live linux distro to modify for this hardware or do I make my own live distro?
I guess you need to decide if you want to invest alot of time troubleshooting while developing your own, or suffer less and modify an existing distro. Porteus would be perfect for the latter choice as it is modular in design allowing you to remove whatever bloat you won't need. There is in fact a built in tool to do just that!

Let me know what kernel you are compiling and i can send you the aufs patch for the kernel. After that you could use an existing kernel config to see the aufs settings we use. wicd is included in the next release and so all you would need to do is remove the modules in the base folder that relate to KDE, and you will boot into LXDE.

I think Porteus would be perfect for your cause because of its light weight, and modular design. Along the way if you have questions there are some very knowledgeable people in the community that can answer any questions you may have. We were just discussing the other day how it would be good to see Porteus on hand held devices!
How do i become super user?
Wear your underpants on the outside and put on a cape.

quotaholic
Black ninja
Black ninja
Posts: 72
Joined: 15 May 2011, 16:20
Location: denver
Contact:

Re: Need help making a decision

Post#3 by quotaholic » 23 May 2011, 01:12

Thank you for your reply brokenman,

I agree with you on Porteus being ideal for the task. I was just playing around with the other night and did as you recommended and removed KDE and sure enough there was LXDE on the next boot. Then I got crafty. I knew that I wanted the right click context on the menus in KDE as I was going to try to build a virtual keyboard and the touchscreen driver. Its really handy having the build a module in the menu. So then I went to the Fido-Slax ISO and grabbed their old KDE 3 just to see. Sure enough it started right up on the next boot. With modularity like that I cant understand using anything else on a 500 meg SSD. Considering your willingness to help me out with the aufs2 kernel patch I do say you have another user. Many more to come. Thank you very much for your assistance!!

I have bone stock slackware 1337 in 32 bit form with a huge.s kernel in vmware as I type. Slimmed up linux-2.6.37.6 quite a bit.

Thank you again!
Daryl

User avatar
fanthom
Site Admin
Site Admin
Posts: 4565
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Need help making a decision

Post#4 by fanthom » 25 May 2011, 19:14

@quotaholic
recompiling the kernel would be the best option for you, as you have specific hardware where you want to run porteus of.
please have a look on this HOWTO:
http://porteus.org/info/docs/51-develop ... ernel.html

there is a info how to create aufs patch from the git and patch/compile the kernel.
Please add [Solved] to your thread title if the solution was found.

quotaholic
Black ninja
Black ninja
Posts: 72
Joined: 15 May 2011, 16:20
Location: denver
Contact:

Re: Need help making a decision

Post#5 by quotaholic » 25 May 2011, 21:26

@fanthom,

Thank you! That should keep me busy for a while. Hey, quick question. Can I do away with the root and guest password portions of init very easily? My tablet hardware does have hard buttons and a d-pad however I only know how to link these to keystrokes / scripts though xmodmap and wont have an enter key available until well after x starts.

Thanks again
quotaholic

User avatar
brokenman
Site Admin
Site Admin
Posts: 5456
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Need help making a decision

Post#6 by brokenman » 25 May 2011, 23:23

Two options here. You can either allow Porteus to boot once and change the default passwords, then put the resulting module into you 'module' folder so that the password change request is skipped for future boots ... or you can edit the section about passwords out of the /etc/rc.d/rc.M file.

Code: Select all

mkdir /tmp/un
cp -Rd /mnt/live/memory/images/001-core/* /tmp/un
vi /tmp/un/etc/rc.d/rc.M
Here you would remove lines 209-251

dir2xzm /tmp/un /tmp/001-core.xzm
Choose your poison.

Do you want to have Porteus log into a guest account automatically?
How do i become super user?
Wear your underpants on the outside and put on a cape.

quotaholic
Black ninja
Black ninja
Posts: 72
Joined: 15 May 2011, 16:20
Location: denver
Contact:

Re: Need help making a decision

Post#7 by quotaholic » 26 May 2011, 13:47

Good question on the guest account. If I did want that can I assume I would find a line in ~.bash_profile that looks something like:

exec /bin/login -f root </dev/tty1 > /dev/tty1 2>&1

and I could swap out root for guest?

Thank you for the options on this. I like the module method for its creativity however I will choose the red pill or the path of more pain.

Kernel patching went well. Took a few tries, possibly due to config options but thank you for the documentation.

First time I have played with initrd. Pretty neat. One question. In this section of the documentation:
Replace all modules in /mnt/cdrom/lib/modules/`uname -r`/ with newer version manually and run 'depmod' command to update module index.
depmod -b /mnt/cdrom
mv /mnt/cdrom/lib/modules/`uname -r` /mnt/cdrom/lib/modules/your-new-kernel-version
Again, first time I have played with initrd but does this look right to you? I would think that I should pull content out of the /root/linux-2.6.38.6 folder where I just built the kernel. The description looks good, makes sense. However, by the looks of the command I am simply renaming the existing module folder to a newer version instead of replacing the modules with the respective newer version. If I am on the right thought then where do I find the modules to put in to the mounted initrd image?

User avatar
fanthom
Site Admin
Site Admin
Posts: 4565
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Need help making a decision

Post#8 by fanthom » 27 May 2011, 00:44

@quotaholic
you can also use "toroot" cheatcode which skips passwd_check function in rc.M and logs you to the root's GUI automatically.

"However, by the looks of the command I am simply renaming the existing module folder to a newer version instead of replacing the modules with the respective newer version."
sorry - i should be more specific:
after "make install" all kernel drivers are placed in /lib/modules/new_kernel folder and from here you need to copy them to /mnt/cdrom (your mounted initrd) manually. for example:
cp /lib/modules/2.6.38.7-porteus/kernel/drivers/net/mii.ko /mnt/cdrom/lib/modules/old_kernel_version/kernel/drivers/net/mii.ko

will fix the HOWTO asap.
Please add [Solved] to your thread title if the solution was found.

quotaholic
Black ninja
Black ninja
Posts: 72
Joined: 15 May 2011, 16:20
Location: denver
Contact:

Re: Need help making a decision

Post#9 by quotaholic » 27 May 2011, 18:06

Ahh thank you again. I am a kernel newb but having a good time with this. Another question. I am at the very last part. Making changes to the 000-kernel.xzm. My challenge is that I am in vm ware on another computer on slackware buiding this kernel. The target hardware does not have enough storage space to do this on. So my thinking is that I need to unpack the xzm, make the changes, repack it and move it over the the /porteus/base folder. xzm is rather new and I cant seem to get much when googling how to unpcak an xzm. Can I ask how to do this?

Thank you in advance
quotaholic

Posted after 13 hours 39 minutes 58 seconds:
Eh, only way I can think to do this is to make another Porteus usb stick and boot my netbook to that. On another usb stick I have the build that will be going in to the target hardware. Up to now I was building this kernel in vmware on the netbook using slackware 1337. Again the target hardware has not enough storage space (and a pretty wimpy cpu) so I have been working mostly on other hardware preparing the os.

Need to unpack the 000-kernel.xzm, make changes and repack. The only way I can see to do this is in Porteus. xzm2dir and respectfully dir2xzm. I transferred all the needed files out of vmware and over to the usb drive that has the build os on it. Just need to boot to the new porteus drive and make the changes to the stick holding the build os and then transfer to the target hardware. I will report back with success or not.

quotaholic

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Need help making a decision

Post#10 by Ahau » 27 May 2011, 18:43

Yeah, I think you'll have better luck extracting and compressing modules from porteus. You might be able to do this with unsquashfs if you have mksquashfs version 4, as well as LZMA2 support in your slackware install...I've never tried it, though, so take this comment with a grain of salt.
Please take a look at our online documentation, here. Suggestions are welcome!

quotaholic
Black ninja
Black ninja
Posts: 72
Joined: 15 May 2011, 16:20
Location: denver
Contact:

Re: Need help making a decision

Post#11 by quotaholic » 27 May 2011, 21:35

Thanks Ahau, I was wondering what tools were being used in those scripts. Well think I made a swing and a miss. After repacking and watching init hang, with many question marks, I remember that my /lib/modules folder did not have a /kernel/drivers/net subfolder. Crossed my fingers running depmod that the old /kernel/drivers/net/* would be okay. Guess not. So I think I am heading back to the drawing board on a kernel reconfig. This time though I will make a 4000 meg save.dat on a 16gb sd card to boot the netbook to so that the instructions are more vanilla to follow. That way I will have fewer mounted devices and fewer opportunities to fopah. That and the instructions will be letter for letter.

Thanks again, out for the weekend. Hope everyone has a great holiday!
quotaholic

User avatar
brokenman
Site Admin
Site Admin
Posts: 5456
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Need help making a decision

Post#12 by brokenman » 28 May 2011, 04:24

To unpack on slackware (providing you have squashfs support)

unsquashfs -f -dest /path/to/unpack /path/to/module.xzm
mksquashfs directory module.xzm

You can download the squashfs tools and stick them in your $PATH.
How do i become super user?
Wear your underpants on the outside and put on a cape.

quotaholic
Black ninja
Black ninja
Posts: 72
Joined: 15 May 2011, 16:20
Location: denver
Contact:

Re: Need help making a decision

Post#13 by quotaholic » 03 Jun 2011, 02:20

Help,

I just failed for the third time in a row. Have yet to produce something that boots based off the instructions here:

http://porteus.org/info/docs/51-develop ... ernel.html

There is one spot where I needed to loose the .xz extension to off the end of the command in order to rebuild the initrd.xz in /root. Other than that I had no luck unmounting the /mnt/cdrom initrd image. Kept getting device busy no matter what I closed or tried. Other that that all indications looked good.

I am hanging at 2.358310 kernel thread helper. Third time in a row. Any ideas?

Thanks
quotaholic

User avatar
fanthom
Site Admin
Site Admin
Posts: 4565
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Need help making a decision

Post#14 by fanthom » 03 Jun 2011, 09:26

there is one mistake:

Code: Select all

xz --check=crc32 --x86 --lzma2 /root/initrd.xz
should be

Code: Select all

xz --check=crc32 --x86 --lzma2 /root/initrd
to umount /mnt/cdrom you muse exit this folder so do:
cd /

BTW: Porteus kernel has all important parts compiled in (*) so if you dont make any major twekas than you could skip initrd part. with current config the ramdisk is important from PXE-boot point of view only.
in short words: you can use original initrd.xz with your own kernel.
Please add [Solved] to your thread title if the solution was found.

quotaholic
Black ninja
Black ninja
Posts: 72
Joined: 15 May 2011, 16:20
Location: denver
Contact:

Re: Need help making a decision

Post#15 by quotaholic » 03 Jun 2011, 13:59

That is seriously good information for me at this stage. Thank you. I will try again with out initrd.xz.

I tried out rc-2 last night. It would not boot on amd geode hardware. Indications were that I needed a cpu with pae support. I am not sure if that was intentional or not as Porteus makes a great embedded os.

Also, for whatever reason I cant get any usb keyboard input to take on init when asked the "do you want to make a save.dat file when booting the target hardware to the sd card holding Porteus RC-1. If I take that sd card back to my netbook I have no problem answering the question and continuing init. Seems like a usb thing. I am using a powered usb hub and a basic logitech keyboard. Have swapped out hubs and keyboards just to make sure. Is there any way to bypass the save.dat question?

Say I am building the kernel on a netbook using a 4000mb save.dat to hold all the kernel stuff. When I go to transfer to the target hardware can I effectively leave behind that 4000mb save.dat

Not 100 percent sure but it seems like some cheat codes dont work on RC-1. "toroot" plops me in kdm. I am going to download a fresh iso. Too many things seem out of place.

**Edit: MD5 sums check out. Not sure why usb keyboard is not working in init. Same on "toroot" cheatcode.

Thanks again
quotaholic
Last edited by quotaholic on 03 Jun 2011, 15:32, edited 2 times in total.

Post Reply