Skip to contentSkip to conversation

raspberrypi2.conf: Make SERIAL_CONSOLE overwritable

PATCH In review Andrei Gherzan 3 participants 6 messages Apr 20, 2017 – Apr 21, 2017 Broadcom BCM2711/BCM2835 Arm architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 raspberrypi2.conf: Make SERIAL_CONSOLE overwritable

---
 conf/machine/raspberrypi2.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
conf/machine/raspberrypi2.conf +1 -1
index 9b4c02a..a17289c 100644
@@ -7,7 +7,7 @@ DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
 require conf/machine/include/tune-cortexa7.inc
 include conf/machine/include/rpi-base.inc
 
-SERIAL_CONSOLE = "115200 ttyAMA0"
+SERIAL_CONSOLE ?= "115200 ttyAMA0"
 
 UBOOT_MACHINE = "rpi_2_config"
 VC4_CMA_SIZE ?= "cma-256"
Signature · 1 line
2.12.2
#1 lore raw

PATCH 2/3 raspberrypi3-64.conf: Make SERIAL_CONSOLE overwritable

---
 conf/machine/raspberrypi3-64.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
conf/machine/raspberrypi3-64.conf +1 -1
index 7e99da1..5e2b80c 100644
@@ -35,7 +35,7 @@ KERNEL_DEVICETREE = " \
     overlays/vc4-kms-v3d.dtbo \
     "
 
-SERIAL_CONSOLE = "115200 ttyS0"
+SERIAL_CONSOLE ?= "115200 ttyS0"
 VC4_CMA_SIZE ?= "cma-256"
 
 UBOOT_MACHINE = "rpi_3_config"
Signature · 1 line
2.12.2
#2 lore raw

PATCH 3/3 raspberrypi3.conf: Use a stand alone machine configuration

In reply to Andrei Gherzan

As well make all the variables assigned in a way that they can be overwritten so we can give maximum flexibility to distros.

---
 conf/machine/raspberrypi3.conf | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
conf/machine/raspberrypi3.conf +7 -3
index 1ac5928..884d875 100644
@@ -2,10 +2,14 @@
 #@NAME: RaspberryPi 3 Development Board
 #@DESCRIPTION: Machine configuration for the RaspberryPi 3
 
-MACHINEOVERRIDES = "raspberrypi2:${MACHINE}"
-include conf/machine/raspberrypi2.conf
+DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
+require conf/machine/include/tune-cortexa7.inc
+include conf/machine/include/rpi-base.inc
 
 MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430"
 
-SERIAL_CONSOLE = "115200 ttyS0"
+SDIMG_KERNELIMAGE ?= "kernel7.img"
+KERNEL_DEFCONFIG ?= "bcm2709_defconfig"
+UBOOT_MACHINE ?= "rpi_2_config"
+SERIAL_CONSOLE ?= "115200 ttyS0"
 VC4_CMA_SIZE ?= "cma-256"
Signature · 1 line
2.12.2
#3 lore raw
In reply to Andrei Gherzan
Quoted 19 lines · Andrei Gherzan
---
 conf/machine/raspberrypi2.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
conf/machine/raspberrypi2.conf +1 -2
index 9b4c02a..a17289c 100644
@@ -7,7 +7,7 @@ DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
 require conf/machine/include/tune-cortexa7.inc
 include conf/machine/include/rpi-base.inc
 
-SERIAL_CONSOLE = "115200 ttyAMA0"
+SERIAL_CONSOLE ?= "115200 ttyAMA0"
 
 UBOOT_MACHINE = "rpi_2_config"
 VC4_CMA_SIZE ?= "cma-256"
--
Quoted 2 lines

2.12.2

Entire patch set merged to master and morty.

--
Andrei Gherzan
gpg: rsa4096/D4D94F67AD0E9640 | t: @agherzan

#4 lore raw
Quoted 17 lines · Andrei Gherzan
Quoted 16 lines · Andrei Gherzan
---
 conf/machine/raspberrypi2.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
conf/machine/raspberrypi2.conf +1 -1
index 9b4c02a..a17289c 100644
@@ -7,7 +7,7 @@ DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
 require conf/machine/include/tune-cortexa7.inc
 include conf/machine/include/rpi-base.inc
 
