diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-03-08 23:16:58 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-03-09 00:27:36 +0100 |
commit | 2aa6c54b8369d6c28f7fe0bb3b496dbbbe78f8e0 (patch) | |
tree | f11c5e798ac4fd46d4a0edb3d4c23a111f6f84b4 /libre/uboot4extlinux-am335x | |
parent | f35b39d0db1287cc76471ccd6076a30487f0c6a5 (diff) | |
download | abslibre-2aa6c54b8369d6c28f7fe0bb3b496dbbbe78f8e0.tar.gz abslibre-2aa6c54b8369d6c28f7fe0bb3b496dbbbe78f8e0.tar.bz2 abslibre-2aa6c54b8369d6c28f7fe0bb3b496dbbbe78f8e0.zip |
libre: uboot4extlinux-am335x: fix filesystem corruption
Before that u-boot.img was to be located at 384k on the microSD,
as CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR defaults to 0x300.
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR states:
Address on the MMC to load U-Boot from, when the MMC is being used
in raw mode. Units: MMC sectors (1 sector = 512 bytes).
However since once built, u-boot.img size was 692k, it went over
the 1MB empty space that is usually created when parititoning
block devices, effectively corrupting the first partition.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'libre/uboot4extlinux-am335x')
-rw-r--r-- | libre/uboot4extlinux-am335x/PKGBUILD | 7 | ||||
-rw-r--r-- | libre/uboot4extlinux-am335x/uboot4extlinux-am335x.install | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libre/uboot4extlinux-am335x/PKGBUILD b/libre/uboot4extlinux-am335x/PKGBUILD index 4ce30c130..6db114815 100644 --- a/libre/uboot4extlinux-am335x/PKGBUILD +++ b/libre/uboot4extlinux-am335x/PKGBUILD @@ -6,7 +6,7 @@ pkgbase=uboot4extlinux-am335x pkgname=('uboot4extlinux-am335x_bone') pkgver=2019.01 -pkgrel=2 +pkgrel=3 arch=('armv7h') url="http://git.denx.de/u-boot.git/" license=('GPL') @@ -19,6 +19,11 @@ sha256sums=('50bd7e5a466ab828914d080d5f6a432345b500e8fba1ad3b7b61e95e60d51c22' boards=('am335x_evm') +prepare() { + cd u-boot-${pkgver} + echo 'CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200' >> configs/am335x_evm_defconfig +} + build() { cd u-boot-${pkgver} diff --git a/libre/uboot4extlinux-am335x/uboot4extlinux-am335x.install b/libre/uboot4extlinux-am335x/uboot4extlinux-am335x.install index 53ab65fba..d4f12e789 100644 --- a/libre/uboot4extlinux-am335x/uboot4extlinux-am335x.install +++ b/libre/uboot4extlinux-am335x/uboot4extlinux-am335x.install @@ -1,6 +1,6 @@ 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=2 seek=1 conv=notrunc bs=384k" + echo "# dd if=/boot/u-boot/images/u-boot.img of=/dev/mmcblk0 count=6 seek=2 conv=notrunc bs=128k" } extlinux_warning() { @@ -17,6 +17,7 @@ flash_uboot() { 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=384k seek=1 count=2 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 |