SlideShare a Scribd company logo
1 of 38
Allwinner Kernel
Upstreaming Experiences
Chen-Yu Tsai (wens) 蔡鎮宇
Chen-Yu Tsai 蔡鎮宇
• Software Engineer @ CloudMosa
• Puffin Web Browser
• Totally not embedded Linux related
• Linux-sunxi community hobbyist
• Contributions to U-boot and Linux
• git log --oneline --author “Chen-Yu Tsai”
• Translations
2015/8/25 2
Disclaimer
I have only done Allwinner/sunxi related stuff.
Linux-sunxi is community/volunteer based.
Your mileage may vary.
2015/8/25 3
Outline
• Current Status
• Where to start
• Tips
• What to expect
• New SoC bringup
• Supporting new boards
• Priorities
• Difficulties
2015/8/25 4
Current Status
Let’s look at some ARM SoC vendors
2015/8/25 5
linux-sunxi?
• Cheap hardware
• Development boards
• Documents and SDKs available
• Given by hardware vendors
• Allwinner now provides them on github
• https://github.com/allwinner-zh/
2015/8/25 6
Allwinner
• Headless server w/ MMC/SATA/USB storage
• I2C & SPI
• LCD/HDMI/VGA display w/ simplefb
• Audio WIP
2015/8/25 7
Allwinner
• Community driven
• git lo --no-merges --perl-regexp --grep
'sunxi|sun[0-9]i' | grep -v m68k | wc –l
• 1118
• Extremely active
• Allwinner supplies documents and their source code
• Answers questions
2015/8/25 8
Rockchip
• Basically a fully working system
• MMC/USB
• I2C & SPI
• Full KMS display support
• I2S & audio codecs
• Chromebook based on mainline kernel + dts
• IP blocks mostly from ARM or Synopsys
2015/8/25 9
Rockchip
• Hobbyist maintainer
• git lo --author 'Heiko Stuebner' | wc -l
• 158
• filtered out Samsung related
• Official support
• git lo --author @rock-chips.com | wc -l
• 169
2015/8/25 10
Mediatek
• Basics (machine, clk, pinctrl , uart)
• Drivers for
• I2C, SPI, MMC, PMIC, Audio
• Not seen in DTS yet
2015/8/25 11
Mediatek
• Outside maintainer
• git lo --author 'Matthias Brugger' | wc -l
• 53
• Since 2014/7/22
• Official support
• git lo --author @mediatek.com | wc -l
• 122
• Since 2014/11/4
2015/8/25 12
Where to start
2015/8/25 13
Getting it to boot
• Machine definition (arch/arm/mach-*)
• Basic DTS
• UART
2015/8/25 14
Infrastructure
• Clocks
• Pinctrl
• Reusable
2015/8/25 15
Peripherals
• Storage
• MMC
• SATA
• USB
• PMIC
• I2C
• SPI
• …
• Common vs custom IP?
2015/8/25 16
Tips
The kernel is very big and moves very fast
2015/8/25 17
Start small
• Is it a known, supported IP block?
• Only standard resources?
• MMIO, IRQ, clocks, resets
• Ex: USB host
• Hardware glue? Quirks?
• Is the core supported?
• Is it a library?
• Write a glue driver
• Modify / port
• Ex: SATA AHCI, STMMAC
2015/8/25 18
Start simple
• Clocks can be done one at a time
• Driver describes clock controls
• Driver or DTS describes relationship between clocks
• Both methods are used
• Pinctrl / GPIO
• Transcribe datasheets
2015/8/25 19
Look around and Ask
• Subscribe to mailing lists
• Look at how other contributors write code
• Learn what reviewers ask for
• Look at how other platforms do it
• mediatek pinctrl driver is very similar to sunxi
• Documentation is sometimes lacking
• When in doubt, ask
• Release often
• No one is going to review unsent code
2015/8/25 20
What to expect
Not getting merged is not the end of the world
2015/8/25 21
Code issues
• Code style
• Indentation
• Comments
• Error path
• Bugs
• Resource leak?
2015/8/25 22
NACK
• Wrong design
• Ex: rfkill dt support
• Deprecated functions
• Ex: platform_data
• Occasional disagreement
• “simplefb: add clock handling code”
2015/8/25 23
Maintainers are busy
• Sometimes you don’t get feedback
• Maintainers often write code as well
• Lots of mailing list traffic
• Ping or resend
2015/8/25 24
Didn’t get your patches in
this release?
• You can do better
• Write better code
• Respond to reviewers
• Keep working
• Release cycle is predictable
• Sometimes it’s not your fault
• Maintainer missed your patch or pull request
• It happens
• Maintainer went on vacation
• Maintainer missing (?)
2015/8/25 25
New SoC bringup
2015/8/25 26
New SoC
1. Getting it to Boot
• Machine definition (arch/arm/mach-*)
• Basic DTS
• UART
2. Clocks / Pinctrl
3. Peripherals
• IP blocks don’t often change
• Existing drivers should work
• Quite satisfying!
2015/8/25 27
Supporting new boards
2015/8/25 28
Supporting new boards
• Need schematics or hardware description
• What peripherals are connected to the board?
• What external ICs are there?
• PMICs, audio codecs, sensors, storage…
• Extra GPIOs?
• LEDs
• Write a .dts file
• Test that everything works
• Fairly easy!
2015/8/25 29
Priorities
2015/8/25 30
Paid work
• Not really much say
• Getting products shipped is all that matters
• Still
• You should try
• What benefits the most platforms / boards?
• Must have vs. want?
• MMC vs USB vs audio
2015/8/25 31
Community hackers
• Expertise / prior experience
• Did clocks before, do it again
• Interest
• Me: I want WiFi! I want SMP!
• Low hanging fruit
• Me: Network is DWMAC based, only need glue code
• Popular demand
• DMA engine
• Audio
2015/8/25 32
Difficulties
2015/8/25 33
Documents
• NDA?
• Incorrect
• How do you know it’s incorrect?
• Missing sections
• Completely non-existent
• No board schematics
• Should you risk it going up in smoke?
2015/8/25 34
Porting vendor code
• Is often bad
• Because of time to market concerns
• Quite old
• Android kernel still at 3.4?
• Custom frameworks
• Obsoleted by common frameworks
• Clocks, resets, pinctrl, gpio, PHY, regmap, …
• Binary blobs
• No source code
2015/8/25 35
Binary drivers
• Third-party IP vendors
• GPUs
• VPUs
• …
• NDAs
2015/8/25 36
GPL violations
• There shouldn’t be binary-only blobs in the kernel
• http://linux-sunxi.org/GPL_Violations
• http://www.xda-developers.com/have-you-paid-
your-linux-kernel-source-license-fee/
2015/8/25 37
Questions?
2015/8/25 38

