#!/bin/bash

## make (update) kernel binary and u-boot binary for new kernel.
## you may not need 'make clean', beacause we need only kernel and drivers updating.
(cd buildroot; make)

## make (update) kernel drivers and user mode drivers for new kernel.
## !!! CAUTION !!! This step forcibly overwrites the target files.
(cd Fpga; ./build_for_mx.sh)
(cd RaspUsbRec; ./build_for_mx.sh)
(cd TestDrv; ./build_for_mx.sh)
(cd bt-daemon; ./build_for_mx.sh)
(cd USBWiFi/rtl8812au; ./build_for_mx.sh)

## copy contents of the customized rootfs files to target directory.
## !!! CAUTION !!! This step forcibly overwrites the target files.
(cd my-rootfs; ./copy_contents.sh)

## make (update) rootfs image for new kernel.
## you must not execute 'make clean', because we need only re-create rootfs image updating.
(cd buildroot; make)

