Current location

narf Source control manager Git

aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJames Valleroy <jvalleroy@mailbox.org>2014-12-31 10:39:37 -0500
committerJames Valleroy <jvalleroy@mailbox.org>2014-12-31 10:39:37 -0500
commit8bfa4951644a43d077a7eca3db5126496c8027c5 (patch)
tree5a5da026d74ac882e2153f11842cbefe53b26ccc /bin
parent97398e5fc860ea7c92dd0c2dd8e985a53f9937dc (diff)
Install beaglebone bootloader in front of first partition.
Switch boottype to ext2.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/freedombox-customize11
-rwxr-xr-xbin/mk_freedombox_image3
2 files changed, 13 insertions, 1 deletions
diff --git a/bin/freedombox-customize b/bin/freedombox-customize
index 06cd706..4408080 100755
--- a/bin/freedombox-customize
+++ b/bin/freedombox-customize
@@ -50,6 +50,7 @@ disable_eatmydata_override() {
use_eatmydata=true
rootdir="$1"
+image=$(pwd)/"$2"
cd "$rootdir"
echo info: building $MACHINE for $ARCHITECTURE to $DESTINATION
@@ -105,6 +106,16 @@ rm $rootdir/usr/sbin/policy-rc.d
chroot $rootdir /usr/lib/freedombox/setup 2>&1 | \
tee $rootdir/var/log/freedombox-setup.log
+# copy u-boot to beginning of image
+case "$MACHINE" in
+ beaglebone)
+ dd if=$rootdir/usr/lib/u-boot/am335x_boneblack/MLO of="$image" \
+ count=1 seek=1 conv=notrunc bs=128k
+ dd if=$rootdir/usr/lib/u-boot/am335x_boneblack/u-boot.img of="$image" \
+ count=2 seek=1 conv=notrunc bs=384k
+ ;;
+esac
+
if $use_eatmydata ; then
disable_eatmydata_override
fi
diff --git a/bin/mk_freedombox_image b/bin/mk_freedombox_image
index 5471462..5d1d7db 100755
--- a/bin/mk_freedombox_image
+++ b/bin/mk_freedombox_image
@@ -75,8 +75,9 @@ case "$MACHINE" in
extra_pkgs="$beaglebone_pkgs"
extra_opts="\
--variant minbase \
+ --bootoffset=2mib \
--bootsize 128M \
- --boottype vfat \
+ --boottype ext2 \
--no-kernel \
--no-extlinux \
--foreign /usr/bin/qemu-arm-static \