More Related Content

What's hot

Kernel Recipes 2017 - HDMI CEC: Status Report - Hans Verkuil
Kernel Recipes 2017 - HDMI CEC: Status Report - Hans VerkuilKernel Recipes 2017 - HDMI CEC: Status Report - Hans Verkuil
Kernel Recipes 2017 - HDMI CEC: Status Report - Hans VerkuilAnne Nicolas
 
Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021Lorenzo Miniero
 
Insertable Streams and E2EE @ ClueCon2020
Insertable Streams and E2EE @ ClueCon2020Insertable Streams and E2EE @ ClueCon2020
Insertable Streams and E2EE @ ClueCon2020Lorenzo Miniero
 
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...Paolo Saviano
 
WebRTC, Whats in it for me?
WebRTC, Whats in it for me?WebRTC, Whats in it for me?
WebRTC, Whats in it for me?SeanDuBois3
 
Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021Lorenzo Miniero
 
Can SFUs and MCUs be friends @ IIT-RTC 2020
Can SFUs and MCUs be friends @ IIT-RTC 2020Can SFUs and MCUs be friends @ IIT-RTC 2020
Can SFUs and MCUs be friends @ IIT-RTC 2020Lorenzo Miniero
 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardAnne Nicolas
 
WebRTC security+more @ KamailioWorld 2018
WebRTC security+more @ KamailioWorld 2018WebRTC security+more @ KamailioWorld 2018
WebRTC security+more @ KamailioWorld 2018Lorenzo Miniero
 
WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022Lorenzo Miniero
 
