build/arm: more on bananapi
This commit is contained in:
parent
5dfee1c041
commit
415af5a2b6
10
README.md
10
README.md
|
@ -138,23 +138,23 @@ boot files to be installed as prompted by the build system.
|
|||
A cross-build on the operating system sources is executed by
|
||||
specifying the target architecture and custom kernel:
|
||||
|
||||
# make base kernel DEVICE=bananapi
|
||||
# make base kernel DEVICE=BANANAPI
|
||||
|
||||
In order to speed up building of using an emulated packages build,
|
||||
the xtools set can be created like so:
|
||||
|
||||
# make xtools DEVICE=bananapi
|
||||
# make xtools DEVICE=BANANAPI
|
||||
|
||||
The xtools set is then used during the packages build similar to
|
||||
the distfiles set.
|
||||
|
||||
# make packages DEVICE=bananapi
|
||||
# make packages DEVICE=BANANAPI
|
||||
|
||||
The final image is built using:
|
||||
|
||||
# make arm-<size> DEVICE=bananapi
|
||||
# make arm-<size> DEVICE=BANANAPI
|
||||
|
||||
Currently available device are: bananapi, odroid-xu3, orangepi-pc2,
|
||||
Currently available device are: BANANAPI, odroid-xu3, orangepi-pc2,
|
||||
rpi2 and rpi3.
|
||||
|
||||
About other scripts and tweaks
|
||||
|
|
|
@ -85,8 +85,6 @@ setup_extras ${STAGEDIR} ${SELF}
|
|||
setup_entropy ${STAGEDIR}
|
||||
setup_xbase ${STAGEDIR}
|
||||
|
||||
echo -n ">>> Building arm image... "
|
||||
|
||||
cat > ${STAGEDIR}/etc/fstab << EOF
|
||||
# Device Mountpoint FStype Options Dump Pass#
|
||||
/dev/ufs/${ARMLABEL} / ufs rw 1 1
|
||||
|
@ -96,6 +94,8 @@ EOF
|
|||
mkdir -p ${STAGEDIR}/boot/msdos
|
||||
mount_msdosfs /dev/${DEV}s1 ${STAGEDIR}/boot/msdos
|
||||
|
||||
echo -n ">>> Building arm image... "
|
||||
|
||||
if [ -n "$(type arm_install_uboot 2> /dev/null)" ]; then
|
||||
arm_install_uboot
|
||||
fi
|
||||
|
@ -140,6 +140,7 @@ rpi3)
|
|||
;;
|
||||
esac
|
||||
|
||||
sync
|
||||
umount ${STAGEDIR}/boot/msdos
|
||||
umount ${STAGEDIR}
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@ EOF
|
|||
arm_hook()
|
||||
{
|
||||
loader_conf_fixup ${1}
|
||||
|
||||
touch ${1}/.probe.for.growfs.nano
|
||||
}
|
||||
|
||||
dvd_hook()
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
# http://www.banana-pi.org/m1.html
|
||||
# http://www.banana-pi.org/m1plus.html
|
||||
# http://www.banana-pi.org/r1.html
|
||||
|
||||
export MAKE_ARGS_DEV="
|
||||
CROSS_BINUTILS_PREFIX=/usr/local/arm-gnueabi-freebsd11.2/bin
|
||||
UBLDR_LOADADDR=0x42000000
|
||||
"
|
||||
|
||||
# XXX make this automatic in builder/common.sh later on
|
||||
export PRODUCT_KERNEL="SMP${PRODUCT_DEVICE+"-${PRODUCT_DEVICE}"}"
|
||||
|
||||
export PRODUCT_TARGET=arm
|
||||
export PRODUCT_ARCH=armv6
|
||||
export PRODUCT_WANTS="arm-gnueabi-binutils qemu-user-static u-boot-bananapi"
|
||||
|
||||
export ARM_FAT_SIZE="32m -b 1m"
|
||||
export ARM_UBOOT_DIR="/usr/local/share/u-boot/u-boot-bananapi"
|
||||
|
||||
arm_install_uboot()
|
||||
{
|
||||
dd if=${ARM_UBOOT_DIR}/u-boot-sunxi-with-spl.bin of=/dev/${DEV} bs=1k seek=8 conv=sync
|
||||
cp ${ARM_UBOOT_DIR}/boot.scr ${STAGEDIR}/boot/msdos
|
||||
cp -p ${STAGEDIR}/boot/ubldr.bin ${STAGEDIR}/boot/msdos
|
||||
ln ${STAGEDIR}/boot/dtb/bananapi.dtb ${STAGEDIR}/boot/dtb/sun7i-a20-bananapi.dtb
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
# http://www.banana-pi.org/
|
||||
|
||||
export MAKE_ARGS_DEV="
|
||||
CROSS_BINUTILS_PREFIX=/usr/local/arm-gnueabi-freebsd11.2/bin
|
||||
UBLDR_LOADADDR=0x42000000
|
||||
"
|
||||
|
||||
export PRODUCT_KERNEL=SMP-BANANAPI
|
||||
export PRODUCT_TARGET=arm
|
||||
export PRODUCT_ARCH=armv6
|
||||
export PRODUCT_WANTS="arm-gnueabi-binutils qemu-user-static u-boot-bananapi"
|
||||
|
||||
export ARM_FAT_SIZE="32m -b 1m"
|
||||
|
||||
arm_install_uboot()
|
||||
{
|
||||
dd if=/usr/local/share/u-boot/u-boot-bananapi/u-boot-sunxi-with-spl.bin \
|
||||
of=${DEV} bs=1k seek=8 conv=sync
|
||||
cp -p /usr/local/share/u-boot/u-boot-bananapi/boot.scr ${STAGEDIR}/boot/msdos
|
||||
cp -p ${STAGEDIR}/boot/ubldr.bin ${STAGEDIR}/boot/msdos
|
||||
ln ${STAGEDIR}/boot/dtb/bananapi.dtb ${STAGEDIR}/boot/dtb/sun7i-a20-bananapi.tb
|
||||
}
|
Loading…
Reference in New Issue