diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-08-14 16:11:22 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-08-14 16:16:39 +0200 |
commit | 67c574bbda146dbaf74221f9c520973d633bab62 (patch) | |
tree | 4f1747297f7a26a7e62b0964fcc01afe20b0bd34 /libre/uboot4extlinux-ti-soc/uboot4extlinux-ti-soc.install | |
parent | 17abe9678b3b6e0610fe40e67484d225bcddc706 (diff) | |
download | abslibre-67c574bbda146dbaf74221f9c520973d633bab62.tar.gz abslibre-67c574bbda146dbaf74221f9c520973d633bab62.tar.bz2 abslibre-67c574bbda146dbaf74221f9c520973d633bab62.zip |
libre: Merge uboot4extlinux{am335x,omap3}, uboot-omap4_panda: into uboot4extlinux-ti-soc
uboot4extlinux-am335x and uboot4extlinux-omap3 were almost identical, the
only difference was the extlinux.conf file. So they were migrated together
in a single package for all TI SOCs.
I think having a single package saves maintenance time: We only have one
package to update for all the supported boards.
One downside is that it can increase the compilation time, but in overal it
probably saves a lot of time.
Another downside is that we cannot test the package separately for each
boards and have to test all the boards for each new update. However since
we are very close to upstream u-boot, there is very few probability of
having breakages that we don't know about. Factorizing the package can also
increase confidence that it will work on the boards we don't have, by
testing on the boards we have.
For instance I've only been able to test this package on the following
boards as I don't have any of the other boards:
- Beagleboard XM
- Beaglebone Green
The support for the Pandaborad from uboot-omap4_panda was added along the
way to furthurer unify u-boot packages.
In addition the version was updated and some whitespace fixes were done.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'libre/uboot4extlinux-ti-soc/uboot4extlinux-ti-soc.install')
-rw-r--r-- | libre/uboot4extlinux-ti-soc/uboot4extlinux-ti-soc.install | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/libre/uboot4extlinux-ti-soc/uboot4extlinux-ti-soc.install b/libre/uboot4extlinux-ti-soc/uboot4extlinux-ti-soc.install new file mode 100644 index 000000000..f33e8c1e3 --- /dev/null +++ b/libre/uboot4extlinux-ti-soc/uboot4extlinux-ti-soc.install @@ -0,0 +1,37 @@ +flash_instructions() { + echo "# dd if=/boot/u-boot/images/MLO of=/dev/mmcblk0 count=1 seek=1 conv=notrunc bs=128k" + echo "# dd if=/boot/u-boot/images/u-boot.img of=/dev/mmcblk0 count=6 seek=2 conv=notrunc bs=128k" +} + +extlinux_warning() { + echo "==> WARNING: Remember to set up your kernels in /boot/extlinux/extlinux.conf" +} + +flash_uboot() { + root=$(mount | awk '/ on \/ / { print $1; }') + if [[ $root =~ ^/dev/mmcblk.*$ ]]; then + root=${root:0:12} + echo "A new U-Boot version needs to be flashed onto $root." + 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/images/MLO of=$root bs=128k seek=1 count=1 conv=notrunc + dd if=/boot/u-boot/images/u-boot.img of=$root bs=128k seek=2 count=6 conv=notrunc + else + echo "You can do this later by running:" + flash_instructions + fi + else + echo "Flash the new U-Boot version onto your boot device. For example:" + flash_instructions + fi + extlinux_warning +} + +post_install() { + flash_uboot +} + +post_upgrade() { + flash_uboot +} |