Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-23 Thread Rogério Brito
Hi.

On Mar 20 2013, Chris Wilkinson wrote:
 File sizes are:
 
 Initrd.img/ramdisk.gz – 2425607

Just curious: Can you install the package advancecomp and run on that
ramdisk the command:

advdef -z -4 ramdisk.gz

and report back the results? Just to be extra safe, you may want to test the
recompressed image with:

gzip -t ramdisk.gz

If the image gets smaller, then you probably will have some space to put one
binary or another in it, so that said image will be more useful.

 Vmlinuz/zImage – 1524976

I don't know how, but it would be nice to see how much improvement one would
get from doing the same trick as above.


Regards,

-- 
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFC
http://rb.doesntexist.org/blog : Projects : https://github.com/rbrito/
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130323154730.gc8...@ime.usp.br



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-23 Thread Maciej Soltysiak
Hi

On Sat, Mar 23, 2013 at 4:47 PM, Rogério Brito rbr...@ime.usp.br wrote:

  Initrd.img/ramdisk.gz – 2425607

 Just curious: Can you install the package advancecomp and run on that
 ramdisk the command:

 advdef -z -4 ramdisk.gz

 I've different files, but here goes. Less by 127 kB:
 3385295 3254732  96% initrd.img-3.8.3-iop32x

and report back the results? Just to be extra safe, you may want to test the
 recompressed image with:

 gzip -t ramdisk.gz

Looks fine.

If the image gets smaller, then you probably will have some space to put one
 binary or another in it, so that said image will be more useful.

  Vmlinuz/zImage – 1524976

 I don't know how, but it would be nice to see how much improvement one
 would
 get from doing the same trick as above.

root@Koryto:/tmp# advdef -z -4 vmlinuz-3.8.3-iop32x
File type not supported on vmlinuz-3.8.3-iop32x [at void
convert_inplace(const std::string):redef.cc:490]

Maybe I could try to do it on the uncompressed image? I'm actually
recompiling at the moment, so will try later.

Regards,
Maciej


Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-23 Thread Rogério Brito
Hi, Maciej,

On Mar 23 2013, Maciej Soltysiak wrote:
  Just curious: Can you install the package advancecomp and run on that
  ramdisk the command:
 
  advdef -z -4 ramdisk.gz
 
 I've different files, but here goes. Less by 127 kB:
  3385295 3254732  96% initrd.img-3.8.3-iop32x

Well, even if the difference is small, that may be the difference between
being able to squeeze it in the memory or exceeding the alloted size.

And 127kB is not neglibible, as there are many modules that would fit in
that space (more if we consider that they will be compressed).

 root@Koryto:/tmp# advdef -z -4 vmlinuz-3.8.3-iop32x
 File type not supported on vmlinuz-3.8.3-iop32x [at void
 convert_inplace(const std::string):redef.cc:490]
 
 Maybe I could try to do it on the uncompressed image? I'm actually
 recompiling at the moment, so will try later.

A compressed Linux image is, in my understanding, more than simply gzipping
the image itself, which means that a plain advdef won't work, but I'd love
to be proven wrong.

Thanks,

-- 
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFC
http://rb.doesntexist.org/blog : Projects : https://github.com/rbrito/
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130323194214.ga22...@ime.usp.br



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-21 Thread Maciej Soltysiak
On Wed, Mar 20, 2013 at 10:20 PM, Chris Wilkinson kins...@verizon.netwrote:

 Sure.
 [...]
 #Reboot
 Redboot reset

Thanks for describing this so well and simple.

This creates the temptation to some of the modules into the kernel.
Many years ago I've read that network drivers as modules can have some
penalty compared to being compiled-in.
Does anybody know if that is still the case? Is it the case with file
system drivers?
I know with SS4000-E this doesn't really matter, it's slow anyway :-)

Best regards,
Maciej


RE: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-20 Thread Chris Wilkinson
Excellent, This worked for me.

 

File sizes are:

Initrd.img/ramdisk.gz – 2425607

Vmlinuz/zImage – 1524976

 

Which fit nicely in the flash. I redid the flash layout to get rid of some of 
the not needed sections and make more useable space.

 

EM-438/EM-7220 ver.AG0 2006-05-23   
   

== Executing boot script in 1.000 seconds - enter ^C to abort   
   

^C  
   

RedBoot ^C 
   

RedBoot fis list   
   

Name  FLASH addr  Mem addrLength  Entry point   
   

RedBoot   0xF000  0xF000  0x0004  0x

RedBoot config0xF07C  0xF07C  0x1000  0x

FIS directory 0xF07E  0xF07E  0x0002  0x

zImage0xF004  0x01008000  0x0040  0x01008000

