Re: Can httpd collect data from target ?

2017-02-21 Thread Mattias Schlenker



Am 22.02.2017 um 04:17 schrieb Vered Zvi:

Hello,

I launched httpd in target. Upon web page request from chrome (or any other web 
client), the html file located in the target is displayed in the host.

But my html page has text boxes in which it should display telemetry data 
collected from the target.
How can I configure httpd to collect data from the target, and put in the HTML 
page ?


Basically you have two options: Use a cronjob to collect data every few 
minutes and replace some place holders in a template to create a static 
HTML page with proper values. Or create a CGI script or binary and use 
the httpd's CGI handler to run this script binary each time it is 
called. Which one is better depends on many factors like frequency of 
calls to the script, flexibility needed...


https://wiki.openwrt.org/doc/howto/http.httpd

The guys at OpenWRT did a good job by documenting Busybox' httpd.

The information contained in this communication is proprietary to Israel 
Aerospace Industries Ltd. and/or third parties, may contain confidential or 
privileged information, and is intended only for the use of the intended 
addressee thereof. If you are not the intended addressee, please be aware that 
any use, disclosure, distribution and/or copying of this communication is 
strictly prohibited. If you receive this communication in error, please notify 
the sender immediately and delete it from your computer.
Probably not the best signature to use when communicating with mailing 
lists...


Yours,
Mattias


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
 redakt...@mattiasschlenker.de
Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

Address__ August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767  Fax: +49 341 30393578
Mobile: +49 163  6953657  Another mobile: +49 159 03160327
VATIN_ DE240998538

Fork me! https://github.com/mschlenker
Website.__ http://www.mattiasschlenker.de/
My books!___ http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: mounting errors

2017-02-21 Thread Mattias Schlenker

Am 21.02.2017 um 22:09 schrieb David Henderson:


EXT4-fs (sde2): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (sde2): couldn't mount as ext2 due to feature incompatibilities


Are you in control of the kernel configuration? In this case it is 
better to use the ext4 driver for ext2/3/4:


http://cateee.net/lkddb/web-lkddb/EXT4_USE_FOR_EXT2.html

Yours,
Mattias

--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
 redakt...@mattiasschlenker.de
Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

Address__ August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767  Fax: +49 341 30393578
Mobile: +49 163  6953657  Another mobile: +49 159 03160327
VATIN_ DE240998538

Fork me! https://github.com/mschlenker
Website.__ http://www.mattiasschlenker.de/
My books!___ http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: Busybox 1.4.2 tftp: read error: Input/output error

2017-02-16 Thread Mattias Schlenker



Am 16.02.2017 um 09:57 schrieb Vesta:

Hi,

BusyBox v1.4.2 on an embedded device running Linux v2.6.18.

I tried to download mtdblock6 "RootFileSystem" MTD partition via tftp, but at 
the very end, transfer every time ended with error tftp: read error: Input/output error.


This way you just download the device file, not the block device 
represented by the device file. Use netcat/nc or a SSH tunnel in 
combination with dd to create an image of the block device on the fly. 
Imaging with dd also works whan mounted, but might result in corruption 
of the image (usually no bad corruption since most devices with simple 
flash keep writes low) when mounted read-write.


Yours,
Mattias




/proc/mtd
dev:size   erasesize  name
...
mtd6: 00416800 0001 "RootFileSystem"

brw-rw1 00 31,   6 mtdblock6

Is there way to solve this issue? Does it possible unmount RootFileSystem MTD 
partition without rebooting and dropping network connection? Busybox commands 
is limited by defined functions only.
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
 redakt...@mattiasschlenker.de
Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

Address__ August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767  Fax: +49 341 30393578
Mobile: +49 163  6953657  Another mobile: +49 159 03160327
VATIN_ DE240998538

Fork me! https://github.com/mschlenker
Website.__ http://www.mattiasschlenker.de/
My books!___ http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: Busybox 1.4.2 tftp: read error: Input/output error

2017-02-16 Thread Mattias Schlenker



Am 16.02.2017 um 11:08 schrieb Vesta:

I managed successfully download the other MTD files via tftp, some of them larger in size 
than mtdblock6 "RootFileSystem". mtdblock6 size is near 4,3MB
The downloading is over the wan network, not via local net. In general, 
embedded CPU is weak and Busybox implementation with limited functions (no 
gzip, etc)
I've never been successful with using netcat on Busybox, only tftp worked. 
After running nc command it just stay forever, zero-size file been created on 
PC and it never got actual bytes. Netcat transfer can used in different ways, 
perhaps there is command variant that might work better in this particular 
case? Please specify netcat commamnd that can work in this situation, on 
transmit side and receive side.


Just tried on a live linux that has busybox on board, this would be your 
embedded device:


dd if=/dev/sr0 | nc -l -p 3456

On the receiver side (PC?) to retrieve the image:

nc 10.76.23.81 3456 > test.img

Yours,
Mattias


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
 redakt...@mattiasschlenker.de
Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

Address__ August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767  Fax: +49 341 30393578
Mobile: +49 163  6953657  Another mobile: +49 159 03160327
VATIN_ DE240998538

Fork me! https://github.com/mschlenker
Website.__ http://www.mattiasschlenker.de/
My books!___ http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: More flexibility for fbsplash

2016-10-05 Thread Mattias Schlenker

Am 05.10.2016 um 19:59 schrieb Timo Teras:

Alpine Linux carries the following related patches, which may be of
interest (or not):
http://git.alpinelinux.org/cgit/aports/tree/main/busybox/0005-fbsplash-support-console-switching.patch
http://git.alpinelinux.org/cgit/aports/tree/main/busybox/0006-fbsplash-support-image-and-bar-alignment-and-positio.patch

But yes, agreed, fbsplash could use some additional features.


Hi Timo,

I do not see too much difference between our approaches. If your patches 
did make it to BusyBox or if I ever heard about them I probably never 
thought about mine. Regarding Simons approach of centering the image I 
think it makes most sense to just take most of the calculation logic to 
userland scripts. BusyBox provides us with expr and well working shells, 
so saying "position the image 100px above center line and 200px left" 
will not take up too much memory and will be just calculated once and 
then written to the config file - as soon as the framebuffer is available.


Maybe it is desired to specify the foreground colors and the gradient of 
the progress bar? Should it take too much memory I'd happily add some 
configuration option for those at build time.


Yours,
Mattias

--
Mattias Schlenker - Redaktion + EDV-Beratung + Linux-CD/DVD-Konzepte
August-Bebel-Str. 74 - 04275 LEIPZIG - GERMANY

Telefon (VoIP "ueberall"), geschaeftlich: +49 341 39290767
Telefon (Festnetz), privat und Fax:   +49 341 30393578
Mobil:+49 163  6953657

Bitte fuer geschaeftliche Telefonate vorzugsweise die VoIP-Telefonnummer
+49 341 39290767 verwenden, da ich diese aufs Mobiltelefon routen kann!

