mirror of
https://github.com/brain-hackers/brainlilo
synced 2024-09-27 15:10:18 +09:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2ec8f7827e | ||
|
f3b955417f | ||
|
48be6a7427 | ||
|
9e2d126e58 | ||
|
29c43802a5 | ||
|
0ef73cdeb4 | ||
|
4d5e55e135 |
@ -1,36 +1,3 @@
|
||||
/*
|
||||
* BrainLILO
|
||||
* U-Boot loader for electric dictionary.
|
||||
*
|
||||
* Copyright (C) 2019 C. Shirasaka <holly_programmer@outlook.com>
|
||||
* based on
|
||||
** ResetKitHelper
|
||||
** Soft/hard reset the electronic dictionary.
|
||||
**
|
||||
** Copyright (C) 2012 T. Kawada <tcppjp [ at ] gmail.com>
|
||||
*
|
||||
* This file is licensed in MIT license.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#define BRAINLILO_API extern "C" __declspec(dllexport)
|
||||
#include "BrainLILO.h"
|
||||
#include "BrainLILODrv.h"
|
||||
|
@ -1,5 +1,3 @@
|
||||
// This file is in public domain.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
|
@ -1,41 +1,15 @@
|
||||
/*
|
||||
* BrainLILODrv
|
||||
* U-Boot loader for electric dictionary.
|
||||
*
|
||||
* Copyright (C) 2019 C. Shirasaka <holly_programmer@outlook.com>
|
||||
* based on
|
||||
** ResetKitHelper
|
||||
** Soft/hard reset the electronic dictionary.
|
||||
**
|
||||
** Copyright (C) 2012 T. Kawada <tcppjp [ at ] gmail.com>
|
||||
*
|
||||
* This file is licensed in MIT license.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
#include <fstream>
|
||||
#include <regex>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
|
||||
#if defined(VERSION_MAJOR) && defined(VERSION_MINOR) && defined(VERSION_PATCH)
|
||||
#define CONFIG_VERSION TEXT(VERSION_MAJOR) L"." TEXT(VERSION_MINOR) L"." TEXT(VERSION_PATCH)
|
||||
#else
|
||||
#define CONFIG_VERSION L"unspecified"
|
||||
#endif
|
||||
|
||||
#define FSNOTIFY_POWER_OFF 1
|
||||
#define FSNOTIFY_POWER_ON 0
|
||||
|
||||
@ -226,6 +200,8 @@ static bool doLinux()
|
||||
HANDLE hUBoot;
|
||||
DWORD wReadSize;
|
||||
|
||||
outputDebugMessage(L"BrainLILO: Version " CONFIG_VERSION);
|
||||
|
||||
iVersion.open("\\NAND\\version.txt");
|
||||
while (getline(iVersion, line))
|
||||
{
|
||||
|
@ -1,5 +1,3 @@
|
||||
// This file is in public domain.
|
||||
|
||||
#pragma once
|
||||
#include <winioctl.h>
|
||||
|
||||
|
26
LICENSE
Normal file
26
LICENSE
Normal file
@ -0,0 +1,26 @@
|
||||
*** BrainLILO ***
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (C) 2019 C. Shirasaka <holly_programmer@outlook.com>
|
||||
Copyright (C) 2012 T. Kawada <tcppjp [ at ] gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
BrainLILO.h, BrainLILODrv.h, and bootloader.cpp are in the public domain.
|
5
Makefile
5
Makefile
@ -1,5 +1,5 @@
|
||||
VERSION_MAJOR=3
|
||||
VERSION_MINOR=0
|
||||
VERSION_MAJOR=4
|
||||
VERSION_MINOR=1
|
||||
VERSION_PATCH=0
|
||||
|
||||
PREFIX?=/opt/cegcc
|
||||
@ -27,6 +27,7 @@ DLLFLAGS=-DEV_PLATFORM_WIN32 -DUNICODE -D_UNICODE -DEV_UNSAFE_SWPRINTF -mwin32 \
|
||||
|
||||
DRVFLAGS= -DEV_PLATFORM_WIN32 -DUNICODE -D_UNICODE -DEV_UNSAFE_SWPRINTF -mwin32 \
|
||||
-O2 -mcpu=arm926ej-s -D_WIN32_WCE=0x600 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 \
|
||||
-DVERSION_MAJOR=\"$(VERSION_MAJOR)\" -DVERSION_MINOR=\"$(VERSION_MINOR)\" -DVERSION_PATCH=\"$(VERSION_PATCH)\" \
|
||||
-D_FILE_OFFSET_BITS=64 -DNDEBUG -Wall -static \
|
||||
-Wl,--image-base,0x100000,--allow-multiple-definition \
|
||||
-lcoredll -shared
|
||||
|
@ -1,5 +1,3 @@
|
||||
// This file is in public domain.
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR lpCmd, int nShow)
|
||||
|
2
models.h
2
models.h
@ -29,7 +29,7 @@ const std::map<std::wstring, std::wstring> models = {
|
||||
{L"ED-NB3", L"gen2.bin"}, // A9300
|
||||
{L"ED-NR3", L"gen2.bin"}, // A9100
|
||||
{L"SD-GJ1", L"gen2.bin"}, // GX300
|
||||
{L"ED-NQ3", L"gen2.bin"}, // A7400
|
||||
{L"ED-NQ3", L"gen2_7400.bin"}, // A7400
|
||||
{L"ED-SJ1", L"gen3_1.bin"}, // SJ1
|
||||
{L"ED-SH1", L"gen3_1.bin"}, // SH1
|
||||
{L"ED-HC4", L"gen3_1.bin"}, // HC4
|
||||
|
Loading…
Reference in New Issue
Block a user