Commit ac0e8d08a18881a37aeff72dfa86aa0360542ad2

Authored by Jon Loeliger
Exists in master and in 55 other branches 8qm-imx_v2020.04_5.4.70_2.3.0, emb_lf_v2022.04, emb_lf_v2023.04, imx_v2015.04_4.1.15_1.0.0_ga, pitx_8mp_lf_v2020.04, smarc-8m-android-10.0.0_2.6.0, smarc-8m-android-11.0.0_2.0.0, smarc-8mp-android-11.0.0_2.0.0, smarc-emmc-imx_v2014.04_3.10.53_1.1.0_ga, smarc-emmc-imx_v2014.04_3.14.28_1.0.0_ga, smarc-imx-l5.0.0_1.0.0-ga, smarc-imx6_v2018.03_4.14.98_2.0.0_ga, smarc-imx7_v2017.03_4.9.11_1.0.0_ga, smarc-imx7_v2018.03_4.14.98_2.0.0_ga, smarc-imx_v2014.04_3.14.28_1.0.0_ga, smarc-imx_v2015.04_4.1.15_1.0.0_ga, smarc-imx_v2017.03_4.9.11_1.0.0_ga, smarc-imx_v2017.03_4.9.88_2.0.0_ga, smarc-imx_v2017.03_o8.1.0_1.3.0_8m, smarc-imx_v2018.03_4.14.78_1.0.0_ga, smarc-m6.0.1_2.1.0-ga, smarc-n7.1.2_2.0.0-ga, smarc-rel_imx_4.1.15_2.0.0_ga, smarc_8m-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8m-imx_v2019.04_4.19.35_1.1.0, smarc_8m_00d0-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8mm-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8mm-imx_v2019.04_4.19.35_1.1.0, smarc_8mm-imx_v2020.04_5.4.24_2.1.0, smarc_8mp_lf_v2020.04, smarc_8mq-imx_v2020.04_5.4.24_2.1.0, smarc_8mq_lf_v2020.04, ti-u-boot-2015.07, u-boot-2013.01.y, v2013.10, v2013.10-smarct33, v2013.10-smartmen, v2014.01, v2014.04, v2014.04-smarct33, v2014.04-smarct33-emmc, v2014.04-smartmen, v2014.07, v2014.07-smarct33, v2014.07-smartmen, v2015.07-smarct33, v2015.07-smarct33-emmc, v2015.07-smarct4x, v2016.05-dlt, v2016.05-smarct3x, v2016.05-smarct3x-emmc, v2016.05-smarct4x, v2017.01-smarct3x, v2017.01-smarct3x-emmc, v2017.01-smarct4x

Merge branch 'mpc8641'

Showing 6 changed files Side-by-side Diff

... ... @@ -173,9 +173,6 @@
173 173 ifeq ($(CPU),mpc85xx)
174 174 OBJS += cpu/$(CPU)/resetvec.o
175 175 endif
176   -ifeq ($(CPU),mpc86xx)
177   -OBJS += cpu/$(CPU)/resetvec.o
178   -endif
179 176 ifeq ($(CPU),bf533)
180 177 OBJS += cpu/$(CPU)/start1.o cpu/$(CPU)/interrupt.o cpu/$(CPU)/cache.o
181 178 OBJS += cpu/$(CPU)/flush.o cpu/$(CPU)/init_sdram.o
board/mpc8641hpcn/config.mk
... ... @@ -25,7 +25,7 @@
25 25 # default CCSRBAR is at 0xff700000
26 26 # assume U-Boot is less than 0.5MB
27 27 #
28   -TEXT_BASE = 0xfff01000
  28 +TEXT_BASE = 0xfff00000
29 29  
30 30 PLATFORM_CPPFLAGS += -DCONFIG_MPC86xx=1
31 31 PLATFORM_CPPFLAGS += -DCONFIG_MPC8641=1 -maltivec -mabi=altivec -msoft-float
board/mpc8641hpcn/u-boot.lds
1 1 /*
2   - * (C) Copyright 2004, Freescale, Inc.
3   - * (C) Copyright 2002,2003, Motorola,Inc.
4   - * Jeff Brown
  2 + * Copyright 2006, 2007 Freescale Semiconductor, Inc.
5 3 *
6 4 * See file CREDITS for list of people who contributed to this
7 5 * project.
8 6  
9 7  
10 8  
... ... @@ -23,24 +21,11 @@
23 21 */
24 22  
25 23 OUTPUT_ARCH(powerpc)
26   -SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
27   -/* Do we need any of these for elf?
28   - __DYNAMIC = 0; */
  24 +
29 25 SECTIONS
30 26 {
31   - .resetvec 0xFFF00100 :
32   - {
33   - *(.resetvec)
34   - } = 0xffff
35 27  
36   - .bootpg 0xFFF70000 :
37   - {
38   - cpu/mpc86xx/start.o (.bootpg)
39   - board/mpc8641hpcn/init.o (.bootpg)
40   - } = 0xffff
41   -
42 28 /* Read-only sections, merged into text segment: */
43   - . = + 1024;
44 29 .interp : { *(.interp) }
45 30 .hash : { *(.hash) }
46 31 .dynsym : { *(.dynsym) }
... ... @@ -66,7 +51,7 @@
66 51 .text :
67 52 {
68 53 cpu/mpc86xx/start.o (.text)
69   - board/mpc8641hpcn/init.o (.text)
  54 + board/mpc8641hpcn/init.o (.bootpg)
70 55 cpu/mpc86xx/traps.o (.text)
71 56 cpu/mpc86xx/interrupts.o (.text)
72 57 cpu/mpc86xx/cpu_init.o (.text)
... ... @@ -88,6 +73,7 @@
88 73 *(.rodata)
89 74 *(.rodata1)
90 75 *(.rodata.str1.4)
  76 + *(.eh_frame)
91 77 }
92 78 .fini : { *(.fini) } =0
93 79 .ctors : { *(.ctors) }
cpu/mpc86xx/resetvec.S
1   - .section .resetvec,"ax"
2   - b _start
doc/README.mpc8641hpcn
... ... @@ -96,14 +96,17 @@
96 96  
97 97 tftp 1000000 u-boot.bin
98 98 protect off all
99   - erase fff00000 ffffffff
100   - cp.b 1000000 fff00100 80000
  99 + erase fff00000 +$filesize
  100 + cp.b 1000000 fff00000 $filesize
101 101  
  102 +or use tftpflash command:
  103 + run tftpflash
  104 +
102 105 To Flash U-boot into the alternative bank (0xFF800000 - 0xFFBFFFFF):
103 106  
104 107 tftp 1000000 u-boot.bin
105   - erase ffb00000 ffbfffff
106   - cp.b 1000000 ffb00100 80000
  108 + erase ffb00000 +$filesize
  109 + cp.b 1000000 ffb00000 $filesize
107 110  
108 111  
109 112 4. Memory Map
include/configs/MPC8641HPCN.h
... ... @@ -577,6 +577,7 @@
577 577 #define CONFIG_HOSTNAME unknown
578 578 #define CONFIG_ROOTPATH /opt/nfsroot
579 579 #define CONFIG_BOOTFILE uImage
  580 +#define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */
580 581  
581 582 #define CONFIG_SERVERIP 192.168.1.1
582 583 #define CONFIG_GATEWAYIP 192.168.1.1
583 584  
... ... @@ -592,10 +593,17 @@
592 593  
593 594 #define CONFIG_EXTRA_ENV_SETTINGS \
594 595 "netdev=eth0\0" \
  596 + "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \
  597 + "tftpflash=tftpboot $loadaddr $uboot; " \
  598 + "protect off " MK_STR(TEXT_BASE) " +$filesize; " \
  599 + "erase " MK_STR(TEXT_BASE) " +$filesize; " \
  600 + "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \
  601 + "protect on " MK_STR(TEXT_BASE) " +$filesize; " \
  602 + "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \
595 603 "consoledev=ttyS0\0" \
596 604 "ramdiskaddr=2000000\0" \
597 605 "ramdiskfile=your.ramdisk.u-boot\0" \
598   - "dtbaddr=40000000000\0" \" \
  606 + "dtbaddr=c0000000000\0" \" \
599 607 "dtbfile=mpc8641_hpcn.dtb\0" \
600 608 "en-wd=mw.b f8100010 0x08; echo -expect:- 08; md.b f8100010 1\0" \
601 609 "dis-wd=mw.b f8100010 0x00; echo -expect:- 00; md.b f8100010 1\0" \