[U-Boot-Users] Loading a kernel on MX31ADS using U-boot

Hi,
I am using U-boot 1.3.2 with the MX31ADS patches posted by Guennadi Liakhovetski.
I would like to load the zImage kernel from Freescale Linux BSP via TFTP and mount the rootfs via NFS.
Does anyone have an example for doing this? I am not sure what address should I use to load the kernel into RAM.
Thanks,
Fabio Estevam
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

On Fri, 11 Apr 2008, Fabio Estevam wrote:
I am using U-boot 1.3.2 with the MX31ADS patches posted by Guennadi Liakhovetski.
I would like to load the zImage kernel from Freescale Linux BSP via TFTP and mount the rootfs via NFS.
You nead a uImage. Just use the same kernel sources and do make uImage instead of zImage.
Does anyone have an example for doing this? I am not sure what address should I use to load the kernel into RAM.
Load it to 0x80800000. You can also try the patch below, which will give you a better default environment, it shall be submitted to the list soon.
Thanks Guennadi --- Guennadi Liakhovetski
[PATCH] mx31ads: Fix default environment
Fix wrong load address in RAM, undefined environment variables, make the default environment more usable.
Signed-off-by: Guennadi Liakhovetski lg@denx.de --- include/configs/mx31ads.h | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/include/configs/mx31ads.h b/include/configs/mx31ads.h index 78e2545..3ad3883 100644 --- a/include/configs/mx31ads.h +++ b/include/configs/mx31ads.h @@ -80,13 +80,24 @@ #define CONFIG_IPADDR 192.168.23.168 #define CONFIG_SERVERIP 192.168.23.2
-#define CONFIG_EXTRA_ENV_SETTINGS \ - "bootargs_base=setenv bootargs console=ttymxc0,115200\0" \ - "bootargs_nfs=setenv bootargs $(bootargs) root=/dev/nfs ip=dhcp nfsroot=$(serverip):$(nfsrootfs),v3,tcp\0" \ - "bootcmd=run bootcmd_net\0" \ - "bootcmd_net=run bootargs_base bootargs_mtd bootargs_nfs; tftpboot 0x80000000 uImage-mx31; bootm\0" \ - "prg_uboot=tftpboot 0x80000000 u-boot-mx31ads.bin; protect off 0xa0000000 0xa001ffff; erase 0xa0000000 0xa001ffff; cp.b 0x80000000 0xa0000000 $(filesize)\0" - +#define CONFIG_EXTRA_ENV_SETTINGS \ + "netdev=eth0\0" \ + "load_addr=0x80800000\0" \ + "uboot_addr=0xa0000000\0" \ + "uboot=mx31ads/u-boot.bin\0" \ + "kernel=mx31ads/uImage\0" \ + "nfsroot=/opt/eldk/arm\0" \ + "bootargs_base=setenv bootargs console=ttymxc0,115200\0" \ + "bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs " \ + "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ + "bootcmd=run bootcmd_net\0" \ + "bootcmd_net=run bootargs_base bootargs_nfs; " \ + "tftpboot ${load_addr} ${kernel}; bootm\0" \ + "prg_uboot=tftpboot ${load_addr} ${uboot}; " \ + "protect off ${uboot_addr} 0xa003ffff; " \ + "erase ${uboot_addr} 0xa003ffff; " \ + "cp.b ${load_addr} ${uboot_addr} ${filesize}; " \ + "setenv filesize; saveenv\0"
#define CONFIG_DRIVER_CS8900 1 #define CS8900_BASE 0xb4020300