Write a SocialTV app @ OpenSIPS 2021
Write a SocialTV app @ OpenSIPS 2021Write a SocialTV app @ OpenSIPS 2021
Write a SocialTV app @ OpenSIPS 2021Lorenzo Miniero
 
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)Balazs Bucsay
 
2012 workshop wed_ethernet_servicesoveri_poib
2012 workshop wed_ethernet_servicesoveri_poib2012 workshop wed_ethernet_servicesoveri_poib
2012 workshop wed_ethernet_servicesoveri_poibstrelecru
 
Simulcast/SVC @ IIT-RTC 2019
Simulcast/SVC @ IIT-RTC 2019Simulcast/SVC @ IIT-RTC 2019
Simulcast/SVC @ IIT-RTC 2019Lorenzo Miniero
 
Олег Купреев «Уязвимости программного обеспечения телекоммуникационного обору...
Олег Купреев «Уязвимости программного обеспечения телекоммуникационного обору...Олег Купреев «Уязвимости программного обеспечения телекоммуникационного обору...
Олег Купреев «Уязвимости программного обеспечения телекоммуникационного обору...Mail.ru Group
 
Fuzzing Janus @ IPTComm 2019
Fuzzing Janus @ IPTComm 2019Fuzzing Janus @ IPTComm 2019
Fuzzing Janus @ IPTComm 2019Lorenzo Miniero
 
IETF remote participation via Meetecho @ WebRTC Meetup Stockholm
IETF remote participation via Meetecho @ WebRTC Meetup StockholmIETF remote participation via Meetecho @ WebRTC Meetup Stockholm
IETF remote participation via Meetecho @ WebRTC Meetup StockholmLorenzo Miniero
 
Bus Pirate Workshop Ruxcon Hardware Hacking 2017
Bus Pirate Workshop Ruxcon Hardware Hacking 2017Bus Pirate Workshop Ruxcon Hardware Hacking 2017
Bus Pirate Workshop Ruxcon Hardware Hacking 2017Tim N
 
WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21Lorenzo Miniero
 

What's hot (20)

Kernel Recipes 2017 - HDMI CEC: Status Report - Hans Verkuil
Kernel Recipes 2017 - HDMI CEC: Status Report - Hans VerkuilKernel Recipes 2017 - HDMI CEC: Status Report - Hans Verkuil
Kernel Recipes 2017 - HDMI CEC: Status Report - Hans Verkuil
 
Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021
 
Insertable Streams and E2EE @ ClueCon2020
Insertable Streams and E2EE @ ClueCon2020Insertable Streams and E2EE @ ClueCon2020
Insertable Streams and E2EE @ ClueCon2020
 
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
 
WebRTC, Whats in it for me?
WebRTC, Whats in it for me?WebRTC, Whats in it for me?
WebRTC, Whats in it for me?
 
Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021
 
Can SFUs and MCUs be friends @ IIT-RTC 2020
Can SFUs and MCUs be friends @ IIT-RTC 2020Can SFUs and MCUs be friends @ IIT-RTC 2020
Can SFUs and MCUs be friends @ IIT-RTC 2020
 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
 
WebRTC security+more @ KamailioWorld 2018
WebRTC security+more @ KamailioWorld 2018WebRTC security+more @ KamailioWorld 2018
WebRTC security+more @ KamailioWorld 2018
 
WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022
 
Write a SocialTV app @ OpenSIPS 2021
Write a SocialTV app @ OpenSIPS 2021Write a SocialTV app @ OpenSIPS 2021
Write a SocialTV app @ OpenSIPS 2021
 
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)
 
2012 workshop wed_ethernet_servicesoveri_poib
2012 workshop wed_ethernet_servicesoveri_poib2012 workshop wed_ethernet_servicesoveri_poib
2012 workshop wed_ethernet_servicesoveri_poib
 
Simulcast/SVC @ IIT-RTC 2019
Simulcast/SVC @ IIT-RTC 2019Simulcast/SVC @ IIT-RTC 2019
Simulcast/SVC @ IIT-RTC 2019
 