http://blog.rootserverexperiment.de/ http://news.mattiasschlenker.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: More flexibility for fbsplash

2016-10-03 Thread Mattias Schlenker



Am 01.10.2016 um 13:26 schrieb Mattias Schlenker:


Hi everyone,

I maintain a few (commercial) live distributions and have to fulfil 
the need of a few customers for a nice graphical boot splash. 
Unfortunately busybox' fbsplash was too unflexible, so I added a bit 
more configurability:


  * Specify a background color which is used to flood the whole screen
before drawing the image and the progress bar
  * Specify an x and y offset of the ppm image
  * Specify an x or y offset larger than the respective screen size to
move the image to the right or bottom edge of the screen (or
bottom right corner)

The attached patch just re-uses functions already in fbsplash.c and 
introduces five more config options, this should result in the same 
size of the busybox binary. Even if these config options are not set, 
the screen is blanked all black before painting the splash, which 
might be desired in most cases (and usually is done by using 
fullscreen images).


With the patch I am able to calculate the position of logo and 
progress bar by a script before invoking fbsplash and do not have to 
add a splash for each and every screen resolution. Initially I was 
thinking about adding more options: color of progess bar and the 
posibility to specify a gradient, but this might have enlarged the 
binary which is not desirable.


I just updated the patch: The calculation for cropping the image was 
wrong, the parameter name "IMAGE_WIDTH" proved too long on 32 bit 
systems and I added a "NOFILL=1" option. This option allows drawing an 
arbitary image to an arbitary position without completely wiping the 
framebuffer first. Take a look at the demo script (run with the path to 
your busybox binary) as first parameter: The scripts reads the 
framebuffer dimensions, creates two config files, paints an image on a 
plain background, progress bar and changing icon beneath the progress bar.


The demo script: http://distfiles.lesslinux.org/fbsplash_demo.tar.gz

The patch is attached.

Yours,
Mattias


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
 redakt...@mattiasschlenker.de
Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

Address__ August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767  Fax: +49 341 30393578
Mobile: +49 163  6953657  Another mobile: +49 159 03160327
VATIN_ DE240998538

Fork me! https://github.com/mschlenker
Website.__ http://www.mattiasschlenker.de/
My books!___ http://www.arduino-hausautomation.de/

diff -ruN busybox-1.25.0/miscutils/fbsplash.c busybox-1.25.0.mod/miscutils/fbsplash.c
--- busybox-1.25.0/miscutils/fbsplash.c	2016-05-26 19:42:44.0 +0200
+++ busybox-1.25.0.mod/miscutils/fbsplash.c	2016-10-03 12:01:26.611456712 +0200
@@ -29,7 +29,8 @@
 //usage: "\n	-d	Framebuffer device (default /dev/fb0)"
 //usage: "\n	-i	Config file (var=value):"
 //usage: "\n			BAR_LEFT,BAR_TOP,BAR_WIDTH,BAR_HEIGHT"
-//usage: "\n			BAR_R,BAR_G,BAR_B"
+//usage: "\n			BAR_R,BAR_G,BAR_B,IMG_LEFT,IMG_TOP"
+//usage: "\nBG_R,BG_G,BG_B,NOFILL"
 //usage: "\n	-f	Control pipe (else exit after drawing image)"
 //usage: "\n			commands: 'NN' (% for progress bar) or 'exit'"
 
@@ -46,7 +47,7 @@
 	FILE *logfile_fd;	// log file
 #endif
 	unsigned char *addr;	// pointer to framebuffer memory
-	unsigned ns[7];		// n-parameters
+	unsigned ns[13];	// n-parameters
 	const char *image_filename;
 	struct fb_var_screeninfo scr_var;
 	struct fb_fix_screeninfo scr_fix;
@@ -68,6 +69,12 @@
 #define nbar_colr	ns[4]	// progress bar color red component
 #define nbar_colg	ns[5]	// progress bar color green component
 #define nbar_colb	ns[6]	// progress bar color blue component
+#define image_posx	ns[7]	// splash image horizontal position
+#define image_posy	ns[8]	// splash image verical position
+#define flood_colr	ns[9]	// background color red component
+#define flood_colg	ns[10]	// background color green component
+#define flood_colb	ns[11]	// background color blue component
+#define do_not_flood	ns[12]	// do not flood the whole screen with one color
 
 #if DEBUG
 #define DEBUG_MESSAGE(strMessage, args...) \
@@ -340,6 +347,14 @@
 			G.nbar_colr, G.nbar_colg, G.nbar_colb);
 }
 