ramdisk.gz0xF044  0x0180  0x0034  0x0180

 

Chris

 

From: Maciej Soltysiak [mailto:mac...@soltysiak.com] 
Sent: Monday, March 18, 2013 4:25 PM
To: Arnaud Patard; Luke Kenneth Casson Leighton
Cc: Chris Wilkinson; debian-arm@lists.debian.org
Subject: Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

 

On Mon, Mar 18, 2013 at 6:10 PM, Arnaud Patard arnaud.pat...@rtp-net.org 
wrote:

Chris Wilkinson kins...@verizon.net writes:

 Is it necessary to flash-kernel? Once /boot on HD is populated with
 the new kernel, doesn’t it finally boot from that and it doesn’t matter what 
 version is flashed?

redboot is configured to read the kernel from the flash, so yes, you
need flash-kernel. I've not tested to load a kernel from disk so I've
no idea if you can configure and use redboot to do it (but it's unlikely).

I was wondering if it would be possible to use a different portion of the flash 
memory for the kernel.

I mean that redboot MTD has like 7 regions.

 

Anyway, as some people requested, I wanted to share what worked for me, so I 
redid the same thing but with 3.8.3.

 

Here are the steps:

https://soltysiak.com/compiling-linux-kernel-for-ss4000-e-aka-lanner-em-7210-running-debian/

 

Best regards,

Maciej

 



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-20 Thread Maciej Soltysiak
On Wed, Mar 20, 2013 at 3:42 PM, Chris Wilkinson kins...@verizon.netwrote:

  Excellent, This worked for me.

 ** **

 File sizes are:

 Initrd.img/ramdisk.gz – 2425607

 Vmlinuz/zImage – 1524976

Great! Glad to have helped!

Which fit nicely in the flash. I redid the flash layout to get rid of some
 of the not needed sections and make more useable space.

Can you share more detail on how you changed the flash layout?


 EM-438/EM-7220 ver.AG0 2006-05-23


 == Executing boot script in 1.000 seconds - enter ^C to
 abort  

 ^C
 

 RedBoot
 ^C
 

 RedBoot fis
 list
 

 Name  FLASH addr  Mem addrLength  Entry
 point  

 RedBoot   0xF000  0xF000  0x0004  0x

 RedBoot config0xF07C  0xF07C  0x1000  0x

 FIS directory 0xF07E  0xF07E  0x0002  0x

 zImage0xF004  0x01008000  0x0040  0x01008000

 ramdisk.gz0xF044  0x0180  0x0034  0x0180

Do I read correctly you made 4MB available for zImage? That would be enough
to hold larger kernels anyway!

Chris

Maciej


RE: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-20 Thread Chris Wilkinson
Sure.

Yes, zImage now has 4K.

This is how it was laid out originally.

#Power up, ^C
+No network interfaces found

EM-438/EM-7220 ver.AG0 2006-05-23 
== Executing boot script in 1.000 seconds - enter ^C to abort ^C
RedBoot ^C
RedBoot fis list
Name  FLASH addr  Mem addrLength  Entry point
RedBoot   0xF000  0xF000  0x0004  0x
zImage0xF004  0x01008000  0x0020  0x01008000
ramdisk.gz0xF024  0x0180  0x0040  0x0180
*wmdata0xF064  0xF064  0x000C  0x01008000
*rammode   0xF070  0x0020  0x0004  0x0020
*naskey0xF074  0xF074  0x0002  0x01008000
*log   0xF076  0xF076  0x0004  0x01008000
*vendor0xF07A  0xF07A  0x0002  0x01008000
RedBoot config0xF07C  0xF07C  0x1000  0x
FIS directory 0xF07E  0xF07E  0x0002  0x

The ones with a * aren’t needed. Rammode is for loading via tftp but I never 
had much success with that so I used minicom serial/ymodem. Bit slow but works.

#Setup flash. Empties flash completely and loads up Redboot, Redboot config and 
FIS directory to default locations.
RedBoot fis init –f

#load your images zImage=vmlinuz-x, ramdisk.gz=initrd.img-x using 
serial/ymodem
RedBoot load -r -v -b 0x01008000 -m ymodem zImage
RedBoot fis create -b 0x01008000 -f 0xf004 -r 0x01008000 -l 0x0040 
zImage
RedBoot load -v -r -b 0x0180 -m ymodem ramdisk.gz
RedBoot fis create -b 0x0180 -f 0xf044 -r 0x0180 -l 0x0034 
ramdisk.gz

RedBoot fis list
Name  FLASH addr  Mem addrLength  Entry point   
   
RedBoot   0xF000  0xF000  0x0004  0x
RedBoot config0xF07C  0xF07C  0x1000  0x
FIS directory 0xF07E  0xF07E  0x0002  0x
zImage0xF004  0x01008000  0x0040  0x01008000
ramdisk.gz0xF044  0x0180  0x0034  0x0180

#Setup boot script #once only needed
RedBoot fconfig (-l to list)
Run script at boot: true
Enter script, terminate with empty line
 fis load ramdisk.gz
 fis load zImage
 exec -c console=ttyS0,115200 rw root=/dev/ram mem=256M@0xa000 -r 
0x0180

Boot script timeout (1000ms resolution): 1
Use BOOTP for network configuration: false
Gateway IP address: 192.168.1.1
Local IP address: 192.168.1.155
Local IP address mask: 255.255.255.0
Default server IP address: 192.168.1.98
Console baud rate: 115200
DNS server IP address: 192.168.1.1
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
Update RedBoot non-volatile configuration - continue (y/n)? y

#Reboot
Redboot reset

From: Maciej Soltysiak [mailto:mac...@soltysiak.com] 
Sent: Wednesday, March 20, 2013 4:34 PM
To: Chris Wilkinson
Cc: Arnaud Patard; Luke Kenneth Casson Leighton; debian-arm@lists.debian.org
Subject: Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

On Wed, Mar 20, 2013 at 3:42 PM, Chris Wilkinson kins...@verizon.net wrote:
Excellent, This worked for me.
 
File sizes are:
Initrd.img/ramdisk.gz – 2425607
Vmlinuz/zImage – 1524976
Great! Glad to have helped!  

Which fit nicely in the flash. I redid the flash layout to get rid of some of 
the not needed sections and make more useable space.
Can you share more detail on how you changed the flash layout?
 
EM-438/EM-7220 ver.AG0 2006-05-23   
  
== Executing boot script in 1.000 seconds - enter ^C to abort   
   
^C  
   
RedBoot ^C 
   
RedBoot fis list   
   
Name  FLASH addr  Mem addrLength  Entry point   
   
RedBoot   0xF000  0xF000  0x0004  0x
RedBoot config0xF07C  0xF07C  0x1000  0x
FIS directory 0xF07E  0xF07E  0x0002  0x
zImage0xF004  0x01008000  0x0040  0x01008000
ramdisk.gz0xF044  0x0180  0x0034  0x0180
Do I read correctly you made 4MB available for zImage? That would be enough to 
hold larger kernels anyway!

Chris
Maciej


--
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/01ce25b0$c92d8b00$5b88a100$@net



RE: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-19 Thread Chris Wilkinson
So it doesn't matter what is in /boot after flash has been loaded by 
flash-kernel? Redboot systems boot only and directly from flash so /boot is 
only a convenient and conventional initial staging post for flash-kernel to get 
the kernel and initramfs from and is irrelevant from that point on?

Am I understanding right?

Chris

-Original Message-
From: Arnaud Patard (Rtp) [mailto:arnaud.pat...@rtp-net.org] 
Sent: Monday, March 18, 2013 1:11 PM
To: Chris Wilkinson
Cc: 'Maciej Soltysiak'; debian-arm@lists.debian.org
Subject: Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

Chris Wilkinson kins...@verizon.net writes:

 Is it necessary to flash-kernel? Once /boot on HD is populated with
 the new kernel, doesn’t it finally boot from that and it doesn’t matter what 
 version is flashed?

redboot is configured to read the kernel from the flash, so yes, you
need flash-kernel. I've not tested to load a kernel from disk so I've
no idea if you can configure and use redboot to do it (but it's unlikely).

Arnaud


--
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/003a01ce24b8$044c1340$0ce439c0$@net



RE: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-18 Thread Chris Wilkinson
Is it necessary to flash-kernel? Once /boot on HD is populated with the new 
kernel, doesn’t it finally boot from that and it doesn’t matter what version is 
flashed?

 

Chris

 

From: Maciej Soltysiak [mailto:mac...@soltysiak.com] 
Sent: Sunday, March 17, 2013 3:05 PM
To: Chris Wilkinson
Cc: debian-arm@lists.debian.org
Subject: Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

 

On Sun, Mar 17, 2013 at 3:35 PM, Chris Wilkinson kins...@verizon.net wrote:

Congrats!

 

Do you think that dpkg –i …  on the ss4000e would upgrade the installed stock 
kernel to a customized one compiled by buildroot or make-kpkg?

Sadly, for me, dpkg -i doesn't seem to update the /boot/vmlinuz and 
/boot/initrd.img symlink; I'm not sure it runs flash-kernel either.

 

After running dpkg -i for the image and headers I go to /boot to make sure the 
symlinks are ok, make sure the vmlinuz file ends with iop32x and then run 
flash-kernel and then checks if it would fit the 2MB MTD region and it flashes.

 

After reboot if works fine.

 

Regards,

Maciej



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-18 Thread Rtp
Chris Wilkinson kins...@verizon.net writes:

 Is it necessary to flash-kernel? Once /boot on HD is populated with
 the new kernel, doesn’t it finally boot from that and it doesn’t matter what 
 version is flashed?

redboot is configured to read the kernel from the flash, so yes, you
need flash-kernel. I've not tested to load a kernel from disk so I've
no idea if you can configure and use redboot to do it (but it's unlikely).

Arnaud


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/874ng8d464@lebrac.rtp-net.org



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-18 Thread Maciej Soltysiak
On Mon, Mar 18, 2013 at 6:10 PM, Arnaud Patard arnaud.pat...@rtp-net.orgwrote:

 Chris Wilkinson kins...@verizon.net writes:

  Is it necessary to flash-kernel? Once /boot on HD is populated with
  the new kernel, doesn’t it finally boot from that and it doesn’t matter
 what version is flashed?

 redboot is configured to read the kernel from the flash, so yes, you
 need flash-kernel. I've not tested to load a kernel from disk so I've
 no idea if you can configure and use redboot to do it (but it's unlikely).

I was wondering if it would be possible to use a different portion of the
flash memory for the kernel.
I mean that redboot MTD has like 7 regions.

Anyway, as some people requested, I wanted to share what worked for me, so
I redid the same thing but with 3.8.3.

Here are the steps:
https://soltysiak.com/compiling-linux-kernel-for-ss4000-e-aka-lanner-em-7210-running-debian/

Best regards,
Maciej


RE: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-17 Thread Chris Wilkinson
Congrats!

 

Do you think that dpkg -i .  on the ss4000e would upgrade the installed
stock kernel to a customized one compiled by buildroot or make-kpkg?

 

Chris

 

From: Maciej Soltysiak [mailto:mac...@soltysiak.com] 
Sent: Saturday, March 16, 2013 4:44 PM
To: debian-arm@lists.debian.org
Subject: Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

 

Months passed and I finally made progress.

I managed to compile and boot a 3.7.10 kernel on SS4000-E.

I basically went through the ordeal of doing the compile on the box itself,
instead of cross-compiling on an x86 VM,

 

Took ages, but it worked.

 

One thing I noticed is that flash-kernel refuses to flash if the kernel
image does not end with iop32x, like /boot/vmlinuz-3.7.10-iop32x

I had too look at the flash-kernel source to figure it was just being fussy
about a file name!

 

Anyway to bring the system up to speed from Debian's 3.2 kernel I'm going to
compile my own e2fstools and iproute2 as I need them for experiments with
new ext4 features and want to use fq_codel on network interface.

 

Is there anything else you suggest that I recompile from things like
util-linux, etc?

 

Best regards,

Maciej

On Fri, Sep 14, 2012 at 6:15 PM, Arnaud Patard arnaud.pat...@rtp-net.org
wrote:

Maciej Soltysiak mac...@soltysiak.com writes:

 the ss4000e is using redboot not uboot. You'll have to check but I think
 that redboot doesn't handle uImage format so you're about to brick
 your system.
 Thanks for the warning! I see that I have in arch/arm/boot these 3 files
 -rwxr-xr-x 1 root root 3459268 Sep 14 09:33 arch/arm/boot/Image
 -rw-r--r-- 1 root root 1328848 Sep 14 09:33 arch/arm/boot/uImage
 -rwxr-xr-x 1 root root 1328784 Sep 14 09:33 arch/arm/boot/zImage

 Looks like zImage is the right one then?

yes.

Arnaud

 



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-17 Thread Maciej Soltysiak
On Sun, Mar 17, 2013 at 3:35 PM, Chris Wilkinson kins...@verizon.netwrote:

 Congrats!

 ** **

 Do you think that dpkg –i …  on the ss4000e would upgrade the installed
 stock kernel to a customized one compiled by buildroot or make-kpkg?

Sadly, for me, dpkg -i doesn't seem to update the /boot/vmlinuz and
/boot/initrd.img symlink; I'm not sure it runs flash-kernel either.

After running dpkg -i for the image and headers I go to /boot to make sure
the symlinks are ok, make sure the vmlinuz file ends with iop32x and then
run flash-kernel and then checks if it would fit the 2MB MTD region and it
flashes.

After reboot if works fine.

Regards,
Maciej


RE: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-17 Thread Chris Wilkinson
What tools are you using to create vmlinuz and initrd? I’m trying buildroot but 
this doesn’t seem to support vmlinuz on ARM, only on MIPS.

 

Also did you do something with system.map?

 

Chris

 

From: Maciej Soltysiak [mailto:mac...@soltysiak.com] 
Sent: Sunday, March 17, 2013 3:05 PM
To: Chris Wilkinson
Cc: debian-arm@lists.debian.org
Subject: Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

 

On Sun, Mar 17, 2013 at 3:35 PM, Chris Wilkinson kins...@verizon.net wrote:

Congrats!

 

Do you think that dpkg –i …  on the ss4000e would upgrade the installed stock 
kernel to a customized one compiled by buildroot or make-kpkg?

Sadly, for me, dpkg -i doesn't seem to update the /boot/vmlinuz and 
/boot/initrd.img symlink; I'm not sure it runs flash-kernel either.

 

After running dpkg -i for the image and headers I go to /boot to make sure the 
symlinks are ok, make sure the vmlinuz file ends with iop32x and then run 
flash-kernel and then checks if it would fit the 2MB MTD region and it flashes.

 

After reboot if works fine.

 

Regards,

Maciej



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2013-03-16 Thread Maciej Soltysiak
Months passed and I finally made progress.
I managed to compile and boot a 3.7.10 kernel on SS4000-E.
I basically went through the ordeal of doing the compile on the box itself,
instead of cross-compiling on an x86 VM,

Took ages, but it worked.

One thing I noticed is that flash-kernel refuses to flash if the kernel
image does not end with iop32x, like /boot/vmlinuz-3.7.10-iop32x
I had too look at the flash-kernel source to figure it was just being fussy
about a file name!

Anyway to bring the system up to speed from Debian's 3.2 kernel I'm going
to compile my own e2fstools and iproute2 as I need them for experiments
with new ext4 features and want to use fq_codel on network interface.

Is there anything else you suggest that I recompile from things like
util-linux, etc?

Best regards,
Maciej

On Fri, Sep 14, 2012 at 6:15 PM, Arnaud Patard arnaud.pat...@rtp-net.orgwrote:

 Maciej Soltysiak mac...@soltysiak.com writes:

  the ss4000e is using redboot not uboot. You'll have to check but I think
  that redboot doesn't handle uImage format so you're about to brick
  your system.
  Thanks for the warning! I see that I have in arch/arm/boot these 3 files
  -rwxr-xr-x 1 root root 3459268 Sep 14 09:33 arch/arm/boot/Image
  -rw-r--r-- 1 root root 1328848 Sep 14 09:33 arch/arm/boot/uImage
  -rwxr-xr-x 1 root root 1328784 Sep 14 09:33 arch/arm/boot/zImage
 
  Looks like zImage is the right one then?

 yes.

 Arnaud



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2012-09-14 Thread Maciej Soltysiak
On Fri, Sep 14, 2012 at 3:15 AM, Eric Cooper e...@cmu.edu wrote:
 On Wed, Sep 12, 2012 at 04:47:42PM +0200, Maciej Soltysiak wrote:
 Also, .config is here: http://pastebin.com/mvnkW2DD

 Using this .config, and the arm-2012.03 cross-compiler from
 codesourcery, I get:
 Image Name:   Linux-3.6.0-rc5mks1+
 Created:  Thu Sep 13 21:13:46 2012
 Image Type:   ARM Linux Kernel Image (uncompressed)
 Data Size:839360 Bytes = 819.69 kB = 0.80 MB
Wow, that's fantastic! I'd give it a try. Do you mean this cross-compiler?
http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/

The lite-version of their product?

Looks like codesourcery is now mentor graphics...

Regards,
Maciej


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/camzr1yam_xjamtv2oxvv10_nbbnuudx_ov7xo8mzvdoqv0m...@mail.gmail.com



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2012-09-14 Thread Eric Cooper
On Fri, Sep 14, 2012 at 12:33:27PM +0200, Maciej Soltysiak wrote:
 Do you mean this cross-compiler?
 http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/
 
 The lite-version of their product?
 
 Looks like codesourcery is now mentor graphics...

Yes; also they make you register first and then email you a download
link.  I chose the tarball rather than their binary installer,
untarred it in /opt, and then used commands like:

make ARCH=arm CROSS_COMPILE=/opt/arm-2012.03/bin/arm-none-eabi- oldconfig
make ARCH=arm CROSS_COMPILE=/opt/arm-2012.03/bin/arm-none-eabi- -j 6 uImage

etc.  Hope this helps.

-- 
Eric Cooper e c c @ c m u . e d u


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120914111923.ga13...@cooper-siegel.org



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2012-09-14 Thread Maciej Soltysiak
On Fri, Sep 14, 2012 at 1:19 PM, Eric Cooper e...@cmu.edu wrote:
 On Fri, Sep 14, 2012 at 12:33:27PM +0200, Maciej Soltysiak wrote:
 Do you mean this cross-compiler?
 http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/

 The lite-version of their product?

 Looks like codesourcery is now mentor graphics...

 Yes; also they make you register first and then email you a download
 link.  I chose the tarball rather than their binary installer,
 untarred it in /opt, and then used commands like:

 make ARCH=arm CROSS_COMPILE=/opt/arm-2012.03/bin/arm-none-eabi- oldconfig
 make ARCH=arm CROSS_COMPILE=/opt/arm-2012.03/bin/arm-none-eabi- -j 6 
 uImage

 etc.  Hope this helps.
Ah, make uImage you say... I tried both with codesourcery and
arm-linux-gnueabi from emdebian.org and I can see now a small (around
1.3 MB) uImage file in arch/arm/boot!
Maybe my mistake was that I was doing:
make ... all
make ... modules_install install
to get the kernel, modules, then vmlinuz and System.map placed in /boot.
That probably deploys the wrong image file.

I guess I can try to flash SS4000-E's mtd with a non-modular uImage
kernel and get away with not doing initrd.

Still to check that though...

Regards,
Maciej


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/camzr1yavj_9jpwkvfx7a0masxai2kdt63d_e1lahbxzidjb...@mail.gmail.com



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2012-09-14 Thread Maciej Soltysiak
 the ss4000e is using redboot not uboot. You'll have to check but I think
 that redboot doesn't handle uImage format so you're about to brick
 your system.
Thanks for the warning! I see that I have in arch/arm/boot these 3 files
-rwxr-xr-x 1 root root 3459268 Sep 14 09:33 arch/arm/boot/Image
-rw-r--r-- 1 root root 1328848 Sep 14 09:33 arch/arm/boot/uImage
-rwxr-xr-x 1 root root 1328784 Sep 14 09:33 arch/arm/boot/zImage

Looks like zImage is the right one then?

 Arnaud
Maciej


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAMZR1YC2090qjw17veWW2u-poK73=14evuyvrm0ob7dr_2j...@mail.gmail.com



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2012-09-14 Thread Rtp
Maciej Soltysiak mac...@soltysiak.com writes:

 the ss4000e is using redboot not uboot. You'll have to check but I think
 that redboot doesn't handle uImage format so you're about to brick
 your system.
 Thanks for the warning! I see that I have in arch/arm/boot these 3 files
 -rwxr-xr-x 1 root root 3459268 Sep 14 09:33 arch/arm/boot/Image
 -rw-r--r-- 1 root root 1328848 Sep 14 09:33 arch/arm/boot/uImage
 -rwxr-xr-x 1 root root 1328784 Sep 14 09:33 arch/arm/boot/zImage

 Looks like zImage is the right one then?

yes.

Arnaud


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87vcfgk2d6@lebrac.rtp-net.org



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2012-09-13 Thread martinwguy
On 12 September 2012 19:46, Luke Kenneth Casson Leighton l...@lkcl.net wrote:
 I went down from whopping 5MB to 2.1MB

   i was expecting a large number but not that large.

 I also tried to use a .config file from
 linux-image-3.2.0-3-iop32x_3.2.23-1_armel.deb
 and it's still is a big image.

  i'm not impressed.  what the fuck's going on with the linux kernel??

This almost always happens to all software. Someone writes a small,
efficient core of code which then gets added to and added to and added
to - each change being well-meant, of course - until it is huge and
bloated. Then someone gets sick of it and says I know, I'll write a
new, small, efficient core of code... and the cycle repeats.

Each piece of software has a high point at which functionality over
bloat hits a maximum, followed by decline. For MSWord it was Word 6.
For Windows it was Windows 3.11. For Mozilla it was about a year after
the open-sourcing of netscape, when it was called Firebird. For Linux
it was somewhere in the 2.4 series.

Of course, it's a wonderful piece of software, runs on anything and
does everything.
I am surprised there are not more minimalist monomaniacs involved in
keeping the core code small.

M


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAL4-wQp5CKEsVM=j9e_je4+l--ihbqtvrp2feygcntnp3yw...@mail.gmail.com



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2012-09-13 Thread Luke Kenneth Casson Leighton
On Thu, Sep 13, 2012 at 8:10 PM, martinwguy martinw...@gmail.com wrote:
 On 12 September 2012 19:46, Luke Kenneth Casson Leighton l...@lkcl.net 
 wrote:
 I went down from whopping 5MB to 2.1MB

   i was expecting a large number but not that large.

 I also tried to use a .config file from
 linux-image-3.2.0-3-iop32x_3.2.23-1_armel.deb
 and it's still is a big image.

  i'm not impressed.  what the fuck's going on with the linux kernel??

 [..]

 Each piece of software has a high point at which functionality over
 bloat hits a maximum, followed by decline. For MSWord it was Word 6.
 For Windows it was Windows 3.11. For Mozilla it was about a year after
 the open-sourcing of netscape, when it was called Firebird. For Linux
 it was somewhere in the 2.4 series.

 *depressed*.

 Of course, it's a wonderful piece of software, runs on anything and
 does everything.
 I am surprised there are not more minimalist monomaniacs involved in
 keeping the core code small.

 ... especially given that the majority of commits nowadays is from
ARM developers.  is anyone else in the debian-arm community concerned
about this trend?  embedded systems aren't exactly known for their
humongous resources.

l.


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/capweedzsirg6mqvcnp3d-nps7clncrzrce-gzxq1uukq5xo...@mail.gmail.com



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2012-09-13 Thread Eric Cooper
On Wed, Sep 12, 2012 at 04:47:42PM +0200, Maciej Soltysiak wrote:
 Also, .config is here: http://pastebin.com/mvnkW2DD

Using this .config, and the arm-2012.03 cross-compiler from
codesourcery, I get:
Image Name:   Linux-3.6.0-rc5mks1+
Created:  Thu Sep 13 21:13:46 2012
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:839360 Bytes = 819.69 kB = 0.80 MB

-- 
Eric Cooper e c c @ c m u . e d u


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120914011556.gd18...@cooper-siegel.org



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2012-09-12 Thread Maciej Soltysiak
On Wed, Sep 12, 2012 at 1:50 AM, Luke Kenneth Casson Leighton
l...@lkcl.net wrote:
 On Tue, Sep 11, 2012 at 9:46 PM, Maciej Soltysiak mac...@soltysiak.com 
 wrote:
 Hi,

 Was anyone successful in getting a 3.6-rc5 kernel zImage smaller than 2MB?
 I'm trying to fit this onto SS4000-e and I've been failing desperately
 for the last couple of days.

  isn't there a parameter which allows you to select the modules that
 go into an initrd?  hmmm /etc/initramfs-tools/initramfs.conf -
 modules=most
I'm aiming to get the kernel under 2MB and initrd under 4MB and I have
initrd under 4MB.
It's just the kernel too big and I've been trying to move things out to modules
or remove completely. I honestly tried to keep things to a minimum.

  also it looks like you can specify COMPRESS=xz which, assuming you've
 enabled xz compression in the linux kernel, would give you a bit more
 space.
I've been setting LZMA, I'll try with XD then.

  also are you using busybox?  again, that would likely save some
 space, esp. if you compiled it specially and *only* with the actual
 functions you need.
Busybox is enabled for initrams. For the kernel I don't think it makes
any difference if I'm using busybox or util-linux to invoke gcc
(arm-linux-gnueabi actually from emdebian.org), maybe that's the problem?
Is there a recommended cross_compiling chain?

  send a link to a file online where the list of files is, in the
 initrd - it will help check what's going on here.
Sure, initrd is here: http://pastebin.com/sdQhJxsn
Also, .config is here: http://pastebin.com/mvnkW2DD

   but, just for a laugh please do tell me the size of the kernel
 you've got.  i remember doing 2.4.24 kernels and they were only 600k.
 we converted to 2.6.8 or thereabouts and that *immediately* shot up to
 900k (exactly the same config options).  hilarious.  not.
I went down from whopping 5MB to 2.1MB

I also tried to use a .config file from
linux-image-3.2.0-3-iop32x_3.2.23-1_armel.deb
but during make it asked for a bunch of new stuff to which I said 'N'
and it's still is a big image.

Regards,
Maciej


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAMZR1YAL2xotF7EDxQ1WHNPjKQF=q++fp9_n2mcuyyhtf0j...@mail.gmail.com



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2012-09-12 Thread Luke Kenneth Casson Leighton
On Wed, Sep 12, 2012 at 3:47 PM, Maciej Soltysiak mac...@soltysiak.com wrote:
 On Wed, Sep 12, 2012 at 1:50 AM, Luke Kenneth Casson Leighton
 l...@lkcl.net wrote:
 On Tue, Sep 11, 2012 at 9:46 PM, Maciej Soltysiak mac...@soltysiak.com 
 wrote:
 Hi,

 Was anyone successful in getting a 3.6-rc5 kernel zImage smaller than 2MB?
 I'm trying to fit this onto SS4000-e and I've been failing desperately
 for the last couple of days.

  isn't there a parameter which allows you to select the modules that
 go into an initrd?  hmmm /etc/initramfs-tools/initramfs.conf -
 modules=most
 I'm aiming to get the kernel under 2MB and initrd under 4MB and I have
 initrd under 4MB.
 It's just the kernel too big and I've been trying to move things out to 
 modules
 or remove completely. I honestly tried to keep things to a minimum.

  also it looks like you can specify COMPRESS=xz which, assuming you've
 enabled xz compression in the linux kernel, would give you a bit more
 space.
 I've been setting LZMA, I'll try with XD then.

 remember to set the appropriate config setting for adding xz
compression in the linux kernel build

  also are you using busybox?  again, that would likely save some
 space, esp. if you compiled it specially and *only* with the actual
 functions you need.
 Busybox is enabled for initrams. For the kernel I don't think it makes
 any difference if I'm using busybox or util-linux to invoke gcc
 (arm-linux-gnueabi actually from emdebian.org), maybe that's the problem?

 well, you've included busybox, but are using libc6 which is probably
1.3mb on its own.  consider finding a version that compiles with
uclibc.  you'll also need to compile libudev as well.

 Is there a recommended cross_compiling chain?

 for debian?  i'm sure one's around.  although it'd be slower i'd
consider just booting up qemu-arm and running the native arm compiler,
there?  heck, you could use the same kernel and initrd you just built.

  send a link to a file online where the list of files is, in the
 initrd - it will help check what's going on here.
 Sure, initrd is here: http://pastebin.com/sdQhJxsn

 ok, yep you've cut things down drastically.  do you really need ppp
and slip?  also if you recompile busybox to use uclibc you'll need to
do udev too.

 Also, .config is here: http://pastebin.com/mvnkW2DD

ok it looks sane to me - line 1880 has CONFIG_DEBUG_KERNEL=y which
could make a difference, i dunno.  there's nothing unreasonable set.

# CONFIG_XZ_DEC is not set
# CONFIG_XZ_DEC_BCJ is not set

remember to try enabling those (and disabling the others, save _some_ space).

   but, just for a laugh please do tell me the size of the kernel
 you've got.  i remember doing 2.4.24 kernels and they were only 600k.
 we converted to 2.6.8 or thereabouts and that *immediately* shot up to
 900k (exactly the same config options).  hilarious.  not.
 I went down from whopping 5MB to 2.1MB

 fuck me that's insane.  i was expecting a large number but not that large.

 I also tried to use a .config file from
 linux-image-3.2.0-3-iop32x_3.2.23-1_armel.deb
 but during make it asked for a bunch of new stuff to which I said 'N'
 and it's still is a big image.

 i'm not impressed.  what the fuck's going on with the linux kernel??
this is really bad news for embedded systems.  sure it's fine for x86
(just checking the 2.6.39-2-amd64 kernel on my machine and
vmlinuz-2.6-36-2-amd64 is 2.9mb)

l.


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAPweEDz4=wfp-mxzsu4qqholmnyzxzmpn2kbpttxcooqx9l...@mail.gmail.com



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2012-09-12 Thread Aaro Koskinen
On Tue, Sep 11, 2012 at 10:46:24PM +0200, Maciej Soltysiak wrote:
 Was anyone successful in getting a 3.6-rc5 kernel zImage smaller than 2MB?

Just a thought, but you could also look into kexec if your bootloader has
limitations for kernel size. I.e. build a very minimal kernel/initramfs
that is able to load and boot a bigger kernel from disk/network/etc.

A.


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20120912215621.ga22...@blackmetal.musicnaut.iki.fi



Re: Can't get a Linux 3.6-rc zImage smaller than 2MB

2012-09-11 Thread Luke Kenneth Casson Leighton
On Tue, Sep 11, 2012 at 9:46 PM, Maciej Soltysiak mac...@soltysiak.com wrote:
 Hi,

 Was anyone successful in getting a 3.6-rc5 kernel zImage smaller than 2MB?
 I'm trying to fit this onto SS4000-e and I've been failing desperately
 for the last couple of days.

 isn't there a parameter which allows you to select the modules that
go into an initrd?  hmmm /etc/initramfs-tools/initramfs.conf -
modules=most

 also it looks like you can specify COMPRESS=xz which, assuming you've
enabled xz compression in the linux kernel, would give you a bit more
space.

 also are you using busybox?  again, that would likely save some
space, esp. if you compiled it specially and *only* with the actual
functions you need.

 send a link to a file online where the list of files is, in the
initrd - it will help check what's going on here.

  but, just for a laugh please do tell me the size of the kernel
you've got.  i remember doing 2.4.24 kernels and they were only 600k.
we converted to 2.6.8 or thereabouts and that *immediately* shot up to
900k (exactly the same config options).  hilarious.  not.

l.


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/capweedwookb7hbqphn6xzfinq4mdrgrhkhmp8zyhqcvgdrs...@mail.gmail.com