New IT forum Follow us on Twitter
04 February 2012, 03:26:16 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: EFIKA MX reviewed in Linux User & Developer issue 104
 
   Home   SHOP Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: [resolved] change nand partition sizes to boot on nand first and after load USB  (Read 3722 times)
maisondouf
Jr. Member
**
Posts: 68


Crazy hacker's family since 1982


WWW
« Reply #15 on: 12 June 2010, 03:15:23 am »

BAD NEWS !

When I applied this, I have errors during images load.
Quote
Marvell>> run umulti

NAND read: device 0 offset 0x1f400000, size 0xc00000

Reading data from 0x1ffff800 -- 100% complete.
 12582912 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Squeeze combined image
   Created:      2010-06-12   3:10:53 UTC
   Image Type:   ARM Linux Multi-File Image (gzip compressed)
   Data Size:    6853405 Bytes =  6.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Contents:
   Image 0:  1431196 Bytes =  1.4 MB
   Image 1:  5422197 Bytes =  5.2 MB
   Verifying Checksum ... OK
   Uncompressing Multi-File Image ... Error: Bad gzipped data
GUNZIP ERROR - must RESET board to recover~

It seem to be due to bad choice for compress....
« Last Edit: 12 June 2010, 03:19:14 am by maisondouf » Logged

