Difference between revisions of "PineNote Development/Booting Linux"
Jump to navigation
Jump to search
Aarondabomb (talk | contribs) (init) |
Aarondabomb (talk | contribs) m |
||
Line 1: | Line 1: | ||
To boot linux, we need to patch stock uboot. I used [https://gist.github.com/charasyn/206b2537534b6679b0961be64cf9c35f charasyn's method], based off work from Dorian as credited in the script. | To boot linux, we need to patch stock uboot. I used [https://gist.github.com/charasyn/206b2537534b6679b0961be64cf9c35f 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 == | == Steps to patch uboot == | ||
Line 10: | Line 10: | ||
$ chmod o+x pinenote-uboot-envtool.py | $ chmod o+x pinenote-uboot-envtool.py | ||
</pre> | </pre> | ||
# | # Write your uboot partition to disk: <code>dd if=/dev/mmcblk0p1 of=~/uboot.img</code> | ||
# Extract the environment: <code> ./pinenote-uboot-envtool.py extract uboot.img uboot.env</code> | |||
# Poke around the files (or skip this if you don't like to learn...): | |||
## Open <code>uboot.env</code> -- see, it's just text at this point! | |||
## Open <code>uboot. | |||
== Sources and further reading == | |||
[https://u-boot.readthedocs.io/en/latest/board/rockchip/rockchip.html U-boot with rockchip docs] | |||
[https://stackoverflow.com/questions/31244862/what-is-the-use-of-spl-secondary-program-loader Helpful stack overflow to learn a bit about the boot process/terminology] |
Revision as of 20:17, 27 August 2022
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
- 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
- Write your uboot partition to disk:
dd if=/dev/mmcblk0p1 of=~/uboot.img
- Extract the environment:
./pinenote-uboot-envtool.py extract uboot.img uboot.env
- Poke around the files (or skip this if you don't like to learn...):
- Open
uboot.env
-- see, it's just text at this point! - Open
uboot.
- Open
Sources and further reading
U-boot with rockchip docs
Helpful stack overflow to learn a bit about the boot process/terminology