• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Help before kernal upgrade  (Read 3812 times)
truxntrax
Newbie
*

Karma: 0
Posts: 21


View Profile
« on: November 29, 2009, 04:36:37 PM »

So, I'm about to upgrade my kernal to the latest (31.6).

If I use the readme file method as stated in the wiki will this work as I boot from an sd card now?

I changed my bootargs_root to bootargs_root=root=b301.  This boots the plug from an sdcard containing the rootfs.

is the readme file the easiest approach for me?  Would appreciate some guidance before I proceed as am very new to linux and don't want to be left with a bricked new toy!  Would I just need to make the bootargs_root change again?  If I use the --rootkernal option will this achieve what I want to achieve?  Are there any extra steps I need to know about?

Many thanks!
Logged

mike
Jr. Member
**

Karma: 2
Posts: 55


View Profile
« Reply #1 on: November 30, 2009, 10:50:27 AM »

Can you please print out all of your environment variable and post them?

Mike
Logged

truxntrax
Newbie
*

Karma: 0
Posts: 21


View Profile
« Reply #2 on: November 30, 2009, 04:52:40 PM »

By this do you mean printenv bootargs_root?  Or more?

Thanks
Logged

mike
Jr. Member
**

Karma: 2
Posts: 55


View Profile
« Reply #3 on: November 30, 2009, 06:28:48 PM »

Hi,

I mean all of your uboot params...

When you interrupt the boot, and you are at the uboot command prompt, type "print".  I will output all of the environment variables.  Please copy and paste them here.  Before recommending anything, I'd like to know what your current config is.

Mike
Logged

truxntrax
Newbie
*

Karma: 0
Posts: 21


View Profile
« Reply #4 on: December 01, 2009, 02:26:27 AM »

Will add when I get home from work.  (I assume I need a direct connection and can not do this with remote ssh login in).

Thanks!
Logged

mgillespie
Full Member
***

Karma: 7
Posts: 239



View Profile
« Reply #5 on: December 01, 2009, 02:55:05 AM »

I would use the sheevainstaller (under Linux) to flash the plug, as it converts it from JIFS (slow) to the newer and much faster to boot UBIFS, along with a updated Ubuntu (or optionally Debian).  From this point, you can then just download a kernel from sheeva-with-linux...
Logged

mike
Jr. Member
**

Karma: 2
Posts: 55


View Profile
« Reply #6 on: December 01, 2009, 08:37:40 AM »

I agree.  The installer will handle setting up the system to work with MMC (SD) for you.  Please post any questions about the installation procedure, after you run through the README which is included with it.

Mike
Logged

truxntrax
Newbie
*

Karma: 0
Posts: 21


View Profile
« Reply #7 on: December 01, 2009, 02:15:39 PM »

Ok - I used the installer version 1 already and flashed with the kernal version that is downloaded with the installer (all the contents of the install directory - as instructed).

"From this point, you can then just download a kernel from sheeva-with-linux..."

So this means I can now just run the ./readme file?  As I have already upgraded the plug?

Here is my print output as to show environment~:
Code:
print
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
console=a0000
e=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
mtdpartitions=mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)
ethaddr=00:50:43:01:DA:96
real_bootcmd=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
bootargs_console=console=ttyS0,115200
recover1=setenv mainlineLinux yes; setenv arcNumber 2097; setenv bootcmd run recover2; saveenv; reset
recover2=run recover3; setenv bootcmd $(real_bootcmd); saveenv; setenv bootargs $(bootargs_console) $(mtdpartitions) root=/dev/ram0 rw ramdisk=0x01100000,8M install_type=nand; bootm 0x00800000 0x01100000
recover3=run recover4; nand erase clean 0x00100000 0x00400000; nand write.e 0x00800000 0x00100000 0x00400000
recover4=usb start; fatload usb 0 0x00800000 uImage; fatload usb 0 0x01100000 initrd
arcNumber=2097
filesize=32D62A
bootcmd=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
bootargs_root=root=b301
stdin=serial
stdout=serial
stderr=serial
nandEnvBase=a0000
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no

Environment size: 2030/131068 bytes
Marvell>>

Many thanks for help!
Logged

mike
Jr. Member
**

Karma: 2
Posts: 55


View Profile
« Reply #8 on: December 01, 2009, 03:12:18 PM »

Hi,


setenv bootargs 'console=ttyS0,115200 root=/dev/mmcblk0p1 rw rootfstype=ext2 rootdelay=10';
setenv bootargs '$(bootargs_console) $(mtdpartitions) $(bootargs_root); mmcinit; nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000'
boot

I believe the above should work to get you booting with your rootfs on your SD card.  In the above, you are telling uboot to look for the rootfs on the first partition of the SD card.  Also, I added in the mmcinit command to make sure that uboot recognizes the card.

