diff options
Diffstat (limited to 'recipes-bsp/imx-bootlets')
4 files changed, 183 insertions, 0 deletions
diff --git a/recipes-bsp/imx-bootlets/imx-bootlets/add-command-script-for-barebox.patch b/recipes-bsp/imx-bootlets/imx-bootlets/add-command-script-for-barebox.patch new file mode 100644 index 00000000..1deca1cb --- /dev/null +++ b/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/recipes-bsp/imx-bootlets/imx-bootlets/linux-fix-paths.patch b/recipes-bsp/imx-bootlets/imx-bootlets/linux-fix-paths.patch new file mode 100644 index 00000000..d54add12 --- /dev/null +++ b/recipes-bsp/imx-bootlets/imx-bootlets/linux-fix-paths.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | imx-bootlets: Fix paths for used during boot stream generation | ||
2 | |||
3 | This will be run during image generation thus this won't use a | ||
4 | complete path to allow for relocation. | ||
5 | |||
6 | Upstream-Status: Inappropriate [configuration] | ||
7 | |||
8 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
9 | |||
10 | diff --git a/linux.bd b/linux.bd | ||
11 | index 516f4f2..366ac22 100644 | ||
12 | --- a/linux.bd | ||
13 | +++ b/linux.bd | ||
14 | @@ -4,10 +4,10 @@ | ||
15 | flags = 0x01; | ||
16 | } | ||
17 | sources { | ||
18 | - power_prep="./power_prep/power_prep"; | ||
19 | - sdram_prep="./boot_prep/boot_prep"; | ||
20 | - linux_prep="./linux_prep/output-target/linux_prep"; | ||
21 | - zImage = "./zImage"; | ||
22 | + power_prep="imx-bootlets-power_prep-@MACHINE@"; | ||
23 | + sdram_prep="imx-bootlets-boot_prep-@MACHINE@"; | ||
24 | + linux_prep="imx-bootlets-linux_prep-@MACHINE@"; | ||
25 | + zImage="zImage-@MACHINE@.bin@DTB@"; | ||
26 | } | ||
27 | |||
28 | section (0) { | ||
diff --git a/recipes-bsp/imx-bootlets/imx-bootlets/linux_prep-fix-cmdlines.patch b/recipes-bsp/imx-bootlets/imx-bootlets/linux_prep-fix-cmdlines.patch new file mode 100644 index 00000000..4fb4c519 --- /dev/null +++ b/recipes-bsp/imx-bootlets/imx-bootlets/linux_prep-fix-cmdlines.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | imx-bootlets: Fix cmdlines for Linux boot | ||
2 | |||
3 | This adapt the cmdlines for the partitioning layout used on the | ||
4 | generated SD cards. | ||
5 | |||
6 | Upstream-Status: Inappropriate [configuration] | ||
7 | |||
8 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
9 | |||
10 | diff --git a/linux_prep/cmdlines/iMX28_EVK.txt b/linux_prep/cmdlines/iMX28_EVK.txt | ||
11 | index 6bc36b9..6cf89a0 100644 | ||
12 | --- a/linux_prep/cmdlines/iMX28_EVK.txt | ||
13 | +++ b/linux_prep/cmdlines/iMX28_EVK.txt | ||
14 | @@ -1 +1 @@ | ||
15 | -console=ttyAM0,115200 root=/dev/mmcblk0p3 rw rootwait | ||
16 | +console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait | ||
17 | diff --git a/linux_prep/cmdlines/stmp378x_dev.txt b/linux_prep/cmdlines/stmp378x_dev.txt | ||
18 | index 9a717eb..fdb7390 100644 | ||
19 | --- a/linux_prep/cmdlines/stmp378x_dev.txt | ||
20 | +++ b/linux_prep/cmdlines/stmp378x_dev.txt | ||
21 | @@ -1,6 +1,3 @@ | ||
22 | -console=ttyAM0,115200 root=/dev/mmcblk0p3 rw rootwait lcd_panel=lms430 no_console_suspend | ||
23 | -console=ttyAM0,115200 root=/dev/mmcblk0p3 rw rootwait lcd_panel=lms350 | ||
24 | -console=ttyAM0,115200 ssp1=spi1 ubi.mtd=2 root=ubi0:rootfs0 rootfstype=ubifs lcd_panel=lms430 | ||
25 | - | ||
26 | - | ||
27 | - | ||
28 | +console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait ssp1=mmc lcd_panel=lms430 no_console_suspend | ||
29 | +console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait ssp1=mmc lcd_panel=lms350 | ||
30 | +console=ttyAMA0,115200 ssp1=spi1 ubi.mtd=2 root=ubi0:rootfs0 rootfstype=ubifs lcd_panel=lms430 | ||
diff --git a/recipes-bsp/imx-bootlets/imx-bootlets_10.12.01.bb b/recipes-bsp/imx-bootlets/imx-bootlets_10.12.01.bb new file mode 100644 index 00000000..6084f169 --- /dev/null +++ b/recipes-bsp/imx-bootlets/imx-bootlets_10.12.01.bb | |||
@@ -0,0 +1,79 @@ | |||
1 | DESCRIPTION = "i.MXS boot streams" | ||
2 | LICENSE = "GPL-2.0" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" | ||
4 | |||
5 | PR = "r5" | ||
6 | |||
7 | SRC_URI = "http://download.ossystems.com.br/bsp/freescale/source/imx-bootlets-src-${PV}.tar.gz \ | ||
8 | file://linux-fix-paths.patch \ | ||
9 | file://linux_prep-fix-cmdlines.patch \ | ||
10 | file://add-command-script-for-barebox.patch" | ||
11 | |||
12 | SRC_URI[md5sum] = "cf0ab3822dca694b930a051501c1d0e4" | ||
13 | SRC_URI[sha256sum] = "63f6068ae36884adef4259bbb1fe2591755718f22c46d0a59d854883dfab1ffc" | ||
14 | |||
15 | S = "${WORKDIR}/imx-bootlets-src-${PV}" | ||
16 | |||
17 | inherit deploy | ||
18 | |||
19 | # Disable parallel building or it may fail to build. | ||
20 | PARALLEL_MAKE = "" | ||
21 | |||
22 | EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" | ||
23 | |||
24 | # Ensure machine defines the IMXBOOTLETS_MACHINE | ||
25 | python () { | ||
26 | if not d.getVar("IMXBOOTLETS_MACHINE", True): | ||
27 | PN = d.getVar("PN", True) | ||
28 | FILE = os.path.basename(d.getVar("FILE", True)) | ||
29 | bb.debug(1, "To build %s, see %s for instructions on \ | ||
30 | setting up your machine config" % (PN, FILE)) | ||
31 | raise bb.parse.SkipPackage("because IMXBOOTLETS_MACHINE is not set") | ||
32 | } | ||
33 | |||
34 | do_configure () { | ||
35 | # Use machine specific binaries | ||
36 | sed 's,@MACHINE@,${MACHINE},g;s,@DTB@,-dtb,g' < linux.bd > linux.bd-dtb | ||
37 | sed -i 's,@MACHINE@,${MACHINE},g;s,@DTB@,,g' linux.bd | ||
38 | sed -i 's,@MACHINE@,${MACHINE},g' barebox_ivt.bd | ||
39 | } | ||
40 | |||
41 | do_compile () { | ||
42 | oe_runmake BOARD=${IMXBOOTLETS_MACHINE} linux_prep \ | ||
43 | boot_prep \ | ||
44 | power_prep \ | ||
45 | 'CC=${TARGET_PREFIX}gcc --sysroot="${STAGING_DIR_TARGET}"' \ | ||
46 | 'LD=${TARGET_PREFIX}ld --sysroot="${STAGING_DIR_TARGET}"' | ||
47 | } | ||
48 | |||
49 | do_install () { | ||
50 | install -d ${D}/boot/ | ||
51 | install -m 644 boot_prep/boot_prep power_prep/power_prep \ | ||
52 | linux_prep/output-target/linux_prep \ | ||
53 | linux.bd linux.bd-dtb \ | ||
54 | barebox_ivt.bd \ | ||
55 | ${D}/boot | ||
56 | } | ||
57 | |||
58 | FILES_${PN} = "/boot" | ||
59 | |||
60 | do_deploy () { | ||
61 | install -d ${DEPLOYDIR} | ||
62 | |||
63 | for f in boot_prep/boot_prep \ | ||
64 | power_prep/power_prep \ | ||
65 | linux_prep/output-target/linux_prep \ | ||
66 | barebox_ivt.bd \ | ||
67 | linux.bd linux.bd-dtb; do | ||
68 | full_name="imx-bootlets-`basename $f`-${MACHINE}-${PV}-${PR}" | ||
69 | symlink_name="imx-bootlets-`basename $f`-${MACHINE}" | ||
70 | |||
71 | install -m 644 ${S}/$f ${DEPLOYDIR}/$full_name | ||
72 | (cd ${DEPLOYDIR} ; rm -f $symlink_name ; ln -sf $full_name $symlink_name) | ||
73 | done | ||
74 | } | ||
75 | |||
76 | addtask deploy before do_build after do_compile | ||
77 | |||
78 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
79 | COMPATIBLE_MACHINE = "(mxs)" | ||