 
					
				
		
Hi,
I'm going through to see what it would take to open the SPI nor driver and update uboot after linux has been started.
I did find https://community.freescale.com/thread/302612
I'm just curious if this is what I'm looking for, I'm still pretty new to dealing with how linux drivers works...
 
					
				
		
 weidong_sun
		
			weidong_sun
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,Kevin,
Yes, It is feasible. After linux starts, recieve new u-boot and copy it to SPI NOR Flash with dd command. It's principle is the same as that of MFG Tools released by Freescale.
Recommend you could take some time to understand how MFG Tools works.
Regards,
Weidong
 
					
				
		
I thought the MFG utils worked from a usb boot?
Any way I found I could use mtd-utils to access the mtd0 device. I'm just not sure how the partitions are made
 
					
				
		
 weidong_sun
		
			weidong_sun
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,Kevin,
Would you like to describe the details that you want to upate u-boot during linux running? Then let us discuss it !
Regards,
Weidong
 
					
				
		
I've got it,
I used 2 header files in mtd-utils 1.4.6 mtd/mtd-user.h mtd/mtd-abi.h to open open up the mtd partitions.
/dev/mtd0 bootloader
/dev/mtd1 u boot params
/dev/mtd2 unused
It's pretty easy to open these up
[CODE]
fd = open (/dev/mtd0, O_SYNC | O_RDWR),
[/CODE]
the only tricky part was erasing it though
[CODE]
struct erase_info_user erase;
/*
fill out erase
*/
ioctl (fd ,MEMERASE,&erase) < 0)
[/CODE]
