summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--classes/image_types_fsl.bbclass68
-rw-r--r--recipes-bsp/barebox/barebox.inc63
-rw-r--r--recipes-bsp/barebox/barebox_2015.10.0.bb9
-rw-r--r--recipes-bsp/elftosb/elftosb_10.12.01.bb22
-rw-r--r--recipes-bsp/elftosb/files/cross-build.patch50
-rw-r--r--recipes-bsp/elftosb/files/don-t-use-full-path-for-headers.patch42
-rw-r--r--recipes-bsp/imx-bootlets/imx-bootlets/add-command-script-for-barebox.patch46
-rw-r--r--recipes-bsp/imx-bootlets/imx-bootlets/linux-fix-paths.patch28
-rw-r--r--recipes-bsp/imx-bootlets/imx-bootlets/linux_prep-fix-cmdlines.patch30
-rw-r--r--recipes-bsp/imx-bootlets/imx-bootlets_10.12.01.bb79
-rw-r--r--recipes-core/packagegroup/nativesdk-packagegroup-sdk-host.bbappend1
-rw-r--r--wic/imx-barebox.wks19
12 files changed, 2 insertions, 455 deletions
diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass
index e7627200..e49bb1af 100644
--- a/classes/image_types_fsl.bbclass
+++ b/classes/image_types_fsl.bbclass
@@ -11,20 +11,6 @@ UBOOT_SUFFIX_SDCARD ?= "${UBOOT_SUFFIX}"
11# 11#
12MXSBOOT_NAND_ARGS ?= "" 12MXSBOOT_NAND_ARGS ?= ""
13 13
14# IMX Bootlets barebox bootstream
15do_image_barebox-mxsboot-sdcard[depends] += "elftosb-native:do_populate_sysroot \
16 u-boot-mxsboot-native:do_populate_sysroot \
17 imx-bootlets:do_deploy \
18 barebox:do_deploy"
19IMAGE_CMD_barebox-mxsboot-sdcard () {
20 barebox_bd_file=imx-bootlets-barebox_ivt.bd-${MACHINE}
21
22 # Ensure the files are generated
23 (cd ${DEPLOY_DIR_IMAGE}; rm -f ${IMAGE_NAME}.barebox.sb ${IMAGE_NAME}.barebox-mxsboot-sdcard; \
24 elftosb -f mx28 -z -c $barebox_bd_file -o ${IMAGE_NAME}.barebox.sb; \
25 mxsboot sd ${IMAGE_NAME}.barebox.sb ${IMAGE_NAME}.barebox-mxsboot-sdcard)
26}
27
28# U-Boot mxsboot generation to SD-Card 14# U-Boot mxsboot generation to SD-Card
29UBOOT_SUFFIX_SDCARD_mxs ?= "mxsboot-sdcard" 15UBOOT_SUFFIX_SDCARD_mxs ?= "mxsboot-sdcard"
30do_image_uboot_mxsboot_sdcard[depends] += "u-boot-mxsboot-native:do_populate_sysroot \ 16do_image_uboot_mxsboot_sdcard[depends] += "u-boot-mxsboot-native:do_populate_sysroot \
@@ -44,9 +30,6 @@ BOOTDD_VOLUME_ID ?= "Boot ${MACHINE}"
44# Boot partition size [in KiB] 30# Boot partition size [in KiB]
45BOOT_SPACE ?= "8192" 31BOOT_SPACE ?= "8192"
46 32
47# Barebox environment size [in KiB]
48BAREBOX_ENV_SPACE ?= "512"
49
50# Set alignment to 4MB [in KiB] 33# Set alignment to 4MB [in KiB]
51IMAGE_ROOTFS_ALIGNMENT = "4096" 34IMAGE_ROOTFS_ALIGNMENT = "4096"
52 35
@@ -125,7 +108,7 @@ _generate_boot_image() {
125# 108#
126# External variables needed: 109# External variables needed:
127# ${SDCARD_ROOTFS} - the rootfs image to incorporate 110# ${SDCARD_ROOTFS} - the rootfs image to incorporate
128# ${IMAGE_BOOTLOADER} - bootloader to use {u-boot, barebox} 111# ${IMAGE_BOOTLOADER} - bootloader to use
129# 112#
130# The disk layout used is: 113# The disk layout used is:
131# 114#
@@ -153,10 +136,6 @@ generate_imx_sdcard () {
153 136
154 # Burn bootloader 137 # Burn bootloader
155 case "${IMAGE_BOOTLOADER}" in 138 case "${IMAGE_BOOTLOADER}" in
156 imx-bootlets)
157 bberror "The imx-bootlets is not supported for i.MX based machines"
158 exit 1
159 ;;
160 u-boot) 139 u-boot)
161 if [ -n "${SPL_BINARY}" ]; then 140 if [ -n "${SPL_BINARY}" ]; then
162 dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY} of=${SDCARD} conv=notrunc seek=2 bs=512 141 dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY} of=${SDCARD} conv=notrunc seek=2 bs=512
@@ -165,12 +144,6 @@ generate_imx_sdcard () {
165 dd if=${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX_SDCARD} of=${SDCARD} conv=notrunc seek=2 bs=512 144 dd if=${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX_SDCARD} of=${SDCARD} conv=notrunc seek=2 bs=512
166 fi 145 fi
167 ;; 146 ;;
168 barebox)
169 dd if=${DEPLOY_DIR_IMAGE}/barebox-${MACHINE}.bin of=${SDCARD} conv=notrunc seek=1 skip=1 bs=512
170 dd if=${DEPLOY_DIR_IMAGE}/bareboxenv-${MACHINE}.bin of=${SDCARD} conv=notrunc seek=1 bs=512k
171 ;;
172 "")
173 ;;
174 *) 147 *)
175 bberror "Unknown IMAGE_BOOTLOADER value" 148 bberror "Unknown IMAGE_BOOTLOADER value"
176 exit 1 149 exit 1
@@ -190,40 +163,13 @@ generate_imx_sdcard () {
190# 163#
191# External variables needed: 164# External variables needed:
192# ${SDCARD_ROOTFS} - the rootfs image to incorporate 165# ${SDCARD_ROOTFS} - the rootfs image to incorporate
193# ${IMAGE_BOOTLOADER} - bootloader to use {imx-bootlets, u-boot} 166# ${IMAGE_BOOTLOADER} - bootloader to use
194# 167#
195generate_mxs_sdcard () { 168generate_mxs_sdcard () {
196 # Create partition table 169 # Create partition table
197 parted -s ${SDCARD} mklabel msdos 170 parted -s ${SDCARD} mklabel msdos
198 171
199 case "${IMAGE_BOOTLOADER}" in 172 case "${IMAGE_BOOTLOADER}" in
200 imx-bootlets)
201 # The disk layout used is:
202 #
203 # 0 -> 1024 - Unused (not partitioned)
204 # 1024 -> BOOT_SPACE - kernel and other data (bootstream)
205 # BOOT_SPACE -> SDIMG_SIZE - rootfs
206 #
207 # Default Free space = 1.3x
208 # Use IMAGE_OVERHEAD_FACTOR to add more space
209 # <--------->
210 # 1024 8MiB SDIMG_ROOTFS 4MiB
211 # <-------> <----------> <----------------------> <------------------------------>
212 # --------------------- ------------------------ -------------------------------
213 # | Unused | BOOT_SPACE | ROOTFS_SIZE | IMAGE_ROOTFS_ALIGNMENT |
214 # --------------------- ------------------------ -------------------------------
215 # ^ ^ ^ ^ ^
216 # | | | | |
217 # 0 1024 1024 + 8MiB 1024 + 8Mib + SDIMG_ROOTFS 1024 + 8MiB + SDIMG_ROOTFS + 4MiB
218 parted -s ${SDCARD} unit KiB mkpart primary 1024 $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED})
219 parted -s ${SDCARD} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ $ROOTFS_SIZE)
220
221 # Empty 4 blocks from boot partition
222 dd if=/dev/zero of=${SDCARD} conv=notrunc seek=2048 count=4
223
224 # Write the bootstream in (2048 + 4) blocks
225 dd if=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.linux.sb of=${SDCARD} conv=notrunc seek=2052
226 ;;
227 u-boot) 173 u-boot)
228 # The disk layout used is: 174 # The disk layout used is:
229 # 175 #
@@ -259,15 +205,6 @@ generate_mxs_sdcard () {
259 205
260 dd if=${WORKDIR}/boot.img of=${SDCARD} conv=notrunc seek=2 bs=$(expr 1024 \* 1024) 206 dd if=${WORKDIR}/boot.img of=${SDCARD} conv=notrunc seek=2 bs=$(expr 1024 \* 1024)
261 ;; 207 ;;
262 barebox)
263 # BAREBOX_ENV_SPACE is taken on BOOT_SPACE_ALIGNED but it doesn't really matter as long as the rootfs is aligned
264 parted -s ${SDCARD} unit KiB mkpart primary 1024 $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} - ${BAREBOX_ENV_SPACE})
265 parted -s ${SDCARD} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} - ${BAREBOX_ENV_SPACE}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED})
266 parted -s ${SDCARD} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ $ROOTFS_SIZE)
267
268 dd if=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.barebox-mxsboot-sdcard of=${SDCARD} conv=notrunc seek=1 bs=$(expr 1024 \* 1024)
269 dd if=${DEPLOY_DIR_IMAGE}/bareboxenv-${MACHINE}.bin of=${SDCARD} conv=notrunc seek=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} - ${BAREBOX_ENV_SPACE}) bs=1024
270 ;;
271 *) 208 *)
272 bberror "Unknown IMAGE_BOOTLOADER value" 209 bberror "Unknown IMAGE_BOOTLOADER value"
273 exit 1 210 exit 1
@@ -310,7 +247,6 @@ IMAGE_TYPEDEP_sdcard_append = " ${@d.getVar('SDCARD_ROOTFS', 1).split('.')[-1]}"
310# image stream built before the sdcard generation 247# image stream built before the sdcard generation
311IMAGE_TYPEDEP_sdcard_append = " \ 248IMAGE_TYPEDEP_sdcard_append = " \
312 ${@bb.utils.contains('IMAGE_FSTYPES', 'uboot-mxsboot-sdcard', 'uboot-mxsboot-sdcard', '', d)} \ 249 ${@bb.utils.contains('IMAGE_FSTYPES', 'uboot-mxsboot-sdcard', 'uboot-mxsboot-sdcard', '', d)} \
313 ${@bb.utils.contains('IMAGE_FSTYPES', 'barebox-mxsboot-sdcard', 'barebox-mxsboot-sdcard', '', d)} \
314" 250"
315 251
316# In case we are building for i.MX23 or i.MX28 we need to have the 252# In case we are building for i.MX23 or i.MX28 we need to have the
diff --git a/recipes-bsp/barebox/barebox.inc b/recipes-bsp/barebox/barebox.inc
deleted file mode 100644
index 20e5a4ff..00000000
--- a/recipes-bsp/barebox/barebox.inc
+++ /dev/null
@@ -1,63 +0,0 @@
1DESCRIPTION = "Barebox - a bootloader that inherits the best of U-Boot and the Linux kernel"
2HOMEPAGE = "http://www.barebox.org/"
3SECTION = "bootloader"
4PROVIDES = "virtual/bootloader"
5PRIORITY = "optional"
6LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=057bf9e50e1ca857d0eb97bfe4ba8e5d"
8
9PACKAGE_ARCH = "${MACHINE_ARCH}"
10
11inherit kernel-arch
12
13EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
14
15BAREBOX_BINARY ?= "barebox.bin"
16BAREBOX_IMAGE ?= "barebox-${MACHINE}-${PV}-${PR}.bin"
17BAREBOXENV_BIN ?= "bareboxenv-${MACHINE}-${PV}-${PR}.bin"
18BAREBOX_SYMLINK ?= "barebox-${MACHINE}.bin"
19BAREBOXENV_SYMLINK ?= "bareboxenv-${MACHINE}.bin"
20
21INSANE_SKIP_${PN} = "True"
22
23do_pre_configure() {
24 cp ${WORKDIR}/defconfig ${S}/.config
25 oe_runmake oldconfig
26}
27addtask pre_configure before do_configure after do_patch
28
29do_compile () {
30 if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then
31 sed -i 's/$(CROSS_COMPILE)ld/$(CROSS_COMPILE)ld.bfd/g' Makefile
32 fi
33 unset LDFLAGS
34 unset CFLAGS
35 unset CPPFLAGS
36 oe_runmake all
37}
38
39do_deploy () {
40 install -d ${DEPLOY_DIR_IMAGE}
41 install ${S}/${BAREBOX_BINARY} ${DEPLOY_DIR_IMAGE}/${BAREBOX_IMAGE}
42
43 cd ${DEPLOY_DIR_IMAGE}
44 rm -f ${BAREBOX_SYMLINK}
45 ln -sf ${BAREBOX_IMAGE} ${BAREBOX_SYMLINK}
46
47 install -d ${STAGING_BINDIR_NATIVE}
48 cd ${S}
49 install -m 755 scripts/mkimage ${STAGING_BINDIR_NATIVE}/
50 install -m 755 scripts/bareboxenv ${STAGING_BINDIR_NATIVE}/
51}
52
53do_deploy[dirs] = "${S}"
54addtask deploy before do_build after do_compile
55
56do_env_deploy() {
57 install ${S}/defaultenv/barebox_default_env ${DEPLOY_DIR_IMAGE}/${BAREBOXENV_BIN}
58
59 cd ${DEPLOY_DIR_IMAGE}
60 rm -f ${BAREBOXENV_SYMLINK}
61 ln -sf ${BAREBOXENV_BIN} ${BAREBOXENV_SYMLINK}
62}
63addtask env_deploy before do_build after do_deploy
diff --git a/recipes-bsp/barebox/barebox_2015.10.0.bb b/recipes-bsp/barebox/barebox_2015.10.0.bb
deleted file mode 100644
index 3efc290e..00000000
--- a/recipes-bsp/barebox/barebox_2015.10.0.bb
+++ /dev/null
@@ -1,9 +0,0 @@
1require recipes-bsp/barebox/barebox.inc
2
3SRC_URI = "http://barebox.org/download/${PN}-${PV}.tar.bz2 \
4 file://defconfig"
5
6SRC_URI[md5sum] = "50b787db3f91bebd5ed646e80a05caab"
7SRC_URI[sha256sum] = "8353042fe27a30a01a00fe1e1f4a34f292a291027b9637d3ea8f305387407880"
8
9COMPATIBLE_MACHINE = "Invalid!"
diff --git a/recipes-bsp/elftosb/elftosb_10.12.01.bb b/recipes-bsp/elftosb/elftosb_10.12.01.bb
deleted file mode 100644
index 2cef1f6a..00000000
--- a/recipes-bsp/elftosb/elftosb_10.12.01.bb
+++ /dev/null
@@ -1,22 +0,0 @@
1# Copyright (C) 2011, 2012 Freescale
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4DESCRIPTION = "Helper utility for freescale imx platforms"
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://COPYING;md5=172ede34353056ebec7a597d8459f029"
7SECTION = "bootloader"
8PR = "r4"
9BBCLASSEXTEND = "native nativesdk"
10
11SRC_URI = "http://repository.timesys.com/buildsources/e/elftosb/elftosb-${PV}/elftosb-${PV}.tar.gz \
12 file://cross-build.patch \
13 file://don-t-use-full-path-for-headers.patch"
14SRC_URI[md5sum] = "e8005d606c1e0bb3507c82f6eceb3056"
15SRC_URI[sha256sum] = "77bb6981620f7575b87d136d94c7daa88dd09195959cc75fc18b138369ecd42b"
16
17do_install() {
18 install -d ${D}${bindir}
19 install ${S}/bld/linux/elftosb ${D}${bindir}
20 install ${S}/bld/linux/keygen ${D}${bindir}
21 install ${S}/bld/linux/sbtool ${D}${bindir}
22}
diff --git a/recipes-bsp/elftosb/files/cross-build.patch b/recipes-bsp/elftosb/files/cross-build.patch
deleted file mode 100644
index 8cffa03e..00000000
--- a/recipes-bsp/elftosb/files/cross-build.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1--- a/makefile.rules.orig 2012-05-09 21:03:28.000000000 +0200
2+++ b/makefile.rules 2012-05-09 21:03:56.000000000 +0200
3@@ -9,6 +9,8 @@
4 # SRC_DIR needs to be passed in. It is assumed that make is running in
5 # the build directory.
6
7+CC ?= gcc
8+
9 #*******************************************************************************
10 # Environment
11
12@@ -101,7 +103,7 @@
13 keygen.o
14
15
16-LIBS = -lstdc++
17+LIBS ?= -lstdc++ -lm
18
19
20 ifeq ("${UNAMES}", "Linux")
21@@ -137,13 +139,13 @@
22 ${EXEC_FILE_ELFTOSB2} ${EXEC_FILE_SBTOOL} ${EXEC_FILE_KEYGEN}
23
24 elftosb: ${OBJ_FILES_ELFTOSB2}
25- gcc ${OBJ_FILES_ELFTOSB2} ${LIBS} -o ${EXEC_FILE_ELFTOSB2}
26+ ${CC} ${OBJ_FILES_ELFTOSB2} ${LIBS} -o ${EXEC_FILE_ELFTOSB2}
27
28 sbtool: ${OBJ_FILES_SBTOOL}
29- gcc ${OBJ_FILES_SBTOOL} ${LIBS} -o ${EXEC_FILE_SBTOOL}
30+ ${CC} ${OBJ_FILES_SBTOOL} ${LIBS} -o ${EXEC_FILE_SBTOOL}
31
32 keygen: ${OBJ_FILES_KEYGEN}
33- gcc ${OBJ_FILES_KEYGEN} ${LIBS} -o ${EXEC_FILE_KEYGEN}
34+ ${CC} ${OBJ_FILES_KEYGEN} ${LIBS} -o ${EXEC_FILE_KEYGEN}
35
36
37 #ifeq ("${UNAMES}", "Linux")
38@@ -153,10 +155,10 @@
39 .SUFFIXES : .c .cpp
40
41 .c.o :
42- gcc ${CFLAGS} -c $<
43+ ${CC} ${CFLAGS} -c $<
44
45 .cpp.o :
46- gcc ${CFLAGS} -c $<
47+ ${CC} ${CFLAGS} -c $<
48
49 #endif
50
diff --git a/recipes-bsp/elftosb/files/don-t-use-full-path-for-headers.patch b/recipes-bsp/elftosb/files/don-t-use-full-path-for-headers.patch
deleted file mode 100644
index 8996ffbb..00000000
--- a/recipes-bsp/elftosb/files/don-t-use-full-path-for-headers.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1elftosb: don't use full path for headers
2
3This fixes the building on new host distributions where header might
4move due multilib support and other possible changes in future.
5
6Upstream-Status: Pending
7
8Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9---
10 common/stdafx.h | 2 +-
11 stdafx.h | 2 +-
12 2 files changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/common/stdafx.h b/common/stdafx.h
15index e6bf9dd..fb3c2d7 100644
16--- a/common/stdafx.h
17+++ b/common/stdafx.h
18@@ -27,7 +27,7 @@
19 // For Linux systems only, types.h only defines the signed
20 // integer types. This is not professional code.
21 // Update: They are defined in the header files in the more recent version of redhat enterprise gcc.
22-#include "/usr/include/sys/types.h"
23+#include <sys/types.h>
24 #include <stdint.h>
25 //typedef unsigned long uint32_t;
26 //typedef unsigned short uint16_t;
27diff --git a/stdafx.h b/stdafx.h
28index ce80458..6ff2f44 100644
29--- a/stdafx.h
30+++ b/stdafx.h
31@@ -27,7 +27,7 @@
32 // For Linux systems only, types.h only defines the signed
33 // integer types. This is not professional code.
34 // Update: They are defined in the header files in the more recent version of redhat enterprise gcc.
35-#include "/usr/include/sys/types.h"
36+#include <sys/types.h>
37 //typedef unsigned long uint32_t;
38 //typedef unsigned short uint16_t;
39 //typedef unsigned char uint8_t;
40--
411.7.2.5
42
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
deleted file mode 100644
index 1deca1cb..00000000
--- a/recipes-bsp/imx-bootlets/imx-bootlets/add-command-script-for-barebox.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1imx-bootlets: Add command script for barebox
2
3Upstream-Status: Inappropriate [configuration]
4
5Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
6
7diff --git a/barebox_ivt.bd b/barebox_ivt.bd
8new file mode 100644
9index 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
deleted file mode 100644
index d54add12..00000000
--- a/recipes-bsp/imx-bootlets/imx-bootlets/linux-fix-paths.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1imx-bootlets: Fix paths for used during boot stream generation
2
3This will be run during image generation thus this won't use a
4complete path to allow for relocation.
5
6Upstream-Status: Inappropriate [configuration]
7
8Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9
10diff --git a/linux.bd b/linux.bd
11index 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
deleted file mode 100644
index 4fb4c519..00000000
--- a/recipes-bsp/imx-bootlets/imx-bootlets/linux_prep-fix-cmdlines.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1imx-bootlets: Fix cmdlines for Linux boot
2
3This adapt the cmdlines for the partitioning layout used on the
4generated SD cards.
5
6Upstream-Status: Inappropriate [configuration]
7
8Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9
10diff --git a/linux_prep/cmdlines/iMX28_EVK.txt b/linux_prep/cmdlines/iMX28_EVK.txt
11index 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
17diff --git a/linux_prep/cmdlines/stmp378x_dev.txt b/linux_prep/cmdlines/stmp378x_dev.txt
18index 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
deleted file mode 100644
index 6084f169..00000000
--- a/recipes-bsp/imx-bootlets/imx-bootlets_10.12.01.bb
+++ /dev/null
@@ -1,79 +0,0 @@
1DESCRIPTION = "i.MXS boot streams"
2LICENSE = "GPL-2.0"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
4
5PR = "r5"
6
7SRC_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
12SRC_URI[md5sum] = "cf0ab3822dca694b930a051501c1d0e4"
13SRC_URI[sha256sum] = "63f6068ae36884adef4259bbb1fe2591755718f22c46d0a59d854883dfab1ffc"
14
15S = "${WORKDIR}/imx-bootlets-src-${PV}"
16
17inherit deploy
18
19# Disable parallel building or it may fail to build.
20PARALLEL_MAKE = ""
21
22EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
23
24# Ensure machine defines the IMXBOOTLETS_MACHINE
25python () {
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
34do_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
41do_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
49do_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
58FILES_${PN} = "/boot"
59
60do_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
76addtask deploy before do_build after do_compile
77
78PACKAGE_ARCH = "${MACHINE_ARCH}"
79COMPATIBLE_MACHINE = "(mxs)"
diff --git a/recipes-core/packagegroup/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroup/nativesdk-packagegroup-sdk-host.bbappend
index b3fdd680..d0c26c2a 100644
--- a/recipes-core/packagegroup/nativesdk-packagegroup-sdk-host.bbappend
+++ b/recipes-core/packagegroup/nativesdk-packagegroup-sdk-host.bbappend
@@ -1,5 +1,4 @@
1RDEPENDS_${PN} += " \ 1RDEPENDS_${PN} += " \
2 nativesdk-elftosb \
3 nativesdk-mxsldr \ 2 nativesdk-mxsldr \
4 nativesdk-u-boot-mkimage \ 3 nativesdk-u-boot-mkimage \
5 nativesdk-imx-usb-loader \ 4 nativesdk-imx-usb-loader \
diff --git a/wic/imx-barebox.wks b/wic/imx-barebox.wks
deleted file mode 100644
index 596583d3..00000000
--- a/wic/imx-barebox.wks
+++ /dev/null
@@ -1,19 +0,0 @@
1# short-description: Create SD card image with a boot partition
2# long-description:
3# Create an image that can be written onto a SD card using dd for use
4# with i.MX SoC family
5# It uses barebox
6#
7# The disk layout used is:
8# - --------- ------------ --------------
9# | | barebox | bareboxenv | rootfs |
10# - --------- ------------ --------------
11# ^ ^ ^ ^ ^
12# | | | | |
13# 0 512B 512kiB 4MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB)
14#
15part barebox --source rawcopy --sourceparams="file=barebox.bin,skip=512" --ondisk mmcblk --no-table
16part bareboxenv --source rawcopy --sourceparams="file=bareboxenv.bin" --ondisk mmcblk --no-table --align 512
17part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096
18
19bootloader --ptable msdos