Changes

Jump to: navigation, search

MISC-TN-004: Running Debian (armbian) on SBCSPG

3,419 bytes added, 14:05, 29 July 2019
Creating the root file system
==Creating the root file system==
To create the root file system, the procedure described [https://github.com/armbian/build here] was followed. Before starting the actual build process, the following patch was applied in order to add the support for the SBCSPG target.
 
<pre>
diff --git a/config/boards/sbcspg.conf b/config/boards/sbcspg.conf
new file mode 100644
index 00000000..1d1411eb
--- /dev/null
+++ b/config/boards/sbcspg.conf
@@ -0,0 +1,11 @@
+# i.MX6UL-powered industrial gateway by DAVE Embedded Systems
+BOARD_NAME="sbcspg"
+BOARDFAMILY="rialto"
+BOOTCONFIG="mx6_cubox-i_config"
+#
+MODULES=""
+MODULES_NEXT=""
+#
+KERNEL_TARGET="default,next,dev"
+CLI_TARGET="buster,bionic:default,next"
+DESKTOP_TARGET=""
diff --git a/config/sources/rialto.conf b/config/sources/rialto.conf
new file mode 100644
index 00000000..0d8b97a8
--- /dev/null
+++ b/config/sources/rialto.conf
@@ -0,0 +1,84 @@
+BOOTSOURCE='https://github.com/SolidRun/u-boot.git'
+BOOTDIR='u-boot-cubox'
+BOOTBRANCH='branch:v2018.01-solidrun-imx6'
+BOOTCONFIG="mx6cuboxi_defconfig"
+BOOTSCRIPT='boot-cubox.cmd:boot.cmd'
+BOOTENV_FILE='cubox-default.txt'
+
+UBOOT_TARGET_MAP=';emmc;SPL:SPL.emmc u-boot.img:u-boot.img.emmc
+ ;sdhc;SPL:SPL.sdhc u-boot.img:u-boot.img.sdhc
+ ;sdhc;SPL:SPL.sata u-boot.img:u-boot.img.sata
+ ;sdhc;SPL:SPL.spi-flash u-boot.img:u-boot.img.spi-flash'
+
+UBOOT_USE_GCC='> 7.0'
+KERNEL_USE_GCC='> 7.0'
+KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
+KERNELDIR=$MAINLINE_KERNEL_DIR
+
+case $BRANCH in
+
+ default)
+
+ KERNELBRANCH='branch:linux-4.14.y'
+
+ ;;
+
+ next)
+
+ KERNELBRANCH='branch:linux-5.1.y'
+
+ ;;
+
+ dev)
+
+ KERNELBRANCH='branch:linux-5.1.y'
+ LINUXCONFIG='linux-cubox-next'
+
+ ;;
+
+esac
+
+CPUMIN=396000
+CPUMAX=996000
+GOVERNOR=interactive
+
+SERIALCON=ttymxc0
+
+
+write_uboot_platform()
+{
+ dd if=$1/SPL.sdhc of=$2 bs=1K seek=1 status=noxfer > /dev/null 2>&1
+ dd if=$1/u-boot.img.sdhc of=$2 bs=1K seek=69 status=noxfer > /dev/null 2>&1
+}
+
+if [[ $BOARD == wandboard-quad ]]; then
+ UBOOT_USE_GCC='> 6.3'
+ KERNEL_USE_GCC='> 6.3'
+ CPUMAX=1008000
+ GOVERNOR=ondemand
+ BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
+ BOOTDIR=$MAINLINE_UBOOT_DIR
+ BOOTBRANCH="branch:v2017.03"
+ write_uboot_platform()
+ {
+ dd if=$1/SPL of=$2 bs=512 seek=2 status=noxfer > /dev/null 2>&1
+ dd if=$1/u-boot.img of=$2 seek=69 bs=1k status=noxfer > /dev/null 2>&1
+ }
+fi
+
+family_tweaks()
+{
+ # TODO: Fix the workaround in firstrun?
+ #chroot $SDCARD /bin/bash -c "LC_ALL=C LANG=C update-rc.d brcm4330-patch defaults > /dev/null"
+ echo ""
+}
+
+family_tweaks_bsp()
+{
+ install -m 644 $SRC/packages/bsp/cubox/99-hdmi_fb0.conf $destination/etc/X11/xorg.conf.d/99-hdmi_fb0.conf
+ install -m 755 $SRC/packages/bsp/cubox/brcm_patchram_plus $destination/usr/bin/brcm_patchram_plus
+ cp $SRC/packages/bsp/cubox/brcm4330 $destination/etc/default/
+ # TODO: replace by a systemd service
+ mkdir $destination/etc/init.d/
+ install -m 755 $SRC/packages/bsp/cubox/brcm4330-patch $destination/etc/init.d/brcm4330-patch
+}
</pre>
 
When the process is completed, the <code>output/images</code> directory is populated with the following files:
<pre>
Armbian_5.91_Sbcspg_Debian_stretch_default_.img
Armbian_5.91_Sbcspg_Debian_stretch_default_.txt
</pre>
The <code>.img</code> is the one we need to deploy the root file system onto the target platform.
 
Even though it is not recommended, the build process was run natively on a PC equipped with Ubuntu 18.04.
==Deploying the root file system onto the target==
4,650
edits

Navigation menu