summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-05 06:45:36 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-05 06:53:44 -0300
commitd737d4e1734b9f1aa3bb590133b3e9f99b89b00c (patch)
tree53e884be9ec57216cf685447fc6072aaf27cc48b /libre
parent8f4210ea6e51b01c5ca354c1092e63e8639fdd98 (diff)
downloadabslibre-d737d4e1734b9f1aa3bb590133b3e9f99b89b00c.tar.gz
abslibre-d737d4e1734b9f1aa3bb590133b3e9f99b89b00c.tar.bz2
abslibre-d737d4e1734b9f1aa3bb590133b3e9f99b89b00c.zip
uboot-sunxi-linux-libre: add new package to [libre]
Diffstat (limited to 'libre')
-rw-r--r--libre/uboot-sunxi-linux-libre/0001-parabola-arm-modifications.patch28
-rw-r--r--libre/uboot-sunxi-linux-libre/PKGBUILD282
-rw-r--r--libre/uboot-sunxi-linux-libre/boot.txt19
-rwxr-xr-xlibre/uboot-sunxi-linux-libre/mkscr9
-rw-r--r--libre/uboot-sunxi-linux-libre/uboot-sunxi-linux-libre.install22
5 files changed, 360 insertions, 0 deletions
diff --git a/libre/uboot-sunxi-linux-libre/0001-parabola-arm-modifications.patch b/libre/uboot-sunxi-linux-libre/0001-parabola-arm-modifications.patch
new file mode 100644
index 000000000..d910fa54e
--- /dev/null
+++ b/libre/uboot-sunxi-linux-libre/0001-parabola-arm-modifications.patch
@@ -0,0 +1,28 @@
+diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h
+index 8237239..2477edf 100644
+--- a/include/config_distro_defaults.h
++++ b/include/config_distro_defaults.h
+@@ -59,4 +59,7 @@
+ #define CONFIG_SUPPORT_RAW_INITRD
+ #define CONFIG_SYS_HUSH_PARSER
+
++#define CONFIG_CMD_PART
++#define CONFIG_PARTITION_UUIDS
++
+ #endif /* _CONFIG_CMD_DISTRO_DEFAULTS_H */
+diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
+index 1f7a1cb..ae0ddf7 100644
+--- a/include/configs/sunxi-common.h
++++ b/include/configs/sunxi-common.h
+@@ -141,7 +141,7 @@
+ #define CONFIG_SYS_NO_FLASH
+
+ #define CONFIG_SYS_MONITOR_LEN (512 << 10) /* 512 KiB */
+-#define CONFIG_IDENT_STRING " Allwinner Technology"
++#define CONFIG_IDENT_STRING " Parabola GNU/Linux-libre"
+
+ #define CONFIG_ENV_OFFSET (544 << 10) /* (8 + 24 + 512) KiB */
+ #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
+--
+2.3.6
+
diff --git a/libre/uboot-sunxi-linux-libre/PKGBUILD b/libre/uboot-sunxi-linux-libre/PKGBUILD
new file mode 100644
index 000000000..bbdc1b10e
--- /dev/null
+++ b/libre/uboot-sunxi-linux-libre/PKGBUILD
@@ -0,0 +1,282 @@
+# U-Boot: sunXi
+# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
+# Maintainer: André Silva <emulatorman@parabola.nu>
+
+buildarch=4
+
+_pkgbase=linux-libre
+pkgbase=uboot-sunxi-${_pkgbase}
+pkgname=("uboot-a10-olinuxino-lime-${_pkgbase}"
+ "uboot-a10s-olinuxino-micro-${_pkgbase}"
+ "uboot-a13-olinuxino-${_pkgbase}"
+ "uboot-a13-olinuxino-micro-${_pkgbase}"
+ "uboot-a20-olinuxino-lime-${_pkgbase}"
+ "uboot-a20-olinuxino-lime2-${_pkgbase}"
+ "uboot-a20-olinuxino-micro-${_pkgbase}"
+ "uboot-cubieboard-${_pkgbase}"
+ "uboot-cubieboard2-${_pkgbase}"
+ "uboot-cubietruck-${_pkgbase}"
+ "uboot-pcduino-${_pkgbase}"
+ "uboot-pcduino3-${_pkgbase}"
+ "uboot-pcduino3-nano-${_pkgbase}")
+pkgver=2015.07
+pkgrel=1
+arch=('armv7h')
+url="http://git.denx.de/u-boot.git/"
+license=('GPL')
+makedepends=('bc' 'dtc')
+depends=('linux-libre')
+source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
+ '0001-parabola-arm-modifications.patch'
+ 'boot.txt'
+ 'mkscr')
+md5sums=('3dac9a0b46fed77fc768ad3bd2d68c05'
+ 'b83d7781a1365b2d9d87f9dfa9d2c166'
+ 'cbc1530c593b029ba8cb8de191d1f095'
+ '858048d9bbc6502968defb52791b6c52')
+
+boards=('A10-OLinuXino-Lime'
+ 'A10s-OLinuXino-M'
+ 'A13-OLinuXino'
+ 'A13-OLinuXinoM'
+ 'A20-OLinuXino-Lime'
+ 'A20-OLinuXino-Lime2'
+ 'A20-OLinuXino_MICRO'
+ 'Cubieboard'
+ 'Cubieboard2'
+ 'Cubietruck'
+ 'Linksprite_pcDuino'
+ 'Linksprite_pcDuino3'
+ 'Linksprite_pcDuino3_Nano')
+
+prepare() {
+ cd u-boot-${pkgver}
+
+ patch -Np1 -i ../0001-parabola-arm-modifications.patch
+}
+
+build() {
+ cd u-boot-${pkgver}
+
+ unset CFLAGS
+ unset CXXFLAGS
+ unset LDFLAGS
+
+ for i in ${boards[@]}; do
+ mkdir ../bin_${i}
+ make distclean
+ make ${i}_config
+ make EXTRAVERSION=-${pkgrel}
+ mv u-boot-sunxi-with-spl.bin ../bin_${i}
+ done
+
+ tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ../boot.txt ../boot.scr
+}
+
+package_uboot-a10-olinuxino-lime-linux-libre() {
+ pkgdesc="U-Boot for A10 OLinuXino Lime (built for the linux-libre kernel package)"
+ install=${pkgbase}.install
+ backup=(boot/${pkgname}/boot.txt boot/${pkgname}/boot.scr)
+ provides=('uboot-sunxi')
+ conflicts=('uboot-sunxi')
+ replaces=('uboot-a10-olinuxino-lime')
+
+ install -d "${pkgdir}/boot/${pkgname}"
+ install -Dm644 bin_A10-OLinuXino-Lime/u-boot-sunxi-with-spl.bin "${pkgdir}/boot/${pkgname}"
+
+ install -Dm644 boot.txt "${pkgdir}/boot/${pkgname}"/boot.txt
+ install -Dm644 boot.scr "${pkgdir}/boot/${pkgname}"/boot.scr
+ install -Dm755 mkscr "${pkgdir}/boot/${pkgname}"/mkscr
+}
+
+package_uboot-a10s-olinuxino-micro-linux-libre() {
+ pkgdesc="U-Boot for A10s OLinuXino Micro (built for the linux-libre kernel package)"
+ install=${pkgbase}.install
+ backup=(boot/${pkgname}/boot.txt boot/${pkgname}/boot.scr)
+ provides=('uboot-sunxi')
+ conflicts=('uboot-sunxi')
+ replaces=('uboot-a10s-olinuxino-micro')
+
+ install -d "${pkgdir}/boot/${pkgname}"
+ install -Dm644 bin_A10s-OLinuXino-M/u-boot-sunxi-with-spl.bin "${pkgdir}/boot/${pkgname}"
+
+ install -Dm644 boot.txt "${pkgdir}/boot/${pkgname}"/boot.txt
+ install -Dm644 boot.scr "${pkgdir}/boot/${pkgname}"/boot.scr
+ install -Dm755 mkscr "${pkgdir}/boot/${pkgname}"/mkscr
+}
+
+package_uboot-a13-olinuxino-linux-libre() {
+ pkgdesc="U-Boot for A13 OLinuXino (built for the linux-libre kernel package)"
+ install=${pkgbase}.install
+ backup=(boot/${pkgname}/boot.txt boot/${pkgname}/boot.scr)
+ provides=('uboot-sunxi')
+ conflicts=('uboot-sunxi')
+ replaces=('uboot-a13-olinuxino')
+
+ install -d "${pkgdir}/boot/${pkgname}"
+ install -Dm644 bin_A13-OLinuXino/u-boot-sunxi-with-spl.bin "${pkgdir}/boot/${pkgname}"
+
+ install -Dm644 boot.txt "${pkgdir}/boot/${pkgname}"/boot.txt
+ install -Dm644 boot.scr "${pkgdir}/boot/${pkgname}"/boot.scr
+ install -Dm755 mkscr "${pkgdir}/boot/${pkgname}"/mkscr
+}
+
+package_uboot-a13-olinuxino-micro-linux-libre() {
+ pkgdesc="U-Boot for A13 OLinuXino Micro (built for the linux-libre kernel package)"
+ install=${pkgbase}.install
+ backup=(boot/${pkgname}/boot.txt boot/${pkgname}/boot.scr)
+ provides=('uboot-sunxi')
+ conflicts=('uboot-sunxi')
+ replaces=('uboot-a13-olinuxino-micro')
+
+ install -d "${pkgdir}/boot/${pkgname}"
+ install -Dm644 bin_A13-OLinuXinoM/u-boot-sunxi-with-spl.bin "${pkgdir}/boot/${pkgname}"
+
+ install -Dm644 boot.txt "${pkgdir}/boot/${pkgname}"/boot.txt
+ install -Dm644 boot.scr "${pkgdir}/boot/${pkgname}"/boot.scr
+ install -Dm755 mkscr "${pkgdir}/boot/${pkgname}"/mkscr
+}
+
+package_uboot-a20-olinuxino-lime-linux-libre() {
+ pkgdesc="U-Boot for A20 OLinuXino Lime (built for the linux-libre kernel package)"
+ install=${pkgbase}.install
+ backup=(boot/${pkgname}/boot.txt boot/${pkgname}/boot.scr)
+ provides=('uboot-sunxi')
+ conflicts=('uboot-sunxi')
+ replaces=('uboot-a20-olinuxino-lime')
+
+ install -d "${pkgdir}/boot/${pkgname}"
+ install -Dm644 bin_A20-OLinuXino-Lime/u-boot-sunxi-with-spl.bin "${pkgdir}/boot/${pkgname}"
+
+ install -Dm644 boot.txt "${pkgdir}/boot/${pkgname}"/boot.txt
+ install -Dm644 boot.scr "${pkgdir}/boot/${pkgname}"/boot.scr
+ install -Dm755 mkscr "${pkgdir}/boot/${pkgname}"/mkscr
+}
+
+package_uboot-a20-olinuxino-lime2-linux-libre() {
+ pkgdesc="U-Boot for A20 OLinuXino Lime2 (built for the linux-libre kernel package)"
+ install=${pkgbase}.install
+ backup=(boot/${pkgname}/boot.txt boot/${pkgname}/boot.scr)
+ provides=('uboot-sunxi')
+ conflicts=('uboot-sunxi')
+ replaces=('uboot-a20-olinuxino-lime2')
+
+ install -d "${pkgdir}/boot/${pkgname}"
+ install -Dm644 bin_A20-OLinuXino-Lime2/u-boot-sunxi-with-spl.bin "${pkgdir}/boot/${pkgname}"
+
+ install -Dm644 boot.txt "${pkgdir}/boot/${pkgname}"/boot.txt
+ install -Dm644 boot.scr "${pkgdir}/boot/${pkgname}"/boot.scr
+ install -Dm755 mkscr "${pkgdir}/boot/${pkgname}"/mkscr
+}
+
+package_uboot-a20-olinuxino-micro-linux-libre() {
+ pkgdesc="U-Boot for A20 OLinuXino Micro (built for the linux-libre kernel package)"
+ install=${pkgbase}.install
+ backup=(boot/${pkgname}/boot.txt boot/${pkgname}/boot.scr)
+ provides=('uboot-sunxi')
+ conflicts=('uboot-sunxi')
+ replaces=('uboot-a20-olinuxino-micro')
+
+ install -d "${pkgdir}/boot/${pkgname}"
+ install -Dm644 bin_A20-OLinuXino_MICRO/u-boot-sunxi-with-spl.bin "${pkgdir}/boot/${pkgname}"
+
+ install -Dm644 boot.txt "${pkgdir}/boot/${pkgname}"/boot.txt
+ install -Dm644 boot.scr "${pkgdir}/boot/${pkgname}"/boot.scr
+ install -Dm755 mkscr "${pkgdir}/boot/${pkgname}"/mkscr
+}
+
+package_uboot-cubieboard-linux-libre() {
+ pkgdesc="U-Boot for Cubieboard (built for the linux-libre kernel package)"
+ install=${pkgbase}.install
+ backup=(boot/${pkgname}/boot.txt boot/${pkgname}/boot.scr)
+ provides=('uboot-sunxi')
+ conflicts=('uboot-sunxi')
+ replaces=('uboot-cubieboard')
+
+ install -d "${pkgdir}/boot/${pkgname}"
+ install -Dm644 bin_Cubieboard/u-boot-sunxi-with-spl.bin "${pkgdir}/boot/${pkgname}"/u-boot-sunxi-with-spl.bin
+
+ install -Dm644 boot.txt "${pkgdir}/boot/${pkgname}"/boot.txt
+ install -Dm644 boot.scr "${pkgdir}/boot/${pkgname}"/boot.scr
+ install -Dm755 mkscr "${pkgdir}/boot/${pkgname}"/mkscr
+}
+
+package_uboot-cubieboard2-linux-libre() {
+ pkgdesc="U-Boot for Cubieboard 2 (built for the linux-libre kernel package)"
+ install=${pkgbase}.install
+ backup=(boot/${pkgname}/boot.txt boot/${pkgname}/boot.scr)
+ provides=('uboot-sunxi')
+ conflicts=('uboot-sunxi')
+ replaces=('uboot-cubieboard2')
+
+ install -d "${pkgdir}/boot/${pkgname}"
+ install -Dm644 bin_Cubieboard2/u-boot-sunxi-with-spl.bin "${pkgdir}/boot/${pkgname}"/u-boot-sunxi-with-spl.bin
+
+ install -Dm644 boot.txt "${pkgdir}/boot/${pkgname}"/boot.txt
+ install -Dm644 boot.scr "${pkgdir}/boot/${pkgname}"/boot.scr
+ install -Dm755 mkscr "${pkgdir}/boot/${pkgname}"/mkscr
+}
+
+package_uboot-cubietruck-linux-libre() {
+ pkgdesc="U-Boot for Cubietruck (built for the linux-libre kernel package)"
+ install=${pkgbase}.install
+ backup=(boot/${pkgname}/boot.txt boot/${pkgname}/boot.scr)
+ provides=('uboot-sunxi')
+ conflicts=('uboot-sunxi')
+ replaces=('uboot-cubietruck')
+
+ install -d "${pkgdir}/boot/${pkgname}"
+ install -Dm644 bin_Cubietruck/u-boot-sunxi-with-spl.bin "${pkgdir}/boot/${pkgname}"/u-boot-sunxi-with-spl.bin
+
+ install -Dm644 boot.txt "${pkgdir}/boot/${pkgname}"/boot.txt
+ install -Dm644 boot.scr "${pkgdir}/boot/${pkgname}"/boot.scr
+ install -Dm755 mkscr "${pkgdir}/boot/${pkgname}"/mkscr
+}
+
+package_uboot-pcduino-linux-libre() {
+ pkgdesc="U-Boot for pcDuino (built for the linux-libre kernel package)"
+ install=${pkgbase}.install
+ backup=(boot/${pkgname}/boot.txt boot/${pkgname}/boot.scr)
+ provides=('uboot-sunxi')
+ conflicts=('uboot-sunxi')
+ replaces=('uboot-pcduino')
+
+ install -d "${pkgdir}/boot/${pkgname}"
+ install -Dm644 bin_Linksprite_pcDuino/u-boot-sunxi-with-spl.bin "${pkgdir}/boot/${pkgname}"
+
+ install -Dm644 boot.txt "${pkgdir}/boot/${pkgname}"/boot.txt
+ install -Dm644 boot.scr "${pkgdir}/boot/${pkgname}"/boot.scr
+ install -Dm755 mkscr "${pkgdir}/boot/${pkgname}"/mkscr
+}
+
+package_uboot-pcduino3-linux-libre() {
+ pkgdesc="U-Boot for pcDuino3 (built for the linux-libre kernel package)"
+ install=${pkgbase}.install
+ backup=(boot/${pkgname}/boot.txt boot/${pkgname}/boot.scr)
+ provides=('uboot-sunxi')
+ conflicts=('uboot-sunxi')
+ replaces=('uboot-pcduino3')
+
+ install -d "${pkgdir}/boot/${pkgname}"
+ install -Dm644 bin_Linksprite_pcDuino3/u-boot-sunxi-with-spl.bin "${pkgdir}/boot/${pkgname}"
+
+ install -Dm644 boot.txt "${pkgdir}/boot/${pkgname}"/boot.txt
+ install -Dm644 boot.scr "${pkgdir}/boot/${pkgname}"/boot.scr
+ install -Dm755 mkscr "${pkgdir}/boot/${pkgname}"/mkscr
+}
+
+package_uboot-pcduino3-nano-linux-libre() {
+ pkgdesc="U-Boot for pcDuino3 Nano (built for the linux-libre kernel package)"
+ install=${pkgbase}.install
+ backup=(boot/${pkgname}/boot.txt boot/${pkgname}/boot.scr)
+ provides=('uboot-sunxi')
+ conflicts=('uboot-sunxi')
+ replaces=('uboot-pcduino3-nano')
+
+ install -d "${pkgdir}/boot/${pkgname}"
+ install -Dm644 bin_Linksprite_pcDuino3_Nano/u-boot-sunxi-with-spl.bin "${pkgdir}/boot/${pkgname}"
+
+ install -Dm644 boot.txt "${pkgdir}/boot/${pkgname}"/boot.txt
+ install -Dm644 boot.scr "${pkgdir}/boot/${pkgname}"/boot.scr
+ install -Dm755 mkscr "${pkgdir}/boot/${pkgname}"/mkscr
+}
diff --git a/libre/uboot-sunxi-linux-libre/boot.txt b/libre/uboot-sunxi-linux-libre/boot.txt
new file mode 100644
index 000000000..bd8417edd
--- /dev/null
+++ b/libre/uboot-sunxi-linux-libre/boot.txt
@@ -0,0 +1,19 @@
+part uuid ${devtype} ${devnum}:${bootpart} uuid
+setenv bootargs console=${console} root=PARTUUID=${uuid} rw rootwait
+
+if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/vmlinuz-linux-libre; then
+ if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/linux-libre/${fdtfile}; then
+ if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /boot/initramfs-linux-libre.img; then
+ bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
+ else
+ bootz ${kernel_addr_r} - ${fdt_addr_r};
+ fi;
+ fi;
+fi
+
+if load ${devtype} ${devnum}:${bootpart} 0x48000000 /boot/uImage-linux-libre; then
+ if load ${devtype} ${devnum}:${bootpart} 0x43000000 /boot/uboot-sunxi-linux-libre/script.bin; then
+ setenv bootm_boot_mode sec;
+ bootm 0x48000000;
+ fi;
+fi
diff --git a/libre/uboot-sunxi-linux-libre/mkscr b/libre/uboot-sunxi-linux-libre/mkscr
new file mode 100755
index 000000000..b79add361
--- /dev/null
+++ b/libre/uboot-sunxi-linux-libre/mkscr
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [[ ! -x /usr/bin/mkimage ]]; then
+ echo "mkimage not found. Please install uboot-tools:"
+ echo " pacman -S uboot-tools"
+ exit 1
+fi
+
+mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d /boot/uboot-sunxi-linux-libre/boot.txt /boot/uboot-sunxi-linux-libre/boot.scr
diff --git a/libre/uboot-sunxi-linux-libre/uboot-sunxi-linux-libre.install b/libre/uboot-sunxi-linux-libre/uboot-sunxi-linux-libre.install
new file mode 100644
index 000000000..3d2a2de7b
--- /dev/null
+++ b/libre/uboot-sunxi-linux-libre/uboot-sunxi-linux-libre.install
@@ -0,0 +1,22 @@
+flash_uboot() {
+ echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0."
+ echo "Do you want to do this now? [y|N]"
+ read -r shouldwe
+ if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
+ dd if=/boot/uboot-sunxi-linux-libre/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8
+ else
+ echo "You can do this later by running:"
+ echo "# dd if=/boot/uboot-sunxi-linux-libre/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8"
+ 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
+}