-SERIAL_CONSOLE = "115200 ttyAMA0"
+SERIAL_CONSOLE ?= "115200 ttyAMA0"
 
Quoted 8 lines
Quoted 5 lines
conf/machine/raspberrypi2.conf +0 -1
 UBOOT_MACHINE = "rpi_2_config"
 VC4_CMA_SIZE ?= "cma-256"
--

2.12.2

Entire patch set merged to master and morty.

This is the sort of thing I'm not keen on applying to stable branches as it may change recipe behaviour. For comparison, the stable branch policy for oe-core is very strict
(https://wiki.yoctoproject.org/wiki/Stable_branch_maintenance#Policies).

In my mind, avoiding potential breakage on a stable branch is more important than making improvements. I'm even weary of updating the raspberrypi firmware as I don't know how careful they are about backwards compatibility. For kernel updates I do have an expectation of backwards compatibility and an understanding that new stable releases often fix security issues so I'm ok with those on stable branches.

For example of where I'm concerned, a "raspberrypi2" override was previously applied to both raspberrypi2 and raspberrypi3 machines. After the third patch in this series it only applies to the raspberrypi2 machine. Also, UBOOT_MACHINE is now set differently for raspberrypi3 ('=' vs '?='). These changes may affect the value of some variables when building for raspberrypi3 if downstream users haven't explicitly handled both raspberrypi2 and raspberrypi3 overrides. I don't mind these sorts of changes on the master branch but I worry about applying them to a stable branch.

What do other meta-raspberrypi stable branch users think? Should we be pedantic here or should we keep things open so that improvements can be applied to stable branches?

Cheers,
Paul

#5 lore raw

2017-04-21 19:37 GMT+02:00 Paul Barker <[email protected]>:

Quoted 50 lines · Andrei Gherzan
Quoted 17 lines · Andrei Gherzan
Quoted 16 lines
---
 conf/machine/raspberrypi2.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
conf/machine/raspberrypi2.conf +1 -1
index 9b4c02a..a17289c 100644
@@ -7,7 +7,7 @@ DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
 require conf/machine/include/tune-cortexa7.inc
 include conf/machine/include/rpi-base.inc
 
-SERIAL_CONSOLE = "115200 ttyAMA0"
+SERIAL_CONSOLE ?= "115200 ttyAMA0"
 
Quoted 8 lines
Quoted 5 lines
conf/machine/raspberrypi2.conf +0 -1
 UBOOT_MACHINE = "rpi_2_config"
 VC4_CMA_SIZE ?= "cma-256"
--

2.12.2

Entire patch set merged to master and morty.

This is the sort of thing I'm not keen on applying to stable branches as it may change recipe behaviour. For comparison, the stable branch policy for oe-core is very strict
(https://wiki.yoctoproject.org/wiki/Stable_branch_maintenance#Policies).

In my mind, avoiding potential breakage on a stable branch is more important than making improvements. I'm even weary of updating the raspberrypi firmware as I don't know how careful they are about backwards compatibility. For kernel updates I do have an expectation of backwards compatibility and an understanding that new stable releases often fix security issues so I'm ok with those on stable branches.

For example of where I'm concerned, a "raspberrypi2" override was previously applied to both raspberrypi2 and raspberrypi3 machines. After the third patch in this series it only applies to the raspberrypi2 machine. Also, UBOOT_MACHINE is now set differently for raspberrypi3 ('=' vs '?='). These changes may affect the value of some variables when building for raspberrypi3 if downstream users haven't explicitly handled both raspberrypi2 and raspberrypi3 overrides. I don't mind these sorts of changes on the master branch but I worry about applying them to a stable branch.

Quoted 3 lines

What do other meta-raspberrypi stable branch users think? Should we be pedantic here or should we keep things open so that improvements can be applied to stable branches?

I would have to agree with Paul here since you asked :).

I would apply a more strict policy working with stable branches, and be be more in line with the Yocto policy. That is only bug fixes, security updates and make sure that build is stable on supported distributions. Everything else can wait until the next "release" and reside in master.

My 2 cents.

Best Regards
Mirza