Олег Купреев «Уязвимости программного обеспечения телекоммуникационного обору...
Олег Купреев «Уязвимости программного обеспечения телекоммуникационного обору...Олег Купреев «Уязвимости программного обеспечения телекоммуникационного обору...
Олег Купреев «Уязвимости программного обеспечения телекоммуникационного обору...
 
Armbian balcoon
Armbian balcoonArmbian balcoon
Armbian balcoon
 
Fuzzing Janus @ IPTComm 2019
Fuzzing Janus @ IPTComm 2019Fuzzing Janus @ IPTComm 2019
Fuzzing Janus @ IPTComm 2019
 
IETF remote participation via Meetecho @ WebRTC Meetup Stockholm
IETF remote participation via Meetecho @ WebRTC Meetup StockholmIETF remote participation via Meetecho @ WebRTC Meetup Stockholm
IETF remote participation via Meetecho @ WebRTC Meetup Stockholm
 
Bus Pirate Workshop Ruxcon Hardware Hacking 2017
Bus Pirate Workshop Ruxcon Hardware Hacking 2017Bus Pirate Workshop Ruxcon Hardware Hacking 2017
Bus Pirate Workshop Ruxcon Hardware Hacking 2017
 
WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21
 

Similar to Allwinner Kernel Upstreaming Experiences

The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageKernel TLV
 
2014 01-21-mpi-community-feedback
2014 01-21-mpi-community-feedback2014 01-21-mpi-community-feedback
2014 01-21-mpi-community-feedbackJeff Squyres
 
12 Lessons Learnt in Boot Time Reduction
12 Lessons Learnt in Boot Time Reduction12 Lessons Learnt in Boot Time Reduction
12 Lessons Learnt in Boot Time Reductionandrewmurraympc
 
Considerations for Operating An OpenStack Cloud
Considerations for Operating An OpenStack CloudConsiderations for Operating An OpenStack Cloud
Considerations for Operating An OpenStack CloudMark Voelker
 
The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)Chris Simmonds
 
Computer motherboard
Computer motherboardComputer motherboard
Computer motherboardRay Mkindo
 
Considerations for Operating an OpenStack Cloud
Considerations for Operating an OpenStack CloudConsiderations for Operating an OpenStack Cloud
Considerations for Operating an OpenStack CloudAll Things Open
 
embedded-systems-for-beginners
embedded-systems-for-beginnersembedded-systems-for-beginners
embedded-systems-for-beginnersmohamed gaber
 
Introduction to Embedded Architecture
Introduction to Embedded Architecture Introduction to Embedded Architecture
Introduction to Embedded Architecture amrutachintawar239
 
Build IoT Applications with C#
Build IoT Applications with C#Build IoT Applications with C#
Build IoT Applications with C#Ken Samson, MISM
 
MPI Requirements of the Network Layer
MPI Requirements of the Network LayerMPI Requirements of the Network Layer
MPI Requirements of the Network Layerinside-BigData.com
 
Hacking Meatspace with Arduino and pyFirmata
Hacking Meatspace with Arduino and pyFirmataHacking Meatspace with Arduino and pyFirmata
Hacking Meatspace with Arduino and pyFirmataChes Martin
 
Intro to Hardware Firmware Hacking
Intro to Hardware Firmware HackingIntro to Hardware Firmware Hacking
Intro to Hardware Firmware HackingAndrew Freeborn
 
LCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solutionLCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solutionLinaro
 
Raspberry Pi Introduction
Raspberry Pi IntroductionRaspberry Pi Introduction
Raspberry Pi IntroductionMichal Sedlak
 
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0Embarcados
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth Pilli
 

Similar to Allwinner Kernel Upstreaming Experiences (20)

The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast Storage
 
2014 01-21-mpi-community-feedback
2014 01-21-mpi-community-feedback2014 01-21-mpi-community-feedback
2014 01-21-mpi-community-feedback
 
12 Lessons Learnt in Boot Time Reduction
12 Lessons Learnt in Boot Time Reduction12 Lessons Learnt in Boot Time Reduction
12 Lessons Learnt in Boot Time Reduction
 
Seminario utovrm
Seminario utovrmSeminario utovrm
Seminario utovrm
 