+/**
+ * Flood the background with one color
+ */
+static void fb_colorfill(void)
+{
+	fb_drawfullrectangle(0, 0, G.scr_var.xres - 1, G.scr_var.yres - 1, 
+		G.flood_colr, G.flood_colg, G.flood_colb);
+}
 
 /**
  * Draw image from PPM file
@@ -398,11 +413,24 @@
 
 	line_size = width*3;
 	pixline = xmalloc(line_size);
-
+	
 	if (width > G.scr_var.xres)
 		width = G.scr_var.xres;
 	if (height > G.scr_var.yres)
 		height = G.scr_var.yres;
+	
+	/* specify a image position outside t

More flexibility for fbsplash

2016-10-01 Thread Mattias Schlenker

Hi everyone,

I maintain a few (commercial) live distributions and have to fulfil the 
need of a few customers for a nice graphical boot splash. Unfortunately 
busybox' fbsplash was too unflexible, so I added a bit more configurability:


 * Specify a background color which is used to flood the whole screen
   before drawing the image and the progress bar
 * Specify an x and y offset of the ppm image
 * Specify an x or y offset larger than the respective screen size to
   move the image to the right or bottom edge of the screen (or bottom
   right corner)

The attached patch just re-uses functions already in fbsplash.c and 
introduces five more config options, this should result in the same size 
of the busybox binary. Even if these config options are not set, the 
screen is blanked all black before painting the splash, which might be 
desired in most cases (and usually is done by using fullscreen images).


With the patch I am able to calculate the position of logo and progress 
bar by a script before invoking fbsplash and do not have to add a splash 
for each and every screen resolution. Initially I was thinking about 
adding more options: color of progess bar and the posibility to specify 
a gradient, but this might have enlarged the binary which is not desirable.


If you find the patch useful it would be nice you added it.

Yours,
Mattias

--
Mattias Schlenker - Redaktion + EDV-Beratung + Linux-CD/DVD-Konzepte
August-Bebel-Str. 74 - 04275 LEIPZIG - GERMANY

Telefon (VoIP "ueberall"), geschaeftlich: +49 341 39290767
Telefon (Festnetz), privat und Fax:   +49 341 30393578
Mobil:+49 163  6953657

Bitte fuer geschaeftliche Telefonate vorzugsweise die VoIP-Telefonnummer
+49 341 39290767 verwenden, da ich diese aufs Mobiltelefon routen kann!

http://blog.rootserverexperiment.de/ http://news.mattiasschlenker.de/


diff -ru busybox-1.25.0.orig/miscutils/fbsplash.c busybox-1.25.0/miscutils/fbsplash.c
--- busybox-1.25.0.orig/miscutils/fbsplash.c	2016-05-26 19:42:44.0 +0200
+++ busybox-1.25.0/miscutils/fbsplash.c	2016-10-01 12:54:38.700436324 +0200
@@ -29,7 +29,8 @@
 //usage: "\n	-d	Framebuffer device (default /dev/fb0)"
 //usage: "\n	-i	Config file (var=value):"
 //usage: "\n			BAR_LEFT,BAR_TOP,BAR_WIDTH,BAR_HEIGHT"
-//usage: "\n			BAR_R,BAR_G,BAR_B"
+//usage: "\n			BAR_R,BAR_G,BAR_B,IMAGE_LEFT,IMAGE_TOP"
+//usage: "\nBG_R,BG_G,BG_B"
 //usage: "\n	-f	Control pipe (else exit after drawing image)"
 //usage: "\n			commands: 'NN' (% for progress bar) or 'exit'"
 
@@ -46,7 +47,7 @@
 	FILE *logfile_fd;	// log file
 #endif
 	unsigned char *addr;	// pointer to framebuffer memory
-	unsigned ns[7];		// n-parameters
+	unsigned ns[12];		// n-parameters
 	const char *image_filename;
 	struct fb_var_screeninfo scr_var;
 	struct fb_fix_screeninfo scr_fix;
@@ -68,6 +69,11 @@
 #define nbar_colr	ns[4]	// progress bar color red component
 #define nbar_colg	ns[5]	// progress bar color green component
 #define nbar_colb	ns[6]	// progress bar color blue component
+#define image_posx	ns[7]	// splash image horizontal position
+#define image_posy	ns[8]	// splash image verical position
+#define flood_colr	ns[9]	// background color red component
+#define flood_colg	ns[10]	// background color green component
+#define flood_colb	ns[11]	// background color blue component
 
 #if DEBUG
 #define DEBUG_MESSAGE(strMessage, args...) \
@@ -340,6 +346,14 @@
 			G.nbar_colr, G.nbar_colg, G.nbar_colb);
 }
 
+/**
+ * Flood the background with one color
+ */
+static void fb_colorfill(void)
+{
+	fb_drawfullrectangle(0, 0, G.scr_var.xres - 1, G.scr_var.yres - 1, 
+		G.flood_colr, G.flood_colg, G.flood_colb);
+}
 
 /**
  * Draw image from PPM file
@@ -398,11 +412,24 @@
 
 	line_size = width*3;
 	pixline = xmalloc(line_size);
-
+	
 	if (width > G.scr_var.xres)
 		width = G.scr_var.xres;
 	if (height > G.scr_var.yres)
 		height = G.scr_var.yres;
+	
+	/* specify a image position outside the visible area to position the splash
+	at the edge of the screen */
+	if (G.image_posx >= G.scr_var.xres)
+		G.image_posx = G.scr_var.xres - width;
+	if (G.image_posy >= G.scr_var.yres)
+		G.image_posy = G.scr_var.yres - width;
+	/* crop the image if upper left corner is within visible area */
+	if (G.image_posx + height > G.scr_var.xres)
+		width = G.image_posx + width - G.scr_var.xres;
+	if (G.image_posy + height > G.scr_var.yres)
+		height = G.image_posy + height - G.scr_var.yres;
+	
 	for (j = 0; j < height; j++) {
 		unsigned char *pixel;
 		unsigned char *src;
@@ -413,7 +440,8 @@
 		src = G.addr + j * G.scr_fix.line_length;
 		for (i = 0; i < width; i++) {
 			unsigned thispix = fb_pixel_value(pixel[0], pixel[1], pixel[2]);
-			fb_write_pixel(src, thispix);
+			fb_write_pixel(G.image_posy *  G.scr_fix.line_length + 
+G.image_posx * G.bytes

Re: [PATCH] Re: Possible Vulnerability in httpd.c

2016-11-21 Thread Mattias Schlenker

Am 21.11.2016 um 18:08 schrieb walter harms:


the only reason we need to buffer everything is because of IE whatever.
Can someone confirm that this is still needed ?


AFAIK this was a valid issue until IE6. IE versions 7 and up should have 
no problems with headers plus small HTML page in one packet. Neither it 
does have with large headers (cookies and stuff) sent in more than one 
packet. (I yet have to dig out a few VMs and test) IE6 was supported 
with patches for regular users until about two years ago and still 
remains supported for paying customers who prefer to pay for support 
instead of moving away from 15 year old software.


If it was up to me, I would prefer to clean up code while being at risk 
to break interoperability with very old browsers.


Yours,
Mattias


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
 redakt...@mattiasschlenker.de
Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

Address__ August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767  Fax: +49 341 30393578
Mobile: +49 163  6953657  Another mobile: +49 159 03160327
VATIN_ DE240998538

Fork me! https://github.com/mschlenker
Website.__ http://www.mattiasschlenker.de/
My books!___ http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: [PATCH] fdisk: Add support for GPT partition type codes

2016-11-28 Thread Mattias Schlenker



Am 28.11.2016 um 20:53 schrieb Tito:

On 11/28/2016 05:42 PM, Simon Rettberg wrote:

27.11.2016, 20:24 +0200, Denys Vlasenko <vda.li...@googlemail.com>:


However, I still don't understand how do you use them,
apart from seeing them on output.



That's pretty much it. Following the same line of argument, you could
ask why we have this table in fdisk.c that maps the MBR type ids
to their names. They also do nothing except for showing up in the
output.

Plus, in case bb fdisk will get write support for GPT one day, the
table would be even more useful, since you usually just enter the type
code in existing GPT editing tools, instead of the full GUID. The
utility then just maps the short type code back to the long GUID when
writing.

Actually, the type codes of GPT are based on the type ids from MBR,
so for example HPFS/NTFS is 07 for MBR and 0700 for GPT, Linux Swap
is 82 for MBR, 8200 for GPT.

Hi,
one stupid question, could the 2 tables be merged or reused in some way
as they share related values (e.g. 82 and 8200)?


During the last weeks I did some tests on dual MBR and GPT partition 
tables, mainly for building bootable USB thumb drives taht have one 
partition visible and usable under Windows.


If the drive is less than 2TB and four partitions or less are used, it 
is very easy to use dual partition tables. If more partitions are used 
or some partitions should only be visible on MBR and others on GPT it 
gets tricky: Linux for example expects the protective partition to start 
at the second block, no matter how big the protective partition is and 
how many partitions follow. If this is the case Linux uses the GPT and 
ignores the rest of the MBR. Windows however expects a protective 
partition that spans the whole disk, otherwise it will use the MBR. So 
if you insert a USB drive with a small protective partition into 
Windows, Windows will prompt you to format the (unknown) partition. Only 
OS X ignores any MBR partitioning if a GPT is present.


So while theoretically interesting, in practice it does not make sense 
to sync partition tables. Use GPT on any linux only system (also makes 
sense on BIOS, albeit a bit more work to boot from), use GPT on any 
external media. Use GPT on any UEFI system as boot media, and only use 
MBR on drives with less than 2TB that should boot windows on BIOS (64 
bit windows 7 and up should be possible to boot from GPT on BIOS - I did 
not yet test).


Yours,
Mattias




Ciao,
Tito


When you send a patch, add a bit of background why do you need this
change,
and if there were other solutions which at first looked better, but
then proved
non-workable, mention those too.

For example, before I saw your email, I looked at fdisk_gpt.c and
decided to simply delete "Code" column on the output. I take it this
is not a good idea?
Why?


Alright, so as mentioned above, those type codes are almost exclusively
used when humans are dealing with GPT partitions in any way.

Not supporting them in busybox would not mean the end of the world; we
could still do everything by reading (and some day writing) type GUIDs
directly, at the expense of having to look them up manually every time,
unless you can memorize them.

As for removing the column: I saw that the formatting of the output
looks exactly like that of gdisk, so I assumed the original author
of fdisk_gpt.c decided that it would be better to print a dummy
value than not having the column at all.
I can't speak for the rest of the world, but I don't care about that
output format compatibility, so I would be fine with not having that
column instead of printing a misleading dummy value; it might
actually be the more reasonable choice, since it had me confused for
a while before checking the source. A new column showing the GUID
directly would be ok with me. I would change my scripts and add a
lengthy comment, probably.
But showing neither the short code nor the GUID does render the output
somewhat useless, just as if MBR mode would not print the type id.
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
 redakt...@mattiasschlenker.de
Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

Address__ August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767  Fax: +49 341 30393578
Mobile: +49 163  6953657  Another mobile: +49 159 03160327
VATIN_ DE240998538

Fork me! https://github.com/mschlenker
Website.__ http://www.mattiasschlenker.de/
My books!___ http://www.arduino-hausautomation.de/

___

Re: Kernel panic - not syncing: No working init found

2016-11-01 Thread Mattias Schlenker

Am 01.11.2016 um 13:41 schrieb Vered Zvi:

Hello,

I'm working with kernel 3.18.24, busybox 1.24.2

/lib contains the following files:

ld-2.22.so
ld-linux-x86-64.so.2 -> ld-2.22.so
libc-2.22.so
libcrypt-2.22.so
libcrypt.so.1 -> libcrypt-2.22.so
libc.so.6 -> libc-2.22.so
libdl-2.22.so
libdl.so.2 -> libdl-2.22.so
libgcc_s.so
libgcc_s.so.1
libm-2.22.so
libm.so.6 -> libm-2.22.so
libpthread-2.22.so
libpthread.so.0 -> libpthread-2.22.so
libresolv-2.22.so
libresolv.so.2 -> libresolv-2.22.so
librt.so.1
libstdc++.so.6
libthread_db.so.1
libutil-2.22.so
libutil.so.1 -> libutil-2.22.so

/lib64 contains the following files:

ld-linux-x86-64.so.2 -> /lib/ld-2.9.so
libc.so.6 -> /lib/libc.so.6
libm.so.6 -> /lib/libm.so.6

Upon boot I'm getting:
Kernel panic - not syncing: No working init found. Try passing init=option

Are there any files missing ?
How can I debug such error ?


First: Put everything that's in your initramfs to a directory and try to 
run busybox via chroot from outside, like "chroot /my/root/dir 
/bin/busybox". You either get a list of compiled in applets or an error 
telling you which files are missing.


Second: If that worked, try to run with "init=/bin/ash" to drop you to a 
shell. In this shell you can mount filesystems and stuff... Make notes


Third: there should be a symlink /init -> /bin/busybox if you are 
running busybox in inittab mode and of course an inittab and startup 
scripts. If you are using busybox to pivot root you should use an 
/linuxrc script to make sure the exec'ed init keeps PID 1.


If you want to see how to build a minimal BSD Gentoo like RC script 
system upon busybox' inittab that is easily readable take a look at one 
of my side projects - it should also explain which filesystems have to 
be mounted when, how to invoke the dhcp client and stuff: 
https://github.com/mschlenker/TinyCrossLinux


Regards,
Mattias

--
Mattias Schlenker - Redaktion + EDV-Beratung + Linux-CD/DVD-Konzepte
August-Bebel-Str. 74 - 04275 LEIPZIG - GERMANY

Telefon (VoIP "ueberall"), geschaeftlich: +49 341 39290767
Telefon (Festnetz), privat und Fax:   +49 341 30393578
Mobil:+49 163  6953657

Bitte fuer geschaeftliche Telefonate vorzugsweise die VoIP-Telefonnummer
+49 341 39290767 verwenden, da ich diese aufs Mobiltelefon routen kann!

http://blog.rootserverexperiment.de/ http://news.mattiasschlenker.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: Kernel panic - not syncing: No working init found

2016-11-01 Thread Mattias Schlenker



Am 01.11.2016 um 15:15 schrieb Vered Zvi:

Hello,

Where should I run:
chroot /bin/busybox ?

under the host PC ?


Yes, under the host PC. I assume, host PC and target architecture for 
initramfs are the same architecture, busybox is installed with all 
necessary symlinks and the files are all residing in some directory 
"/path/to/initramfs", then you execute


chroot /path/to/initramfs /bin/busybox

and probably afterwards:

chroot /path/to/initramfs /bin/ash

To get a shell in the initramfs and look around there. If the host and the 
initramfs target are same architecture, but host is 64 bit and initramfs is 32 
bit, you want to use:

linux32 chroot /path/to/initramfs /bin/busybox

Regards,
Mattias








Thank you,
Z.V

From: busybox [busybox-boun...@busybox.net] on behalf of Mattias Schlenker 
[m...@mattiasschlenker.de]
Sent: Tuesday, November 01, 2016 2:58 PM
To: busybox@busybox.net
Subject: Re: Kernel panic - not syncing: No working init found

Am 01.11.2016 um 13:41 schrieb Vered Zvi:

Hello,

I'm working with kernel 3.18.24, busybox 1.24.2

/lib contains the following files:

ld-2.22.so
ld-linux-x86-64.so.2 -> ld-2.22.so
libc-2.22.so
libcrypt-2.22.so
libcrypt.so.1 -> libcrypt-2.22.so
libc.so.6 -> libc-2.22.so
libdl-2.22.so
libdl.so.2 -> libdl-2.22.so
libgcc_s.so
libgcc_s.so.1
libm-2.22.so
libm.so.6 -> libm-2.22.so
libpthread-2.22.so
libpthread.so.0 -> libpthread-2.22.so
libresolv-2.22.so
libresolv.so.2 -> libresolv-2.22.so
librt.so.1
libstdc++.so.6
libthread_db.so.1
libutil-2.22.so
libutil.so.1 -> libutil-2.22.so

/lib64 contains the following files:

ld-linux-x86-64.so.2 -> /lib/ld-2.9.so
libc.so.6 -> /lib/libc.so.6
libm.so.6 -> /lib/libm.so.6

Upon boot I'm getting:
Kernel panic - not syncing: No working init found. Try passing init=option

Are there any files missing ?
How can I debug such error ?

First: Put everything that's in your initramfs to a directory and try to
run busybox via chroot from outside, like "chroot /my/root/dir
/bin/busybox". You either get a list of compiled in applets or an error
telling you which files are missing.

Second: If that worked, try to run with "init=/bin/ash" to drop you to a
shell. In this shell you can mount filesystems and stuff... Make notes

Third: there should be a symlink /init -> /bin/busybox if you are
running busybox in inittab mode and of course an inittab and startup
scripts. If you are using busybox to pivot root you should use an
/linuxrc script to make sure the exec'ed init keeps PID 1.

If you want to see how to build a minimal BSD Gentoo like RC script
system upon busybox' inittab that is easily readable take a look at one
of my side projects - it should also explain which filesystems have to
be mounted when, how to invoke the dhcp client and stuff:
https://github.com/mschlenker/TinyCrossLinux

Regards,
Mattias

--
Mattias Schlenker - Redaktion + EDV-Beratung + Linux-CD/DVD-Konzepte
August-Bebel-Str. 74 - 04275 LEIPZIG - GERMANY

Telefon (VoIP "ueberall"), geschaeftlich: +49 341 39290767
Telefon (Festnetz), privat und Fax:   +49 341 30393578
Mobil:+49 163  6953657

Bitte fuer geschaeftliche Telefonate vorzugsweise die VoIP-Telefonnummer
+49 341 39290767 verwenden, da ich diese aufs Mobiltelefon routen kann!

http://blog.rootserverexperiment.de/ http://news.mattiasschlenker.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

This Email and the attachments were emulated by Check Point ThreatEmulation 
Service.
The information contained in this communication is proprietary to Israel 
Aerospace Industries Ltd. and/or third parties, may contain confidential or 
privileged information, and is intended only for the use of the intended 
addressee thereof. If you are not the intended addressee, please be aware that 
any use, disclosure, distribution and/or copying of this communication is 
strictly prohibited. If you receive this communication in error, please notify 
the sender immediately and delete it from your computer.



--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
 redakt...@mattiasschlenker.de
Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

Address__ August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767  Fax: +49 341 30393578
Mobile: +49 163  6953657  Another mobile: +49 159 03160327
VATIN_ DE240998538

Fork me! https://github.com/mschlenker
Website.__ http://www.mattiasschlenker.de/
My books!___ http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: PHP, Web Server

2016-10-11 Thread Mattias Schlenker



Am 11.10.2016 um 14:09 schrieb Rowan Sylvester-Bradley:


I’m afraid I know very little about BusyBox or Linux or Unix, so I am 
starting from square zero. I have a very small microcomputer (a VoCore 
+ Dock) which is loaded with BusyBox. I’m not sure what the processor 
is – probably ARM. If possible I would like to run PHP on this device, 
and to run a web server. Are these things available? How do I add them 
to the system? If PHP is not available, is there any other scripting 
language with similar capability (if so I can potentially convert my 
PHP program into this new language). How do I build an application 
written in C to run on this device (this is an existing C program 
written by me and currently running under Windows, which I will 
obviously need to modify to use the features available in BusyBox 
rather than Windows).




VoCore uses a MIPS processor https://wiki.openwrt.org/toh/vocore/vocore 
and runs a distribution called "OpenWRT" http://www.openwrt.org/ , so 
please head over to the OpenWRT Wiki to find more about howto run PHP on 
this system: https://wiki.openwrt.org/doc/howto/php The OpenWRT forum 
might also be of help to you.


Yours,
Mattias


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
 redakt...@mattiasschlenker.de
Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

Address__ August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767  Fax: +49 341 30393578
Mobile: +49 163  6953657  Another mobile: +49 159 03160327
VATIN_ DE240998538

Fork me! https://github.com/mschlenker
Website.__ http://www.mattiasschlenker.de/
My books!___ http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Re: Create RAM disk downloaded via TFTP

2016-12-18 Thread Mattias Schlenker

Am 19.12.2016 um 04:18 schrieb Vered Zvi:

Hello,

I created a root file system with busybox.

Currently I have a tree with the following folders: bin sbin boot tmp sys proc 


My target (ARM-V7, NXP's LS1021A) was booted OK with this tree over NFS.


Then create a (compressed) CPIO archive from the content:

cd /path/to/rootfs && find . | cpio -o -H newc > ../inird.img

or

cd /path/to/rootfs && find . | cpio -o -H newc | gzip -c > ../inird.gz

Regards,
Mattias



--
Mattias Schlenker - Redaktion + EDV-Beratung + Linux-CD/DVD-Konzepte
August-Bebel-Str. 74 - 04275 LEIPZIG - GERMANY

Telefon (VoIP "ueberall"), geschaeftlich: +49 341 39290767
Telefon (Festnetz), privat und Fax:   +49 341 30393578
Mobil:+49 163  6953657

Bitte fuer geschaeftliche Telefonate vorzugsweise die VoIP-Telefonnummer
+49 341 39290767 verwenden, da ich diese aufs Mobiltelefon routen kann!

http://blog.rootserverexperiment.de/ http://news.mattiasschlenker.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: mdev change no longer supporting v2.6.2x kernels by using /sys/dev

2017-03-23 Thread Mattias Schlenker

Am 23.03.2017 um 17:32 schrieb Ralf Friedl:

Busybox is often used in embedded devices, where kernels (and other 
software) are not changed that often. Firmware may contain kernel 
modules without full source, so a change to a newer kernel is not an 
option. As an example, I have a router with kernel 2.6.13. I can't 
update the kernel, but I can replace the busybox with a newer version 
(and much more applets) than the original.


So it would be nice to have support for older kernels. I understand 
that you may not want to have it enabled by default to keep the code 
small, but in this case the code to support the older kernels seems 
already present, so why not give the user an option to use it. 


In my opinion it's completely legitimate to remove support for kernels, 
C libraries or compilers that are older than seven or eight years. It's 
not just about keeping (object) code small, but also about keeping 
(source) code small. However how about maintaining a (semi official) 
repository of some patches for special use cases like older kernels, 
compilers or additional features like my nicer looking fbsplash? The 
people over at xpra are doing so to be able to address some common 
combinations of compilers and video encoder libraries to escape the 
#ifdef of menuconfig hell.


BTW: You are sticking to an old Fritzbox 7270 since it "just works"? So 
I suggest I'll be calling Doris Haar or some development staff over at 
AVM for opening a bit more of the code than GPL requires?


Yours,
Mattias

--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
 redakt...@mattiasschlenker.de
Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

Address__ August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767  Fax: +49 341 30393578
Mobile: +49 163  6953657  Another mobile: +49 159 03160327
VATIN_ DE240998538

Fork me! https://github.com/mschlenker
Website.__ http://www.mattiasschlenker.de/
My books!___ http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: Web server under busybox

2017-03-20 Thread Mattias Schlenker



Am 20.03.2017 um 06:17 schrieb Vered Zvi:


Hello,

I'm working with busybox 1.25.1

I have to run a web server under vanilla Linux (and busybox)

Upon http request to display a web page, the web server has also to 
collect some data from the target and display it in the HTML page.


What is the right solution for my scenario ?

Can I use httpd  ?  How can httpd collect data ?



You already asked this question, I already answered:

http://lists.busybox.net/pipermail/busybox/2017-February/085254.html

Regards,
Mattias



Thank you,

Z.V

The information contained in this communication is proprietary to 
Israel Aerospace Industries Ltd. and/or third parties, may contain 
confidential or privileged information, and is intended only for the 
use of the intended addressee thereof. If you are not the intended 
addressee, please be aware that any use, disclosure, distribution 
and/or copying of this communication is strictly prohibited. If you 
receive this communication in error, please notify the sender 
immediately and delete it from your computer.




___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
 redakt...@mattiasschlenker.de
Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

Address__ August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767  Fax: +49 341 30393578
Mobile: +49 163  6953657  Another mobile: +49 159 03160327
VATIN_ DE240998538

Fork me! https://github.com/mschlenker
Website.__ http://www.mattiasschlenker.de/
My books!___ http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Re: bbox: musl versus uclibc

2017-08-14 Thread Mattias Schlenker

Am 14.08.2017 um 19:43 schrieb Denys Vlasenko:


As uclibc is increasingly aging, I am finally forced
to switch to musl: I'm bitten by a nasty bug in
getopt() - hush is using it in a slightly unusual way,
which uclibc does not expect.

I built a toolchain using
 https://github.com/richfelker/musl-cross-make
(Rich, is this the thing I should be using?)
and it worked with no issues at all.

(I can probably only wish for the README
to also mention how to make this a _static_
toolchain... I have a box with 32-bit userspace,
would be awesome to be able to copy this fresh
64-bit toolchain to it and have it working).


From time to time I am updating:

https://github.com/mschlenker/TinyCrossLinux

This might not be as clean as Rich Felkers Makefile collection, it uses 
the "classic" approach of building the compiler in two steps. It is 
extensively tested in x86_64 and i686, but not at all for other 
architectures. Comments are welcome.


Yours,
Mattias




Then I built busybox. Impressions:

Only a few options did not build:
EXTRA_COMPAT and FEATURE_VI_REGEX_SEARCH
failed because they need GNU regexp extensions.
FEATURE_MOUNT_NFS and FEATURE_INETD_RPC do not build
because they need rpc/rpc.h.
Not complaining, since them being in libc was a mistake
in the first place.

Now, the good news - musl has smaller data!
6695 bytes versus 7129 bytes for uclibc:

text  data   bss dechex filename
  894902   465  6664  902031  dc38f busybox.uclibc
  912538   563  6132  919233  e06c1 busybox.musl

Whee!
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
redakt...@mattiasschlenker.de

Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767 - Fax: +49 341 25365955
Mobile (primary): +49 163 6953657
Mobile (secondary): +49 163 1848610
VATIN DE240998538

https://github.com/mschlenker
http://www.mattiasschlenker.de/
http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: Busybox in Debian

2017-08-14 Thread Mattias Schlenker



Am 14.08.2017 um 14:55 schrieb Denys Vlasenko:

On Sat, Aug 12, 2017 at 4:15 PM, Ben Hutchings <b...@decadent.org.uk> wrote:

On Fri, 2017-08-11 at 14:54 -0400, Chris Boot wrote:
[...]

- The default initramfs assembly system, initramfs-tools, incorporates
busybox into the initramfs and it's used until the root filesystem (and
/usr if separate) is mounted and can be pivot_rooted into. We also use
parts of klibc in the initramfs, and I'm not yet entirely clear what
tools in the initramfs are klibc tools, busybox applets or executables
copied from the running system.

[...]

If initramfs-tools is configured to use busybox, busybox installs all
its commands and then klibc-utils installs any commands that are not
already there.  So for any command that they both implement, the
busybox implementation is used.

Do you have a list of tools klibc-utils installs?


https://packages.debian.org/sid/i386/klibc-utils/filelis
Regards,
Mattias

--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
redakt...@mattiasschlenker.de

Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767 - Fax: +49 341 25365955
Mobile (primary): +49 163 6953657
Mobile (secondary): +49 163 1848610
VATIN DE240998538

https://github.com/mschlenker
http://www.mattiasschlenker.de/
http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: Busybox in Debian

2017-08-14 Thread Mattias Schlenker



Am 14.08.2017 um 16:42 schrieb Denys Vlasenko:

If you want "resume" and "ipconfig" in bbox, I can do that.


The weird thing with Debian is that any package can add scripts to the 
initramfs and call an initramfs update after installation. This 
perfectly makes sense for tools that manage RAIDs or special 
filesystems. Thus I guess properly updating busybox in Debian and 
testing it with a "normal" hard drive installed system and the installer 
won't be such a big deal. But afterwards packages have to be identified 
that rely on certain commands in the initramfs and those have to be 
checked or adjusted as well.


Regards,
Mattias

--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
redakt...@mattiasschlenker.de

Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767 - Fax: +49 341 25365955
Mobile (primary): +49 163 6953657
Mobile (secondary): +49 163 1848610
VATIN DE240998538

https://github.com/mschlenker
http://www.mattiasschlenker.de/
http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: BusyBox built-in shell (ash)

2017-11-30 Thread Mattias Schlenker



Am 30.11.2017 um 14:13 schrieb A.W.C.:

Hello,

Linux embedded file system (Linux v. 2.6.26.5) running on raw NAND flash, and 
use Full Image's RootFS.
I need to access to linux shell when Linux kernel is fully loaded

U-Boot> setenv bootargs console=ttyS1,115200n8 rootfstype=squashfs noalign 
half_image=0 verify=y single init=/bin/sh

BusyBox v1.10.2 (2017-08-02 14:07:25 CST) built-in shell (ash)
When I access to Busybox emergency shell, Linux kernel is not fully loaded, 
actual root partition is not mounted yet, the available commands are very 
limited.

BusyBox v1.10.2 (2015-09-06 10:58:05 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
# help

Built-in commands:
---
 . : [ [[ alias bg break cd chdir continue echo eval exec exit
 export false fg hash help jobs let local pwd read readonly return
 set shift source test times trap true type ulimit umask unalias
 unset wait

# fdisk -l
/bin/sh: fdisk: not found
#

# mount
mount: no /proc/mounts
#

How to get Linux Kernel fully loaded, and MTD-devices mounted, at the same time 
having access to file system from Busybox emergency shell?


Mount /dev, /proc, /sys and /dev/pts. Alternatively create a few device 
nodes. Look at this /etc/rc script to see how to start a working linux 
with not much more than busybox:


https://github.com/mschlenker/TinyCrossLinux/blob/master/patches/etc-rc

Yours,
Mattias




Regards,
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
redakt...@mattiasschlenker.de

Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767 - Fax: +49 341 25365955
Mobile (primary): +49 163 6953657
Mobile (secondary): +49 163 1848610
VATIN DE240998538

https://github.com/mschlenker
http://www.mattiasschlenker.de/
http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: BusyBox built-in shell (ash)

2017-12-12 Thread Mattias Schlenker

Am 13.12.2017 um 00:28 schrieb A.W.C.:

Hi,

yes, I know that Squashfs is read-only filesystem. Tried again, not 
sure what need be changed here for this specific configuration and 
filesystems available.


# mknod -m 666 /dev/null c 1 3
mknod: /dev/null: Read-only file system
# mknod -m 666 /dev/zero c 1 5
mknod: /dev/zero: Read-only file system
# mkdir /dev/pts
mkdir: cannot create directory '/dev/pts': Read-only file system
# mount -t devtmpfs none /dev
mount: mounting none on /dev failed: No such device


RTFM, Read Those Fine Manuals.

man mknod

seems devtmpfs is not supported by your kernel. Create device nodes 
manually. Like back in 1998.


Yours,
Mattias

--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
redakt...@mattiasschlenker.de

Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767 - Fax: +49 341 25365955
Mobile (primary): +49 163 6953657
Mobile (secondary): +49 163 1848610
VATIN DE240998538

https://github.com/mschlenker http://www.mattiasschlenker.de/ 
http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: BusyBox built-in shell (ash)

2017-12-01 Thread Mattias Schlenker

Am 01.12.2017 um 10:38 schrieb tiggersWelt.net (Support):


 This should work whenever /dev is mounted.
Matthias [0] already gave you the advice to look at other rc-scripts how
they are doing this kind of stuff, like his own scripts:

   <https://github.com/mschlenker/TinyCrossLinux/blob/master/patches/etc-rc>

Everything you need is written down there and is not busybox-related,
but how to build a linux from scratch (maybe the LFS-Project would be a
good starting-point for you).


I object! TinyCrossLinux is a collection of scripts to build a minimal 
working usable linux distribution that basically just uses busybox, the 
kernel and a bootloader. It extensively uses features special to 
busybox: busybox' init (with a sample inittab and a BSD like rc script), 
busybox mdev and other stuff. I tried to keep all the scripts simple to 
build a minimal base distribution for your own busybox related experiments.


Yours,
Mattias



--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
redakt...@mattiasschlenker.de

Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767 - Fax: +49 341 25365955
Mobile (primary): +49 163 6953657
Mobile (secondary): +49 163 1848610
VATIN DE240998538

https://github.com/mschlenker
http://www.mattiasschlenker.de/
http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: BusyBox built-in shell (ash)

2017-12-03 Thread Mattias Schlenker



Am 04.12.2017 um 00:09 schrieb A.W.C.:

Hi Baruch,

what I want ismanually mount the root file system from busybox rescue 
shell. To make some changes, umount and exit from shell.  Linux v 
2.6.26.5, rootfstype=squashfs, root filesystem is on mtd4, NAND flash, 
jffs2.



# mount -t proc none /proc
# mount -t sysfs none /sys

# mount -t devtmpfs devtmpfs /dev
mount: mounting devtmpfs on /dev failed: No such device


Seems devtmpfs is not supported by your kernel. Use mknod to create the 
most basic device nodes (/dev/null, /dev/zero, /dev/mtdblock{,1,2,3,4} 
and a few ttys).  But: This is absolutely not busybox related. This is 
linux basics.



# mount -t jffs2 /dev/mtd4 /mnt/root
mount: mounting /dev/mtd4 on /mnt/root failed: No such file or directory


After creating the device node with the proper minor major mount will work.

Yours,
Mattias





On Sunday, December 3, 2017 9:23 AM, Baruch Siach <bar...@tkos.co.il> 
wrote:



Hi Alex,

On Fri, Dec 01, 2017 at 03:17:39PM +, A.W.C. wrote:
> But I already have directories /dev, /proc, /sys, /tmp
> If I'll make these new dir for TinyCross they will replace existing 
ones?

>
> mkdir -p /proc
> mkdir -p /sys
> mkdir -p /tmp
> mkdir -p /var/log
>
> Basically, I want mount root partition, its located on /dev/mtd4. In my
> specific case I need manually mount a few partitions only required 
for this

> task, correct?
> Then mount root
>
> mount /dev/mtd4 /mnt/root

You must specify the type of the filesystem when mounting raw MTD 
filesystems.
This is probably jffs2 in your case, though it might also be ubifs. In 
case of

ubifs you also need to "attach" the ubi volume before you mount it.

> Please correct me if I'm wrong.
>
> How to exit from busybox shell properly? Command 'exit' produces 
Kernel panic.


This is expected behaviour. The kernel panics when PID 1, your shell, 
exits.
The common implementation is to exec the rootfs init from the 
initramfs init


script.


baruch

--
http://baruch.siach.name/blog/                 ~. .~  Tk Open Systems
=}ooO--U--Ooo{=
  - bar...@tkos.co.il <mailto:bar...@tkos.co.il> - tel: 
+972.2.679.5364, http://www.tkos.co.il <http://www.tkos.co.il/>

-




___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
redakt...@mattiasschlenker.de

Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767 - Fax: +49 341 25365955
Mobile (primary): +49 163 6953657
Mobile (secondary): +49 163 1848610
VATIN DE240998538

https://github.com/mschlenker
http://www.mattiasschlenker.de/
http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: Unexpected directory listing line connecting to a BusyBox device

2018-06-11 Thread Mattias Schlenker



Am 10.06.2018 um 19:18 schrieb Marco Usai:

Hello to the whole BusyBox Community!

I have a Zyxel AMG1312-T10B device with the latest firmware version 
that is using BusyBox 1.0 and Dropbear sshd0.52( uname –a command 
shows: Linux ZyXEL 2.6.22.15 #37 SMP Mon Dec 19 19:09:06 CST 2016 mips 
unknown)


If I try to connect to this device using the latest WinScp version 
using scp protocols, I receive the following error:


Error listing directory ‘/’.
Unexpected directory listing line 'drwxr-xr-x12 00156 .'.

If I try to connect to this device using the latest SecureFX client 
using scp protocols, I can only list symlink under /


With both clients above and FlashFXP using ftp I receive an error that 
prevent listing of directory content.


I have no problem accessing the device with putty
Any suggestion is welcomed. Thank You.


Hi Marco,

what is your man objective? Putting files to this special device or 
improving buybox' compatibility with tools that expect a more GNUish 
behaviour?


If you just want to put files to the router, do it with a bit of cat's 
help, if you do not have a Unix like system handy, run Ubuntu live in a 
virtual machine or install Microsofts Linux environment for Windows 10:


cat local.file | ssh root@zyxel "cat > /remote.file"

(it might work with less cats) or a whole folder with tar:

tar cvf - folder | ssh root@zyxel "tar xvf -"

If you want to improve busybox' compatibility, please test if the 
mentioned behaviour still exists with the latest stable version of 
busybox - version 1.0 might be a few years old.


Regards,
Mattias


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
redakt...@mattiasschlenker.de

Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767 - Fax: +49 341 25365955
Mobile (primary): +49 163 6953657
Mobile (secondary): +49 178 2323141
VATIN DE240998538

https://github.com/mschlenker
http://www.mattiasschlenker.de/
http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: Question: Finding libraries that are required for busybox??

2018-06-25 Thread Mattias Schlenker

Am 25.06.2018 um 21:01 schrieb Michael D. Setzer II:


Using busybox nslookup failed due to one of the libraries I had removed not
being there? libnss_dns and libnss_files. ldd busybox doesn't report these
libraries are used? Once I put those libraries back, the nslookup resolves.

Is there a way to find if there are any other such required libraries rather 
than
having to find an issue at run time?


You just ran into one of those culprits using busybox with GNU libc, I 
guess... These problems are usually reported at compile time.


Yours,
Mattias




--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
redakt...@mattiasschlenker.de

Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767 - Fax: +49 341 25365955
Mobile (primary): +49 163 6953657
Mobile (secondary): +49 178 2323141
VATIN DE240998538

https://github.com/mschlenker
http://www.mattiasschlenker.de/
http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


BusyBox on Windows 10 (WSL)

2018-07-05 Thread Mattias Schlenker

Hi everyone,

did anyone of you start building a BusyBox based minimal distribution 
for WSL? 
https://docs.microsoft.com/en-us/windows/wsl/build-custom-distro I think 
having a musl plus BusyBox based minimal linux running on WSL could be a 
great way of showcasing BusyBox' abilities on one hand and it could 
leverage the power of a linux command line without having to download a 
full fledged distribution. I maintain (updated about once a year) a 
small distribution that could be used as a starting point for this 
experiment: https://github.com/mschlenker/TinyCrossLinux - However doing 
it based on a buildroot target might also work.


If someone of you started building BusyBox for WSL I'd happily join, if 
not, I'll update TinyCrossLinux soon and add WSL as a target there.


Regards,
Mattias

--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
redakt...@mattiasschlenker.de

Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767 - Fax: +49 341 25365955
Mobile (primary): +49 163 6953657
Mobile (secondary): +49 178 2323141
VATIN DE240998538

https://github.com/mschlenker
http://www.mattiasschlenker.de/
http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: Login to the root shell from the serial console

2019-06-25 Thread Mattias Schlenker



Am 25.06.19 um 13:31 schrieb Vesta:

Board with ARM embedded Linux version 2.6.26.5 and Busybox 1.10.2
How to configure Busybox to accept any password when login to the root shell 
from the serial console?



This is some sample inittab from a simple live linux. It runs /etc/rc on 
system startup, shows some info on the first console, starts two login 
prompts on tty2 and tty3 and two root shells (one with builtin bash, one 
with ash) on tty4 and tty5. You'd probably want to build a two line 
inittab, one with sysinit and one with an askfirst shell on your serial 
console:


::sysinit:/etc/rc
tty1::respawn:/static/bin/show_placeholder
tty2::respawn:/static/sbin/getty -l /static/bin/login 38400 tty2
tty3::respawn:/static/sbin/getty -l /static/bin/login 38400 tty3
tty4::askfirst:/static/bin/ash
tty5::askfirst:/bin/bash

Of course you could also use a login line and build an e/etc/password 
with an empty hash.


Regards,
Mattias







B.Regards,
Alex
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
redakt...@mattiasschlenker.de

Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY

https://github.com/mschlenker
http://www.mattiasschlenker.de/
http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: I cannot find latest binaries file(.exe file) of BusyBox

2019-05-02 Thread Mattias Schlenker


Am 02.05.19 um 08:50 schrieb Ron Yorston:

Yoshi,

Sorry for the late response.

You wrote:

I tried to access the URL below, but I cannot access to it successfully.
https://busybox.net/downloads/binaries/latest/

Yes, that directory doesn't seem to exist.  Is there a link to it on
the website?  If so it should be fixed.


Could you kindly tell me how to download latest exe file of BusyBox?
Windows 10 版のメールから送信

If you're looking for a Windows executable, they aren't available on
the mainstream BusyBox site.


Did someone package a static binary (musl) of BusyBox for WSL yet?

New builds of Win 10 allow for the import of a "backup" of a linux 
system atop of WSL from a tarball. This would be a great way of 
initially distributing busybox for WSL without using the Windows store.


Yours,
Mattias





I maintain a (limited) port of BusyBox for Windows.  This web page
describes it and has links to executables:

https://frippery.org/busybox

In particular, the latest binaries are:

https://frippery.org/files/busybox/busybox.exe
https://frippery.org/files/busybox/busybox64.exe

Hope that helps,

Ron
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


--
Mattias Schlenker - Freier IT-Fachredakteur und -autor
redakt...@mattiasschlenker.de

Mattias Schlenker - IT-Consulting, Softwareentwicklung
consult...@mattiasschlenker.de

August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY

https://github.com/mschlenker
http://www.mattiasschlenker.de/
http://www.arduino-hausautomation.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: rustybox, an experimental fork written entirely in Rust

2019-11-14 Thread Mattias Schlenker

Am 14.11.19 um 23:33 schrieb Markus Gothe:

How do you think that fatso library aptly named librust would fit into 
any modest embedded system? Well it doesn't and you never thought of 
that in the first place which makes the rest of your assumptions more 
damaging than any good.

[...]
Busybox is INTENDED for embedded systems (and without any explanation 
bounds-checking should be optional etcetera). Feel free to fork it and 
create a rust variant; but it is all out of the scope of the current 
purpose.


Busybox' popularity is increasing among container folks where it is a 
building block allowing for small storage footprints and reduced 
complexity. A rustybox port could take off among the Rust community 
because it would allow containerizing Rust apps by building a complete 
container with a single toolchain (Rustybox, Rust app, some shell scripts).


I think, the busybox should embrace this as a chance to get attention 
from developers beyond embedded.


Yours,
Mattias

--
Mattias Schlenker
IT-Fachredaktion: redakt...@mattiasschlenker.de
IT-Consulting:   consult...@mattiasschlenker.de

Post:  August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Parcel: Brandvorwerkstr. 52, Raum 325 - D-04275 LEIPZIG
Phone: +49 341 39290767 - Fax: +49 341 25365955
Mobile: +49 163 xxx or  +49 178 xxx
VATIN DE24xxx

https://github.com/mschlenker/
http://www.mattiasschlenker.de/

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox