How to customize U-Boot with OSD335X on a custom board (memo)

Story up to the last time

Until OSD335X runs U-boot on a custom board (memo) https://qiita.com/nonNoise/items/ef6702fd666421bd5688

This story

Now that I can see how U-Boot works, let's talk about it.

Important commands mentioned in the previous talk

Patch U-Boot

wget -c https://rcn-ee.com/repos/git/u-boot-patches/v2018.01/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch wget -c https://rcn-ee.com/repos/git/u-boot-patches/v2018.01/0002-U-Boot-BeagleBone-Cape-Manager.patch wget -c https://raw.githubusercontent.com/RobertCNelson/Bootloader-Builder/master/patches/v2018.03-rc1/0002-NFM-Production-eeprom-assume-device-is-BeagleBone-Bl.patch

patch -p1 < 0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch patch -p1 < 0002-U-Boot-BeagleBone-Cape-Manager.patch patch -p1 < 0002-NFM-Production-eeprom-assume-device-is-BeagleBone-Bl.patch

U-Boot patch

I searched for U-Boot patches. I want to customize U-Boot for the original board. First, I looked at what Pach was doing in the first place. I was looking for the source, thinking that it was some compiled content, but I can't find it. I patched it before compiling ... maybe ... image.png

The patch file was usually a file with git diff information. I see, there was a patch command, so if you think there is a mechanism, is it such a mechanism? In that case, I wonder if I can make my own patch by grasping the patch difference, rewriting the source of U-Boot itself, and making the difference a patch. I see, I didn't know.

About each patch

If you look at the diff information of git, it is convenient to know at a glance which file you played with

◎ 0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch

image.png

◎ 0002-U-Boot-BeagleBone-Cape-Manager.patch

image.png

◎ 0002-NFM-Production-eeprom-assume-device-is-BeagleBone-Bl.patch

image.png

Patch expectations

Looking at the Diff, I found that the same files were processed by different patches, so I thought that if they were out of order, they would collide.

For the time being, one by one

◎ 0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch

It's the first patch to apply. am335x_pocketbeagle_defconfig has been modified the most. This is a U-Boot / configs block that sets which features to y / n.

◎ 0002-U-Boot-BeagleBone-Cape-Manager.patch

The next patch to apply. board / ti / am335x / board.c has changed the most. I feel like I'm patching the board here. In particular, the BeagleBone-Cape, a slightly newer board in the BeagleBone. https://github.com/u-boot/u-boot/tree/master/board/ti/am335x

◎ 0002-NFM-Production-eeprom-assume-device-is-BeagleBone-Bl.patch

The last patch I applied. board / ti / common / board_detect.c has changed the most. Since it is common, I feel that I am modifying the interface (external extension function) specific to the board. https://github.com/u-boot/u-boot/tree/master/board/ti/common

So where should I play after all?

do not know. After all, look at the basic U-boot source, then grasp the difference between the three types of patches, and apply the correction patch you want to do. Since it is a Diff, the corrected (deleted) part is displayed as a minus, so if you apply 3 types of patches for the time being and then play with the source and leave the Diff, I think that a highly reproducible U-Boot patch will be completed. ..

Feeling, I want to recreate the patch with the latest U-boot version, but that is probably a technique with difference understanding and source understanding.

Recommended Posts

How to customize U-Boot with OSD335X on a custom board (memo)
Until OSD335X runs U-boot on a custom board (memo)
How to operate Firefox with selenium on Windows Memo
A memo on how to overcome the difficult problem of capturing FX with AI
A memo on how to easily prepare a Linux exercise environment
How to add a package with PyCharm
A memo with Python2.7 and Python3 on CentOS
How to make a Backtrader custom indicator
How to test on a Django-authenticated page
How to run Cython on OSX Memo
How to draw a vertical line on a heatmap drawn with Python seaborn
How to read a CSV file with Python 2/3
How to send a message to LINE with curl
How to draw a 2-axis graph with pyplot
Strategy on how to monetize with Python Java
How to develop a cart app with Django
How to make a dictionary with a hierarchical structure.
How to install OpenGM on OSX with macports
How to live a decent life on 2017 Windows
How to create a multi-platform app with kivy
How to publish a blog on Amazon S3 with the static Blog engine'Pelican'for Pythonista
[Tentative] How to convert a character string to Shift_jis with kivy-ios Memo kivy v1.8.0
How to set a shared folder with the host OS in CentOS7 on VirtualBOX
A memo connected to HiveServer2 of EMR with python
A memo of how to use AIST supercomputer ABCI
[Python] How to draw a line graph with Matplotlib
How to create a submenu with the [Blender] plugin
How to deploy a Django application on Alibaba Cloud
How to convert a class object to a dictionary with SQLAlchemy
How to install Linux on a 32bit UEFI PC
How to make a shooting game with toio (Part 1)
[Go] How to create a custom error for Sentry
How to install caffe on OS X with macports
A memorandum on how to use keras.preprocessing.image in Keras
How to build a Django (python) environment on docker
[Python] A memo to write CSV vertically with Pandas
Autoencoder with Chainer (Notes on how to use + trainer)
[Python] How to create a 2D histogram with Matplotlib
How to run Django on IIS on a Windows server
Making a paper craft on Linux/macOS with OSS Memo
How to build a Python environment on amazon linux 2
[Python] How to draw a scatter plot with Matplotlib
How to connect to Cloud SQL PostgreSQL on Google Cloud Platform from a local environment with Java
[Shell startup] I tried to display the shell on the TV with a cheap Linux board G-cluster
How to use GitHub on a multi-person server without a password
How to deploy a web app made with Flask to Heroku
How to make a Cisco Webex Teams BOT with Flask
How to use Fujifilm X-T3 as a webcam on Ubuntu 20.04
How to put a hyperlink to "file: // hogehoge" with sphinx-> pdf
How to install NPI + send a message to line with python
How to install Python2.7 python3.5 with pyenv (on RHEL5 CentOS5) (2016 Nov)
Memo to get the value on the html-javascript side with jupyter
How to run a trained transformer model locally on CloudTPU
How to kill a process instantly with Python's Process Pool Executor
How to build a new python virtual environment on Ubuntu
How to output a document in pdf format with Sphinx
How to make a multiplayer online action game on Slack
[Ev3dev] How to display bmp image on LCD with python
How to create a flow mesh around a cylinder with snappyHexMesh
How to print characters as a table with Python's print function
How to mount a Windows 10 directory on Ubuntu-Server 20.04 on VMware Workstation 15