diff options
| -rw-r--r-- | meta-fsl-arm/recipes-bsp/imx-bootlets/imx-bootlets/add-command-script-for-barebox.patch | 46 | ||||
| -rw-r--r-- | meta-fsl-arm/recipes-bsp/imx-bootlets/imx-bootlets_10.12.01.bb | 6 |
2 files changed, 51 insertions, 1 deletions
diff --git a/meta-fsl-arm/recipes-bsp/imx-bootlets/imx-bootlets/add-command-script-for-barebox.patch b/meta-fsl-arm/recipes-bsp/imx-bootlets/imx-bootlets/add-command-script-for-barebox.patch new file mode 100644 index 000000000..1deca1cbc --- /dev/null +++ b/meta-fsl-arm/recipes-bsp/imx-bootlets/imx-bootlets/add-command-script-for-barebox.patch | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | imx-bootlets: Add command script for barebox | ||
| 2 | |||
| 3 | Upstream-Status: Inappropriate [configuration] | ||
| 4 | |||
| 5 | Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> | ||
| 6 | |||
| 7 | diff --git a/barebox_ivt.bd b/barebox_ivt.bd | ||
| 8 | new file mode 100644 | ||
| 9 | index 0000000..79cbccf | ||
| 10 | --- /dev/null | ||
| 11 | +++ b/barebox_ivt.bd | ||
| 12 | @@ -0,0 +1,34 @@ | ||
| 13 | +// STMP378x ROM command script to load and run barebox | ||
| 14 | + | ||
| 15 | +sources { | ||
| 16 | + power_prep="imx-bootlets-power_prep-@MACHINE@"; | ||
| 17 | + sdram_prep="imx-bootlets-boot_prep-@MACHINE@"; | ||
| 18 | + barebox="barebox-@MACHINE@.bin"; | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +section (0) { | ||
| 22 | + | ||
| 23 | + //---------------------------------------------------------- | ||
| 24 | + // Power Supply initialization | ||
| 25 | + //---------------------------------------------------------- | ||
| 26 | + | ||
| 27 | + load power_prep; | ||
| 28 | + load ivt (entry = power_prep:_start) > 0x8000; | ||
| 29 | + hab call 0x8000; | ||
| 30 | + | ||
| 31 | + //---------------------------------------------------------- | ||
| 32 | + // SDRAM initialization | ||
| 33 | + //---------------------------------------------------------- | ||
| 34 | + | ||
| 35 | + load sdram_prep; | ||
| 36 | + load ivt (entry = sdram_prep:_start) > 0x8000; | ||
| 37 | + hab call 0x8000; | ||
| 38 | + //---------------------------------------------------------- | ||
| 39 | + // Load and call barebox - ELF ARM image | ||
| 40 | + //---------------------------------------------------------- | ||
| 41 | + | ||
| 42 | + load barebox; | ||
| 43 | + load ivt (entry = barebox:start) > 0x8000; | ||
| 44 | + hab call 0x8000; | ||
| 45 | + | ||
| 46 | +} | ||
diff --git a/meta-fsl-arm/recipes-bsp/imx-bootlets/imx-bootlets_10.12.01.bb b/meta-fsl-arm/recipes-bsp/imx-bootlets/imx-bootlets_10.12.01.bb index 6cea049ea..1ddfb6fef 100644 --- a/meta-fsl-arm/recipes-bsp/imx-bootlets/imx-bootlets_10.12.01.bb +++ b/meta-fsl-arm/recipes-bsp/imx-bootlets/imx-bootlets_10.12.01.bb | |||
| @@ -6,7 +6,8 @@ PR = "r2" | |||
| 6 | 6 | ||
| 7 | SRC_URI = "http://download.ossystems.com.br/bsp/freescale/source/imx-bootlets-src-${PV}.tar.gz \ | 7 | SRC_URI = "http://download.ossystems.com.br/bsp/freescale/source/imx-bootlets-src-${PV}.tar.gz \ |
| 8 | file://linux-fix-paths.patch \ | 8 | file://linux-fix-paths.patch \ |
| 9 | file://linux_prep-fix-cmdlines.patch" | 9 | file://linux_prep-fix-cmdlines.patch \ |
| 10 | file://add-command-script-for-barebox.patch" | ||
| 10 | 11 | ||
| 11 | SRC_URI[md5sum] = "cf0ab3822dca694b930a051501c1d0e4" | 12 | SRC_URI[md5sum] = "cf0ab3822dca694b930a051501c1d0e4" |
| 12 | SRC_URI[sha256sum] = "63f6068ae36884adef4259bbb1fe2591755718f22c46d0a59d854883dfab1ffc" | 13 | SRC_URI[sha256sum] = "63f6068ae36884adef4259bbb1fe2591755718f22c46d0a59d854883dfab1ffc" |
| @@ -32,6 +33,7 @@ do_configure () { | |||
| 32 | # Use machine specific binaries | 33 | # Use machine specific binaries |
| 33 | sed 's,@MACHINE@,${MACHINE},g;s,@DTB@,-dtb,g' < linux.bd > linux.bd-dtb | 34 | sed 's,@MACHINE@,${MACHINE},g;s,@DTB@,-dtb,g' < linux.bd > linux.bd-dtb |
| 34 | sed -i 's,@MACHINE@,${MACHINE},g;s,@DTB@,,g' linux.bd | 35 | sed -i 's,@MACHINE@,${MACHINE},g;s,@DTB@,,g' linux.bd |
| 36 | sed -i 's,@MACHINE@,${MACHINE},g' barebox_ivt.bd | ||
| 35 | } | 37 | } |
| 36 | 38 | ||
| 37 | do_compile () { | 39 | do_compile () { |
| @@ -45,6 +47,7 @@ do_install () { | |||
| 45 | install -m 644 boot_prep/boot_prep power_prep/power_prep \ | 47 | install -m 644 boot_prep/boot_prep power_prep/power_prep \ |
| 46 | linux_prep/output-target/linux_prep \ | 48 | linux_prep/output-target/linux_prep \ |
| 47 | linux.bd linux.bd-dtb \ | 49 | linux.bd linux.bd-dtb \ |
| 50 | barebox_ivt.bd \ | ||
| 48 | ${D}/boot | 51 | ${D}/boot |
| 49 | } | 52 | } |
| 50 | 53 | ||
| @@ -56,6 +59,7 @@ do_deploy () { | |||
| 56 | for f in boot_prep/boot_prep \ | 59 | for f in boot_prep/boot_prep \ |
| 57 | power_prep/power_prep \ | 60 | power_prep/power_prep \ |
| 58 | linux_prep/output-target/linux_prep \ | 61 | linux_prep/output-target/linux_prep \ |
| 62 | barebox_ivt.bd \ | ||
| 59 | linux.bd linux.bd-dtb; do | 63 | linux.bd linux.bd-dtb; do |
| 60 | full_name="imx-bootlets-`basename $f`-${MACHINE}-${PV}-${PR}" | 64 | full_name="imx-bootlets-`basename $f`-${MACHINE}-${PV}-${PR}" |
| 61 | symlink_name="imx-bootlets-`basename $f`-${MACHINE}" | 65 | symlink_name="imx-bootlets-`basename $f`-${MACHINE}" |