Hi Guennadi,
I tried to load the kernel at 0x80800000, but this is what I get: Hit any key to stop autoboot: 0 => run bootargs_base bootargs_nfs => tftp 80800000 uImage TFTP from server 10.29.244.101; our IP address is 10.29.244.102 Filename 'uImage'. Load address: 0x80800000 Loading: ################################################################# ########################### done Bytes transferred = 1339152 (146f10 hex) => bootm ## Booting image at 80800000 ... Image Name: Linux-2.6.22 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1339088 Bytes = 1.3 MB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK OK
Starting kernel ...
Uncompressing Linux............................................................. ................................... done, booting the kernel. (then it freezes)
I generated uImage manually by doing: ./mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n 'Linux-2.6.22' -d zImage uImage
Used 0x80008000 to match the value of ZRELADDR in /arch/arm/mach-mx3/Makefile.boot from Freescale Linux BSP.
Any suggestions?
Thanks,
Fabio Estevam
--- Guennadi Liakhovetski g.liakhovetski@gmx.de wrote:
On Fri, 11 Apr 2008, Fabio Estevam wrote:
I am using U-boot 1.3.2 with the MX31ADS patches posted by Guennadi Liakhovetski.
I would like to load the zImage kernel from
Freescale
Linux BSP via TFTP and mount the rootfs via NFS.
You nead a uImage. Just use the same kernel sources and do make uImage instead of zImage.
Does anyone have an example for doing this? I am
not
sure what address should I use to load the kernel
into
RAM.
Load it to 0x80800000. You can also try the patch below, which will give you a better default environment, it shall be submitted to the list soon.
Thanks Guennadi
Guennadi Liakhovetski
[PATCH] mx31ads: Fix default environment
Fix wrong load address in RAM, undefined environment variables, make the default environment more usable.
Signed-off-by: Guennadi Liakhovetski lg@denx.de
include/configs/mx31ads.h | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/include/configs/mx31ads.h b/include/configs/mx31ads.h index 78e2545..3ad3883 100644 --- a/include/configs/mx31ads.h +++ b/include/configs/mx31ads.h @@ -80,13 +80,24 @@ #define CONFIG_IPADDR 192.168.23.168 #define CONFIG_SERVERIP 192.168.23.2
-#define CONFIG_EXTRA_ENV_SETTINGS \
- "bootargs_base=setenv bootargs
console=ttymxc0,115200\0" \
- "bootargs_nfs=setenv bootargs $(bootargs)
root=/dev/nfs ip=dhcp nfsroot=$(serverip):$(nfsrootfs),v3,tcp\0" \
- "bootcmd=run bootcmd_net\0" \
- "bootcmd_net=run bootargs_base bootargs_mtd
bootargs_nfs; tftpboot 0x80000000 uImage-mx31; bootm\0" \
- "prg_uboot=tftpboot 0x80000000 u-boot-mx31ads.bin;
protect off 0xa0000000 0xa001ffff; erase 0xa0000000 0xa001ffff; cp.b 0x80000000 0xa0000000 $(filesize)\0"
+#define CONFIG_EXTRA_ENV_SETTINGS \
- "netdev=eth0\0" \
- "load_addr=0x80800000\0" \
- "uboot_addr=0xa0000000\0" \
- "uboot=mx31ads/u-boot.bin\0" \
- "kernel=mx31ads/uImage\0" \
- "nfsroot=/opt/eldk/arm\0" \
- "bootargs_base=setenv bootargs
console=ttymxc0,115200\0" \
- "bootargs_nfs=setenv bootargs ${bootargs}
root=/dev/nfs " \
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0"
\
- "bootcmd=run bootcmd_net\0" \
- "bootcmd_net=run bootargs_base bootargs_nfs; " \
"tftpboot ${load_addr} ${kernel}; bootm\0" \
- "prg_uboot=tftpboot ${load_addr} ${uboot}; " \
"protect off ${uboot_addr} 0xa003ffff; " \
"erase ${uboot_addr} 0xa003ffff; " \
"cp.b ${load_addr} ${uboot_addr} ${filesize}; "
\
"setenv filesize; saveenv\0"
#define CONFIG_DRIVER_CS8900 1
#define CS8900_BASE 0xb4020300
1.5.4
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

On Sat, 12 Apr 2008, Fabio Estevam wrote:
I tried to load the kernel at 0x80800000, but this is what I get: Hit any key to stop autoboot: 0 => run bootargs_base bootargs_nfs => tftp 80800000 uImage TFTP from server 10.29.244.101; our IP address is 10.29.244.102 Filename 'uImage'. Load address: 0x80800000 Loading: ################################################################# ########################### done Bytes transferred = 1339152 (146f10 hex) => bootm ## Booting image at 80800000 ... Image Name: Linux-2.6.22 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1339088 Bytes = 1.3 MB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK OK
Starting kernel ...
Uncompressing Linux............................................................. ................................... done, booting the kernel. (then it freezes)
I generated uImage manually by doing: ./mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n 'Linux-2.6.22' -d zImage uImage
Used 0x80008000 to match the value of ZRELADDR in /arch/arm/mach-mx3/Makefile.boot from Freescale Linux BSP.
I'll just assume your uImage is correct - although I don't understand why you don't just do make uImage. Apart from that, verify that your console= command line parameter is correct, your machine ID matches, and that you don't have a jtag debugger like bdi2000 connected when you're trying to boot.
Thanks Guennadi --- Guennadi Liakhovetski

Hi Guennadi,
Now I generated uImage correctly and it boots fine.
Have you ever tried to boot U-boot from NAND (K9K1G08U0B) on the i.MX31ADS?
Thanks,
Fabio Estevam
--- Guennadi Liakhovetski g.liakhovetski@gmx.de wrote:
On Sat, 12 Apr 2008, Fabio Estevam wrote:
I tried to load the kernel at 0x80800000, but this
is
what I get: Hit any key to stop autoboot: 0 => run bootargs_base bootargs_nfs => tftp 80800000 uImage TFTP from server 10.29.244.101; our IP address is 10.29.244.102 Filename 'uImage'. Load address: 0x80800000 Loading:
#################################################################
###########################
done Bytes transferred = 1339152 (146f10 hex) => bootm ## Booting image at 80800000 ... Image Name: Linux-2.6.22 Image Type: ARM Linux Kernel Image
(uncompressed)
Data Size: 1339088 Bytes = 1.3 MB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK OK
Starting kernel ...
Uncompressing
Linux.............................................................
................................... done, booting
the
kernel. (then it freezes)
I generated uImage manually by doing: ./mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n 'Linux-2.6.22' -d
zImage
uImage
Used 0x80008000 to match the value of ZRELADDR in /arch/arm/mach-mx3/Makefile.boot from Freescale
Linux
BSP.
I'll just assume your uImage is correct - although I don't understand why you don't just do make uImage. Apart from that, verify that your console= command line parameter is correct, your machine ID matches, and that you don't have a jtag debugger like bdi2000 connected when you're trying to boot.
Thanks Guennadi
Guennadi Liakhovetski
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao...
U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

