[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



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 addr    Length      Entry point
RedBoot           0xF0000000  0xF0000000  0x00040000  0x00000000
zImage            0xF0040000  0x01008000  0x00200000  0x01008000
ramdisk.gz        0xF0240000  0x01800000  0x00400000  0x01800000
*wmdata            0xF0640000  0xF0640000  0x000C0000  0x01008000
*rammode           0xF0700000  0x00200000  0x00040000  0x00200000
*naskey            0xF0740000  0xF0740000  0x00020000  0x01008000
*log               0xF0760000  0xF0760000  0x00040000  0x01008000
*vendor            0xF07A0000  0xF07A0000  0x00020000  0x01008000
RedBoot config    0xF07C0000  0xF07C0000  0x00001000  0x00000000
FIS directory     0xF07E0000  0xF07E0000  0x00020000  0x00000000

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-xxxxx, ramdisk.gz=initrd.img-xxxxx using serial/ymodem
RedBoot> load -r -v -b 0x01008000 -m ymodem zImage
RedBoot> fis create -b 0x01008000 -f 0xf0040000 -r 0x01008000 -l 0x00400000 zImage
RedBoot> load -v -r -b 0x01800000 -m ymodem ramdisk.gz
RedBoot> fis create -b 0x01800000 -f 0xf0440000 -r 0x01800000 -l 0x00340000 ramdisk.gz

RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point                                  
RedBoot           0xF0000000  0xF0000000  0x00040000  0x00000000
RedBoot config    0xF07C0000  0xF07C0000  0x00001000  0x00000000
FIS directory     0xF07E0000  0xF07E0000  0x00020000  0x00000000
zImage            0xF0040000  0x01008000  0x00400000  0x01008000
ramdisk.gz        0xF0440000  0x01800000  0x00340000  0x01800000

#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@0xa0000000" -r 0x01800000
    >>
    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:maciej@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 <kinsham@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 addr    Length      Entry point                                  
RedBoot           0xF0000000  0xF0000000  0x00040000  0x00000000
RedBoot config    0xF07C0000  0xF07C0000  0x00001000  0x00000000
FIS directory     0xF07E0000  0xF07E0000  0x00020000  0x00000000
zImage            0xF0040000  0x01008000  0x00400000  0x01008000
ramdisk.gz        0xF0440000  0x01800000  0x00340000  0x01800000
Do I read correctly you made 4MB available for zImage? That would be enough to hold larger kernels anyway!

Chris
Maciej


Reply to: