From Denim Gorilla, 4 Months ago, written in Plain Text.
This paste will shuffle off the mortal coil in 6 Months.
Embed
  1.  
  2. armtix on pinephone
  3.  
  4. Partitions
  5. - sd card patition table should be mbr
  6. - make a 250mb fat32 boot partition after 5mb unpartitioned space
  7. - flag the partition as boot (required?)
  8. - make the ext4 system partition, leave 5mb unpartitioned space at the end
  9. Requirements
  10.  pacman -S u-boot-tools aarch64-linux-gnu-gcc swig
  11. U-Boot
  12. - clone uboot and arm trusted platform
  13.  git clone https://source.denx.de/u-boot/u-boot.git
  14.  git clone https://github.com/ARM-software/arm-trusted-firmware.git
  15. - compile arm trusted platform and copy the image, if working on arm remove the cross compile flag
  16.  cd arm-trusted-firmware
  17.  make CROSS_COMPILE=aarch64-linux-gnu- PLAT=sun50i_a64
  18.  cp ~/arm-trusted-firmware/build/sun50i_a64/release/bl31.bin ~/u-boot/
  19. - set flags and compile uboot
  20.  cd ~/u-boot
  21.  export CROSS_COMPILE=aarch64-linux-gnu-
  22.  export BL31=bl31.bin
  23.  export ARCH=arm64
  24.  make pinephone_defconfig
  25.  make all -j
  26. - copy uboot to the sd card
  27.  dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
  28. Data
  29. - get and extract the armtix filesystem to ~/armtixfs/ and mount the sd card partitions
  30. - copy the boot directory and the filesystem to the sd partitions
  31.  rsync -avxHAX --progress ~/armtixfs/boot/* /mnt/bootp (your path to sd boot partition)
  32.  rsync -avxHAX --progress ~/armtixfs/* /mnt/systemp (your path to sd system partition)
  33. Kernel
  34. - enter the sd boot partition and make the initramfs
  35.  cd /mnt/bootp
  36.  mkimage -A arm64 -T ramdisk -d /mnt/bootp/initramfs-linux.img mkinitramfs-linux.uimg
  37. - create the boot config file "uboot.cmd":
  38. env setenv bootargs console=${console} console=tty0 root=/dev/mmcblk0p2 rw rootwait quiet
  39. load mmc 1:1 ${fdt_addr_r} /dtbs/allwinner/sun50i-a64-pinephone-1.2.dtb
  40. load mmc 1:1 ${kernel_addr_r} /Image
  41. load mmc 1:1 ${ramdisk_addr_r} /initramfs-linux.uimg
  42. booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
  43. -
  44.  on the emmc the root device is: root=/dev/mmcblk2p2
  45. - make the kernel image
  46. mkimage -A arm64 -T ramdisk -d uboot.cmd boot.scr
  47. - boot
  48. - use the audio jack uart to access or ...
  49.