Considerations for Operating An OpenStack Cloud
Considerations for Operating An OpenStack CloudConsiderations for Operating An OpenStack Cloud
Considerations for Operating An OpenStack Cloud
 
The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)
 
Computer motherboard
Computer motherboardComputer motherboard
Computer motherboard
 
Considerations for Operating an OpenStack Cloud
Considerations for Operating an OpenStack CloudConsiderations for Operating an OpenStack Cloud
Considerations for Operating an OpenStack Cloud
 
embedded-systems-for-beginners
embedded-systems-for-beginnersembedded-systems-for-beginners
embedded-systems-for-beginners
 
StarlingX - A Platform for the Distributed Edge | Ildiko Vancsa
StarlingX - A Platform for the Distributed Edge | Ildiko VancsaStarlingX - A Platform for the Distributed Edge | Ildiko Vancsa
StarlingX - A Platform for the Distributed Edge | Ildiko Vancsa
 
Introduction to Embedded Architecture
Introduction to Embedded Architecture Introduction to Embedded Architecture
Introduction to Embedded Architecture
 
Build IoT Applications with C#
Build IoT Applications with C#Build IoT Applications with C#
Build IoT Applications with C#
 
MPI Requirements of the Network Layer
MPI Requirements of the Network LayerMPI Requirements of the Network Layer
MPI Requirements of the Network Layer
 
Hacking Meatspace with Arduino and pyFirmata
Hacking Meatspace with Arduino and pyFirmataHacking Meatspace with Arduino and pyFirmata
Hacking Meatspace with Arduino and pyFirmata
 
Building foundations
Building foundationsBuilding foundations
Building foundations
 
Intro to Hardware Firmware Hacking
Intro to Hardware Firmware HackingIntro to Hardware Firmware Hacking
Intro to Hardware Firmware Hacking
 
LCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solutionLCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solution
 
Raspberry Pi Introduction
Raspberry Pi IntroductionRaspberry Pi Introduction
Raspberry Pi Introduction
 
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latest
 

Recently uploaded

Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Anthony Dahanne
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profileakrivarotava
 

Recently uploaded (20)

Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profile
 

