Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 47 additions & 1 deletion data/catalogue/goke.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Goke — 13 SoC(s).
# Goke — 16 SoC(s).
#
# Exported from the catalogue table (#161). This file is the source of
# truth for the hardware pages: edit it in a pull request, not in the
Expand Down Expand Up @@ -177,6 +177,52 @@ socs:
build_status_url: https://github.com/OpenIPC/firmware/actions/workflows/gk7205v300_images.yml/badge.svg
featured: true
segment: cctv
- family: GK7205V500
model: GK7205V500
version: ''
status: done
load_address: '0x42000000'
sdk: ''
kernel: ''
uboot_filename: u-boot-gk7205v500-nor.bin
uboot_nand_filename: u-boot-gk7205v500-nand.bin
linux_filename: openipc.gk7205v500-nor-lite.tgz
notes: ''
urlname: gk7205v500
build_status_url: https://github.com/OpenIPC/firmware/actions/workflows/gk7205v500_images.yml/badge.svg
featured: false
segment: cctv
- family: GK7205V500
model: GK7205V510
version: ''
status: done
load_address: '0x42000000'
sdk: ''
kernel: ''
uboot_filename: u-boot-gk7205v510-nor.bin
uboot_nand_filename: u-boot-gk7205v510-nand.bin
linux_filename: openipc.gk7205v510-nor-lite.tgz
nand_board: gk7205v500
notes: ''
urlname: gk7205v510
build_status_url: https://github.com/OpenIPC/firmware/actions/workflows/gk7205v500_images.yml/badge.svg
featured: false
segment: cctv
- family: GK7205V500
model: GK7205V530
version: ''
status: done
load_address: '0x42000000'
sdk: ''
kernel: ''
uboot_filename: u-boot-gk7205v530-nor.bin
uboot_nand_filename: u-boot-gk7205v530-nand.bin
linux_filename: openipc.gk7205v500-nor-lite.tgz
notes: ''
urlname: gk7205v530
build_status_url: https://github.com/OpenIPC/firmware/actions/workflows/gk7205v500_images.yml/badge.svg
featured: false
segment: cctv
- family: GK7205V200
model: GK7605V100
version: ''
Expand Down
12 changes: 8 additions & 4 deletions data/catalogue/hisilicon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ socs:
load_address: '0x42000000'
sdk: ''
kernel: ''
uboot_filename: u-boot-hi3516dv200-universal.bin
uboot_filename: u-boot-hi3516dv200-nor.bin
uboot_nand_filename: u-boot-hi3516dv200-nand.bin
linux_filename: openipc.hi3516dv200-nor-lite.tgz
notes: ''
urlname: hi3516dv200
Expand Down Expand Up @@ -175,7 +176,8 @@ socs:
load_address: '0x42000000'
sdk: ''
kernel: ''
uboot_filename: u-boot-hi3516ev200-universal.bin
uboot_filename: u-boot-hi3516ev200-nor.bin
uboot_nand_filename: u-boot-hi3516ev200-nand.bin
linux_filename: openipc.hi3516ev200-nor-lite.tgz
notes: f23 f37 gc2053 imx307 imx335 sc2231 sc2232h sc2239 sc2315e sc3235 sc4236 sp2305
urlname: hi3516ev200
Expand All @@ -189,7 +191,8 @@ socs:
load_address: '0x42000000'
sdk: ''
kernel: ''
uboot_filename: u-boot-hi3516ev300-universal.bin
uboot_filename: u-boot-hi3516ev300-nor.bin
uboot_nand_filename: u-boot-hi3516ev300-nand.bin
linux_filename: openipc.hi3516ev300-nor-lite.tgz
notes: ''
urlname: hi3516ev300
Expand Down Expand Up @@ -259,7 +262,8 @@ socs:
load_address: '0x42000000'
sdk: ''
kernel: ''
uboot_filename: u-boot-hi3518ev300-universal.bin
uboot_filename: u-boot-hi3518ev300-nor.bin
uboot_nand_filename: u-boot-hi3518ev300-nand.bin
linux_filename: openipc.hi3518ev300-nor-lite.tgz
notes: ''
urlname: hi3518ev300
Expand Down
3 changes: 3 additions & 0 deletions deploy/firmware-segments.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ gk7202v300 goke GK7205V200 cctv
gk7205v200 goke GK7205V200 cctv
gk7205v210 goke GK7205V200 cctv
gk7205v300 goke GK7205V200 cctv
gk7205v500 goke GK7205V500 cctv
gk7205v510 goke GK7205V500 cctv
gk7205v530 goke GK7205V500 cctv
gk7605v100 goke GK7205V200 cctv
gm8135 grainmedia GM8136
gm8136 grainmedia GM8136
Expand Down
24 changes: 22 additions & 2 deletions frontend/apps/site/src/components/wizard/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ export default function Form({
// filename: a SoC can name a bootloader upstream does not publish, and the
// blank check let it through to a form offering to build an image around a
// bootloader that does not exist.
// A UBI-only NAND SoC publishes its NAND bootloader apart from the NOR one,
// and either is enough to install with.
const usable = doc === null
|| (doc.bootloader_published && doc.linux_filename !== ''
|| ((doc.bootloader_published || doc.bootloader_nand_published === true) && doc.linux_filename !== ''
Comment thread
widgetii marked this conversation as resolved.
&& doc.load_address !== '' && doc.availability !== 'none');

// Firmware but no bootloader, and a load address to work with. See
Expand Down Expand Up @@ -359,10 +361,28 @@ function Unavailable({ t, facts, doc }: { t: Props['t']; facts: SocFacts; doc: W
download being broken. Both of these are asked of the release index,
not built from a filename.
*/}
{/*
Two links where the SoC has a NAND bootloader of its own, each named
for its flash the way the bundles below are; one, unnamed, where a
single bootloader serves both.
*/}
{doc.bootloader_published && (
<div class="site-alert site-alert-info github">
<Icon name="github" size="github" class="float-end" />
<h5 class="site-h5 mb-1"><a href={doc.bl_url}>{show('bootloader')}</a></h5>
<h5 class="site-h5 mb-1">
<a href={doc.bl_url} title={doc.uboot_filename}>
{doc.uboot_nand_filename ? `${show('bootloader')} NOR` : show('bootloader')}
</a>
</h5>
<p class="mb-0 text-[.875em]">{show('for', { name: facts.fullName })}</p>
</div>
)}
{doc.bootloader_nand_published === true && doc.uboot_nand_filename && (
<div class="site-alert site-alert-info github">
<Icon name="github" size="github" class="float-end" />
<h5 class="site-h5 mb-1">
<a href={doc.bl_nand_url} title={doc.uboot_nand_filename}>{`${show('bootloader')} NAND`}</a>
</h5>
<p class="mb-0 text-[.875em]">{show('for', { name: facts.fullName })}</p>
</div>
)}
Expand Down
28 changes: 19 additions & 9 deletions frontend/apps/site/src/components/wizard/Result.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
import { useRef, useState } from 'preact/hooks';
import type { ComponentChildren } from 'preact';
import type { Block, Combination, WizardDocument } from '../../lib/wizard-export';
import { bootloaderFor, type Block, type Combination, type WizardDocument } from '../../lib/wizard-export';
import { fillHoles, type WizardSettings } from '../../lib/wizard-input';
import { toPermalink } from '../../lib/wizard-input';
import {
Expand Down Expand Up @@ -380,12 +380,19 @@ export default function Result({
/>
</Collapse>

<Html
html={t('firmware.info_html', {
commands: (combination.bootloader_variables ?? [])
.map((name) => `<code>${name}</code>`).join(', '),
})}
/>
{/*
Nothing to name on the UBI-only NAND layout: that install is
rootfs.ubi written by hand, not a bootloader macro, and the
sentence with an empty list reads as a fault.
*/}
{(combination.bootloader_variables ?? []).length > 0 && (
<Html
html={t('firmware.info_html', {
commands: (combination.bootloader_variables ?? [])
.map((name) => `<code>${name}</code>`).join(', '),
})}
/>
)}

<a
href="#collapseExperts"
Expand Down Expand Up @@ -554,6 +561,9 @@ function Experts({ t, doc, combination, settings, facts, sdcardRequired, edition
const install = (key: string, options?: Record<string, unknown>) =>
t(`firmware.installation.${key}`, options);
const nand = settings.flashType === 'nand';
// The file the U-Boot commands below write: on a UBI-only NAND SoC that is
// the NAND build, not the NOR one uboot_filename names.
const bootloader = bootloaderFor(doc, settings.flashType);

return (
<>
Expand All @@ -563,11 +573,11 @@ function Experts({ t, doc, combination, settings, facts, sdcardRequired, edition
<h3 class="mb-6 font-bold">{install('flashing_uboot.title')}</h3>
<div class="site-row">
<div class="site-col site-col-lg-4">
{doc.uboot_filename !== '' && (
{bootloader.filename !== '' && bootloader.published && (
<div class="github">
<Icon name="github" size="github" class="float-start me-2" />
<h6 class="site-h6 mb-0">
<a href={doc.bl_url} title={doc.uboot_filename}>{install('flashing_uboot.link')}</a>
<a href={bootloader.url} title={bootloader.filename}>{install('flashing_uboot.link')}</a>
</h6>
<p>for {facts.fullName}</p>
<p class="mb-0">{install('flashing_uboot.info')}</p>
Expand Down
30 changes: 30 additions & 0 deletions frontend/apps/site/src/data/catalogue.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,36 @@
"featured": true,
"segment": "cctv"
},
{
"model": "GK7205V500",
"family": "GK7205V500",
"version": "",
"urlname": "gk7205v500",
"status": "done",
"load_address": "0x42000000",
"featured": false,
"segment": "cctv"
},
{
"model": "GK7205V510",
"family": "GK7205V500",
"version": "",
"urlname": "gk7205v510",
"status": "done",
"load_address": "0x42000000",
"featured": false,
"segment": "cctv"
},
{
"model": "GK7205V530",
"family": "GK7205V500",
"version": "",
"urlname": "gk7205v530",
"status": "done",
"load_address": "0x42000000",
"featured": false,
"segment": "cctv"
},
{
"model": "GK7605V100",
"family": "GK7205V200",
Expand Down
63 changes: 63 additions & 0 deletions frontend/apps/site/src/lib/sitemap.golden.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1576,6 +1576,69 @@
<xhtml:link rel="alternate" hreflang="zh" href="https://openipc.org/zh/cameras/vendors/goke/socs/gk7205v300"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v300"/>
</url>
<url>
<loc>https://openipc.org/cameras/vendors/goke/socs/gk7205v500</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v500"/>
<xhtml:link rel="alternate" hreflang="ru" href="https://openipc.org/ru/cameras/vendors/goke/socs/gk7205v500"/>
<xhtml:link rel="alternate" hreflang="zh" href="https://openipc.org/zh/cameras/vendors/goke/socs/gk7205v500"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v500"/>
</url>
<url>
<loc>https://openipc.org/ru/cameras/vendors/goke/socs/gk7205v500</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v500"/>
<xhtml:link rel="alternate" hreflang="ru" href="https://openipc.org/ru/cameras/vendors/goke/socs/gk7205v500"/>
<xhtml:link rel="alternate" hreflang="zh" href="https://openipc.org/zh/cameras/vendors/goke/socs/gk7205v500"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v500"/>
</url>
<url>
<loc>https://openipc.org/zh/cameras/vendors/goke/socs/gk7205v500</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v500"/>
<xhtml:link rel="alternate" hreflang="ru" href="https://openipc.org/ru/cameras/vendors/goke/socs/gk7205v500"/>
<xhtml:link rel="alternate" hreflang="zh" href="https://openipc.org/zh/cameras/vendors/goke/socs/gk7205v500"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v500"/>
</url>
<url>
<loc>https://openipc.org/cameras/vendors/goke/socs/gk7205v510</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v510"/>
<xhtml:link rel="alternate" hreflang="ru" href="https://openipc.org/ru/cameras/vendors/goke/socs/gk7205v510"/>
<xhtml:link rel="alternate" hreflang="zh" href="https://openipc.org/zh/cameras/vendors/goke/socs/gk7205v510"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v510"/>
</url>
<url>
<loc>https://openipc.org/ru/cameras/vendors/goke/socs/gk7205v510</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v510"/>
<xhtml:link rel="alternate" hreflang="ru" href="https://openipc.org/ru/cameras/vendors/goke/socs/gk7205v510"/>
<xhtml:link rel="alternate" hreflang="zh" href="https://openipc.org/zh/cameras/vendors/goke/socs/gk7205v510"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v510"/>
</url>
<url>
<loc>https://openipc.org/zh/cameras/vendors/goke/socs/gk7205v510</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v510"/>
<xhtml:link rel="alternate" hreflang="ru" href="https://openipc.org/ru/cameras/vendors/goke/socs/gk7205v510"/>
<xhtml:link rel="alternate" hreflang="zh" href="https://openipc.org/zh/cameras/vendors/goke/socs/gk7205v510"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v510"/>
</url>
<url>
<loc>https://openipc.org/cameras/vendors/goke/socs/gk7205v530</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v530"/>
<xhtml:link rel="alternate" hreflang="ru" href="https://openipc.org/ru/cameras/vendors/goke/socs/gk7205v530"/>
<xhtml:link rel="alternate" hreflang="zh" href="https://openipc.org/zh/cameras/vendors/goke/socs/gk7205v530"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v530"/>
</url>
<url>
<loc>https://openipc.org/ru/cameras/vendors/goke/socs/gk7205v530</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v530"/>
<xhtml:link rel="alternate" hreflang="ru" href="https://openipc.org/ru/cameras/vendors/goke/socs/gk7205v530"/>
<xhtml:link rel="alternate" hreflang="zh" href="https://openipc.org/zh/cameras/vendors/goke/socs/gk7205v530"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v530"/>
</url>
<url>
<loc>https://openipc.org/zh/cameras/vendors/goke/socs/gk7205v530</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v530"/>
<xhtml:link rel="alternate" hreflang="ru" href="https://openipc.org/ru/cameras/vendors/goke/socs/gk7205v530"/>
<xhtml:link rel="alternate" hreflang="zh" href="https://openipc.org/zh/cameras/vendors/goke/socs/gk7205v530"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://openipc.org/cameras/vendors/goke/socs/gk7205v530"/>
</url>
<url>
<loc>https://openipc.org/cameras/vendors/goke/socs/gk7605v100</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://openipc.org/cameras/vendors/goke/socs/gk7605v100"/>
Expand Down
43 changes: 43 additions & 0 deletions frontend/apps/site/src/lib/wizard-export.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* Which bootloader the download link beside the U-Boot commands names. On the
* UBI-only NAND SoCs (u-boot-xmedia: hi3516ev300 and its family, the
* GK7205V500 family) upstream builds the NAND bootloader apart from the NOR
* one, and the commands for a NAND chip write the NAND file -- a link to the
* NOR file beside them would install a bootloader with the wrong mtdparts.
*/
import { describe, expect, test } from 'vitest';
import { bootloaderFor } from './wizard-export';

const split = {
uboot_filename: 'u-boot-hi3516av100-universal.bin',
bl_url: 'https://example.invalid/u-boot-hi3516av100-universal.bin',
bootloader_published: true,
};
const ubi = {
uboot_filename: 'u-boot-hi3516ev300-nor.bin',
bl_url: 'https://example.invalid/u-boot-hi3516ev300-nor.bin',
bootloader_published: true,
uboot_nand_filename: 'u-boot-hi3516ev300-nand.bin',
bl_nand_url: 'https://example.invalid/u-boot-hi3516ev300-nand.bin',
bootloader_nand_published: false,
};

describe('the bootloader a flash chip installs', () => {
test('one bootloader serves both chips where there is no NAND build', () => {
for (const chip of ['nor8m', 'nor16m', 'nand']) {
expect(bootloaderFor(split, chip)).toEqual({
filename: split.uboot_filename, url: split.bl_url, published: true,
});
}
});

test('NAND gets the NAND build, with its own published state', () => {
expect(bootloaderFor(ubi, 'nand')).toEqual({
filename: 'u-boot-hi3516ev300-nand.bin', url: ubi.bl_nand_url, published: false,
});
});

test('NOR keeps the NOR build on a SoC that has both', () => {
expect(bootloaderFor(ubi, 'nor16m').filename).toBe('u-boot-hi3516ev300-nor.bin');
});
});
Loading
Loading