Goodnight Wiki / Gongkai and Shanzhai

Gongkai and Shanzhai

In the markets of Shenzhen, you can buy a functional cell phone for twelve dollars. Not a stripped-down burner — a phone with a 364 MHz ARM processor, megabytes of RAM, Bluetooth, a touchscreen, an FM radio, and more peripherals than most Arduino boards. It exists because Chinese entrepreneurs have access to a parallel IP ecosystem that operates outside the Western framework of patents, copyrights, and NDAs — and this ecosystem produces innovation at a pace that Western startups can barely comprehend.1

Andrew "bunnie" Huang coined the term gongkai to describe this system. It's deliberately not the Chinese word for "open source" (kaiyuan), because this isn't open source in the Western sense. It's something structurally different.

The Network Model of IP

The key insight is about two fundamentally different ways of thinking about intellectual property. The West has a "broadcast" model: innovation is credited to specific authors or inventors, who receive royalties and legal protection for their work. Good ideas are owned, and ownership is enforced by law. This works well for the people at the top of the IP hierarchy — Apple, Google, Qualcomm — but creates nearly impenetrable barriers for newcomers.

China's gongkai ecosystem operates on a "network" model: documents labeled "confidential" and "proprietary" are shared overtly, not according to the letter of the law, but according to a system of reciprocal favors. Chip manufacturers share detailed design packages with small entrepreneurs — schematics, board layouts, firmware — because those entrepreneurs will use the manufacturer's chips in their products. The sharing promotes sales. There's a quid pro quo, but it's enforced by social norms and business relationships rather than by lawyers.

This isn't a one-directional flow of piracy. The gongkai ecosystem is a functioning innovation network where sharing is investment. You share your documentation today because tomorrow your friend might stand on your shoulders, and next month you'll need to stand on theirs. In a system with loose IP enforcement, maintaining your position in the network requires constant sharing.

What This Enables

The practical result is extraordinary prototyping speed. Chinese phone models change on a seasonal basis. Small teams — sometimes just two or three people — obtain complete design packages for working phones and fork the design, focusing only on the parts they want to change. This produces a wild diversity of form factors: phones with built-in cigarette lighters, phones with enormous batteries that can charge other phones, phones with huge buttons for the visually impaired, watch-sized phones, skeleton novelty phones.

Western entrepreneurs, by contrast, start from Arduino, Raspberry Pi, or Beaglebone — platforms that use older, well-documented chips because those are the only ones with freely available documentation. The cutting-edge chips that power modern smartphones are locked behind NDAs, minimum purchase agreements, and six-figure cash deposits. Even if a Western startup has a brilliant hardware idea, the IP framework forces them to build on antiquated foundations.

Huang found this situation intolerable. As a hardware engineer, he wanted to be able to fork existing phone designs — to use a $3 chip with a 364 MHz processor instead of a $6 chip with a 16 MHz processor. So his team set out to reverse-engineer the Mediatek MT6260, port an open-source RTOS to it, and create a legal bridge between the gongkai ecosystem and Western open-source licensing.

The Reverse Engineering Journey

The technical work is fascinating in its own right. The Mediatek chip turned out to be not a single die but a multi-chip module — at least four chips wire-bonded together in a single package, a vindication of the prediction that the future would be "system mostly on a chip" rather than system-on-a-chip. The team used oscilloscopes to trace boot sequences, built FPGA-based ROM emulators to speed up their test cycle, and constructed a hybrid debugging environment where a QEMU-emulated ARM CPU ran the firmware while reflecting memory accesses to a live physical chip.

The legal foundation for this work rests on established fair-use precedents for reverse engineering: courts have found that reverse engineering to understand ideas embedded in code and achieve interoperability is fair use. Facts — like the base address of an interrupt controller — are not copyrightable. The team could extract facts from the gongkai documentation and re-express them in their own arrangement under a Western open-source license.

To guard against unconscious plagiarism, they invented a custom scripting language called "scriptic" for expressing hardware initialization sequences. By transforming code into a new language, they were forced to consider the facts presented and express them in an original arrangement, rather than inadvertently copying the structure of the source material.

Gongkai and Open Source: Complements, Not Competitors

The gongkai ecosystem and Western open source solve the same problem — making technology accessible to innovators — through different mechanisms. Open source uses legal frameworks (licenses, foundations, contributor agreements) to create commons. Gongkai uses social frameworks (reciprocal sharing, network obligations, face) to create a different kind of commons. Neither is strictly superior.

Where gongkai excels is speed and accessibility: no lawyers needed, no license compatibility debates, no foundation politics. Where it falls short is in the protections it can offer: there's no guarantee that what's shared today will still be available tomorrow, and the system depends on the continued goodwill of the major chip manufacturers. Western open source is slower and more bureaucratic but more durable.

The question of whether these two systems can bridge is important for open hardware more broadly. The Fernvale project demonstrated that it's technically and legally possible to move knowledge from gongkai into Western open source. But the process is laborious — reverse engineering each chip, re-expressing each fact in original form. It doesn't scale the way simple copying does.

What scales is economic incentive. If Western open-source hardware platforms can demonstrate the same kind of ecosystem effects that gongkai produces in Shenzhen — where sharing documentation sells chips — then chip manufacturers might start making their documentation available under open terms, not because of ideology but because it's good business. The twelve-dollar phone isn't a political statement about IP reform. It's proof that open documentation produces innovation faster than closed documentation. The rest is just catching up.

Footnotes

  1. From Gongkai to Open Source by bunnie (Andrew Huang) — source

Open in stacked reader →