Puppy In-House Development

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#181 Post by technosaurus »

@laurentius77 - Your X is working, "ratpoison" (like many other window managers) does not provide any desktop environment ... it just manages windows ... my microsaurus experiment used only jwm to provide the full desktop since it does have many extras (the whole !distro was still less than 1Mb)

Hows bout I try to simplify init and xinit into a single shorty (ported from my c implementation to shell)

Code: Select all

#!/bin/sh
#Normally these variables would be in a sourced config file - here for brevity
#X="Xorg"
X="Xvesa -screen 1280x800x24 -nolisten tcp"
wm="jwm"
PATH=/bin #... etc (all my binary dirs symlink to /bin :) )
HOME=/root
TERM=rxvt
PS1="  > "
SHELL=/bin/sh
export X wm PATH HOME TERM PS1 SHELL

waitforX(){
    while [ ! -S /tmp/.X11-unix/X0]; do sleep .1;done
    [ "$DISPLAY" ] || export DISPLAY=":0"
}

mount -t proc none /proc 
mount -t sysfs none /sys 
mount -t devtmpfs none /dev #or config kernel to do this
$X & waitforX && $wm
**that should boot you to X really fast (but IIRC some X servers will require a login as root as well), but you'll need to set up other env vars for things like ROX and you'll want to mount /dev/pts for rxvt to work, but that can be done in X with an autostart script such as jwm's StartupCommand or as part of the freedesktop autostart API ... something like:
for x in $HOME/.autostart/*;do $x;done
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#182 Post by 01micko »

Now part of woof-CE technosaurus..

https://github.com/puppylinux-woof-CE/w ... oot_.jwmrc

Code: Select all

<StartupCommand>
for i in $HOME/.config/autostart/*.desktop;do if [ -f $i ];then xdg-open $i;fi;done
</StartupCommand>
Puppy Linux Blog - contact me for access

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#183 Post by technosaurus »

01micko wrote:

Code: Select all

<StartupCommand>
for i in $HOME/.config/autostart/*.desktop;do if [ -f $i ];then xdg-open $i;fi;done
</StartupCommand>
Thanks for fixing my mis-remembering of the autostart directory. (Note: for multiuser there are additional directories to consider if anyone is going that direction ...$XDG_CONFIG_DIRS)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

laurentius77
Posts: 82
Joined: Wed 30 Mar 2011, 07:02

#184 Post by laurentius77 »

01micko wrote:@laurentius77

X is started :wink:

Read some info about the window manager named "rat-poison".. named so because there is no mouse usage at all. Works ok for me.

BTW.. just for anyone interested, this is how I boot lazyux on a stick.

# isohybrid lazyux.iso
# dd if=lazyux.iso of=/dev/sdX #where X is your usb stick, eg: sdc NOT sdc1, which is a partition on the usb stick. Be careful! You can wipe your HDD if you get it wrong.

Put stick in target machine >> ensure boot from usb stick is the default (or choose from menu, many BIOS have this these days) - power on >> watch it boot >> at login prompt type root (you may not see the entry, don't worry) >> at password prompt type root >> after successful login type xinit ... rtfm about rat-poison!
I expected that Ratpoison to be not different from Puppy X manager but I was on a wrong way...I read the documentation and exercised some commands. It's very different and very interesting.
Regarding installing Lazyux on usb I have already installed it using Universal USB Installer from Windows, worked for any ISO livecd that I tried until now.

I intend to compile Openvpn and Asterisk for Lazyux and I am asking myself if this will be possible to accomplish... ?

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#185 Post by Iguleder »

It lacks networking support - it's too early for that.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

laurentius77
Posts: 82
Joined: Wed 30 Mar 2011, 07:02

#186 Post by laurentius77 »

Iguleder wrote:It lacks networking support - it's too early for that.
Yes, I know it lacks networking support. Should I understand that when the network support will be there it will be possible? It would be great to have a small, secure distro working as an asterisk or openvpn server.

I was thinking also if it will be possible to compile Linux libre kernel with grsecurity http://grsecurity.net/ for the Linux Libre kernel, somebody did it already http://forums.grsecurity.net/viewtopic.php?f=3&t=3569. Also here are some ideeas on improving Linux security http://wiki.securix.org/doku.php.
Thank you for your work, the distro works great on my hardware, when boot it from USB.

I couldn't make it start in Virtual Box...there is a Kernel panic error. Tried in VMWare player with no success, it freeze wit Starting dropbear...

I will inform you on every problem that I met on the distro, excuse me for being sometimes wrong.
Thank you for your great work.

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#187 Post by Iguleder »

A "storm" (as they call it in newspapers) destroyed my router - I installed OpenWRT and made it a WiFi bridge - now, my domain (including the ISO repository) is back to life.

EDIT: I added a fork of xinit 1.1.1 to tinyxserver - I think I can also add the fixed fonts and the cursor font, so the entire X server ships as a single, easy to build package.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#188 Post by amigo »

"ships as a single, easy to build package" I recently had started doing some work in tinyX sources to eliminate all references to installed versions of libs and especially headers. tinyX won't build out-of-the-box on systems where very modern X is installed as the inlcudes in the sources reference installed locations whose code is now incompatible.

I didn't have to time to get very far with the work -it would be nice if one of you did this as you are digging around in there...

What sort of changes did you make to xinit?

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#189 Post by Iguleder »

Just kicked BINDIR and replaced SIGVAL with int. 8)

EDIT: I added font-cursor-misc, font-misc-misc and font-alias. Now, building tinyxserver is pretty simple - build tinyxlib, then tinyxserver - that's it! :)
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#190 Post by amigo »

Are the sources up on your github?

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#191 Post by Iguleder »

Yes - I pushed everything.

I also made PS/2 support built-in, so touchpads should work well now. Currently, I'm trying to build the entire package set on pemasu's Wheezy, since it fails to build on Slacko. I want to do a woof-CE experiment - produce a barebones Puppy with these packages, plus the packages in the "common" repo - totally independent of other distros and T2 (well, that's the goal of this project, after all). :D

EDIT: built just fine - time to get some sleep, tomorrow I'll create a PET repository from these packages :)

EDIT 2: uploaded everything - here. woof-CE is running :wink:
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#192 Post by Karl Godt »

Iguleder wrote:A "storm" (as they call it in newspapers) destroyed my router - I installed OpenWRT and made it a WiFi bridge - now, my domain (including the ISO repository) is back to life.
Unbelievable :
http://www.telegraph.co.uk/news/worldnews/middleeast/israel/10516498/Historic-snow-storms-spread-havoc-and-misery-across-the-Middle-East.html wrote: Several inches of snow fell in the Sinai Peninsual, usually an arid desert region, while authorities were forced to close the port in the coastal city of Alexandria – which saw relatively light snowfall – after a third consecutive day of bad weather and high winds.
..
Up to 15 inches of snow blocked many streets in Jerusalem
..
The wintery outbreak seemed all the more for severe after several weeks of record-breaking high temperatures in November and early December.
Do you have the router on top of the roof, or did you forgot to close the window ?

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#193 Post by Iguleder »

lol :lol:

Now, some power surge or something caused it hang - it's up and running, but it doesn't route :lol:

The stock firmware is horrible (this happens pretty much once in two weeks) and the storm made this problem persistent somehow, so I replaced it with something more reliable.

EDIT: failure - it seems more static PETs are needed.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#194 Post by technosaurus »

Can someone with x86_64 check if this (non-posix, but simpler) mount I wrote works
gcc -nostdlib -Os -ffreestanding -fomit-frame-pointer -o mount mount.c -s

Code: Select all

asm(
".text\n"
".global _start\n"
"_start:\n"
"	popl	%ecx\n"
"	movl	%esp,%esi\n"
"	pushl	%esi\n"
"	pushl	%ecx\n"
"	call	main\n"
"	movl	%eax,%ebx\n"
"	movl	$1, %eax\n"
"   int	$0x80\n"
"	hlt\n"
".Lstart:\n"
"	.size	 _start,.Lstart-_start\n"
);

#define MS_MGC_VAL 0xC0ED0000

int main(int argc, char **argv){
	if (argc!=6) return argc; //todo usage
	long ret,flags=MS_MGC_VAL;
	while (*argv[4] && ((unsigned)(*argv[4])-'@'<32))
		flags|=1<<((unsigned)(*argv[4]++)-'@');
	asm(
		"int $128"
		:	"=a"(ret)
		:	"a"(21),
			"b"((long)argv[1]),
			"c"((long)argv[2]),
			"d"((long)argv[3]),
			"S"((long)flags),
			"D"((long)0)
		: "memory"
	);
	return ret;
}

Code: Select all

usage: mount source target filesystemtype mountflags data
source - device or image to mount
target - directory to mount it on
filesystemtype - the filesystem type of the source
mountflags - string of mount flags. "BJ" == MS_NODEV|MS_NOATIME
	@  MS_RDONLY
	A  MS_NOSUID
	B  MS_NODEV
	C  MS_NOEXEC
	D  MS_SYNCHRONOUS
	E  MS_REMOUNT
	F  MS_MANDLOCK
	G  MS_DIRSYNC
	J  MS_NOATIME
	K  MS_NODIRATIME
	L  MS_BIND
	M  MS_MOVE
	N  MS_REC
	O  MS_VERBOSE||MS_SILENT
	P  MS_POSIXACL
	Q  MS_UNBINDABLE
	R  MS_PRIVATE
	S  MS_SLAVE
	T  MS_SHARED
	U  MS_RELATIME
	V  MS_KERNMOUNT
	W  MS_I_VERSION
	X  MS_STRICTATIME
	^  MS_ACTIVE
	_  MS_NOUSER
data - see filesystem specific man page.
I am trying to get key components below 384 bytes after:
# strip --strip-all -R .note -R .comment mount
# sstrip mount

according to: this article it can mean 20X+ speedup.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#195 Post by L18L »

technosaurus wrote:Can someone with x86_64 check if this (non-posix, but simpler) mount I wrote works
gcc -nostdlib -Os -ffreestanding -fomit-frame-pointer -o mount mount.c -s

Code: Select all

# gcc -nostdlib -Os -ffreestanding -fomit-frame-pointer -o mount mount.c -s
/tmp/ccFmBe4O.s: Assembler messages:
/tmp/ccFmBe4O.s:6: Error: invalid instruction suffix for `pop'
/tmp/ccFmBe4O.s:8: Error: invalid instruction suffix for `push'
/tmp/ccFmBe4O.s:9: Error: invalid instruction suffix for `push'
#
:cry:

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#196 Post by technosaurus »

I wonder if it is just a build time issue?
Attachments
mount.gz
Here is a precompiled version
needs to be gunzipped and made executable again.
(198 Bytes) Downloaded 297 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#197 Post by nooby »

Guys I am a true noob so don't pay too muc hattention
but we need UEFI support tha teven a noob can get.
I have defered to buy a computer now for some
12 month or more since all computer sold was
UEFI or if they did not have UEFI they would cost 3 times more
being some Game Special made with water cooling and
special made by enthusiasts. Not my style though.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#198 Post by 01micko »

fails on slackware64-14.1, same error as L18L

however, builds with clang.. not what you want though

Code: Select all

bash-4.2# clang -nostdlib -Os -ffreestanding -fomit-frame-pointer -o mount mount.c
bash-4.2# strip --strip-all -R .note -R .comment mount 
bash-4.2# sstrip mount 
bash: sstrip: command not found
bash-4.2# stat -c %s mount
792

Code: Select all

bash-4.2# mkdir test
bash-4.2# ./mount /dev/sdb1 test ext2 "P" noacl
bash-4.2# cd test 
bash-4.2# ls
bash-4.2# 
bash-4.2# cd ..
bash-4.2# ./mount /dev/sdb1 test ext2 "BJ" noacl
bash-4.2$echo $?
255
fails anyway

Just tested yours too. The same.. maybe I have the 'data' param wrong?
Puppy Linux Blog - contact me for access

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#199 Post by technosaurus »

I have been leaving data as "" thus far since it is currently unused {its the "D"((long)0) parameter} ... need to look into that still, but I think int will normally just be argv[5]
I've been meaning to write a platform independent macro to handles syscalls and _start using inline asm

all of platforms can be in a format similar to:

Code: Select all

   asm(
      "int $128"  //start a linux x86 syscall
      :   "=a"(ret) //the return
      :   "a"(21), //eax register ... 21 is the mount syscall
         "b"((long)argv[1]), //ebx register is 1st syscall parameter
         "c"((long)argv[2]), //ecx
         "d"((long)argv[3]), //edx
         "S"((long)flags),
         "D"((long)0)
      : "memory" //dirty memories :)
   ); 
so a single ifdef set can be used to define everything according to http://man7.org/linux/man-pages/man2/syscall.2.html and http://sourceforge.net/p/predef/wiki/Architectures/
...
#elif __X86__
#define SYSCALL_ENTRY "int $128"
#define FIRSTREG "a"
... __ppc__ ...
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#200 Post by Iguleder »

nooby - UEFI is supported.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

Post Reply