Bug#899118: Aw: Re: Bug#899118: flash-kernel: add missing arm64 boards

2018-05-21 Thread Heinrich Schuchardt
I will try to build those 60 images and analyze which conform to your requirements. But that will take some time.

Best regards

Heinrich




Bug#899118: flash-kernel: add missing arm64 boards

2018-05-21 Thread Karsten Merker
On Mon, May 21, 2018 at 01:01:56AM +0200, Heinrich Schuchardt wrote:
> On 05/20/2018 09:15 PM, Karsten Merker wrote:
> > On Sat, May 19, 2018 at 02:57:41PM +0200, Heinrich Schuchardt wrote:
> > 
> >> Package: flash-kernel
> >> Version: 3.94
> >> Severity: normal
> >> Tags: patch
> >>
> >> Add 60 missing database entries for arm64 boards
> >> supported both by U-Boot and by Linux:
[...]
> > many thanks for the patch.  Just to make sure that we don't run
> > into problems later on: do all these boards really use u-boot's
> > config_distro_bootcmd.h and thereby work properly with
> > bootscr.uboot-generic?
> > 
> > When looking at the defconfigs for several of these systems, I
> > see e.g. CONFIG_BOOTARGS settings that don't really match what I
> > would expect for systems using config_distro_bootcmd.h.
> > Three random examples:
> > 
> > - r8a77995_draak_defconfig:
> >   CONFIG_BOOTARGS="console=ttySC0,115200 rw root=/dev/nfs 
> > nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
> > 
> > - ls1088ardb_sdcard_qspi_defconfig:
> >   CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 
> > earlycon=uart8250,mmio,0x21c0500 ramdisk_size=0x300 
> > default_hugepagesz=2m hugepagesz=2m hugepages=256"
> > 
> > - hikey_defconfig:
> >   CONFIG_BOOTARGS="console=ttyAMA0,115200n8 root=/dev/mmcblk0p9 rw"
[,,,]
> For a board to be able to benefit from flash-kernel U-Boot must:
> 
> - be capable to load and execute boot.scr
> - provide the booti command
> - allow the definition of the following environment variables:
>   - devtype, devnum, partition
>   - fdtfile
>   - kernel_addr_r
>   - fdt_addr_r
>   - ramdisk_addr_r
> 
> In your examples above I could not find any evidence that U-Boot cannot
> be configured and built to fulfill these requirements.
> 
> For instance build
> 
> make r8a77995_draak_defconfig
> make menuconfig
> CONFIG_DISTRO_DEFAULTS=y
> CONFIG_BOOTARGS="console=ttySC0,115200"
> CONFIG_ENV_IS_IN_MMC=y (this is a default value)
> make -j6
> 
> Setup missing environment variables interactively and save them to MMC
> and you can rely on flash-kernel for booting.
> 
> ls1088ardb_sdcard_qspi_defconfig and hikey_defconfig select
> CONFIG_DISTRO_DEFAULTS=y. CONFIG_BOOTARGS has to be reconfigured.
> 
> This patch is only about providing flash-kernel for the boards. It is
> not about providing U-Boot configured to match flash-kernel's requirements.
> 
> I think that even for boards for which we do not provide U-Boot as a
> Debian package we should allow the usage of flash-kernel without setting
> up a local override for the machine database (/etc/flash-kernel/db).

Hello,

our policy has always been to only add an entry for an
armhf/arm64 system to the flash-kernel database if this entry
works out of the box with the default mainline u-boot
configuration for the respective device.  Users usually expect
that a system boots out of the box without having to build a
non-standard u-boot configuration and modify the default
environment if the system is listed in the flash-kernel machine
db.

I'm open to arguments to the contrary, but for now I believe that
is makes sense to keep this policy.

Having to build u-boot with an undocumented non-standard
configuration and having to modify various non-obvious parts of
the default environment (which possibly includes having to find
out the platform-specific kernel_addr_r, fdt_addr_r and
ramdisk_addr_r values for systems where they are not already
defined in the default environment) to make the system boot is an
extremely high and completely unexpected hurdle for a "normal"
user, and I believe that we would do a large part of our userbase
a misservice by including entries that do not work out of the
box.

For somebody who has the knowledge to perform all the
aforementioned steps on the u-boot side, it's usually easy to
also add a corresponding local entry to /etc/flash-kernel/db.

