alarm/uboot-udoo to 2016.09-1

This commit is contained in:
Kevin Mihelich 2016-09-24 21:20:31 +00:00
parent 9e33a2519a
commit b9e3dfb9d8
3 changed files with 84 additions and 351 deletions

View file

@ -1,292 +1,53 @@
From fba6302e331dfc82aae917673c8beb1602660fcd Mon Sep 17 00:00:00 2001
From 446af39a88aa7a8f63a2e484df8bb828851e47ec Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sat, 3 Jan 2015 14:32:48 -0700
Date: Tue, 26 Jul 2016 21:28:27 -0600
Subject: [PATCH] arch linux arm modifications
---
board/udoo/1066mhz_4x256mx16_dl.cfg | 58 ++++++++++++++++
board/udoo/ddr-setup_dl.cfg | 84 ++++++++++++++++++++++
board/udoo/udoo-dl.cfg | 29 ++++++++
configs/udoo_dl_defconfig | 3 +
include/configs/udoo.h | 135 ++++++++++++++++++++++--------------
5 files changed, 256 insertions(+), 53 deletions(-)
create mode 100644 board/udoo/1066mhz_4x256mx16_dl.cfg
create mode 100644 board/udoo/ddr-setup_dl.cfg
create mode 100644 board/udoo/udoo-dl.cfg
create mode 100644 configs/udoo_dl_defconfig
include/configs/udoo.h | 103 +++++++++++++++++++++++--------------------------
1 file changed, 49 insertions(+), 54 deletions(-)
diff --git a/board/udoo/1066mhz_4x256mx16_dl.cfg b/board/udoo/1066mhz_4x256mx16_dl.cfg
new file mode 100644
index 0000000..e37c9f9
--- /dev/null
+++ b/board/udoo/1066mhz_4x256mx16_dl.cfg
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2013 Seco USA Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+
+DATA 4, MX6_MMDC_P0_MDPDC, 0x0002002D
+DATA 4, MX6_MMDC_P0_MDOTC, 0x00333040
+
+DATA 4, MX6_MMDC_P0_MDCFG0, 0x3F4352F3
+DATA 4, MX6_MMDC_P0_MDCFG1, 0xB66D8B63
+DATA 4, MX6_MMDC_P0_MDCFG2, 0x01FF00DB
+
+DATA 4, MX6_MMDC_P0_MDMISC, 0x00001740
+DATA 4, MX6_MMDC_P0_MDSCR, 0x00008000
+DATA 4, MX6_MMDC_P0_MDRWD, 0x000026D2
+
+
+DATA 4, MX6_MMDC_P0_MDOR, 0x00431023
+DATA 4, MX6_MMDC_P0_MDASP, 0x00000027
+DATA 4, MX6_MMDC_P0_MDCTL, 0x831A0000
+
+DATA 4, MX6_MMDC_P0_MDSCR, 0x02008032
+DATA 4, MX6_MMDC_P0_MDSCR, 0x00008033
+DATA 4, MX6_MMDC_P0_MDSCR, 0x00048031
+DATA 4, MX6_MMDC_P0_MDSCR, 0x05208030
+DATA 4, MX6_MMDC_P0_MDSCR, 0x04008040
+
+DATA 4, MX6_MMDC_P0_MPZQHWCTRL, 0xa1390003
+DATA 4, MX6_MMDC_P1_MPZQHWCTRL, 0xa1390003
+
+DATA 4, MX6_MMDC_P0_MDREF, 0x00007800
+
+DATA 4, MX6_MMDC_P0_MPODTCTRL, 0x00022227
+DATA 4, MX6_MMDC_P1_MPODTCTRL, 0x00022227
+
+DATA 4, MX6_MMDC_P0_MPDGCTRL0, 0x425C0251
+DATA 4, MX6_MMDC_P0_MPDGCTRL1, 0x021B021E
+DATA 4, MX6_MMDC_P1_MPDGCTRL0, 0x021B021E
+DATA 4, MX6_MMDC_P1_MPDGCTRL1, 0x01730200
+
+DATA 4, MX6_MMDC_P0_MPRDDLCTL, 0x45474C45
+DATA 4, MX6_MMDC_P1_MPRDDLCTL, 0x44464744
+DATA 4, MX6_MMDC_P0_MPWRDLCTL, 0x3F3F3336
+DATA 4, MX6_MMDC_P1_MPWRDLCTL, 0x32383630
+
+DATA 4, MX6_MMDC_P0_MPWLDECTRL0, 0x002F0038
+DATA 4, MX6_MMDC_P0_MPWLDECTRL1, 0x001F001F
+DATA 4, MX6_MMDC_P1_MPWLDECTRL0, 0x001F001F
+DATA 4, MX6_MMDC_P1_MPWLDECTRL1, 0x001F001F
+
+DATA 4, MX6_MMDC_P0_MPMUR0, 0x00000000
+DATA 4, MX6_MMDC_P1_MPMUR0, 0x00000000
+
+DATA 4, MX6_MMDC_P0_MDPDC, 0x0002556D
+DATA 4, MX6_MMDC_P0_MAPSR, 0x00011006
+DATA 4, MX6_MMDC_P0_MDSCR, 0x00000000
diff --git a/board/udoo/ddr-setup_dl.cfg b/board/udoo/ddr-setup_dl.cfg
new file mode 100644
index 0000000..487570e
--- /dev/null
+++ b/board/udoo/ddr-setup_dl.cfg
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2013 Seco USA Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ * Device Configuration Data (DCD)
+ *
+ * Each entry must have the format:
+ * Addr-type Address Value
+ *
+ * where:
+ * Addr-type register length (1,2 or 4 bytes)
+ * Address absolute address of the register
+ * value value to be stored in the register
+ */
+
+/*
+ * DDR3 settings
+ * MX6Q ddr is limited to 1066 Mhz currently 1056 MHz(528 MHz clock),
+ * memory bus width: 64 bits x16/x32/x64
+ * MX6DL ddr is limited to 800 MHz(400 MHz clock)
+ * memory bus width: 64 bits x16/x32/x64
+ * MX6SOLO ddr is limited to 800 MHz(400 MHz clock)
+ * memory bus width: 32 bits x16/x32
+ */
+DATA 4, MX6_IOM_DRAM_SDQS0, 0x00000028
+DATA 4, MX6_IOM_DRAM_SDQS1, 0x00000028
+DATA 4, MX6_IOM_DRAM_SDQS2, 0x00000028
+DATA 4, MX6_IOM_DRAM_SDQS3, 0x00000028
+DATA 4, MX6_IOM_DRAM_SDQS4, 0x00000028
+DATA 4, MX6_IOM_DRAM_SDQS5, 0x00000028
+DATA 4, MX6_IOM_DRAM_SDQS6, 0x00000028
+DATA 4, MX6_IOM_DRAM_SDQS7, 0x00000028
+
+DATA 4, MX6_IOM_GRP_B0DS, 0x00000028
+DATA 4, MX6_IOM_GRP_B1DS, 0x00000028
+DATA 4, MX6_IOM_GRP_B2DS, 0x00000028
+DATA 4, MX6_IOM_GRP_B3DS, 0x00000028
+DATA 4, MX6_IOM_GRP_B4DS, 0x00000028
+DATA 4, MX6_IOM_GRP_B5DS, 0x00000028
+DATA 4, MX6_IOM_GRP_B6DS, 0x00000028
+DATA 4, MX6_IOM_GRP_B7DS, 0x00000028
+DATA 4, MX6_IOM_GRP_ADDDS, 0x00000028
+
+DATA 4, MX6_IOM_GRP_CTLDS, 0x00000028
+
+DATA 4, MX6_IOM_DRAM_DQM0, 0x00000028
+DATA 4, MX6_IOM_DRAM_DQM1, 0x00000028
+DATA 4, MX6_IOM_DRAM_DQM2, 0x00000028
+DATA 4, MX6_IOM_DRAM_DQM3, 0x00000028
+DATA 4, MX6_IOM_DRAM_DQM4, 0x00000028
+DATA 4, MX6_IOM_DRAM_DQM5, 0x00000028
+DATA 4, MX6_IOM_DRAM_DQM6, 0x00000028
+DATA 4, MX6_IOM_DRAM_DQM7, 0x00000028
+
+DATA 4, MX6_IOM_DRAM_CAS, 0x00000028
+DATA 4, MX6_IOM_DRAM_RAS, 0x00000028
+DATA 4, MX6_IOM_DRAM_SDCLK_0, 0x00000028
+DATA 4, MX6_IOM_DRAM_SDCLK_1, 0x00000028
+
+DATA 4, MX6_IOM_DRAM_RESET, 0x00000028
+
+DATA 4, MX6_IOM_DRAM_SDODT0, 0x00000028
+DATA 4, MX6_IOM_DRAM_SDODT1, 0x00000028
+
+/* (differential input) */
+DATA 4, MX6_IOM_DDRMODE_CTL, 0x00020000
+/* (differential input) */
+DATA 4, MX6_IOM_GRP_DDRMODE, 0x00020000
+/* disable ddr pullups */
+DATA 4, MX6_IOM_GRP_DDRPKE, 0x00000000
+DATA 4, MX6_IOM_DRAM_SDBA2, 0x00000000
+/* 40 Ohm drive strength for cs0/1,sdba2,cke0/1,sdwe */
+DATA 4, MX6_IOM_GRP_DDR_TYPE, 0x000C0000
+
+/* Read data DQ Byte0-3 delay */
+DATA 4, MX6_MMDC_P0_MPRDDQBY0DL, 0x33333333
+DATA 4, MX6_MMDC_P0_MPRDDQBY1DL, 0x33333333
+DATA 4, MX6_MMDC_P0_MPRDDQBY2DL, 0x33333333
+DATA 4, MX6_MMDC_P0_MPRDDQBY3DL, 0x33333333
+DATA 4, MX6_MMDC_P1_MPRDDQBY0DL, 0x33333333
+DATA 4, MX6_MMDC_P1_MPRDDQBY1DL, 0x33333333
+DATA 4, MX6_MMDC_P1_MPRDDQBY2DL, 0x33333333
+DATA 4, MX6_MMDC_P1_MPRDDQBY3DL, 0x33333333
diff --git a/board/udoo/udoo-dl.cfg b/board/udoo/udoo-dl.cfg
new file mode 100644
index 0000000..46953c1
--- /dev/null
+++ b/board/udoo/udoo-dl.cfg
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2013 Boundary Devices
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ * Refer doc/README.imximage for more details about how-to configure
+ * and create imximage boot image
+ *
+ * The syntax is taken as close as possible with the kwbimage
+ */
+
+/* image version */
+IMAGE_VERSION 2
+
+/*
+ * Boot Device : one of
+ * spi, sd (the board has no nand neither onenand)
+ */
+BOOT_FROM sd
+
+#define __ASSEMBLY__
+#include <config.h>
+#include "asm/arch/mx6-ddr.h"
+#include "asm/arch/iomux.h"
+#include "asm/arch/crm_regs.h"
+
+#include "ddr-setup_dl.cfg"
+#include "1066mhz_4x256mx16_dl.cfg"
+#include "clocks.cfg"
diff --git a/configs/udoo_dl_defconfig b/configs/udoo_dl_defconfig
new file mode 100644
index 0000000..5dc9016
--- /dev/null
+++ b/configs/udoo_dl_defconfig
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/udoo/udoo-dl.cfg,MX6DL,DDR_MB=1024"
+CONFIG_ARM=y
+CONFIG_TARGET_UDOO=y
diff --git a/include/configs/udoo.h b/include/configs/udoo.h
index 700e9c1..7fdce0f 100644
index fba78d0..b96f490 100644
--- a/include/configs/udoo.h
+++ b/include/configs/udoo.h
@@ -78,7 +78,7 @@
#define CONFIG_CMD_BMODE
#define CONFIG_CMD_SETEXPR
-#define CONFIG_BOOTDELAY 3
+#define CONFIG_BOOTDELAY 1
#define CONFIG_SYS_MEMTEST_START 0x10000000
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
@@ -96,60 +96,97 @@
#define CONFIG_BOUNCE_BUFFER
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT
+#define CONFIG_CMD_EXT4
+#define CONFIG_CMD_FS_GENERIC
#define CONFIG_DOS_PARTITION
@@ -18,6 +18,8 @@
#define MACH_TYPE_UDOO 4800
#define CONFIG_MACH_TYPE MACH_TYPE_UDOO
+#define CONFIG_IDENT_STRING " Arch Linux ARM"
+
+#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
+#define CONFIG_DEFAULT_FDT_FILE "imx6dl-udoo.dtb"
+#elif defined(CONFIG_MX6Q)
#define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb"
+#endif
/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN (2 * SZ_1M)
@@ -63,7 +65,6 @@
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
#define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
- "image=zImage\0" \
- "console=ttymxc1\0" \
+ "bootfile=zImage\0" \
+ "bootdir=/boot\0" \
+ "console=ttymxc1,115200\0" \
"image=zImage\0" \
"console=ttymxc1\0" \
"splashpos=m,m\0" \
"fdt_high=0xffffffff\0" \
@@ -71,47 +72,50 @@
"initrd_high=0xffffffff\0" \
"fdt_file=undefined\0" \
"fdt_addr=0x18000000\0" \
- "boot_fdt=try\0" \
+ "rdaddr=0x12A00000\0" \
+ "rdfile=initramfs-linux.img\0" \
"initrd_high=0xffffffff\0" \
- "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
- "fdt_addr=0x18000000\0" \
- "boot_fdt=try\0" \
+ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
+ "fdtdir=/boot/dtbs\0" \
+ "fdtaddr=0x18000000\0" \
"ip_dyn=yes\0" \
+ "optargs=\0" \
+ "video=\0" \
"ip_dyn=yes\0" \
"mmcdev=0\0" \
- "mmcpart=1\0" \
"mmcpart=1\0" \
- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
- "update_sd_firmware_filename=u-boot.imx\0" \
- "update_sd_firmware=" \
- "if test ${ip_dyn} = yes; then " \
- "setenv get_cmd dhcp; " \
+ "mmcroot=/dev/mmcblk0p1 rw rootwait\0" \
+ "mmcargs=setenv bootargs console=${console} " \
+ "${optargs} " \
+ "root=${mmcroot} " \
+ "video=${video}\0" \
+ "videoargs=" \
+ "setenv nextcon 0; " \
+ "if hdmidet; then " \
+ "setenv bootargs ${bootargs} " \
+ "video=mxcfb${nextcon}:dev=hdmi,1280x720M@60," \
+ "if=RGB24; " \
+ "setenv fbmem fbmem=28M; " \
+ "setexpr nextcon ${nextcon} + 1; " \
"else " \
- "else " \
- "setenv get_cmd tftp; " \
+ "echo - no HDMI monitor;" \
"fi; " \
- "fi; " \
- "if mmc dev ${mmcdev}; then " \
- "if ${get_cmd} ${update_sd_firmware_filename}; then " \
- "setexpr fw_sz ${filesize} / 0x200; " \
@ -294,43 +55,32 @@ index 700e9c1..7fdce0f 100644
- "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
- "fi; " \
- "fi\0" \
- "mmcargs=setenv bootargs console=${console},${baudrate} " \
+ "mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
- "root=${mmcroot}\0" \
- "loadbootscript=" \
- "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
- "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
- "bootscript=echo Running bootscript from mmc ...; " \
- "source\0" \
- "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
- "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
- "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
- "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
- "mmcboot=echo Booting from mmc ...; " \
- "run mmcargs; " \
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
- "if run loadfdt; then " \
- "bootz ${loadaddr} - ${fdt_addr}; " \
+ "i2c dev 1; " \
+ "if i2c probe 0x10; then " \
+ "setenv bootargs ${bootargs} " \
+ "video=mxcfb${nextcon}:dev=lcd,800x480@60," \
+ "if=RGB666; " \
+ "if test 0 -eq ${nextcon}; then " \
+ "setenv fbmem fbmem=10M; " \
"else " \
- "else " \
- "if test ${boot_fdt} = try; then " \
- "bootz; " \
- "else " \
- "echo WARN: Cannot load the DT; " \
- "fi; " \
+ "setenv fbmem ${fbmem},10M; " \
"fi; " \
+ "setexpr nextcon ${nextcon} + 1; " \
"else " \
- "bootz; " \
+ "echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \
+ "fi; " \
+ "setenv bootargs ${bootargs} ${fbmem}\0" \
+ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
+ "loadrd=load mmc ${bootpart} ${rdaddr} ${bootdir}/${rdfile}\0" \
+ "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load mmc ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}\0" \
+ "${optargs} " \
+ "root=${mmcroot} " \
+ "video=${video}\0" \
+ "loadimage=echo Loading /boot/${image}..; load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/${image}\0" \
+ "loadfdt=echo Loading /boot/dtbs/${fdt_file}..; load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/dtbs/${fdt_file}\0" \
+ "loadrd=load mmc ${bootpart} ${rdaddr} /boot/${rdfile}\0" \
+ "mmcboot=mmc dev ${mmcdev}; " \
+ "if mmc rescan; then " \
+ "echo SD/MMC found on device ${mmcdev};" \
@ -345,14 +95,16 @@ index 700e9c1..7fdce0f 100644
+ "echo Running uenvcmd ...;" \
+ "run uenvcmd;" \
+ "fi;" \
+ "fi; " \
"fi; " \
- "else " \
- "bootz; " \
+ "if run loadimage; then " \
+ "if run loadfdt; then " \
+ "run mmcargs;" \
+ "if run loadrd; then " \
+ "bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr};" \
+ "bootz ${loadaddr} ${rdaddr}:${filesize} ${fdt_addr};" \
+ "else " \
+ "bootz ${loadaddr} - ${fdtaddr};" \
+ "bootz ${loadaddr} - ${fdt_addr};" \
+ "fi;" \
+ "else " \
+ "echo Kernel found, but no device tree found;" \
@ -363,24 +115,27 @@ index 700e9c1..7fdce0f 100644
"fi;\0" \
"netargs=setenv bootargs console=${console},${baudrate} " \
"root=/dev/nfs " \
@@ -161,10 +198,10 @@
@@ -137,26 +141,17 @@
"else " \
"setenv get_cmd tftp; " \
"fi; " \
- "${get_cmd} ${image}; " \
+ "${get_cmd} ${bootfile}; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
- "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
- "bootz ${loadaddr} - ${fdt_addr}; " \
+ "if ${get_cmd} ${fdtaddr} ${fdtfile}; then " \
+ "bootz ${loadaddr} - ${fdtaddr}; " \
"else " \
"if test ${boot_fdt} = try; then " \
"bootz; " \
@@ -177,16 +214,7 @@
"fi;\0"
"fi;\0" \
- "findfdt=" \
- "if test $board_rev = MX6Q ; then " \
- "setenv fdt_file imx6q-udoo.dtb; fi; " \
- "if test $board_rev = MX6DL ; then " \
- "setenv fdt_file imx6dl-udoo.dtb; fi; " \
- "if test $fdt_file = undefined; then " \
- "echo WARNING: Could not determine dtb to use; fi; \0"
+ "findfdt=" \
+ "if test $board_rev = MX6Q ; then " \
+ "setenv fdt_file imx6q-udoo.dtb; fi; " \
+ "if test $board_rev = MX6DL ; then " \
+ "setenv fdt_file imx6dl-udoo.dtb; fi; " \
+ "if test $fdt_file = undefined; then " \
+ "echo WARNING: Could not determine dtb to use; fi; \0"
#define CONFIG_BOOTCOMMAND \
"run findfdt; " \
- "mmc dev ${mmcdev}; if mmc rescan; then " \
- "if run loadbootscript; then " \
- "run bootscript; " \
@ -391,18 +146,10 @@ index 700e9c1..7fdce0f 100644
- "fi; " \
- "fi; " \
- "else run netboot; fi"
+ "run mmcboot;"
+ "run mmcboot; "
/* Miscellaneous configurable options */
#define CONFIG_SYS_LONGHELP
@@ -228,6 +256,7 @@
#define CONFIG_OF_LIBFDT
#define CONFIG_CMD_BOOTZ
+#define CONFIG_SUPPORT_RAW_INITRD
#ifndef CONFIG_SYS_DCACHE_OFF
#define CONFIG_CMD_CACHE
/* Print Buffer Size */
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
--
2.2.1
2.10.0