Allwinner Kernel Upstreaming Experiences

  • 2. Chen-Yu Tsai 蔡鎮宇 • Software Engineer @ CloudMosa • Puffin Web Browser • Totally not embedded Linux related • Linux-sunxi community hobbyist • Contributions to U-boot and Linux • git log --oneline --author “Chen-Yu Tsai” • Translations 2015/8/25 2
  • 3. Disclaimer I have only done Allwinner/sunxi related stuff. Linux-sunxi is community/volunteer based. Your mileage may vary. 2015/8/25 3
  • 4. Outline • Current Status • Where to start • Tips • What to expect • New SoC bringup • Supporting new boards • Priorities • Difficulties 2015/8/25 4
  • 5. Current Status Let’s look at some ARM SoC vendors 2015/8/25 5
  • 6. linux-sunxi? • Cheap hardware • Development boards • Documents and SDKs available • Given by hardware vendors • Allwinner now provides them on github • https://github.com/allwinner-zh/ 2015/8/25 6
  • 7. Allwinner • Headless server w/ MMC/SATA/USB storage • I2C & SPI • LCD/HDMI/VGA display w/ simplefb • Audio WIP 2015/8/25 7
  • 8. Allwinner • Community driven • git lo --no-merges --perl-regexp --grep 'sunxi|sun[0-9]i' | grep -v m68k | wc –l • 1118 • Extremely active • Allwinner supplies documents and their source code • Answers questions 2015/8/25 8
  • 9. Rockchip • Basically a fully working system • MMC/USB • I2C & SPI • Full KMS display support • I2S & audio codecs • Chromebook based on mainline kernel + dts • IP blocks mostly from ARM or Synopsys 2015/8/25 9
  • 10. Rockchip • Hobbyist maintainer • git lo --author 'Heiko Stuebner' | wc -l • 158 • filtered out Samsung related • Official support • git lo --author @rock-chips.com | wc -l • 169 2015/8/25 10
  • 11. Mediatek • Basics (machine, clk, pinctrl , uart) • Drivers for • I2C, SPI, MMC, PMIC, Audio • Not seen in DTS yet 2015/8/25 11
  • 12. Mediatek • Outside maintainer • git lo --author 'Matthias Brugger' | wc -l • 53 • Since 2014/7/22 • Official support • git lo --author @mediatek.com | wc -l • 122 • Since 2014/11/4 2015/8/25 12
  • 14. Getting it to boot • Machine definition (arch/arm/mach-*) • Basic DTS • UART 2015/8/25 14
  • 16. Peripherals • Storage • MMC • SATA • USB • PMIC • I2C • SPI • … • Common vs custom IP? 2015/8/25 16
  • 17. Tips The kernel is very big and moves very fast 2015/8/25 17
  • 18. Start small • Is it a known, supported IP block? • Only standard resources? • MMIO, IRQ, clocks, resets • Ex: USB host • Hardware glue? Quirks? • Is the core supported? • Is it a library? • Write a glue driver • Modify / port • Ex: SATA AHCI, STMMAC 2015/8/25 18
  • 19. Start simple • Clocks can be done one at a time • Driver describes clock controls • Driver or DTS describes relationship between clocks • Both methods are used • Pinctrl / GPIO • Transcribe datasheets 2015/8/25 19
  • 20. Look around and Ask • Subscribe to mailing lists • Look at how other contributors write code • Learn what reviewers ask for • Look at how other platforms do it • mediatek pinctrl driver is very similar to sunxi • Documentation is sometimes lacking • When in doubt, ask • Release often • No one is going to review unsent code 2015/8/25 20
  • 21. What to expect Not getting merged is not the end of the world 2015/8/25 21
  • 22. Code issues • Code style • Indentation • Comments • Error path • Bugs • Resource leak? 2015/8/25 22
  • 23. NACK • Wrong design • Ex: rfkill dt support • Deprecated functions • Ex: platform_data • Occasional disagreement • “simplefb: add clock handling code” 2015/8/25 23
  • 24. Maintainers are busy • Sometimes you don’t get feedback • Maintainers often write code as well • Lots of mailing list traffic • Ping or resend 2015/8/25 24
  • 25. Didn’t get your patches in this release? • You can do better • Write better code • Respond to reviewers • Keep working • Release cycle is predictable • Sometimes it’s not your fault • Maintainer missed your patch or pull request • It happens • Maintainer went on vacation • Maintainer missing (?) 2015/8/25 25
  • 27. New SoC 1. Getting it to Boot • Machine definition (arch/arm/mach-*) • Basic DTS • UART 2. Clocks / Pinctrl 3. Peripherals • IP blocks don’t often change • Existing drivers should work • Quite satisfying! 2015/8/25 27
  • 29. Supporting new boards • Need schematics or hardware description • What peripherals are connected to the board? • What external ICs are there? • PMICs, audio codecs, sensors, storage… • Extra GPIOs? • LEDs • Write a .dts file • Test that everything works • Fairly easy! 2015/8/25 29
  • 31. Paid work • Not really much say • Getting products shipped is all that matters • Still • You should try • What benefits the most platforms / boards? • Must have vs. want? • MMC vs USB vs audio 2015/8/25 31
  • 32. Community hackers • Expertise / prior experience • Did clocks before, do it again • Interest • Me: I want WiFi! I want SMP! • Low hanging fruit • Me: Network is DWMAC based, only need glue code • Popular demand • DMA engine • Audio 2015/8/25 32
  • 34. Documents • NDA? • Incorrect • How do you know it’s incorrect? • Missing sections • Completely non-existent • No board schematics • Should you risk it going up in smoke? 2015/8/25 34
  • 35. Porting vendor code • Is often bad • Because of time to market concerns • Quite old • Android kernel still at 3.4? • Custom frameworks • Obsoleted by common frameworks • Clocks, resets, pinctrl, gpio, PHY, regmap, … • Binary blobs • No source code 2015/8/25 35
  • 36. Binary drivers • Third-party IP vendors • GPUs • VPUs • … • NDAs 2015/8/25 36
  • 37. GPL violations • There shouldn’t be binary-only blobs in the kernel • http://linux-sunxi.org/GPL_Violations • http://www.xda-developers.com/have-you-paid- your-linux-kernel-source-license-fee/ 2015/8/25 37