I'm CCing debian-arm for further opinions on the matter.

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.



Bug#899118: flash-kernel: add missing arm64 boards

2018-05-20 Thread Heinrich Schuchardt
On 05/20/2018 09:15 PM, Karsten Merker wrote:
> On Sat, May 19, 2018 at 02:57:41PM +0200, Heinrich Schuchardt wrote:
> 
>> Package: flash-kernel
>> Version: 3.94
>> Severity: normal
>> Tags: patch
>>
>> Add 60 missing database entries for arm64 boards
>> supported both by U-Boot and by Linux:
>>
>> Amlogic Meson GXL (S905X) P212 Development Board
>> BananaPi-M64
>> Freescale Layerscape 2080a QDS Board
>> Freescale Layerscape 2080a RDB Board
>> FriendlyARM NanoPi A64
>> FriendlyARM NanoPi NEO 2
>> FriendlyARM NanoPi NEO Plus2
>> GeekBox
>> HiKey Development Board
>> HiSilicon Poplar Development Board
>> Khadas VIM
>> Libre Computer Board ALL-H3-CC H5
>> Libre Technology CC
>> LS1012A Freedom Board
>> LS1012A QDS Board
>> LS1012A RDB Board
>> LS1043A RDB Board
>> LS1046A RDB Board
>> LS1088A QDS Board
>> LS1088A RDB Board
>> Marvell Armada 3720 Development Board DB-88F3720-DDR3
>> Marvell Armada 7040 DB board
>> NVIDIA Tegra210 P2371 (P2530/P2595) reference design
>> NVIDIA Tegra210 P2571 reference design
>> Olimex A64-Olinuxino
>> OrangePi Win/Win Plus
>> OrangePi Zero Plus2
>> Pine64
>> Renesas Draak board based on r8a77995
>> Renesas Eagle board based on r8a77970
>> Renesas H3ULCB board based on r8a7795 ES2.0+
>> Renesas M3ULCB board based on r8a7796
>> Renesas Salvator-X board based on r8a7795 ES2.0+
>> Renesas Salvator-X board based on r8a7796
>> Renesas Salvator-X board based on r8a77965
>> Rockchip PX5 EVB
>> Rockchip RK3328 EVB
>> SoCFPGA Stratix 10 SoCDK
>> UniPhier LD11 Global Board (REF_LD11_GP)
>> UniPhier LD11 Reference Board
>> UniPhier LD20 Global Board (REF_LD20_GP)
>> UniPhier LD20 Reference Board
>> UniPhier PXs3 Reference Board
>> Xunlong Orange Pi PC 2
>> Xunlong Orange Pi Prime
>> ZynqMP ZC1232 RevA
>> ZynqMP ZC1254 RevA
>> ZynqMP ZC1275 RevA
>> ZynqMP zc1751-xm015-dc1 RevA
>> ZynqMP zc1751-xm016-dc2 RevA
>> ZynqMP zc1751-xm017-dc3 RevA
>> ZynqMP zc1751-xm018-dc4
>> ZynqMP zc1751-xm019-dc5 RevA
>> ZynqMP ZCU100 RevC
>> ZynqMP ZCU102 Rev1.0
>> ZynqMP ZCU102 RevA
>> ZynqMP ZCU102 RevB
>> ZynqMP ZCU104 RevA
>> ZynqMP ZCU106 RevA
>> ZynqMP ZCU111 RevA
> 
> Hello,
> 
> many thanks for the patch.  Just to make sure that we don't run
> into problems later on: do all these boards really use u-boot's
> config_distro_bootcmd.h and thereby work properly with
> bootscr.uboot-generic?
> 
> When looking at the defconfigs for several of these systems, I
> see e.g. CONFIG_BOOTARGS settings that don't really match what I
> would expect for systems using config_distro_bootcmd.h.
> Three random examples:
> 
> - r8a77995_draak_defconfig:
>   CONFIG_BOOTARGS="console=ttySC0,115200 rw root=/dev/nfs 
> nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
> 
> - ls1088ardb_sdcard_qspi_defconfig:
>   CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 
> earlycon=uart8250,mmio,0x21c0500 ramdisk_size=0x300 default_hugepagesz=2m 
> hugepagesz=2m hugepages=256"
> 
> - hikey_defconfig:
>   CONFIG_BOOTARGS="console=ttyAMA0,115200n8 root=/dev/mmcblk0p9 rw"
> 
> Regards,
> Karsten
> 

