Upgrade to Pro — share decks privately, control downloads, hide ads and more …

電子辞書のアイデンティティを消す方法

Takumi Sueda
September 24, 2022
3.5k

 電子辞書のアイデンティティを消す方法

第54回 情報科学若手の会 #wakate2022

Takumi Sueda

September 24, 2022
Tweet

More Decks by Takumi Sueda

Transcript

  1. 54 #wakate
    2022
    @puhitaku

    View full-size slide

  2. 2
    Takumi Sueda @puhitaku




    HOMMA

    Inc.







    3
    D







    20
    1
    4 2
    018


    2020 Linux



    20
    2
    1
    TEPRA Lite BLE

    View full-size slide

  3. SHARP Brain
    5

    View full-size slide






  4. Twitter #wakate
    202
    2
    7

    View full-size slide

  5. SHARP Brain
    SHARP Brain PW-SH
    1


    SHARP 2008


    Windows CE 2020


    CE


    exe


    Brain 2ch


    Brain Windows CE




    Wikipedia


    matplotlib



    9

    View full-size slide

  6. SHARP Brain 10
    DRAM: LPDDR
    128
    MB
    eMMC:
    8
    GB


    SD
    Raspberry Pi


    LCD
    CPU: NXP i.MX
    2
    83

    ARM
    926
    EJ-S, armv
    5
    tej


    4
    54
    MHz
    LCD:
    8
    00
    x
    48 0
    SD: SDXC


    :



    View full-size slide

  7. SHARP Brain
    Linux


    2020 Linux


    "Brain Hackers"



    Brain Debian
    Linux Brainux


    OS SD
    Brain Linux
    11
    Brainux / Brain Hackers

    View full-size slide

  8. SHARP Brain



    1 Windows Linux
    12

    View full-size slide

  9. SHARP Brain SD eMMC 13
    SD Linux


    eMMC
    SD: SDXC


    eMMC:
    8
    GB


    SD

    View full-size slide

  10. SHARP Brain SD eMMC
    SD


    SD


    SD


    SDIO Wi-Fi


    Linux mainline
    SDIO Wi-Fi


    GPIO


    eMMC Linux
    14

    View full-size slide

  11. SHARP Brain SD eMMC
    Brain Linux

    Linux


    Good-bye, Windows Good-bye,
    15

    View full-size slide

  12. eMMC Linux



    17

    View full-size slide

  13. eMMC Linux 18
    Brain

    Windows CE

    View full-size slide

  14. eMMC Linux 19


    Windows CE

    ?

    View full-size slide

  15. eMMC Linux
    SoC






    eMMC
    20

    View full-size slide

  16. Boot ROM
    Arm SoC
    22

    View full-size slide

  17. Boot ROM
    A. Boot ROM


    23

    View full-size slide

  18. Boot ROM
    A. Boot ROM

    (i.MX
    28
    On-chip ROM )
    24

    View full-size slide

  19. Boot ROM


    CPU
    25
    eMMC
    DRAM
    I
    2
    C
    SPI
    ARM
    9
    2 6
    EJ-S

    Core

    View full-size slide

  20. Boot ROM
    On-chip ROM On-chip RAM


    On-chip RAM On-chip ROM
    26
    On-chip ROM

    (Boot ROM)
    On-chip RAM

    (SRAM)
    ARM
    9
    2 6
    EJ-S

    Core

    View full-size slide

  21. ARM
    9
    2 6
    EJ-S

    Core
    Boot ROM
    CPU Boot ROM


    27
    On-chip ROM
    On-chip RAM

    (SRAM)
    🤔
    ARM
    USB recovery
    I
    2
    C
    SPI
    SSP (eMMC / SD)
    GPMI (NAND)
    JTAG

    View full-size slide

  22. ARM
    9
    2 6
    EJ-S

    Core
    Boot ROM
    Boot ROM


    "One-Time Programmable ROM" "Boot Mode"
    28
    On-chip ROM
    On-chip RAM

    (SRAM)
    🤔
    OTP

    One-Time Programmable ROM

    View full-size slide

  23. Boot ROM
    "OTP ROM" "OTP"


    SoC
    ROM


    CPU



    OTP
    One-Time Programmable (OTP) ROM
    29
    OTP

    View full-size slide

  24. SHARP OTP
    SHARP Brain PW-SH
    1


    SHARP 2008


    Windows CE 2020


    CE


    exe


    Brain 2ch


    Brain Windows CE




    Wikipedia


    matplotlib



    31

    View full-size slide

  25. SHARP OTP
    Brain Scalpel Windows CE
    32

    View full-size slide

  26. SHARP OTP 33


    0x
    80
    02
    C
    1
    A
    0
    32bit


    MSB 8bit BOOT_MODE
    Scalpel 0x
    80
    02
    C
    1
    A
    0

    BOOT_MODE 0x
    01
    (
    0
    b
    00
    0000
    01
    )

    View full-size slide

  27. SHARP OTP
    BOOT_MODE
    0
    bXXX
    0 0
    001
    I²C
    3
    .
    3
    V
    34

    View full-size slide

  28. ARM
    9
    2 6
    EJ-S

    Core
    SHARP OTP
    CPU I²C EEPROM
    35
    On-chip ROM
    On-chip RAM

    (SRAM)
    😊
    ARM
    USB slave (recovery)
    SSP (eMMC / SD)
    SPI
    I
    2
    C
    GPMI (NAND)
    JTAG
    I²C

    View full-size slide

  29. SHARP EEPROM
    Q. Brain EEPROM
    37

    View full-size slide

  30. SHARP EEPROM 38

    View full-size slide

  31. SHARP EEPROM


    I²C 100kHz 400kHz


    EEPROM
    Digi-key


    SON


    2
    mm x
    3
    mm ON Semi Rohm


    0.5mm Rohm VSON EEPROM


    IC 4G
    3
    BR
    2
    4
    G
    3
    2
    =
    4
    KB
    EEPROM
    39

    View full-size slide

  32. SHARP EEPROM
    0.2mm
    40

    View full-size slide

  33. SHARP EEPROM
    "Boot Stream" (SB)


    SB Boot ROM


    Rockbox sbtoelf

    Ghidra disassemble
    EEPROM
    41
    SB Header
    Encryption keys
    Section 0
    Cmd: LOAD @ 0xE440
    Cmd: FILL @ 0xE6A0 ~ +0x114
    Cmd: LOAD @ 0xE400
    Cmd: CALL @ 0xE400
    Cmd: MODE to 0x09
    Rockbox:
    Boot ROM (U-Boot)

    View full-size slide

  34. SHARP EEPROM
    SB SRAM
    42
    IVT Header


    Entry point:

    0xE61C
    Instructions (armv5tej)
    Zero-filled


    area

    (.bss)
    0xE400 0xE440 0xE6A0 0xE7B4
    0xE61C
    CALL command Jump Return

    View full-size slide

  35. SHARP EEPROM
    eMMC
    eMMC


    eMMC EEPROM
    eMMC SB
    EEPROM Boot ROM
    43
    Cmd: LOAD @ 0xE440
    Cmd: FILL @ 0xE6A0
    Cmd: LOAD @ 0xE400
    Cmd: CALL @ 0xE400
    Cmd: MODE to 0x09
    eMMC
    eMMC

    View full-size slide

  36. ARM
    9
    2 6
    EJ-S

    Core
    SHARP EEPROM
    CPU I²C EEPROM eMMC


    eMMC
    44
    On-chip ROM
    On-chip RAM

    (SRAM)
    😊
    ARM
    USB slave (recovery)
    SSP (eMMC / SD)
    SPI
    I
    2
    C
    GPMI (NAND)
    JTAG
    I²C EEPROM


    eMMC


    eMMC

    View full-size slide

  37. SHARP eMMC
    Linux SD dd /dev/mmcblk
    0 



    Master Boot Record i.MX
    2
    8
    partition
    type
    0
    x
    5
    3

    SB
    eMMC
    46

    View full-size slide

  38. SHARP eMMC
    eMMC
    47
    MBR


    Entry 0: FAT32


    Entry 1: SB


    Entry 2: ?
    SB
    FAT32


    Sector 0 256 2304
    Read MBR Read & run SB Run EBOOT
    ?
    198912

    View full-size slide

  39. ARM
    9
    2 6
    EJ-S

    Core
    SHARP eMMC
    CPU eMMC EBOOT Windows CE


    48
    On-chip ROM
    On-chip RAM

    (SRAM)
    😊
    ARM
    USB slave (recovery)
    SSP (eMMC / SD)
    SPI
    I
    2
    C
    GPMI (NAND)
    JTAG
    eMMC



    View full-size slide

  40. SHARP eMMC
    EBOOT NK image Windows

    eMMC DRAM Windows CE
    49
    EBOOT
    SSP (eMMC / SD)
    MBR
    Boot Stream
    NK image
    NK image


    On-chip ROM On-chip RAM
    DRAM
    NK image
    EBOOT
    EBOOT

    View full-size slide

  41. SHARP eMMC 50
    On-chip ROM I²C EEPROM eMMC
    Windows CE

    View full-size slide

  42. I²C EEPROM SB OS


    eMMC SB Windows CE EBOOT


    eMMC
    Linux
    52
    On-chip ROM I²C EEPROM eMMC
    OS OS

    View full-size slide



  43. : USB boot eMMC boot Windows

    View full-size slide

  44. 54
    "USB boot mode" PC SB EEPROM


    eMMC SB PC Windows CE


    EEPROM OS
    eMMC

    I²C EEPROM
    USB Boot
    💻
    USB
    SB U-Boot mkimage

    View full-size slide

  45. eMMC USB USB boot mode
    55

    View full-size slide

  46. :


    EEPROM eMMC
    56
    On-chip ROM I²C EEPROM eMMC
    SB

    View full-size slide

  47. eMMC
    Linux U-Boot (Das U-
    Boot)


    SD Linux kernel
    U-Boot eMMC


    SD OS
    SB U-Boot
    eMMC OS
    58

    View full-size slide

  48. eMMC
    eMMC OS
    59
    MBR


    Entry 0: FAT32


    Entry 1: SB


    Entry 2: Ext4
    FAT32


    Ext4


    Sector 0 2048 20800
    Read MBR Read & run SB Run U-Boot
    SB


    24800

    View full-size slide

  49. eMMC
    Linux SD eMMC
    dd




    USB boot + (UART)
    eMMC
    61

    View full-size slide

  50. eMMC 63
    /dev/mmcblk0 = eMMC

    View full-size slide

  51. eMMC
    SHARP Brain


    Linux
    64

    View full-size slide

  52. 66
    On-chip ROM I²C EEPROM eMMC
    SoC





    View full-size slide