From bc64b621cc880f5f21c492f2d526e27581475e87 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 20 Jan 2019 22:18:41 -0800 Subject: [PATCH] the factory image was still wrong --- boot-script/sdcard.cmd | 6 +++--- make-factory-sdcard/Makefile | 21 +++++++++++++++++++++ make-factory-sdcard/rc.local | 18 ++++++++++++++++++ u-boot/uboot | 9 +++++++++ 4 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 make-factory-sdcard/Makefile create mode 100755 make-factory-sdcard/rc.local diff --git a/boot-script/sdcard.cmd b/boot-script/sdcard.cmd index 99c8bbb..17ccd50 100644 --- a/boot-script/sdcard.cmd +++ b/boot-script/sdcard.cmd @@ -11,9 +11,9 @@ ### BOOT SCRIPT START #### ### BOOT SCRIPT START #### -ext4load mmc 1:1 ${ramdisk_addr_r} /boot/uInitrd-4.19.2-sunxi64 -ext4load mmc 1:1 ${kernel_addr_r} /boot/vmlinuz-4.19.2-sunxi64 -ext4load mmc 1:1 ${fdt_addr_r} /boot/dtb/allwinner/sun50i-a64-pinebook.dtb +ext4load mmc 0:1 ${ramdisk_addr_r} /boot/uInitrd-4.19.2-sunxi64 +ext4load mmc 0:1 ${kernel_addr_r} /boot/vmlinuz-4.19.2-sunxi64 +ext4load mmc 0:1 ${fdt_addr_r} /boot/dtb/allwinner/sun50i-a64-pinebook.dtb setenv bootargs 'root=/dev/mmcblk0p1 console=ttyS0,115200 console=tty0 3' diff --git a/make-factory-sdcard/Makefile b/make-factory-sdcard/Makefile new file mode 100644 index 0000000..ee49b9e --- /dev/null +++ b/make-factory-sdcard/Makefile @@ -0,0 +1,21 @@ +all: + echo make install-onto-sdcard + +install-onto-sdcard: + parted /dev/sdb mklabel msdos + parted /dev/sdb mkpart primary ext4 1MiB 8GB + parted /dev/sdb mkpart primary ext4 8GB 32GB + sleep 1 + mkfs.ext4 /dev/sdb1 + mkfs.ext4 /dev/sdb2 + e2label /dev/sdb1 root + e2label /dev/sdb2 factory-image + mount /dev/sdb1 /mnt/sdcard/ + dd if=/home/pinebook/u-boot-jcarr/u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1K seek=8 + cd /mnt/sdcard/ && rsync -av --progress /home/pinebook/factory/jcarr-factory-sdcard/ . + umount /mnt/sdcard + sync + mount /dev/sdb2 /mnt/sdcard-image/ + rsync -av --progress /home/pinebook/factory/community-builds/Armbian_5.69_Pinebook-a64_Ubuntu_bionic_next_4.19.13_desktop.img /mnt/sdcard-image/emmc.img + umount /mnt/sdcard-image/ + sync diff --git a/make-factory-sdcard/rc.local b/make-factory-sdcard/rc.local new file mode 100755 index 0000000..77196a8 --- /dev/null +++ b/make-factory-sdcard/rc.local @@ -0,0 +1,18 @@ +#!/bin/bash -x + +# mount /home/internal-mmc + +echo +echo +echo STARTING PINEBOOK IMAGING IN 5 SECONDS +echo STARTING PINEBOOK IMAGING IN 5 SECONDS +echo STARTING PINEBOOK IMAGING IN 5 SECONDS +echo STARTING PINEBOOK IMAGING IN 5 SECONDS +echo STARTING PINEBOOK IMAGING IN 5 SECONDS +echo +echo CONTROL-C TO STOP +echo + +sleep 10 + +mount /dev/mmcblk0p2 /home/factory diff --git a/u-boot/uboot b/u-boot/uboot index c3383b9..01679c1 100755 --- a/u-boot/uboot +++ b/u-boot/uboot @@ -31,6 +31,15 @@ case "$1" in ;; cross) echo export CROSS_COMPILE=/home/pinebook/cross-compilers/gcc-linaro/bin/aarch64-linux-gnu- + echo builds normally under arch: + echo '[root@alarm ~]# gcc -v' + echo 'Using built-in specs.' + echo 'COLLECT_GCC=gcc' + echo 'COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-unknown-linux-gnu/8.2.0/lto-wrapper' + echo 'Target: aarch64-unknown-linux-gnu' + echo 'Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://github.com/archlinuxarm/PKGBUILDs/issues --enable-languages=c,c++,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu --with-arch=armv8-a --enable-fix-cortex-a53-835769 --enable-fix-cortex-a53-843419' + echo 'Thread model: posix' + echo 'gcc version 8.2.0 (GCC)' ;; build) make pinebook_defconfig