Thanks for reviewing.

For a board to be able to benefit from flash-kernel U-Boot must:

- be capable to load and execute boot.scr
- provide the booti command
- allow the definition of the following environment variables:
  - devtype, devnum, partition
  - fdtfile
  - kernel_addr_r
  - fdt_addr_r
  - ramdisk_addr_r

In your examples above I could not find any evidence that U-Boot cannot
be configured and built to fulfill these requirements.

For instance build

make r8a77995_draak_defconfig
make menuconfig
CONFIG_DISTRO_DEFAULTS=y
CONFIG_BOOTARGS="console=ttySC0,115200"
CONFIG_ENV_IS_IN_MMC=y (this is a default value)
make -j6

Setup missing environment variables interactively and save them to MMC
and you can rely on flash-kernel for booting.

ls1088ardb_sdcard_qspi_defconfig and hikey_defconfig select
CONFIG_DISTRO_DEFAULTS=y. CONFIG_BOOTARGS has to be reconfigured.

This patch is only about providing flash-kernel for the boards. It is
not about providing U-Boot configured to match flash-kernel's requirements.

I think that even for boards for which we do not provide U-Boot as a
Debian package we should allow the usage of flash-kernel without setting
up a local override for the machine database (/etc/flash-kernel/db).

Best regards

Heinrich



Bug#899118: flash-kernel: add missing arm64 boards

2018-05-20 Thread Karsten Merker
On Sat, May 19, 2018 at 02:57:41PM +0200, Heinrich Schuchardt wrote:

> Package: flash-kernel
> Version: 3.94
> Severity: normal
> Tags: patch
> 
> Add 60 missing database entries for arm64 boards
> supported both by U-Boot and by Linux:
> 
> Amlogic Meson GXL (S905X) P212 Development Board
> BananaPi-M64
> Freescale Layerscape 2080a QDS Board
> Freescale Layerscape 2080a RDB Board
> FriendlyARM NanoPi A64
> FriendlyARM NanoPi NEO 2
> FriendlyARM NanoPi NEO Plus2
> GeekBox
> HiKey Development Board
> HiSilicon Poplar Development Board
> Khadas VIM
> Libre Computer Board ALL-H3-CC H5
> Libre Technology CC
> LS1012A Freedom Board
> LS1012A QDS Board
> LS1012A RDB Board
> LS1043A RDB Board
> LS1046A RDB Board
> LS1088A QDS Board
> LS1088A RDB Board
> Marvell Armada 3720 Development Board DB-88F3720-DDR3
> Marvell Armada 7040 DB board
> NVIDIA Tegra210 P2371 (P2530/P2595) reference design
> NVIDIA Tegra210 P2571 reference design
> Olimex A64-Olinuxino
> OrangePi Win/Win Plus
> OrangePi Zero Plus2
> Pine64
> Renesas Draak board based on r8a77995
> Renesas Eagle board based on r8a77970
> Renesas H3ULCB board based on r8a7795 ES2.0+
> Renesas M3ULCB board based on r8a7796
> Renesas Salvator-X board based on r8a7795 ES2.0+
> Renesas Salvator-X board based on r8a7796
> Renesas Salvator-X board based on r8a77965
> Rockchip PX5 EVB
> Rockchip RK3328 EVB
> SoCFPGA Stratix 10 SoCDK
> UniPhier LD11 Global Board (REF_LD11_GP)
> UniPhier LD11 Reference Board
> UniPhier LD20 Global Board (REF_LD20_GP)
> UniPhier LD20 Reference Board
> UniPhier PXs3 Reference Board
> Xunlong Orange Pi PC 2
> Xunlong Orange Pi Prime
> ZynqMP ZC1232 RevA
> ZynqMP ZC1254 RevA
> ZynqMP ZC1275 RevA
> ZynqMP zc1751-xm015-dc1 RevA
> ZynqMP zc1751-xm016-dc2 RevA
> ZynqMP zc1751-xm017-dc3 RevA
> ZynqMP zc1751-xm018-dc4
> ZynqMP zc1751-xm019-dc5 RevA
> ZynqMP ZCU100 RevC
> ZynqMP ZCU102 Rev1.0
> ZynqMP ZCU102 RevA
> ZynqMP ZCU102 RevB
> ZynqMP ZCU104 RevA
> ZynqMP ZCU106 RevA
> ZynqMP ZCU111 RevA