Please post with whether it works or not for you.  If it does, please repeat it and enter 'save' to write the changes to nand.  If you don't save it, the changes will only last for the single reboot and will  be lost after that.

Good luck,
Mike
Logged

truxntrax
Newbie
*

Karma: 0
Posts: 21


View Profile
« Reply #9 on: December 01, 2009, 04:47:17 PM »

Mike,

Thanks for the help.

To be clear.  I already successfully boot from the sd card.  This was the line that made this start working:

bootargs_root=root=b301

What you are saying is:

Upgrade the kernal with the ./readme script.
(I assume with no flags set? or should this be with the --rootkernal option?)
Then to make the plug boot using the rootfs on the card (again) I should make the changes you suggest.

Sorry for asking for it to be A-B-C but have put quite a bit of time in getting plug set up and booting to sd card.  Just being cautious that I don't undo some of the hard work.

BTW want newer kernal to sort a webcam out and go for a zoneminder set up...

Cheers again!
« Last Edit: December 01, 2009, 04:51:36 PM by truxntrax » Logged

mike
Jr. Member
**

Karma: 2
Posts: 55


View Profile
« Reply #10 on: December 02, 2009, 07:23:21 AM »

Hi,

No worries on the help.  Lots of folks have helped me get up to speed on this, and I'm happy to pay back my debts.

Take a quick read through on the ./readme that you'll execute.  It's pretty short and fairly easy to follow.  It's good to get an understanding of what it is that you are about to do...

I usually build my own kernels and flash them myself using the procedure I posted earlier.  I write the uImage to NAND at a specific address.  Then I modify the environment variables to match the uImage name and address location.  Also, I change the rootfs to load from the MMC.  So, I don't usually use the ./readme script or cbxbiker61's kernels, although I have done so on occasion and have figured out problems with my own home-brewed kernels as a result.  So, I'm very thankful they are there.

If you read through cbxbiker61's ./readme script, you'll find that you need to either pass in --nandkernel or --rootkernel as options.  If you pass no options, you'll get a usage error and the script will exit. 

If you choose --nandkernel, he'll write the new uImage to NAND.  If you choose --rootkernel, he'll right the uImage to the /boot directory which is in your rootfs (located on your SD card, in your case).  He provides the environment variable required to be set to boot from NAND and pull the rootfs from NAND:
 
Code:
setenv bootargs rootfstype=jffs2 console=ttyS0,115200 mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=192.168.1.9:192.168.1.4:192.168.1.4:255.255.255.0:DB88FXX81:eth0:none

You, however want to boot from NAND (or SD) and pull the rootfs from your SD card.  If you want to boot your uImage from NAND and load your rootfs from your SD card (which is what you are doing now), doing the following should do the trick:

Code:
setenv bootargs 'console=ttyS0,115200 root=/dev/mmcblk0p1 rw rootfstype=ext2 rootdelay=10';
setenv bootargs '$(bootargs_console) $(mtdpartitions) $(bootargs_root); mmcinit; nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000'
boot

DISCLAIMER:  The above is to the best of my knowledge.  While I believe it will work, and I have thought about it a bit before sitting down to write it, I can not absolutely guarantee your success.   Wink

There might be others out there who could chime in to let you know if this all looks good, or whether I've made some egregious error....

No matter what, look at this as a gigantic learning opportunity!  Smiley

Mike
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #11 on: December 02, 2009, 08:23:45 AM »

Quote
Code:
setenv bootargs 'console=ttyS0,115200 root=/dev/mmcblk0p1 rw rootfstype=ext2 rootdelay=10';
setenv bootargs '$(bootargs_console) $(mtdpartitions) $(bootargs_root); mmcinit; nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000' boot

I think the second setenv bootargs '$(bootargs_console) $(mtdpartitions)... should be
   setenv bootcmd '$(bootargs_console) $(mtdpartitions)...
Logged

Good Luck Smiley

mike
Jr. Member
**

Karma: 2
Posts: 55


View Profile
« Reply #12 on: December 02, 2009, 09:33:56 AM »

Oops..   Shocked I meant to write bootcmd!  Good catch!

Mike
Logged

truxntrax
Newbie
*

Karma: 0
Posts: 21


View Profile
« Reply #13 on: December 02, 2009, 03:47:50 PM »

Ok - great.  Thanks for the detailed assistance!

Learning already!  I thought I was booting from the sd card already - I guess I'm not then and just using the rootfs from the sd card!?

Debating when to make the change.  My plug lives in a cold cupboard on it's own!  I also don't want to be without it for long as it's my automated nzb reader too!

Cheers!
Logged

Pages: [1]
Print
Jump to: