PineNote Development/Booting Linux

From PINE64
Revision as of 20:17, 27 August 2022 by Aarondabomb (talk | contribs)
Jump to navigation Jump to search

To boot linux, we need to patch stock uboot. I used charasyn's method, based off work from Dorian as credited in the script. We'll use the script to pull the uboot environment out of the stock uboot partition. We'll then apply the patch, recreate the image, add a configuration file, and flash the new image to the PineNote.

Steps to patch uboot

  1. Get the patch and the python tool:
$ mkdir pinenote-uboot && cd pinenote-uboot
$ curl https://gist.githubusercontent.com/charasyn/206b2537534b6679b0961be64cf9c35f/raw/cc513998a36fac0cea266260e3ca3e64abfe3696/boot-menu.patch -o boot-menu.patch
$ curl https://gist.githubusercontent.com/charasyn/206b2537534b6679b0961be64cf9c35f/raw/cc513998a36fac0cea266260e3ca3e64abfe3696/pinenote-uboot-envtool.py -o pinenote-uboot-envtool.py
$ chmod o+x pinenote-uboot-envtool.py
  1. Write your uboot partition to disk: dd if=/dev/mmcblk0p1 of=~/uboot.img
  2. Extract the environment: ./pinenote-uboot-envtool.py extract uboot.img uboot.env
  3. Poke around the files (or skip this if you don't like to learn...):
    1. Open uboot.env -- see, it's just text at this point!
    2. Open uboot.

Sources and further reading

U-boot with rockchip docs Helpful stack overflow to learn a bit about the boot process/terminology