View file

@ -3,53 +3,40 @@
buildarch=4
pkgbase=uboot-udoo
pkgname=('uboot-udoo-dual' 'uboot-udoo-quad')
pkgver=2015.01
pkgname=uboot-udoo
pkgver=2016.09
pkgrel=1
pkgdesc="U-Boot for UDOO Dual and Quad"
arch=('armv7h')
url="http://git.denx.de/u-boot.git/"
makedepends=('bc' 'dtc' 'git')
replaces=('uboot-udoo-dual' 'uboot-udoo-quad')
license=('GPL')
makedepends=('git' 'bc')
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
install=${pkgname}.install
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
'0001-arch-linux-arm-modifications.patch')
md5sums=('7f08dc9e98a71652bd6968888ed6ec95'
'85e269e9211ea5ed2d9ccc7bb8c8d5d7')
md5sums=('2e69dda70eb28f8042d2f9fbeb1feaa1'
'6165211bb53ee947ce58a22828984b5e')
prepare() {
cd u-boot-${pkgver}
cd u-boot-${pkgver/rc/-rc}
git apply ../0001-arch-linux-arm-modifications.patch
}
build() {
cd u-boot-${pkgver}
cd u-boot-${pkgver/rc/-rc}
unset CFLAGS CXXFLAGS LDFLAGS
mkdir bins
for i in dl quad; do
make distclean
make udoo_${i}_config
make
mv u-boot.imx bins/u-boot-${i}.imx
done
make udoo_defconfig
make EXTRAVERSION=-${pkgrel}
}
package_uboot-udoo-dual() {
pkgdesc="U-Boot for UDOO Dual"
conflicts=('uboot-udoo-quad')
install=${pkgbase}.install
package_uboot-udoo() {
cd u-boot-${pkgver/rc/-rc}
mkdir -p "${pkgdir}"/boot
cp u-boot-${pkgver}/bins/u-boot-dl.imx "${pkgdir}"/boot/u-boot.imx
}
package_uboot-udoo-quad() {
pkgdesc="U-Boot for UDOO Quad"
conflicts=('uboot-udoo-dual')
install=${pkgbase}.install
mkdir -p "${pkgdir}"/boot
cp u-boot-${pkgver}/bins/u-boot-quad.imx "${pkgdir}"/boot/u-boot.imx
cp SPL u-boot.img "${pkgdir}"/boot
}

View file

@ -3,21 +3,20 @@ flash_uboot() {
echo "Do you want to do this now? [y|N]"
read -r shouldwe
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
dd if=/boot/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2
dd if=/boot/SPL of=/dev/mmcblk0 seek=1 bs=1k
dd if=/boot/u-boot.img of=/dev/mmcblk0 seek=69 bs=1k
sync
else
echo "You can do this later by running:"
echo "# dd if=/boot/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2"
echo "# dd if=/boot/SPL of=/dev/mmcblk0 seek=1 bs=1k"
echo "# dd if=/boot/u-boot.img of=/dev/mmcblk0 seek=69 bs=1k"
fi
}
## arg 1: the new package version
post_install() {
flash_uboot
}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
flash_uboot
}