Hi Jens,
Yes, I used LTIB for building the kernel:
export SYSCFG_KTARG=uImage ./ltib -p kernel -m prep ./ltib -p kernel -m scbuild ./ltib -p kernel -m scdeploy
The uImage is generated at: .../rpm/BUILD/linux/arch/arm/boot/uImage
Regards,
Fabio Estevam
--- Jens Gehrlein sew_s@tqs.de wrote:
Hi Fabio,
Fabio Estevam schrieb:
Hi Guennadi,
Now I generated uImage correctly and it boots
fine.
How did you build this Kernel? Did you use the LTIB?
Regards Jens
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao...
U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Fabio Estevam schrieb:
Hi Jens,
Yes, I used LTIB for building the kernel:
export SYSCFG_KTARG=uImage ./ltib -p kernel -m prep ./ltib -p kernel -m scbuild ./ltib -p kernel -m scdeploy
The uImage is generated at: .../rpm/BUILD/linux/arch/arm/boot/uImage
Regards,
Fabio Estevam
Thank you very much. I will try it as soon as I come to the Linux part.
Regards Jens

Hi Guennadi,
Guennadi Liakhovetski schrieb:
...
Apart from that, verify that your console=
command line parameter is correct, your machine ID matches, and that you don't have a jtag debugger like bdi2000 connected when you're trying to boot.
I have the same problem on our board: I don't see the console outputs if the BDI2000 cable is connected to the target, although the BDI is in mode "reset run". Do have an idea why?
Best Regards, Jens

On Wed, 14 May 2008, Jens Gehrlein wrote:
Apart from that, verify that your console=
command line parameter is correct, your machine ID matches, and that you don't have a jtag debugger like bdi2000 connected when you're trying to boot.
I have the same problem on our board: I don't see the console outputs if the BDI2000 cable is connected to the target, although the BDI is in mode "reset run". Do have an idea why?
No, I don't know "why", but that's exactly why I've mentioned it above - I had the same problem here and I spent about half a day trying to figure out why it didn't boot.
Thanks Guennadi --- Guennadi Liakhovetski

Hi Jens,
Have you tried to pass the "jtag=on" option into the kernel command line?
Regards,
Fabio Estevam
--- On Wed, 5/14/08, Jens Gehrlein sew_s@tqs.de wrote:
From: Jens Gehrlein sew_s@tqs.de Subject: Re: [U-Boot-Users] Loading a kernel on MX31ADS using U-boot To: "Guennadi Liakhovetski" g.liakhovetski@gmx.de Cc: u-boot-users@lists.sourceforge.net Date: Wednesday, May 14, 2008, 4:08 AM Hi Guennadi,
Guennadi Liakhovetski schrieb:
...
Apart from that, verify that your console=
command line parameter is correct, your machine ID
matches, and that you
don't have a jtag debugger like bdi2000 connected
when you're trying to
boot.
I have the same problem on our board: I don't see the console outputs if the BDI2000 cable is connected to the target, although the BDI is in mode "reset run". Do have an idea why?
Best Regards, Jens
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users

Hi Fabio,
Fabio Estevam schrieb:
Hi Jens,
Have you tried to pass the "jtag=on" option into the kernel command line?
Yippee! This works. Thank you very much for this hint! Where is this parameter documented? I didn't found anything in linux/Documentation or with google.
...
Apart from that, verify that your console=
command line parameter is correct, your machine ID
matches, and that you
don't have a jtag debugger like bdi2000 connected
when you're trying to
boot.
I have the same problem on our board: I don't see the console outputs if the BDI2000 cable is connected to the target, although the BDI is in mode "reset run". Do have an idea why?
Best Regards, Jens

--- On Thu, 5/15/08, Jens Gehrlein sew_s@tqs.de wrote:
Yippee! This works. Thank you very much for this hint! Where is this parameter documented? I didn't found anything in linux/Documentation or with google.
Yes, this is a Freescale specific option as part of the BSP for mainly debugging purpose.
Regards,
Fabio Estevam
participants (4)
-
Fabio Estevam
-
Guennadi Liakhovetski
-
Guennadi Liakhovetski
-
Jens Gehrlein