board: Add support for LePotato
cover board: Add support for LePotato
Hello everyone,
Here is my first version of this series that adds the support of the board LePotato SBC from LibreComputer [1].
This board uses FIP utilities [2][3] from AMLogic to sign u-boot. The patch 02 is adding these FIP utilities as a host package. It is available for different boards such as khadas-vim, some odroids, etc. This package will copy the corresponding utilities, only for LePotato for the moment, into the HOST_DIR/usr/bin. Currently, LePotato's ones are the default ones. This should be updating once more boards are added.
The patch 03 is adding the support of this board from LibreComputer:
- one defconfig including a u-boot, kernel and minimal rootfs. The configuration is also enabling the FIP package for LePotato.
- one post-build script that is using the FIP utilities to sign u-boot binary.
- one post-image script to generate a sd-card image and flashing the signed u-boot on it.
- a readme file to explain how to configure, compile and flash image for this board.
- a boot.scr file including booti commands to run.
Let me know if you have any comments on this series.
Best regards,
Myl?ne
[1]: https://libre.computer/products/boards/aml-s905x-cc/
[2]: https://github.com/LibreELEC/amlogic-boot-fip
[3]: https://github.com/BayLibre/u-boot
Myl?ne Josserand (3):
DEVELOPERS: Update Mylene's email
package: Add new fip package
configs/lepotato: Add new defconfig
.gitlab-ci.yml | 1 + DEVELOPERS | 4 +- board/librecomputer/lepotato/boot.cmd | 6 +++ board/librecomputer/lepotato/genimage.cfg | 28 ++++++++++ board/librecomputer/lepotato/post-build.sh | 61 ++++++++++++++++++++++ board/librecomputer/lepotato/post-image.sh | 17 ++++++ board/librecomputer/lepotato/readme.txt | 35 +++++++++++++ configs/lepotato_defconfig | 29 ++++++++++ package/Config.in.host | 1 + package/fip/Config.in.host | 17 ++++++ package/fip/fip.hash | 2 + package/fip/fip.mk | 30 +++++++++++ 12 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 board/librecomputer/lepotato/boot.cmd create mode 100644 board/librecomputer/lepotato/genimage.cfg create mode 100755 board/librecomputer/lepotato/post-build.sh create mode 100755 board/librecomputer/lepotato/post-image.sh create mode 100644 board/librecomputer/lepotato/readme.txt create mode 100644 configs/lepotato_defconfig create mode 100644 package/fip/Config.in.host create mode 100644 package/fip/fip.hash create mode 100644 package/fip/fip.mk
Signature · 1 line
2.27.0
PATCH 1/3 DEVELOPERS: Update Mylene's email
--- DEVELOPERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
DEVELOPERS +1 -1
@@ -1843,7 +1843,7 @@ N: Murat Demirten <[email protected]> F: package/jpeg-turbo/ F: package/libgeotiff/ -N: Myl?ne Josserand <[email protected]> +N: Myl?ne Josserand <[email protected]> F: package/rtl8723bu/ N: Nathaniel Roach <[email protected]>
Signature · 1 line
2.27.0
PATCH 2/3 package: Add new fip package
In reply to Mylène JosserandFirmware Image Pacakge (FIP) is used to sign Amlogic u-boot binaries. It is a host package as it is only binaries to call on u-boot image to sign it. One tool is a python script that needs to be called with 'python' command, otherwise, it is not working. That is why there is a dependency on host-python.
For the moment, only LePotato's board is supported. Other ones may be added later, if needed.
--- package/Config.in.host | 1 + package/fip/Config.in.host | 17 +++++++++++++++++ package/fip/fip.hash | 2 ++ package/fip/fip.mk | 30 ++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 package/fip/Config.in.host create mode 100644 package/fip/fip.hash create mode 100644 package/fip/fip.mk
package/Config.in.host +1 -0
@@ -24,6 +24,7 @@ menu "Host utilities" source "package/f2fs-tools/Config.in.host" source "package/faketime/Config.in.host" source "package/fatcat/Config.in.host" + source "package/fip/Config.in.host" source "package/fwup/Config.in.host" source "package/genext2fs/Config.in.host" source "package/genimage/Config.in.host"
package/fip/Config.in.host new file +17 -0
@@ -0,0 +1,17 @@ +config BR2_PACKAGE_HOST_FIP + bool "host Amlogic FIP binaries" + help + This package contains the FIP utilities, that is + used to create U-Boot final binary. + +if BR2_PACKAGE_HOST_FIP + +config BR2_PACKAGE_HOST_FIP_LEPOTATO + bool "FIP lepotato version" + default y + select BR2_PACKAGE_HOST_PYTHON3 + help + This option will download the latest libretech-cc's version + of the fip utility for the board "lepotato". + +endif
package/fip/fip.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed +sha256 7a59dc36c89b02c38f9b630b4abb7056869ff76ca6152b6c3ce797ddd1349a64 fip-bfdad4cc520b254813536ebfba8b9749386cd57c.tar.gz
package/fip/fip.mk new file +30 -0
@@ -0,0 +1,30 @@ +################################################################################ +# +# fip +# +################################################################################ + +FIP_VERSION = bfdad4cc520b254813536ebfba8b9749386cd57c +FIP_SITE = $(call github,LibreELEC,amlogic-boot-fip,$(FIP_VERSION)) +FIP_LICENSE = PROPRIETARY +FIP_DEPENDENCIES = host-python3 + +ifeq ($(BR2_PACKAGE_HOST_FIP_LEPOTATO),y) +HOST_FIP_LEPOTATO_BINARIES += lepotato/bl2.bin lepotato/acs.bin \ + lepotato/bl21.bin lepotato/bl30.bin \ + lepotato/bl301.bin lepotato/bl31.img \ + lepotato/blx_fix.sh lepotato/acs_tool.py lepotato/aml_encrypt_gxl +endif + +define HOST_FIP_INSTALL_SUBDIR + $(INSTALL) -m 0755 -d $(HOST_DIR)/usr/bin/fip/ +endef + +define HOST_FIP_INSTALL_CMDS + $(foreach b,$(HOST_FIP_LEPOTATO_BINARIES), + $(INSTALL) -D -m 755 $(@D)/$(b) $(HOST_DIR)/usr/bin/fip/) +endef + +HOST_FIP_PRE_INSTALL_HOOKS += HOST_FIP_INSTALL_SUBDIR + +$(eval $(host-generic-package))
Signature · 1 line
2.27.0
PATCH 2/3 package: Add new fip package
Hi Myl?ne,
Le 07/07/2020 ? 09:53, Myl?ne Josserand a ?crit?:
Quoted 8 lines
Firmware Image Pacakge (FIP) is used to sign Amlogic u-boot binaries. It is a host package as it is only binaries to call on u-boot image to sign it. One tool is a python script that needs to be called with 'python' command, otherwise, it is not working. That is why there is a dependency on host-python.
For the moment, only LePotato's board is supported. Other ones may be added later, if needed.
We had a previous contribution about LePotato board from Baylibre [1]. There are several concerns about licensing, aml_encrypt_gxl and acs_tool.py.
What about gxlimg to replace aml_encrypt_gxl?
[1]
http://patchwork.ozlabs.org/project/buildroot/patch/1533545408-11248-2-git-send-email-narmstrong at baylibre.com/
[2] https://github.com/repk/gxlimg
Best regards,
Romain
Quoted 92 lines
Signed-off-by Myl?ne Josserand <[email protected]>--- package/Config.in.host | 1 + package/fip/Config.in.host | 17 +++++++++++++++++ package/fip/fip.hash | 2 ++ package/fip/fip.mk | 30 ++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 package/fip/Config.in.host create mode 100644 package/fip/fip.hash create mode 100644 package/fip/fip.mkpackage/Config.in.host +1
-0@@ -24,6 +24,7 @@ menu "Host utilities" source "package/f2fs-tools/Config.in.host" source "package/faketime/Config.in.host" source "package/fatcat/Config.in.host" + source "package/fip/Config.in.host" source "package/fwup/Config.in.host" source "package/genext2fs/Config.in.host" source "package/genimage/Config.in.host"package/fip/Config.in.host new file +17
-0@@ -0,0 +1,17 @@ +config BR2_PACKAGE_HOST_FIP + bool "host Amlogic FIP binaries" + help + This package contains the FIP utilities, that is + used to create U-Boot final binary. + +if BR2_PACKAGE_HOST_FIP + +config BR2_PACKAGE_HOST_FIP_LEPOTATO + bool "FIP lepotato version" + default y + select BR2_PACKAGE_HOST_PYTHON3 + help + This option will download the latest libretech-cc's version + of the fip utility for the board "lepotato". + +endifpackage/fip/fip.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally computed +sha256 7a59dc36c89b02c38f9b630b4abb7056869ff76ca6152b6c3ce797ddd1349a64 fip-bfdad4cc520b254813536ebfba8b9749386cd57c.tar.gzpackage/fip/fip.mk new file +30
-0@@ -0,0 +1,30 @@ +################################################################################ +# +# fip +# +################################################################################ + +FIP_VERSION = bfdad4cc520b254813536ebfba8b9749386cd57c +FIP_SITE = $(call github,LibreELEC,amlogic-boot-fip,$(FIP_VERSION)) +FIP_LICENSE = PROPRIETARY +FIP_DEPENDENCIES = host-python3 + +ifeq ($(BR2_PACKAGE_HOST_FIP_LEPOTATO),y) +HOST_FIP_LEPOTATO_BINARIES += lepotato/bl2.bin lepotato/acs.bin \ + lepotato/bl21.bin lepotato/bl30.bin \ + lepotato/bl301.bin lepotato/bl31.img \ + lepotato/blx_fix.sh lepotato/acs_tool.py lepotato/aml_encrypt_gxl +endif + +define HOST_FIP_INSTALL_SUBDIR + $(INSTALL) -m 0755 -d $(HOST_DIR)/usr/bin/fip/ +endef + +define HOST_FIP_INSTALL_CMDS + $(foreach b,$(HOST_FIP_LEPOTATO_BINARIES), + $(INSTALL) -D -m 755 $(@D)/$(b) $(HOST_DIR)/usr/bin/fip/) +endef + +HOST_FIP_PRE_INSTALL_HOOKS += HOST_FIP_INSTALL_SUBDIR + +$(eval $(host-generic-package))
PATCH 2/3 package: Add new fip package
Hi Romain,
Thank you for the review!
Quoted 9 lines · Romain Naour
Hi Myl?ne,
Le 07/07/2020 ? 09:53, Myl?ne Josserand a ?crit?:
Quoted 6 lines
Firmware Image Pacakge (FIP) is used to sign Amlogic u-boot binaries. It is a host package as it is only binaries to call on u-boot image to sign it. One tool is a python script that needs to be called with 'python' command, otherwise, it is not working. That is why there is a dependency on host-python.
Quoted 5 lines
Quoted 2 lines
For the moment, only LePotato's board is supported. Other ones may be added later, if needed.
We had a previous contribution about LePotato board from Baylibre [1]. There are several concerns about licensing,
aml_encrypt_gxlandacs_tool.py.
oh, indeed, I missed that one.
Quoted 2 lines
What about gxlimg to replace
aml_encrypt_gxl?
Thanks for the link, I will try it, indeed but I guess my patches are lapsed because of these license issues, right?
Quoted 7 lines
[1]
http://patchwork.ozlabs.org/project/buildroot/patch/1533545408-11248-2-git-send-email-narmstrong at baylibre.com/
[2] https://github.com/repk/gxlimgBest regards,
Romain
Best regards,
Myl?ne
Quoted 94 lines
Quoted 93 lines
Signed-off-by Myl?ne Josserand <[email protected]>--- package/Config.in.host | 1 + package/fip/Config.in.host | 17 +++++++++++++++++ package/fip/fip.hash | 2 ++ package/fip/fip.mk | 30 ++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+)create mode 100644 package/fip/Config.in.host
create mode 100644 package/fip/fip.hash
create mode 100644package/fip/fip.mkpackage/Config.in.host +1
-0@@ -24,6 +24,7 @@ menu "Host utilities" source "package/f2fs-tools/Config.in.host" source "package/faketime/Config.in.host" source "package/fatcat/Config.in.host" + source "package/fip/Config.in.host" source "package/fwup/Config.in.host" source "package/genext2fs/Config.in.host" source "package/genimage/Config.in.host"package/fip/Config.in.host new file +17
-0@@ -0,0 +1,17 @@ +config BR2_PACKAGE_HOST_FIP + bool "host Amlogic FIP binaries" + help + This package contains the FIP utilities, that is + used to create U-Boot final binary. + +if BR2_PACKAGE_HOST_FIP + +config BR2_PACKAGE_HOST_FIP_LEPOTATO + bool "FIP lepotato version" + default y + select BR2_PACKAGE_HOST_PYTHON3 + help + This option will download the latest libretech-cc's version + of the fip utility for the board "lepotato". + +endifpackage/fip/fip.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally computed +sha256 7a59dc36c89b02c38f9b630b4abb7056869ff76ca6152b6c3ce797ddd1349a64 fip-bfdad4cc520b254813536ebfba8b9749386cd57c.tar.gzpackage/fip/fip.mk new file +30
-0@@ -0,0 +1,30 @@ +################################################################################ +# +# fip +# +################################################################################ + +FIP_VERSION = bfdad4cc520b254813536ebfba8b9749386cd57c +FIP_SITE = $(call github,LibreELEC,amlogic-boot-fip,$(FIP_VERSION)) +FIP_LICENSE = PROPRIETARY +FIP_DEPENDENCIES = host-python3 + +ifeq ($(BR2_PACKAGE_HOST_FIP_LEPOTATO),y) +HOST_FIP_LEPOTATO_BINARIES += lepotato/bl2.bin lepotato/acs.bin \ + lepotato/bl21.bin lepotato/bl30.bin \ + lepotato/bl301.bin lepotato/bl31.img \ + lepotato/blx_fix.sh lepotato/acs_tool.py lepotato/aml_encrypt_gxl +endif + +define HOST_FIP_INSTALL_SUBDIR + $(INSTALL) -m 0755 -d $(HOST_DIR)/usr/bin/fip/ +endef + +define HOST_FIP_INSTALL_CMDS + $(foreach b,$(HOST_FIP_LEPOTATO_BINARIES), + $(INSTALL) -D -m 755 $(@D)/$(b) $(HOST_DIR)/usr/bin/fip/) +endef + +HOST_FIP_PRE_INSTALL_HOOKS += HOST_FIP_INSTALL_SUBDIR + +$(eval $(host-generic-package))
PATCH 2/3 package: Add new fip package
Hi Myl?ne,
Le 07/07/2020 ? 16:18, Mylene Josserand a ?crit?:
Quoted 3 lines
Hi Romain,
Thank you for the review!
You're welcome.
Quoted 11 lines · Romain Naour
Quoted 9 lines
Hi Myl?ne,
Le 07/07/2020 ? 09:53, Myl?ne Josserand a ?crit?:
Quoted 6 lines
Firmware Image Pacakge (FIP) is used to sign Amlogic u-boot binaries. It is a host package as it is only binaries to call on u-boot image to sign it. One tool is a python script that needs to be called with 'python' command, otherwise, it is not working. That is why there is a dependency on host-python.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
For the moment, only LePotato's board is supported. Other ones may be added later, if needed.
We had a previous contribution about LePotato board from Baylibre [1]. There are several concerns about licensing,
aml_encrypt_gxlandacs_tool.py.oh, indeed, I missed that one.
No problem, those patches date from August 2018.
Quoted 6 lines
Quoted 3 lines
What about gxlimg to replace
aml_encrypt_gxl?Thanks for the link, I will try it, indeed but I guess my patches are lapsed because of these license issues, right?
I'm afraid yes. LibreELEC doesn't provide any licensing information in their repository. I'm not sure if we should use LibreELEC or Baylibre repository...
Best regards,
Romain
Quoted 111 lines
Quoted 9 lines
[1]
http://patchwork.ozlabs.org/project/buildroot/patch/1533545408-11248-2-git-send-email-narmstrong at baylibre.com/[2] https://github.com/repk/gxlimg
Best regards,
RomainBest regards,
Myl?neQuoted 97 lines
Quoted 96 lines
Signed-off-by Myl?ne Josserand <[email protected]>---
? package/Config.in.host???? |? 1 + ? package/fip/Config.in.host | 17 +++++++++++++++++ ? package/fip/fip.hash?????? |? 2 ++ ? package/fip/fip.mk???????? | 30 ++++++++++++++++++++++++++++++? 4 files changed, 50 insertions(+)
? create mode 100644 package/fip/Config.in.host
? create mode 100644 package/fip/fip.hash
? create mode 100644package/fip/fip.mkpackage/Config.in.host +0
-0@@ -24,6 +24,7 @@ menu "Host utilities"????? source "package/f2fs-tools/Config.in.host"
????? source "package/faketime/Config.in.host"
????? source "package/fatcat/Config.in.host"
+??? source "package/fip/Config.in.host"
????? source "package/fwup/Config.in.host"
????? source "package/genext2fs/Config.in.host"
????? source "package/genimage/Config.in.host"package/fip/Config.in.host new file +17
-0@@ -0,0 +1,17 @@ +config BR2_PACKAGE_HOST_FIP +??? bool "host Amlogic FIP binaries" +??? help +????? This package contains the FIP utilities, that is +????? used to create U-Boot final binary. + +if BR2_PACKAGE_HOST_FIP + +config BR2_PACKAGE_HOST_FIP_LEPOTATO +??? bool "FIP lepotato version" +??? default y +??? select BR2_PACKAGE_HOST_PYTHON3 +??? help +????? This option will download the latest libretech-cc's version +????? of the fip utility for the board "lepotato". + +endifpackage/fip/fip.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally computed +sha256 7a59dc36c89b02c38f9b630b4abb7056869ff76ca6152b6c3ce797ddd1349a64?fip-bfdad4cc520b254813536ebfba8b9749386cd57c.tar.gz
package/fip/fip.mk new file +30
-0@@ -0,0 +1,30 @@ +################################################################################ +# +# fip +# +################################################################################ + +FIP_VERSION = bfdad4cc520b254813536ebfba8b9749386cd57c +FIP_SITE = $(call github,LibreELEC,amlogic-boot-fip,$(FIP_VERSION)) +FIP_LICENSE = PROPRIETARY +FIP_DEPENDENCIES = host-python3 + +ifeq ($(BR2_PACKAGE_HOST_FIP_LEPOTATO),y) +HOST_FIP_LEPOTATO_BINARIES += lepotato/bl2.bin lepotato/acs.bin \ +??????????? lepotato/bl21.bin lepotato/bl30.bin \ +??????????? lepotato/bl301.bin lepotato/bl31.img \ +??????????? lepotato/blx_fix.sh lepotato/acs_tool.py lepotato/aml_encrypt_gxl +endif + +define HOST_FIP_INSTALL_SUBDIR +??? $(INSTALL) -m 0755 -d $(HOST_DIR)/usr/bin/fip/ +endef + +define HOST_FIP_INSTALL_CMDS +??? $(foreach b,$(HOST_FIP_LEPOTATO_BINARIES), +??????? $(INSTALL) -D -m 755 $(@D)/$(b) $(HOST_DIR)/usr/bin/fip/) +endef + +HOST_FIP_PRE_INSTALL_HOOKS += HOST_FIP_INSTALL_SUBDIR + +$(eval $(host-generic-package))
PATCH 2/3 package: Add new fip package
Hello,
Quoted 32 lines · Romain Naour
Hi Myl?ne,
Le 07/07/2020 ? 16:18, Mylene Josserand a ?crit?:
Quoted 3 lines
Hi Romain,
Thank you for the review!
You're welcome.
Quoted 11 lines · Romain Naour
Quoted 9 lines
Hi Myl?ne,
Le 07/07/2020 ? 09:53, Myl?ne Josserand a ?crit?:
Quoted 6 lines
Firmware Image Pacakge (FIP) is used to sign Amlogic u-boot binaries. It is a host package as it is only binaries to call on u-boot image to sign it. One tool is a python script that needs to be called with 'python' command, otherwise, it is not working. That is why there is a dependency on host-python.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
For the moment, only LePotato's board is supported. Other ones may be added later, if needed.
We had a previous contribution about LePotato board from Baylibre [1]. There are several concerns about licensing,
aml_encrypt_gxlandacs_tool.py.oh, indeed, I missed that one.
No problem, those patches date from August 2018.
Quoted 2 lines
Quoted 2 lines
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
What about gxlimg to replace
aml_encrypt_gxl?Thanks for the link, I will try it, indeed but I guess my patches are lapsed because of these license issues, right?
I'm afraid yes. LibreELEC doesn't provide any licensing information in their repository. I'm not sure if we should use LibreELEC or Baylibre repository...
okay, thank you
Yes, I am not sure too, I thought that LibreElec was more appropriate but without any conviction :)
Best regards,
Myl?ne
Quoted 116 lines
Best regards,
RomainQuoted 111 lines
Quoted 9 lines
[1]
http://patchwork.ozlabs.org/project/buildroot/patch/1533545408-11248-2-git-send-email-narmstrong at baylibre.com/[2] https://github.com/repk/gxlimg
Best regards,
RomainBest regards,
Myl?neQuoted 97 lines
Quoted 96 lines
Signed-off-by Myl?ne Josserand <[email protected]>---
? package/Config.in.host???? |? 1 + ? package/fip/Config.in.host | 17 +++++++++++++++++ ? package/fip/fip.hash?????? |? 2 ++ ? package/fip/fip.mk???????? | 30 ++++++++++++++++++++++++++++++? 4 files changed, 50 insertions(+)
? create mode 100644 package/fip/Config.in.host
? create mode 100644 package/fip/fip.hash
? create mode 100644package/fip/fip.mkpackage/Config.in.host +1
-0@@ -24,6 +24,7 @@ menu "Host utilities" ????? source "package/f2fs-tools/Config.in.host" ????? source "package/faketime/Config.in.host" ????? source "package/fatcat/Config.in.host" +??? source "package/fip/Config.in.host" ????? source "package/fwup/Config.in.host" ????? source "package/genext2fs/Config.in.host" ????? source "package/genimage/Config.in.host"package/fip/Config.in.host new file +17
-0@@ -0,0 +1,17 @@ +config BR2_PACKAGE_HOST_FIP +??? bool "host Amlogic FIP binaries" +??? help +????? This package contains the FIP utilities, that is +????? used to create U-Boot final binary. + +if BR2_PACKAGE_HOST_FIP + +config BR2_PACKAGE_HOST_FIP_LEPOTATO +??? bool "FIP lepotato version" +??? default y +??? select BR2_PACKAGE_HOST_PYTHON3 +??? help +????? This option will download the latest libretech-cc's version +????? of the fip utility for the board "lepotato". + +endifpackage/fip/fip.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally computed +sha256 7a59dc36c89b02c38f9b630b4abb7056869ff76ca6152b6c3ce797ddd1349a64fip-bfdad4cc520b254813536ebfba8b9749386cd57c.tar.gz
package/fip/fip.mk new file +30
-0@@ -0,0 +1,30 @@ +################################################################################ +# +# fip +# +################################################################################ + +FIP_VERSION = bfdad4cc520b254813536ebfba8b9749386cd57c +FIP_SITE = $(call github,LibreELEC,amlogic-boot-fip,$(FIP_VERSION)) +FIP_LICENSE = PROPRIETARY +FIP_DEPENDENCIES = host-python3 + +ifeq ($(BR2_PACKAGE_HOST_FIP_LEPOTATO),y) +HOST_FIP_LEPOTATO_BINARIES += lepotato/bl2.bin lepotato/acs.bin \ +??????????? lepotato/bl21.bin lepotato/bl30.bin \ +??????????? lepotato/bl301.bin lepotato/bl31.img \ +??????????? lepotato/blx_fix.sh lepotato/acs_tool.py lepotato/aml_encrypt_gxl +endif + +define HOST_FIP_INSTALL_SUBDIR +??? $(INSTALL) -m 0755 -d $(HOST_DIR)/usr/bin/fip/ +endef + +define HOST_FIP_INSTALL_CMDS +??? $(foreach b,$(HOST_FIP_LEPOTATO_BINARIES), +??????? $(INSTALL) -D -m 755 $(@D)/$(b) $(HOST_DIR)/usr/bin/fip/) +endef + +HOST_FIP_PRE_INSTALL_HOOKS += HOST_FIP_INSTALL_SUBDIR + +$(eval $(host-generic-package))
PATCH 3/3 configs/lepotato: Add new defconfig
In reply to Mylène JosserandAdd a basic support for the Libre Computer board called "Le Potato". One particularity is that this board is using FIP utilities to sign a mainline u-boot. The defconfig reflects that.
The final image produced is a sd-card image.
--- .gitlab-ci.yml | 1 + DEVELOPERS | 2 + board/librecomputer/lepotato/boot.cmd | 6 +++ board/librecomputer/lepotato/genimage.cfg | 28 ++++++++++ board/librecomputer/lepotato/post-build.sh | 61 ++++++++++++++++++++++ board/librecomputer/lepotato/post-image.sh | 17 ++++++ board/librecomputer/lepotato/readme.txt | 35 +++++++++++++ configs/lepotato_defconfig | 29 ++++++++++ 8 files changed, 179 insertions(+) create mode 100644 board/librecomputer/lepotato/boot.cmd create mode 100644 board/librecomputer/lepotato/genimage.cfg create mode 100755 board/librecomputer/lepotato/post-build.sh create mode 100755 board/librecomputer/lepotato/post-image.sh create mode 100644 board/librecomputer/lepotato/readme.txt create mode 100644 configs/lepotato_defconfig
.gitlab-ci.yml +1 -0
@@ -215,6 +215,7 @@ imx8mmpico_defconfig: { extends: .defconfig } imx8mpico_defconfig: { extends: .defconfig } lafrite_defconfig: { extends: .defconfig } lego_ev3_defconfig: { extends: .defconfig } +lepotato_defconfig: { extends: .defconfig } licheepi_zero_defconfig: { extends: .defconfig } linksprite_pcduino_defconfig: { extends: .defconfig } minnowboard_max-graphical_defconfig: { extends: .defconfig }
DEVELOPERS +2 -0
@@ -1845,6 +1845,8 @@ F: package/libgeotiff/ N: Myl?ne Josserand <[email protected]> F: package/rtl8723bu/ +F: board/librecomputer/lepotato/ +F: configs/lepotato_defconfig N: Nathaniel Roach <[email protected]> F: package/bandwidthd/
board/librecomputer/lepotato/boot.cmd new file +6 -0
@@ -0,0 +1,6 @@ +setenv bootargs console=ttyAML0,115200 earlyprintk root=/dev/mmcblk1p2 rootwait + +fatload mmc 0 $kernel_addr_r Image +fatload mmc 0 $fdt_addr_r meson-gxl-s905x-libretech-cc.dtb + +booti $kernel_addr_r - $fdt_addr_r
board/librecomputer/lepotato/genimage.cfg new file +28 -0
@@ -0,0 +1,28 @@ +image boot.vfat { + vfat { + files = { + "Image", + "meson-gxl-s905x-libretech-cc.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 1M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +}
board/librecomputer/lepotato/post-build.sh new file +61 -0
61 lines not on this page · raw message
board/librecomputer/lepotato/post-image.sh new file +17 -0
@@ -0,0 +1,17 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +dd if=${BINARIES_DIR}/u-boot.bin.sd.bin of=${BINARIES_DIR}/sdcard.img conv=fsync,notrunc bs=1 count=442 status=progress +dd if=${BINARIES_DIR}/u-boot.bin.sd.bin of=${BINARIES_DIR}/sdcard.img conv=fsync,notrunc bs=512 skip=1 seek=1 status=progress
board/librecomputer/lepotato/readme.txt new file +35 -0
@@ -0,0 +1,35 @@ +Intro +===== + +Libre Computer "Le Potato" is a low cost SBC based around an Amlogic +s905xcc SoC (quad Cortex-A53) including 2GB DDR3. To see its specification, +look at the website: + +https://libre.computer/products/boards/aml-s905x-cc/ + +How to build it +=============== + +Configure Buildroot: + + $ make lepotato_defconfig + +Compile everything and build the SD-card image: + + $ make + +How to write the SD-card image +====================================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the image "sdcard.img" onto a SD-card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX status=progress + +How to boot +=========== + +Insert the SD-card in the slot and power up board. The system will boot +automatically.
configs/lepotato_defconfig new file +29 -0
@@ -0,0 +1,29 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/librecomputer/lepotato/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/librecomputer/lepotato/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.2.14" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="amlogic/meson-gxl-s905x-libretech-cc" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="65M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="libretech-cc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/librecomputer/lepotato/boot.cmd" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_FIP=y +BR2_PACKAGE_HOST_FIP_LEPOTATO=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y
Signature · 1 line
2.27.0
Yann E. MORIN
Appliedcover board: Add support for LePotato
In reply to Mylène JosserandMyl?ne, All,
On 2020-07-07 09:53 +0200, Myl?ne Josserand spake thusly:
Quoted 4 lines
Here is my first version of this series that adds the support of the board LePotato SBC from LibreComputer [1].
This board uses FIP utilities [2][3] from AMLogic to sign u-boot.
Following the issues raised by Romain, I've marked patches 2-3 as "changes requested". Hopefully, gslimg is an interesting trail to follow as a free/libre replacement for the vendor stuff.
I've applied patch 1 to master, thanks.
Regards,
Yann E. MORIN.
Quoted 62 lines
The patch 02 is adding these FIP utilities as a host package. It is available for different boards such as khadas-vim, some odroids, etc. This package will copy the corresponding utilities, only for LePotato for the moment, into the HOST_DIR/usr/bin. Currently, LePotato's ones are the default ones. This should be updating once more boards are added.
The patch 03 is adding the support of this board from LibreComputer:
- one defconfig including a u-boot, kernel and minimal rootfs. The configuration is also enabling the FIP package for LePotato.
- one post-build script that is using the FIP utilities to sign u-boot binary.
- one post-image script to generate a sd-card image and flashing the signed u-boot on it.
- a readme file to explain how to configure, compile and flash image for this board.
- a boot.scr file including booti commands to run.Let me know if you have any comments on this series.
Best regards,
Myl?ne
[1]: https://libre.computer/products/boards/aml-s905x-cc/
[2]: https://github.com/LibreELEC/amlogic-boot-fip
[3]: https://github.com/BayLibre/u-bootMyl?ne Josserand (3):
DEVELOPERS: Update Mylene's email
package: Add new fip package
configs/lepotato: Add new defconfig.gitlab-ci.yml | 1 + DEVELOPERS | 4 +- board/librecomputer/lepotato/boot.cmd | 6 +++ board/librecomputer/lepotato/genimage.cfg | 28 ++++++++++ board/librecomputer/lepotato/post-build.sh | 61 ++++++++++++++++++++++ board/librecomputer/lepotato/post-image.sh | 17 ++++++ board/librecomputer/lepotato/readme.txt | 35 +++++++++++++ configs/lepotato_defconfig | 29 ++++++++++ package/Config.in.host | 1 + package/fip/Config.in.host | 17 ++++++ package/fip/fip.hash | 2 + package/fip/fip.mk | 30 +++++++++++ 12 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 board/librecomputer/lepotato/boot.cmd create mode 100644 board/librecomputer/lepotato/genimage.cfg create mode 100755 board/librecomputer/lepotato/post-build.sh create mode 100755 board/librecomputer/lepotato/post-image.sh create mode 100644 board/librecomputer/lepotato/readme.txt create mode 100644 configs/lepotato_defconfig create mode 100644 package/fip/Config.in.host create mode 100644 package/fip/fip.hash create mode 100644 package/fip/fip.mkSignature · 6 lines
2.27.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
cover board: Add support for LePotato
Hello,
Quoted 11 lines · Yann E. MORIN
Myl?ne, All,
On 2020-07-07 09:53 +0200, Myl?ne Josserand spake thusly:
Quoted 4 lines
Here is my first version of this series that adds the support of the board LePotato SBC from LibreComputer [1].
This board uses FIP utilities [2][3] from AMLogic to sign u-boot.
Following the issues raised by Romain, I've marked patches 2-3 as "changes requested". Hopefully, gslimg is an interesting trail to follow as a free/libre replacement for the vendor stuff.
Sure, make sense, thanks!
Quoted 2 lines
I've applied patch 1 to master, thanks.
Thank you,
Best regards,
Myl?ne
Quoted 67 lines
Regards,
Yann E. MORIN.Quoted 62 lines
The patch 02 is adding these FIP utilities as a host package. It is available for different boards such as khadas-vim, some odroids, etc. This package will copy the corresponding utilities, only for LePotato for the moment, into the HOST_DIR/usr/bin. Currently, LePotato's ones are the default ones. This should be updating once more boards are added.
The patch 03 is adding the support of this board from LibreComputer:
- one defconfig including a u-boot, kernel and minimal rootfs. The configuration is also enabling the FIP package for LePotato.
- one post-build script that is using the FIP utilities to sign u-boot binary.
- one post-image script to generate a sd-card image and flashing the signed u-boot on it.
- a readme file to explain how to configure, compile and flash image for this board.
- a boot.scr file including booti commands to run.Let me know if you have any comments on this series.
Best regards,
Myl?ne
[1]: https://libre.computer/products/boards/aml-s905x-cc/
[2]: https://github.com/LibreELEC/amlogic-boot-fip
[3]: https://github.com/BayLibre/u-bootMyl?ne Josserand (3):
DEVELOPERS: Update Mylene's email
package: Add new fip package
configs/lepotato: Add new defconfig.gitlab-ci.yml | 1 + DEVELOPERS | 4 +- board/librecomputer/lepotato/boot.cmd | 6 +++ board/librecomputer/lepotato/genimage.cfg | 28 ++++++++++ board/librecomputer/lepotato/post-build.sh | 61 ++++++++++++++++++++++ board/librecomputer/lepotato/post-image.sh | 17 ++++++ board/librecomputer/lepotato/readme.txt | 35 +++++++++++++ configs/lepotato_defconfig | 29 ++++++++++ package/Config.in.host | 1 + package/fip/Config.in.host | 17 ++++++ package/fip/fip.hash | 2 + package/fip/fip.mk | 30 +++++++++++ 12 files changed, 230 insertions(+), 1 deletion(-)create mode 100644 board/librecomputer/lepotato/boot.cmd create mode 100644 board/librecomputer/lepotato/genimage.cfg create mode 100755
board/librecomputer/lepotato/post-build.shcreate mode 100755board/librecomputer/lepotato/post-image.shcreate mode 100644board/librecomputer/lepotato/readme.txtcreate mode 100644 configs/lepotato_defconfig create mode 100644 package/fip/Config.in.host create mode 100644 package/fip/fip.hash
create mode 100644package/fip/fip.mkSignature · 6 lines
2.27.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot