URI: 
       tfinalize bananapi - arm-sdk - os build toolkit for various embedded devices
  HTML git clone https://git.parazyd.org/arm-sdk
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
   DIR commit 4189419ee11a7cabddc6cfe8abb6bd01e5a07cd4
   DIR parent 81cdfb4af4432a32f3f5a76f58d668368643f650
  HTML Author: parazyd <parazyd@dyne.org>
       Date:   Thu, 13 Oct 2016 10:04:30 +0200
       
       finalize bananapi
       
       Diffstat:
         M boards/bananapi.sh                  |      58 +++++++++++++++++--------------
       
       1 file changed, 31 insertions(+), 27 deletions(-)
       ---
   DIR diff --git a/boards/bananapi.sh b/boards/bananapi.sh
       t@@ -22,7 +22,7 @@
        ## settings & config
        vars+=(device_name arch size parted_type parted_boot parted_root inittab)
        vars+=(gitkernel gitbranch sunxi_tools sunxi_uboot sunxi_boards)
       -arrs+=(custmodules extra_packages)
       +arrs+=(custmodules)
        
        device_name="bananapi"
        arch="armhf"
       t@@ -33,7 +33,7 @@ parted_type="dos"
        parted_boot="fat32 2048s 264191s"
        parted_root="ext4 264192s 100%"
        
       -extra_packages=()
       +extra_packages+=()
        custmodules=(sunxi_emac)
        
        gitkernel="https://github.com/LeMaker/linux-sunxi.git"
       t@@ -50,19 +50,22 @@ prebuild() {
        
                notice "executing $device_name prebuild"
        
       +        enablessh
                write-fstab
                copy-zram-init
        
                mkdir -p $R/tmp/kernels/$device_name
       +
                clone-git $sunxi_boards "$R/tmp/kernels/$device_name/sunxi-boards" || zerr
                clone-git $sunxi_tools  "$R/tmp/kernels/$device_name/sunxi-tools"  || zerr
                clone-git $sunxi_uboot  "$R/tmp/kernels/$device_name/sunxi-uboot"  || zerr
        
                pushd $R/tmp/kernels/$device_name/sunxi-tools
       -        act "running fex2bin"
       -        make fex2bin || zerr
       -        sudo ./fex2bin $R/tmp/kernels/$device_name/sunxi-boards/sys_config/a20/BananaPi.fex \
       -                $strapdir/boot/script.bin || zerr
       +                act "running fex2bin"
       +                make fex2bin || zerr
       +                sudo ./fex2bin \
       +                        $R/tmp/kernels/$device_name/sunxi-boards/sys_config/a20/BananaPi.fex \
       +                        $strapdir/boot/script.bin || zerr
                popd
        }
        
       t@@ -73,23 +76,28 @@ postbuild() {
        
                notice "building u-boot"
                pushd $R/tmp/kernels/$device_name/sunxi-uboot
       -        make distclean
       -        make BananaPi_config
       -        make $MAKEOPTS || zerr
       -        act "dd-ing to image..."
       -        sudo dd if=u-boot-sunxi-with-spl.bin of=$loopdevice bs=1024 seek=8 || zerr
       +                make distclean
       +                make BananaPi_config
       +                make $MAKEOPTS || zerr
       +                act "dd-ing to image..."
       +                sudo dd if=u-boot-sunxi-with-spl.bin of=$loopdevice bs=1024 seek=8 || zerr
       +        popd
        
       +        ## {{{ boot txts
                notice "creating boot.cmd"
       -        cat <<EOF | sudo tee ${strapdir}/boot/boot.cmd ${TEEVERBOSE}
       +        cat <<EOF | sudo tee ${strapdir}/boot/boot.cmd
        setenv bootm_boot_mode sec
        setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} rw rootfstype=ext4 net.ifnames=0
        fatload mmc 0 0x43000000 script.bin
        fatload mmc 0 0x48000000 uImage
        bootm 0x48000000
        EOF
       +        ## }}}
        
                notice "creating u-boot script image"
                sudo mkimage -A arm -T script -C none -d $strapdir/boot/boot.cmd $strapdir/boot/boot.scr || zerr
       +
       +        postbuild-clean
        }
        
        build_kernel_armhf() {
       t@@ -105,12 +113,10 @@ build_kernel_armhf() {
        
                get-kernel-sources
                pushd $R/tmp/kernels/$device_name/${device_name}-linux
       -        #wget -O .config $linux_defconfig
       -        #copy-kernel-config
       -        make sun7i_defconfig
       -        make $MAKEOPTS uImage modules || zerr
       -        sudo -E PATH="$PATH" \
       -                make INSTALL_MOD_PATH=$strapdir modules_install || zerr
       +                make sun7i_defconfig
       +                make $MAKEOPTS uImage modules || zerr
       +                sudo -E PATH="$PATH" \
       +                        make INSTALL_MOD_PATH=$strapdir modules_install || zerr
                popd
        
                sudo rm -rf $strapdir/lib/firmware
       t@@ -118,15 +124,13 @@ build_kernel_armhf() {
                sudo cp $CPVERBOSE -ra $R/tmp/linux-firmware $strapdir/lib/firmware
        
                pushd $R/tmp/kernels/$device_name/${device_name}-linux
       -        sudo -E PATH="$PATH" \
       -                make INSTALL_MOD_PATH=$strapdir firmware_install || zerr
       -        sudo cp -v arch/arm/boot/uImage $strapdir/boot/
       -        make mrproper
       -        #wget -O .config $linux_defconfig
       -        #copy-kernel-config
       -        make sun7i_defconfig
       -        sudo -E PATH="$PATH" \
       -                make modules_prepare || zerr
       +                sudo -E PATH="$PATH" \
       +                        make INSTALL_MOD_PATH=$strapdir firmware_install || zerr
       +                sudo cp -v arch/arm/boot/uImage $strapdir/boot/
       +                make mrproper
       +                make sun7i_defconfig
       +                sudo -E PATH="$PATH" \
       +                        make modules_prepare || zerr
                popd
        
                postbuild || zerr