NSLU2 owner since 4 years...
Very new owner of a black eSata Sheevaplug.
(Wiki en français http://plug.maisondouf.fr)
fragfutter
Newbie
*
Posts: 24


« Reply #16 on: 12 June 2010, 07:27:40 am »

either kernel or initrd is not a gzipped image. Could be that the initrd is a cpio archive. Then you need to convert that before building the multi image.
Logged
maisondouf
Jr. Member
**
Posts: 68


Crazy hacker's family since 1982


WWW
« Reply #17 on: 12 June 2010, 09:37:58 am »

Here the results of my tries :
Quote
papounet@P4Karmic:~/Sheeva/squeeze-test$
papounet@P4Karmic:~/Sheeva/squeeze-test$dd if=uInitrd of=zInitrd bs=64 skip=1
84721+1 enregistrements lus
84721+1 enregistrements écrits
5422197 octets (5,4 MB) copiés, 0,98559 s, 5,5 MB/s
papounet@P4Karmic:~/Sheeva/squeeze-test$
papounet@P4Karmic:~/Sheeva/squeeze-test$ mkdir uInitrd-extract
papounet@P4Karmic:~/Sheeva/squeeze-test$ cd uInitrd-extract
papounet@P4Karmic:~/Sheeva/squeeze-test/uInitrd-extract$ cp ../zInitrd zInitrd.gz
papounet@P4Karmic:~/Sheeva/squeeze-test/uInitrd-extract$
papounet@P4Karmic:~/Sheeva/squeeze-test/uInitrd-extract$ ls
zInitrd.gz
papounet@P4Karmic:~/Sheeva/squeeze-test/uInitrd-extract$ ls -l
-rw-r--r-- 1 papounet papounet 5422197 2010-06-12 05:10 zInitrd.gz
papounet@P4Karmic:~/Sheeva/squeeze-test/uInitrd-extract$
papounet@P4Karmic:~/Sheeva/squeeze-test/uInitrd-extract$ gzip -d zInitrd.gz
papounet@P4Karmic:~/Sheeva/squeeze-test/uInitrd-extract$ ls
zInitrd
papounet@P4Karmic:~/Sheeva/squeeze-test/uInitrd-extract$ ls -l
-rw-r--r-- 1 papounet papounet 12761088 2010-06-12 11:12 zInitrd
papounet@P4Karmic:~/Sheeva/squeeze-test/uInitrd-extract$ cpio -id <zInitrd
24924 blocs
papounet@P4Karmic:~/Sheeva/squeeze-test/uInitrd-extract$ ls
bin  conf  etc  init  lib  sbin  scripts  zInitrd
papounet@P4Karmic:~/Sheeva/squeeze-test/uInitrd-extract$ ls -l
total 12496
drwxr-xr-x 2 papounet papounet     4096 2010-06-12 11:14 bin
drwxr-xr-x 3 papounet papounet     4096 2010-06-12 11:14 conf
drwxr-xr-x 4 papounet papounet     4096 2010-06-12 11:14 etc
-rwxr-xr-x 1 papounet papounet     5137 2010-06-12 11:14 init
drwxr-xr-x 4 papounet papounet     4096 2010-06-12 11:14 lib
drwxr-xr-x 2 papounet papounet     4096 2010-06-12 11:14 sbin
drwxr-xr-x 5 papounet papounet     4096 2010-06-12 11:14 scripts
-rw-r--r-- 1 papounet papounet 12761088 2010-06-12 11:12 zInitrd
papounet@P4Karmic:~/Sheeva/squeeze-test/uInitrd-extract$
papounet@P4Karmic:~/Sheeva/squeeze-test/uInitrd-extract$ cd ..
papounet@P4Karmic:~/Sheeva/squeeze-test$
papounet@P4Karmic:~/Sheeva/squeeze-test$ dd if=uImage of=zImage bs=64 skip=1
22362+1 enregistrements lus
22362+1 enregistrements écrits
1431196 octets (1,4 MB) copiés, 0,307175 s, 4,7 MB/s
papounet@P4Karmic:~/Sheeva/squeeze-test$
papounet@P4Karmic:~/Sheeva/squeeze-test$ mkdir uImage-extract
papounet@P4Karmic:~/Sheeva/squeeze-test$ cd uImage-extract
papounet@P4Karmic:~/Sheeva/squeeze-test/uImage-extract$ cp ../zImage zImage.gz
papounet@P4Karmic:~/Sheeva/squeeze-test/uImage-extract$ gzip -d zImage.gz

gzip: zImage.gz: not in gzip format
papounet@P4Karmic:~/Sheeva/squeeze-test/uImage-extract$
papounet@P4Karmic:~/Sheeva/squeeze-test/uImage-extract$ cd ..
papounet@P4Karmic:~/Sheeva/squeeze-test$

Effectively, uInitrd is a gzipped archive, but not uImage.

Do I have to gzip uImage before run mkimage ?
« Last Edit: 12 June 2010, 09:39:55 am by maisondouf » Logged

NSLU2 owner since 4 years...
Very new owner of a black eSata Sheevaplug.
(Wiki en français http://plug.maisondouf.fr)
maisondouf
Jr. Member
**
Posts: 68


Crazy hacker's family since 1982


WWW
« Reply #18 on: 12 June 2010, 10:26:34 am »

I try to gzip "uImage" before making the combined file "uMulti" (with mkimage), the load is good but kernel hangs

Quote
Marvell>> setenv umulti 'run t1; nand read.e 0x0800000 0x1f400000; bootm 0x0800000'
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>> run umulti

NAND read: device 0 offset 0x1f400000, size 0xc00000

Reading data from 0x1ffff800 -- 100% complete.
 12582912 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Squeeze combined image
   Created:      2010-06-12  10:15:23 UTC
   Image Type:   ARM Linux Multi-File Image (gzip compressed)
   Data Size:    6845593 Bytes =  6.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Contents:
   Image 0:  1423382 Bytes =  1.4 MB
   Image 1:  5422197 Bytes =  5.2 MB
   Verifying Checksum ... OK
   Uncompressing Multi-File Image ... OK

Starting kernel ...


NB: t1 is only to set 'bootargs'

Quote
Marvell>> print t1
t1=setenv bootargs $(bootargs_console) $(bootroot_usb) $(mtdpartitions)
Logged

NSLU2 owner since 4 years...
Very new owner of a black eSata Sheevaplug.
(Wiki en français http://plug.maisondouf.fr)
fragfutter
Newbie
*
Posts: 24


« Reply #19 on: 06 July 2010, 09:14:40 pm »

i had time to play with the plug. The short version to get a multiboot image

Code:
linux-2.6.34/arch/arm/boot/zImage
gzip zImage
mkimage -A arm -O linux -T multi \
   -C gzip -a 0x00008000 -e 0x00008000 \
   -d zImage.gz:rootfsGenerator/ramdisk.img.gz uMulti

Code:
tftp 0xf00000 uMulti; bootm

I have no clue why arm (or recent kernels) have different load and entry addresses. Took my some time to figure this out. Anyone has a hint?

if there is interrest i can build (next week) a small rescue image with a kernel, ramdisk, dhcp network config, ssh login and ubifs tools. I just need to collect the parts from my harddisk and clean them up.
Logged
fragfutter
Newbie
*
Posts: 24


« Reply #20 on: 17 July 2010, 04:48:56 pm »

here is a finished multi-image  http://www.held-im-ruhestand.de/software/sheevaplug/plug_resuce.img
it contains kernel and busybox based initial ramdisk. Configuration is done with dhcp

Load and start it like this

Code:
Marvell> setenv ipaddr 192.168.1.2
Marvell> setenv serverip 192.168.1.1
Marvell> setenv netmask 255.255.255.0
Marvell> setenv bootargs 'console=ttyS0,115200 ramdisk_size=16384 root=/dev/ram'
Marvell> tftp 0xe00000 uMulti
Marvell> TFTP from server 192.168.1.1; our IP address is 192.168.1.2
Filename 'uMulti'.
Load address: 0xe00000
Loading: ##################################################
         ...
         ###################################################
done
Bytes transferred = 5252797 (5026bd hex)
Marvell> bootm 0xe00000

if your dhcp/tftp has a nextfile option you can do a complete boot with dhcp.
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!