Jump to content

Recommended Posts

Posted

Hi,

 

I have a OPi lite board and the U-boot model name shows Orange Pi One. Reason: It's patched as a "one" in u-boot-99-add-missing-boards.patch. I copied this file to the userpatches/u-boot/u-boot-dev directory and made some changes so it refered to the sun8i-h3-orangepi-lite.dts I created. (According to the user provided patches section) This didn't do the trick because it didn't override the original patch. No change and the patching log shows that the original patch is applied.

So obviously I did something wrong but I have no idea what. What I would like to achive is that I can control the green led on my board. (Pin PL10, signal name PWR-LED, signal name LED1 and component name LED-R in the schematics) If I stop the automatic boot and use the command gpio set PL10 I receive a warning that the output is still 0. My guess is that there is something wrong in the dts file of the one.

Question: What's the best way to actualy add the lite board so that selecting the board in the building script uses the lite board config files? Any help would be appriciated.

 

Regards,

 

Bor.

Posted

I have a OPi lite board and the U-boot model name shows Orange Pi One. Reason: It's patched as a "one" in u-boot-99-add-missing-boards.patch.

Orange Pi Lite uses config for Orange Pi One from upstream, we only patch DRAM frequency (for both boards)

From u-boot perspective One and Lite are identical (since there is no Ethernet support for H3 in u-boot yet)

 

I copied this file to the userpatches/u-boot/u-boot-dev directory and made some changes so it refered to the sun8i-h3-orangepi-lite.dts I created. (According to the user provided patches section) This didn't do the trick because it didn't override the original patch. No change and the patching log shows that the original patch is applied.

Patching log won't show any specific messages. If your patch has same file name, it will be used instead of original (maybe I should modify this to explicitly show that user provided patch was used).

To verify that your patch was applied you can check u-boot sources after compilation was finished (or use "printenv" in u-boot prompt to see if fdtfile environment variable did change)

 

What I would like to achive is that I can control the green led on my board. (Pin PL10, signal name PWR-LED, signal name LED1 and component name LED-R in the schematics) If I stop the automatic boot and use the command gpio set PL10 I receive a warning that the output is still 0. My guess is that there is something wrong in the dts file of the one.

Device tree in u-boot sources doesn't matter, you need to create one for the kernel (or compile it manually and put it to /boot/dtb directory on SD card). Also you don't need to patch anything to load another DTB file for the kernel, use something like "setenv fdtfile sun8i-h3-orangepi-lite.dtb" at the beginning of boot script to point u-boot to your new DT file.

 

Just to be sure - do you want to control LED from u-boot (i.e. in boot script) or from OS (via sysfs)? If you want to simply turn on this LED to act as "power led", there was a patch for u-boot 2016.05 to do this, but looks like it broke after u-boot updated to 2016.07, so I'm not sure that GPIO code in u-boot still works.

 

Question: What's the best way to actualy add the lite board so that selecting the board in the building script uses the lite board config files? Any help would be appriciated.

Again, right now from mainline kernel perspective these boards are identical. In order to properly separate them, you need to add separate u-boot config and separate DT file for the kernel.

Posted

Hi Zador,

 

Thanks for the reply.

I know the boards are the same for U-boot. (Except for the name of the board.) Not an issue but I wanted to try to add a new board to the boards supported by U-boot.

In my user patch file I removed the patches for the other boards and checked if the timestamp of those files changed. They did. I will check the ftdfile environment variable when my long term memory test run is finished.

Currently I'm only interested in U-boot because I can't set the green led. (It is also set in the boot script but that's also failing.) I have no problem setting the led in the OS. So the hardware is OK. (I don't use the vanilla kernel so I have a FEX-file.) I can set the red led in U-boot with gpio set PA15. (gpio code is working?) So I was looking for the differences between them in the dts file. The leds are treated different in the dts file. I want to debug this in U-boot without disturbing the original. Again the led itself is't important. I just want to get an idea what's the best way to make changes. (The ultimate goal is a fast boot but that's miles away.)

 

Edit:

I think I found my mistake. I copied the file from the u-boot-dev directory but that's not the directory that's in use. The u-boot-default directory is used and the other directories are ignored. Using the right directory overrides the patches and the log is showing this in the path name. (The u-boot-02-support-cheap-mmc.patch in the default seems to have problems.) Still interested in a supported way to make changes.

 

Regards,

 

Bor.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines