barebox: Build a version of barebox for the ODU

Build a version of barebox that has support for NAND flash and
ubifs. Load the kernel from the device. One needs to flash the
*mlo*.img into the xloader partitions and the other image into
the barebox partition.

erase /dev/nand0.xload.bb
erase /dev/nand0.xload_backup1.bb
erase /dev/nand0.xload_backup2.bb
erase /dev/nand0.xload_backup3.bb
cp /mnt/mmc0.0/MLO /dev/nand0.xload.bb
cp /mnt/mmc0.0/MLO /dev/nand0.xload_backup1.bb
cp /mnt/mmc0.0/MLO /dev/nand0.xload_backup2.bb
cp /mnt/mmc0.0/MLO /dev/nand0.xload_backup3.bb
This commit is contained in:
Holger Hans Peter Freyther 2014-07-11 18:53:23 +02:00
parent 7aa38f0755
commit f18a674af3
3 changed files with 98 additions and 0 deletions

View File

@ -0,0 +1,27 @@
SRC_URI = "git://git.sysmocom.de/barebox;protocol=git;branch=master"
SRCREV = "21ddb3c528cb1bc3202ad358eb44faaa40e5a899"
COMPATIBLE_MACHINE="sysmocom-odu"
S = "${WORKDIR}/git"
BAREBOX_BINARY_OE ?= "barebox-mlo-${MACHINE}-${PV}-${PR}.bin"
BAREBOX_BINARY_SYMLINK ?= "barebox-mlo-${MACHINE}.bin"
BAREBOX_IMAGE ?= "images/barebox-am33xx-phytec-phycore-mlo.img"
BAREBOX_IMAGE_OE ?= "barebox-mlo-${MACHINE}-${PV}-${PR}.img"
BAREBOX_IMAGE_SYMLINK ?= "barebox-mlo-${MACHINE}.img"
require barebox.inc
do_pre_configure() {
cp ${S}/arch/arm/configs/am335x_mlo_defconfig_odu ${S}/.config
oe_runmake oldconfig
}
do_deploy_append() {
install ${S}/${BAREBOX_IMAGE} ${DEPLOY_DIR_IMAGE}/${BAREBOX_IMAGE_OE}
cd ${DEPLOY_DIR_IMAGE}
rm -f ${BAREBOX_IMAGE_SYMLINK}
ln -sf ${BAREBOX_IMAGE_OE} ${BAREBOX_IMAGE_SYMLINK}
}

View File

@ -0,0 +1,25 @@
SRC_URI = "git://git.sysmocom.de/barebox;protocol=git;branch=master"
SRCREV = "21ddb3c528cb1bc3202ad358eb44faaa40e5a899"
DEPENDS = "${PN}-mlo"
COMPATIBLE_MACHINE="sysmocom-odu"
S = "${WORKDIR}/git"
BAREBOX_IMAGE ?= "images/barebox-am33xx-phytec-phycore.img"
BAREBOX_IMAGE_OE ?= "barebox-${MACHINE}-${PV}-${PR}.img"
BAREBOX_IMAGE_SYMLINK ?= "barebox-${MACHINE}.img"
require barebox.inc
do_pre_configure() {
cp ${S}/arch/arm/configs/am335x_defconfig_odu ${S}/.config
oe_runmake oldconfig
}
do_deploy_append() {
install ${S}/${BAREBOX_IMAGE} ${DEPLOY_DIR_IMAGE}/${BAREBOX_IMAGE_OE}
cd ${DEPLOY_DIR_IMAGE}
rm -f ${BAREBOX_IMAGE_SYMLINK}
ln -sf ${BAREBOX_IMAGE_OE} ${BAREBOX_IMAGE_SYMLINK}
}

View File

@ -0,0 +1,46 @@
DESCRIPTION = "Barebox - a bootloader that inherits the best of U-Boot and the Linux kernel"
HOMEPAGE = "http://www.barebox.org/"
SECTION = "bootloader"
PROVIDES = "virtual/bootloader"
PRIORITY = "optional"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=057bf9e50e1ca857d0eb97bfe4ba8e5d"
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit kernel-arch
EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
BAREBOX_BINARY ?= "barebox.bin"
BAREBOX_BINARY_OE ?= "barebox-${MACHINE}-${PV}-${PR}.bin"
BAREBOX_BINARY_SYMLINK ?= "barebox-${MACHINE}.bin"
INSANE_SKIP_${PN} = "True"
addtask pre_configure before do_configure after do_patch
do_compile () {
unset LDFLAGS
unset CFLAGS
unset CPPFLAGS
oe_runmake all
}
do_deploy () {
install -d ${DEPLOY_DIR_IMAGE}
install ${S}/${BAREBOX_BINARY} ${DEPLOY_DIR_IMAGE}/${BAREBOX_BINARY_OE}
cd ${DEPLOY_DIR_IMAGE}
rm -f ${BAREBOX_BINARY_SYMLINK}
ln -sf ${BAREBOX_BINARY_OE} ${BAREBOX_BINARY_SYMLINK}
install -d ${STAGING_BINDIR_NATIVE}
cd ${S}
install -m 755 scripts/mkimage ${STAGING_BINDIR_NATIVE}/
install -m 755 scripts/bareboxenv ${STAGING_BINDIR_NATIVE}/
}
do_deploy[dirs] = "${S}"
addtask deploy before do_build after do_compile