* freescale-mx28-evk run from ram
@ 2018-03-01 16:30 duhuanpeng
2018-03-02 7:36 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: duhuanpeng @ 2018-03-01 16:30 UTC (permalink / raw)
To: barebox
Dear all,
Happy Yuanxiao(Lantern) Festival!
I have a modified mx28-evk board, I want to run barebox on it, but I don’t want to make change to the flash.
In System.map
00000000 T __image_start
00000000 T start
00000000 T _stext
00000000 T _text
00000004 T __bare_init_start
00000004 T get_runtime_offset
00000014 t linkadr
00000018 T __ld_var_base
00000018 T __ld_var__text
00000020 t ___text
00000024 T __ld_var___rel_dyn_start
0000002c t ____rel_dyn_start
00000030 T __ld_var___rel_dyn_end
00000038 t ____rel_dyn_end
0000003c T __ld_var___dynsym_start
00000044 t ____dynsym_start
00000048 T __ld_var___dynsym_end
00000050 t ____dynsym_end
00000054 T __ld_var___bss_start
0000005c t ____bss_start
00000060 T __ld_var___bss_stop
00000068 t ____bss_stop
So, I load barebox.bin to address 0x00000000:
Hit any key to stop autoboot: 0
MX28 U-Boot > tftpboot 0 barebox.bin
Using FEC0 device
TFTP from server 192.168.12.61; our IP address is 192.168.12.62
Filename 'barebox.bin'.
Load address: 0x0
Loading: T #############################
done
Bytes transferred = 424776 (67b48 hex)
MX28 U-Boot > go 0
## Starting application at 0x00000000 ...
I believe the sram is too small to load the binary.
So, I change the TEXT_BASE to 0x41600000 in menuconfig, build and update barebox.bin, it print funny characters:
MX28 U-Boot > <INTERRUPT>
MX28 U-Boot > <INTERRUPT>
MX28 U-Boot > tftpboot 0x41600000 barebox.bin
Using FEC0 device
TFTP from server 192.168.12.61; our IP address is 192.168.12.62
Filename 'barebox.bin'.
Load address: 0x41600000
Loading: T #############################
done
Bytes transferred = 424776 (67b48 hex)
MX28 U-Boot > go 0x41600000
## Starting application at 0x41600000 ...
���������������������������������������������������������������������������������������������������������������������������������������������
For imx283, How to run barebox from ram?
Thanks,
Du Huanpeng
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: freescale-mx28-evk run from ram
2018-03-01 16:30 freescale-mx28-evk run from ram duhuanpeng
@ 2018-03-02 7:36 ` Sascha Hauer
2018-03-02 9:53 ` 答复: " duhuanpeng
[not found] ` <000001d3b205$12bea160$383be420$@qq.com>
0 siblings, 2 replies; 6+ messages in thread
From: Sascha Hauer @ 2018-03-02 7:36 UTC (permalink / raw)
To: duhuanpeng; +Cc: barebox
Hi Du Huanpeng,
On Fri, Mar 02, 2018 at 12:30:37AM +0800, duhuanpeng wrote:
> Dear all,
>
> Happy Yuanxiao(Lantern) Festival!
Thanks, same to you. Just googled some pictures for the lantern
Festival, it must look amazing to stand under that many lanterns ;)
> In System.map
> 00000000 T __image_start
> 00000000 T start
> 00000000 T _stext
> 00000000 T _text
> 00000004 T __bare_init_start
> 00000004 T get_runtime_offset
> 00000014 t linkadr
> 00000018 T __ld_var_base
> 00000018 T __ld_var__text
> 00000020 t ___text
> 00000024 T __ld_var___rel_dyn_start
> 0000002c t ____rel_dyn_start
> 00000030 T __ld_var___rel_dyn_end
> 00000038 t ____rel_dyn_end
> 0000003c T __ld_var___dynsym_start
> 00000044 t ____dynsym_start
> 00000048 T __ld_var___dynsym_end
> 00000050 t ____dynsym_end
> 00000054 T __ld_var___bss_start
> 0000005c t ____bss_start
> 00000060 T __ld_var___bss_stop
> 00000068 t ____bss_stop
>
> So, I load barebox.bin to address 0x00000000:
I assume you use freescale-mx28-evk_defconfig, right?
Which image do you start? It seems you are trying to start barebox.bin.
It should be images/barebox-freescale-mx28evk-2nd.img instead.
The image should be linked to 0x0, that is right. The code is position
independent though and the full barebox relocates itself to the end of
the available SDRAM automatically. TEXT_BASE is not relevant here.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* 答复: freescale-mx28-evk run from ram
2018-03-02 7:36 ` Sascha Hauer
@ 2018-03-02 9:53 ` duhuanpeng
[not found] ` <000001d3b205$12bea160$383be420$@qq.com>
1 sibling, 0 replies; 6+ messages in thread
From: duhuanpeng @ 2018-03-02 9:53 UTC (permalink / raw)
To: 'Sascha Hauer'; +Cc: barebox
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 3687 bytes --]
Hi, this is the output for barebox-freescale-mx28evk-2nd.img
Load to address 0x00000000
- - -
Loading: *
Abort
MX28 U-Boot > tftpboot 0 barebox-freescale-mx28evk-2nd.img
Using FEC0 device
TFTP from server 192.168.12.61; our IP address is 192.168.12.62
Filename 'barebox-freescale-mx28evk-2nd.img'.
Load address: 0x0
Loading: T #################
done
Bytes transferred = 237766 (3a0c6 hex)
MX28 U-Boot > go 0
## Starting application at 0x00000000 ...
- - -
Load to address 0x41600000:
- - -
MX28 U-Boot > tftpboot barebox-freescale-mx28evk-2nd.img
Using FEC0 device
TFTP from server 192.168.12.61; our IP address is 192.168.12.62
Filename 'barebox-freescale-mx28evk-2nd.img'.
Load address: 0x41600000
Loading: T #################
done
Bytes transferred = 237766 (3a0c6 hex)
MX28 U-Boot > go 0x41600000
## Starting application at 0x41600000 ...
- - - -
This macro is on CONFIG_PBL_RELOCATABLE
#
# memory layout
#
CONFIG_HAVE_PBL_IMAGE=y
CONFIG_HAVE_PBL_MULTI_IMAGES=y
CONFIG_HAVE_IMAGE_COMPRESSION=y
CONFIG_PBL_IMAGE=y
CONFIG_PBL_MULTI_IMAGES=y
CONFIG_PBL_RELOCATABLE=y
-----ÓʼþÔ¼þ-----
·¢¼þÈË: Sascha Hauer [mailto:s.hauer@pengutronix.de]
·¢ËÍʱ¼ä: 2018Äê3ÔÂ2ÈÕ 15:37
ÊÕ¼þÈË: duhuanpeng
³ËÍ: barebox@lists.infradead.org
Ö÷Ìâ: Re: freescale-mx28-evk run from ram
Hi Du Huanpeng,
On Fri, Mar 02, 2018 at 12:30:37AM +0800, duhuanpeng wrote:
> Dear all,
>
> Happy Yuanxiao(Lantern) Festival!
Thanks, same to you. Just googled some pictures for the lantern Festival, it
must look amazing to stand under that many lanterns ;)
> In System.map
> 00000000 T __image_start
> 00000000 T start
> 00000000 T _stext
> 00000000 T _text
> 00000004 T __bare_init_start
> 00000004 T get_runtime_offset
> 00000014 t linkadr
> 00000018 T __ld_var_base
> 00000018 T __ld_var__text
> 00000020 t ___text
> 00000024 T __ld_var___rel_dyn_start
> 0000002c t ____rel_dyn_start
> 00000030 T __ld_var___rel_dyn_end
> 00000038 t ____rel_dyn_end
> 0000003c T __ld_var___dynsym_start
> 00000044 t ____dynsym_start
> 00000048 T __ld_var___dynsym_end
> 00000050 t ____dynsym_end
> 00000054 T __ld_var___bss_start
> 0000005c t ____bss_start
> 00000060 T __ld_var___bss_stop
> 00000068 t ____bss_stop
>
> So, I load barebox.bin to address 0x00000000:
> I assume you use freescale-mx28-evk_defconfig, right?
Yes.
Which image do you start? It seems you are trying to start barebox.bin.
> barebox.bin and barebox-freescale-mx28evk-2nd.img
It should be images/barebox-freescale-mx28evk-2nd.img instead.
The image should be linked to 0x0, that is right. The code is position
independent though and the full barebox relocates itself to the end of the
available SDRAM automatically. TEXT_BASE is not relevant here.
The start symbol is still 0x00000000 even I change TEXT_BASE in menuconfig.
my board have 64MiB ram. Modified board.
Very cheap one, just 33. :D
EasyARM-i.MX283A
http://www.zlg.cn/ipc/ipc/product/id/92.html
http://www.zlg.cn/ipc/down/down/id/92.html
This board has a LCD(480*800?), I want to test font support on this board.
The sch is here:
https://drive.google.com/open?id=1_3xW7nfQ6p9tnkjZEDK9vZiLlUnat25K
There are many pcf fonts here:
https://www.netsarang.com/download/main.html
and maybe use code from freetype?
http://www.freetype.org/
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 答复: freescale-mx28-evk run from ram
[not found] ` <000001d3b205$12bea160$383be420$@qq.com>
@ 2018-03-02 10:15 ` 'Sascha Hauer'
2018-03-02 10:55 ` 答复: " duhuanpeng
2018-03-02 10:56 ` duhuanpeng
0 siblings, 2 replies; 6+ messages in thread
From: 'Sascha Hauer' @ 2018-03-02 10:15 UTC (permalink / raw)
To: duhuanpeng; +Cc: barebox
On Fri, Mar 02, 2018 at 05:01:37PM +0800, duhuanpeng wrote:
> > I assume you use freescale-mx28-evk_defconfig, right?
> Yes.
>
> Which image do you start? It seems you are trying to start barebox.bin.
> > barebox.bin and barebox-freescale-mx28evk-2nd.img
> It should be images/barebox-freescale-mx28evk-2nd.img instead.
>
> The image should be linked to 0x0, that is right. The code is position
> independent though and the full barebox relocates itself to the end of the
> available SDRAM automatically. TEXT_BASE is not relevant here.
> The start symbol is still 0x00000000 even I change TEXT_BASE in menuconfig.
> my board have 64MiB ram. Modified board.
> Very cheap one, just 33?. :D
> EasyARM-i.MX283A
You are running on a board which actually is no mx28-evk, so it's no
wonder it doesn't work. Please mention that next time, because that
changes the question from "What is broken with the mx28-evk" to "What is
different on your board". This is a very important detail to answer
questions.
Anyway, you say your board only has 64MiB of RAM, so you must at least
change:
ENTRY_FUNCTION(start_barebox_freescale_mx28evk, r0, r1, r2)
{
barebox_arm_entry(IMX_MEMORY_BASE, SZ_128M, NULL);
}
to SZ_64M. Other differences might include the pinmux and the UART port
number which is used for console output.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* 答复: 答复: freescale-mx28-evk run from ram
2018-03-02 10:15 ` 'Sascha Hauer'
@ 2018-03-02 10:55 ` duhuanpeng
2018-03-02 10:56 ` duhuanpeng
1 sibling, 0 replies; 6+ messages in thread
From: duhuanpeng @ 2018-03-02 10:55 UTC (permalink / raw)
To: 'Sascha Hauer'; +Cc: barebox
Hi, now it is running. Thanks. Now the lcd is dark. How to launch the gui?
- - -
diff --git a/arch/arm/boards/freescale-mx28-evk/lowlevel.c
b/arch/arm/boards/freescale-mx28-evk/lowlevel.c
index 4d45a03..10f7ef6 100644
--- a/arch/arm/boards/freescale-mx28-evk/lowlevel.c
+++ b/arch/arm/boards/freescale-mx28-evk/lowlevel.c
@@ -14,7 +14,7 @@
ENTRY_FUNCTION(start_barebox_freescale_mx28evk, r0, r1, r2)
{
- barebox_arm_entry(IMX_MEMORY_BASE, SZ_128M, NULL);
+ barebox_arm_entry(IMX_MEMORY_BASE, SZ_64M, NULL);
}
- - -
got MAC address from IIM: 00:04:f8:5d:d7:cf
FEC0
Warning: FEC0 MAC addresses don't match:
Address in SROM is 00:04:f8:5d:d7:cf
Address in environment is 02:00:92:b3:c4:a8
Hit any key to stop autoboot: 0
MX28 U-Boot > <INTERRUPT>
MX28 U-Boot > <INTERRUPT>
MX28 U-Boot > <INTERRUPT>
MX28 U-Boot > <INTERRUPT>
MX28 U-Boot > <INTERRUPT>
MX28 U-Boot > tftpboot barebox-freescale-mx28evk-2nd.img
Using FEC0 device
TFTP from server 192.168.12.61; our IP address is 192.168.12.62
Filename 'barebox-freescale-mx28evk-2nd.img'.
Load address: 0x41600000
Loading: T #################
done
Bytes transferred = 237783 (3a0d7 hex)
MX28 U-Boot > go 0x41600000
## Starting application at 0x41600000 ...
initcall-> globalvar_init+0x0/0x38
initcall-> platform_init+0x0/0xc
initcall-> mdio_bus_init+0x0/0xc
initcall-> spi_bus_init+0x0/0xc
initcall-> gpio_desc_alloc+0x0/0x20
initcall-> fs_bus_init+0x0/0xc
initcall-> mxs_gpio_add+0x0/0x18
initcall-> imx28_clocksource_init+0x0/0x54
initcall-> unwind_init+0x0/0x30
initcall-> imx28_ccm_init+0x0/0xc
initcall-> net_init+0x0/0x88
initcall-> init_fs+0x0/0x3c
initcall-> mxs_init+0x0/0xdc
detected i.MX28 revision 1.2
initcall-> imx28_devices_init+0x0/0x144
initcall-> imx28_init+0x0/0x2c
initcall-> stm_serial_driver_register+0x0/0xc
initcall-> auart_serial_driver_register+0x0/0xc
initcall-> mx28_evk_console_init+0x0/0x54
Switch to console [cs0]
barebox 2018.02.0-00077-g359966d-dirty #12 Fri Mar 2 18:37:29 CST 2018
Board: Freescale i.MX28 EVK
initcall-> globalvar_init+0x0/0x38
initcall-> platform_init+0x0/0xc
-----邮件原件-----
发件人: 'Sascha Hauer' [mailto:s.hauer@pengutronix.de]
发送时间: 2018年3月2日 18:15
收件人: duhuanpeng
抄送: barebox@lists.infradead.org
主题: Re: 答复: freescale-mx28-evk run from ram
On Fri, Mar 02, 2018 at 05:01:37PM +0800, duhuanpeng wrote:
> > I assume you use freescale-mx28-evk_defconfig, right?
> Yes.
>
> Which image do you start? It seems you are trying to start barebox.bin.
> > barebox.bin and barebox-freescale-mx28evk-2nd.img
> It should be images/barebox-freescale-mx28evk-2nd.img instead.
>
> The image should be linked to 0x0, that is right. The code is position
> independent though and the full barebox relocates itself to the end of
> the available SDRAM automatically. TEXT_BASE is not relevant here.
> The start symbol is still 0x00000000 even I change TEXT_BASE in
menuconfig.
> my board have 64MiB ram. Modified board.
> Very cheap one, just 33?. :D
> EasyARM-i.MX283A
You are running on a board which actually is no mx28-evk, so it's no wonder
it doesn't work. Please mention that next time, because that changes the
question from "What is broken with the mx28-evk" to "What is different on
your board". This is a very important detail to answer questions.
Anyway, you say your board only has 64MiB of RAM, so you must at least
change:
ENTRY_FUNCTION(start_barebox_freescale_mx28evk, r0, r1, r2) {
barebox_arm_entry(IMX_MEMORY_BASE, SZ_128M, NULL); }
to SZ_64M. Other differences might include the pinmux and the UART port
number which is used for console output.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* 答复: 答复: freescale-mx28-evk run from ram
2018-03-02 10:15 ` 'Sascha Hauer'
2018-03-02 10:55 ` 答复: " duhuanpeng
@ 2018-03-02 10:56 ` duhuanpeng
1 sibling, 0 replies; 6+ messages in thread
From: duhuanpeng @ 2018-03-02 10:56 UTC (permalink / raw)
To: 'Sascha Hauer'; +Cc: barebox
Hi, now it is running. Thanks. Now the lcd is dark. How to launch the gui?
- - -
diff --git a/arch/arm/boards/freescale-mx28-evk/lowlevel.c
b/arch/arm/boards/freescale-mx28-evk/lowlevel.c
index 4d45a03..10f7ef6 100644
--- a/arch/arm/boards/freescale-mx28-evk/lowlevel.c
+++ b/arch/arm/boards/freescale-mx28-evk/lowlevel.c
@@ -14,7 +14,7 @@
ENTRY_FUNCTION(start_barebox_freescale_mx28evk, r0, r1, r2)
{
- barebox_arm_entry(IMX_MEMORY_BASE, SZ_128M, NULL);
+ barebox_arm_entry(IMX_MEMORY_BASE, SZ_64M, NULL);
}
- - -
got MAC address from IIM: 00:04:f8:5d:d7:cf
FEC0
Warning: FEC0 MAC addresses don't match:
Address in SROM is 00:04:f8:5d:d7:cf
Address in environment is 02:00:92:b3:c4:a8
Hit any key to stop autoboot: 0
MX28 U-Boot > <INTERRUPT>
MX28 U-Boot > <INTERRUPT>
MX28 U-Boot > <INTERRUPT>
MX28 U-Boot > <INTERRUPT>
MX28 U-Boot > <INTERRUPT>
MX28 U-Boot > tftpboot barebox-freescale-mx28evk-2nd.img
Using FEC0 device
TFTP from server 192.168.12.61; our IP address is 192.168.12.62
Filename 'barebox-freescale-mx28evk-2nd.img'.
Load address: 0x41600000
Loading: T #################
done
Bytes transferred = 237783 (3a0d7 hex)
MX28 U-Boot > go 0x41600000
## Starting application at 0x41600000 ...
initcall-> globalvar_init+0x0/0x38
initcall-> platform_init+0x0/0xc
initcall-> mdio_bus_init+0x0/0xc
initcall-> spi_bus_init+0x0/0xc
initcall-> gpio_desc_alloc+0x0/0x20
initcall-> fs_bus_init+0x0/0xc
initcall-> mxs_gpio_add+0x0/0x18
initcall-> imx28_clocksource_init+0x0/0x54
initcall-> unwind_init+0x0/0x30
initcall-> imx28_ccm_init+0x0/0xc
initcall-> net_init+0x0/0x88
initcall-> init_fs+0x0/0x3c
initcall-> mxs_init+0x0/0xdc
detected i.MX28 revision 1.2
initcall-> imx28_devices_init+0x0/0x144
initcall-> imx28_init+0x0/0x2c
initcall-> stm_serial_driver_register+0x0/0xc
initcall-> auart_serial_driver_register+0x0/0xc
initcall-> mx28_evk_console_init+0x0/0x54
Switch to console [cs0]
barebox 2018.02.0-00077-g359966d-dirty #12 Fri Mar 2 18:37:29 CST 2018
Board: Freescale i.MX28 EVK
initcall-> globalvar_init+0x0/0x38
initcall-> platform_init+0x0/0xc
-----邮件原件-----
发件人: 'Sascha Hauer' [mailto:s.hauer@pengutronix.de]
发送时间: 2018年3月2日 18:15
收件人: duhuanpeng
抄送: barebox@lists.infradead.org
主题: Re: 答复: freescale-mx28-evk run from ram
On Fri, Mar 02, 2018 at 05:01:37PM +0800, duhuanpeng wrote:
> > I assume you use freescale-mx28-evk_defconfig, right?
> Yes.
>
> Which image do you start? It seems you are trying to start barebox.bin.
> > barebox.bin and barebox-freescale-mx28evk-2nd.img
> It should be images/barebox-freescale-mx28evk-2nd.img instead.
>
> The image should be linked to 0x0, that is right. The code is position
> independent though and the full barebox relocates itself to the end of
> the available SDRAM automatically. TEXT_BASE is not relevant here.
> The start symbol is still 0x00000000 even I change TEXT_BASE in
menuconfig.
> my board have 64MiB ram. Modified board.
> Very cheap one, just 33?. :D
> EasyARM-i.MX283A
You are running on a board which actually is no mx28-evk, so it's no wonder
it doesn't work. Please mention that next time, because that changes the
question from "What is broken with the mx28-evk" to "What is different on
your board". This is a very important detail to answer questions.
Anyway, you say your board only has 64MiB of RAM, so you must at least
change:
ENTRY_FUNCTION(start_barebox_freescale_mx28evk, r0, r1, r2) {
barebox_arm_entry(IMX_MEMORY_BASE, SZ_128M, NULL); }
to SZ_64M. Other differences might include the pinmux and the UART port
number which is used for console output.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-03-02 10:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-01 16:30 freescale-mx28-evk run from ram duhuanpeng
2018-03-02 7:36 ` Sascha Hauer
2018-03-02 9:53 ` 答复: " duhuanpeng
[not found] ` <000001d3b205$12bea160$383be420$@qq.com>
2018-03-02 10:15 ` 'Sascha Hauer'
2018-03-02 10:55 ` 答复: " duhuanpeng
2018-03-02 10:56 ` duhuanpeng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox