Repository navigation
Install NAND cameras on u-boot-xmedia SoCs as one UBI device, written with write.trimffs #392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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'); | ||
| }); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.