Hello,

many thanks for the patch.  Just to make sure that we don't run
into problems later on: do all these boards really use u-boot's
config_distro_bootcmd.h and thereby work properly with
bootscr.uboot-generic?

When looking at the defconfigs for several of these systems, I
see e.g. CONFIG_BOOTARGS settings that don't really match what I
would expect for systems using config_distro_bootcmd.h.
Three random examples:

- r8a77995_draak_defconfig:
  CONFIG_BOOTARGS="console=ttySC0,115200 rw root=/dev/nfs 
nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"

- ls1088ardb_sdcard_qspi_defconfig:
  CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 
earlycon=uart8250,mmio,0x21c0500 ramdisk_size=0x300 default_hugepagesz=2m 
hugepagesz=2m hugepages=256"

- hikey_defconfig:
  CONFIG_BOOTARGS="console=ttyAMA0,115200n8 root=/dev/mmcblk0p9 rw"

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.



Bug#899118: flash-kernel: add missing arm64 boards

2018-05-19 Thread Heinrich Schuchardt
Package: flash-kernel
Version: 3.94
Severity: normal
Tags: patch

Add 60 missing database entries for arm64 boards
supported both by U-Boot and by Linux:

Amlogic Meson GXL (S905X) P212 Development Board
BananaPi-M64
Freescale Layerscape 2080a QDS Board
Freescale Layerscape 2080a RDB Board
FriendlyARM NanoPi A64
FriendlyARM NanoPi NEO 2
FriendlyARM NanoPi NEO Plus2
GeekBox
HiKey Development Board
HiSilicon Poplar Development Board
Khadas VIM
Libre Computer Board ALL-H3-CC H5
Libre Technology CC
LS1012A Freedom Board
LS1012A QDS Board
LS1012A RDB Board
LS1043A RDB Board
LS1046A RDB Board
LS1088A QDS Board
LS1088A RDB Board
Marvell Armada 3720 Development Board DB-88F3720-DDR3
Marvell Armada 7040 DB board
NVIDIA Tegra210 P2371 (P2530/P2595) reference design
NVIDIA Tegra210 P2571 reference design
Olimex A64-Olinuxino
OrangePi Win/Win Plus
OrangePi Zero Plus2
Pine64
Renesas Draak board based on r8a77995
Renesas Eagle board based on r8a77970
Renesas H3ULCB board based on r8a7795 ES2.0+
Renesas M3ULCB board based on r8a7796
Renesas Salvator-X board based on r8a7795 ES2.0+
Renesas Salvator-X board based on r8a7796
Renesas Salvator-X board based on r8a77965
Rockchip PX5 EVB
Rockchip RK3328 EVB
SoCFPGA Stratix 10 SoCDK
UniPhier LD11 Global Board (REF_LD11_GP)
UniPhier LD11 Reference Board
UniPhier LD20 Global Board (REF_LD20_GP)
UniPhier LD20 Reference Board
UniPhier PXs3 Reference Board
Xunlong Orange Pi PC 2
Xunlong Orange Pi Prime
ZynqMP ZC1232 RevA
ZynqMP ZC1254 RevA
ZynqMP ZC1275 RevA
ZynqMP zc1751-xm015-dc1 RevA
ZynqMP zc1751-xm016-dc2 RevA
ZynqMP zc1751-xm017-dc3 RevA
ZynqMP zc1751-xm018-dc4
ZynqMP zc1751-xm019-dc5 RevA
ZynqMP ZCU100 RevC
ZynqMP ZCU102 Rev1.0
ZynqMP ZCU102 RevA
ZynqMP ZCU102 RevB
ZynqMP ZCU104 RevA
ZynqMP ZCU106 RevA
ZynqMP ZCU111 RevA

Signed-off-by: Heinrich Schuchardt 
---
 db/all.db | 420 ++
 1 file changed, 420 insertions(+)

diff --git a/db/all.db b/db/all.db
index 5c1c85d..f5e507a 100644
--- a/db/all.db
+++ b/db/all.db
@@ -42,6 +42,13 @@ DTB-Id: sun8i-r16-parrot.dtb
 U-Boot-Script-Name: bootscr.sunxi
 Required-Packages: u-boot-tools
 
+Machine: Amlogic Meson GXL (S905X) P212 Development Board
+Kernel-Flavors: arm64
+DTB-Id: amlogic/meson-gxl-s905x-p212.dts
+Boot-Script-Path: /boot/boot.scr
+U-Boot-Script-Name: bootscr.uboot-generic
+Required-Packages: u-boot-tools
+
 Machine: APM X-Gene Mustang board
 U-Boot-Kernel-Address: 0x8
 U-Boot-Initrd-Address: 0x0
@@ -74,6 +81,13 @@ DTB-Id: sun8i-h3-bananapi-m2-plus.dtb
 U-Boot-Script-Name: bootscr.sunxi
 Required-Packages: u-boot-tools
 
+Machine: BananaPi-M64
+Kernel-Flavors: arm64
+DTB-Id: allwinner/sun50i-a64-bananapi-m64.dts
+Boot-Script-Path: /boot/boot.scr
+U-Boot-Script-Name: bootscr.uboot-generic
+Required-Packages: u-boot-tools
+
 Machine: BA10 tvbox
 Kernel-Flavors: armmp
 Boot-Script-Path: /boot/boot.scr
@@ -432,6 +446,27 @@ Boot-Initrd-Path: /boot/uInitrd
 Required-Packages: u-boot-tools
 Bootloader-Sets-Incorrect-Root: no
 
+Machine: Freescale Layerscape 2080a QDS Board
+Kernel-Flavors: arm64
+DTB-Id: freescale/fsl-ls2080a-qds.dts
+Boot-Script-Path: /boot/boot.scr
+U-Boot-Script-Name: bootscr.uboot-generic
+Required-Packages: u-boot-tools
+
+Machine: Freescale Layerscape 2080a RDB Board
+Kernel-Flavors: arm64
+DTB-Id: freescale/fsl-ls2080a-rdb.dts
+Boot-Script-Path: /boot/boot.scr
+U-Boot-Script-Name: bootscr.uboot-generic
+Required-Packages: u-boot-tools
+
+Machine: FriendlyARM NanoPi A64
+Kernel-Flavors: arm64
+DTB-Id: allwinner/sun50i-a64-nanopi-a64.dts
+Boot-Script-Path: /boot/boot.scr
+U-Boot-Script-Name: bootscr.uboot-generic
+Required-Packages: u-boot-tools
+
 Machine: FriendlyArm NanoPi M1
 Kernel-Flavors: armmp armmp-lpae
 Boot-Script-Path: /boot/boot.scr
@@ -453,6 +488,13 @@ DTB-Id: sun8i-h3-nanopi-neo.dtb
 U-Boot-Script-Name: bootscr.sunxi
 Required-Packages: u-boot-tools
 
+Machine: FriendlyARM NanoPi NEO 2
+Kernel-Flavors: arm64
+DTB-Id: allwinner/sun50i-h5-nanopi-neo2.dts
+Boot-Script-Path: /boot/boot.scr
+U-Boot-Script-Name: bootscr.uboot-generic
+Required-Packages: u-boot-tools
+
 Machine: FriendlyARM NanoPi NEO Air
 Kernel-Flavors: armmp armmp-lpae
 Boot-Script-Path: /boot/boot.scr
@@ -460,6 +502,20 @@ DTB-Id: sun8i-h3-nanopi-neo-air.dtb
 U-Boot-Script-Name: bootscr.sunxi
 Required-Packages: u-boot-tools
 
+Machine: FriendlyARM NanoPi NEO Plus2
+Kernel-Flavors: arm64
+DTB-Id: allwinner/sun50i-h5-nanopi-neo-plus2.dts
+Boot-Script-Path: /boot/boot.scr
+U-Boot-Script-Name: bootscr.uboot-generic
+Required-Packages: u-boot-tools
+
+Machine: GeekBox
+Kernel-Flavors: arm64
+DTB-Id: rockchip/rk3368-geekbox.dts
+Boot-Script-Path: /boot/boot.scr
+U-Boot-Script-Name: bootscr.uboot-generic
+Required-Packages: u-boot-tools
+
 Machine: Gemei G9 Tablet
 Kernel-Flavors: armmp
 Boot-Script-Path: /boot/boot.scr
@@ -533,6 +589,20 @@ Boot-Script-Path: /boot/boot.scr
 U-Boot-Script-Name: bootscr.uboot-generic
 Required-Packages: u-boot-tools
 
+Machine: