分类 pocketchip 下的文章

sudo apt-get install -y bluez-tools pulseaudio-module-bluetooth
sudo nano /etc/bluetooth/audio.conf
[General] Disable=Socket Enable=Media,Source,Sink,Gateway
sudo systemctl restart bluetooth pactl unload-module module-bluetooth-discover pactl load-module module-bluetooth-discover

sudo apt-get -y install build-essential git mercurial cmake curl screen unzip device-tree-compiler libncurses-dev ppp cu linux-image-extra-virtual u-boot-tools android-tools-fastboot android-tools-fsutils python-dev python-pip libusb-1.0-0-dev g++-arm-linux-gnueabihf pkg-config libacl1-dev zlib1g-dev liblzo2-dev uuid-dev libc6-i386 lib32stdc++6 lib32z1

git clone https://github.com/xue-fei/CHIP-buildroot.git

cd CHIP-buildroot
git checkout -b 4.4.13-ntc-mlc origin/4.4.13-ntc-mlc
make chip_defconfig
make

错误0
要以不安全的方式连接至 releases.linaro.org,使用“--no-check-certificate”
make menuconfig
load
在wget命令中加入--no-check-certificate的参数
Build options --->Commands --->(wget --passive-ftp -nd -t 3 --no-check-certificate) Wget command

用Ubuntu14.04无以下错误
错误1
Please port gnulib freadahead.c to your platform
cd output/build/host-m4-1.4.17
sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h

错误2
gdate.c:2497:7: error: format not a string literal, format string not checked [-Werror=format-nonliteral]

nano output/build/host-libglib2-2.44.1/glib/gdate.c
头部添加(不包含@)
@#pragma GCC diagnostic ignored "-Wformat-nonliteral"

错误3
gdbusmessage.c:2698:30: error: '%s' directive argument is null [-Werror=format-overflow=]

nano output/build/host-libglib2-2.44.1/gio/gdbusmessage.c
2698行 signature_str判空一下

if (signature_str == NULL)
{

goto out;

}
nano output/build/host-libglib2-2.44.1/gio/gdbusauth.c
1295行 line提前判空
if (line == NULL)
{

goto out;

}

错误4
lib/fseterr.c:77:3: error: #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."

cd output/build/host-bison-3.0.4
sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h

未完待续

我这里用的是Ubuntu20.04
sudo apt install device-tree-compiler
wget https://github.com/xue-fei/CHIP-u-boot/archive/refs/tags/production-v1.2.zip
unzip production-v1.2.zip
cd CHIP-u-boot-production-v1.2
nano Makefile
头部添加
export CROSS_COMPILE=arm-linux-gnueabihf-
export ARCH=arm

另外 mv include/linux/compiler-gcc7.h include/linux/compiler-gcc9.h
Ubuntu14.04上不用处理
最后
make CHIP_defconfig
make

最后说明,生成的文件还未测试,等测试后贴出结果

sendpix1.jpg
sendpix4.jpg

从Ubuntu18.04升级到20.04后,chip刷机提示usb_bulk_send() ERROR -7: Operation timed out
解决方法
wget http://ftp.br.debian.org/debian/pool/main/s/sunxi-tools/sunxi-tools_1.4.1-1_amd64.deb
sudo dpkg -i sunxi-tools_1.4.1-1_amd64.deb
然后

sudo apt-mark hold sunxi-tools

参考链接
https://steward-fu.github.io/website/umpc/pocketchip/fix_usb.htm
https://github.com/Thore-Krug/Flash-CHIP/issues/21

https://github.com/aleh/pocketchip-jwmrc

sudo apt-get install jwm
sudo apt-get install libxft-dev
git clone https://github.com/aleh/pocketchip-jwmrc.git
cd pocketchip-jwmrc
sudo make install
sudo reboot

桌面配置文件 /home/chip/.jwmrc

<?xml version="1.0"?>
<JWM>
   <!-- vim: set expandtab ts=3 sw=3 ai : -->

   <RootMenu height="18" onroot="12">

      <Program icon="terminal.png" label="Terminal">vala-terminal -fs 8</Program>
      <Program icon="pico8.png" label="PICO-8">pico8</Program>
      <Program icon="musicsequencer.png" label="SunVox">sunvox</Program>
      <Program icon="filebrowser.png" label="File Manager">pcmanfm</Program>
      <Program icon="webbrowser.png" label="Internet">surf -n -p -u "Mozilla/4.0 (PSP (PlayStation Portable); 2.00)" google.com</Program>
      <Program icon="texteditor.png" label="Text Editor">leafpad</Program>
      <Program icon="virtualboy.png" label="RetroArch">retroarch</Program>     
      <Program icon="kodi.png" label="Kodi">kodi</Program>
      <Separator/>

      <Menu label="Sound">
         <Program label="Enable Internal Speaker">
            amixer sset 'Left Mixer Left DAC' playback on
            amixer sset 'Power Amplifier Mixer' playback off
            amixer sset 'Right Mixer Left DAC' playback off
            amixer sset 'Right Mixer Right DAC' playback off
         </Program>
         <Program label="Disable Internal Speaker">
            amixer sset 'Left Mixer Left DAC' playback off 
            amixer sset 'Power Amplifier Mixer' playback off
            amixer sset 'Right Mixer Left DAC' playback off
            amixer sset 'Right Mixer Right DAC' playback off
         </Program>
         <Separator/>
         <Program label="Low">amixer sset 'Power Amplifier' playback 40%</Program>
         <Program label="Medium">amixer sset 'Power Amplifier' playback 50%</Program>
         <Program label="High">amixer sset 'Power Amplifier' playback 70%</Program>
         <Program label="Max">amixer sset 'Power Amplifier' playback 100%</Program>
      </Menu>

      <Menu label="Backlight">
         <Program label="10%">echo "1" > /sys/class/backlight/backlight/brightness</Program>
         <Program label="20%">echo "2" > /sys/class/backlight/backlight/brightness</Program>
         <Program label="50%">echo "5" > /sys/class/backlight/backlight/brightness</Program>
         <Program label="80%">echo "8" > /sys/class/backlight/backlight/brightness</Program>
         <Program label="100%">echo "10" > /sys/class/backlight/backlight/brightness</Program>
      </Menu>

      <Menu label="WiFi">
         <Program label="Configure">xfce4-terminal --hide-menubar --hide-toolbar -e nmtui</Program>
      </Menu>

      <Menu label="More">
         <Program label="Shutdown">systemctl poweroff</Program>
         <Program label="Reboot">systemctl reboot</Program>
         <Exit label="Log Out"/>
         <Separator/>

         <Program label="Screenshoot (Shift+Alt+3)">xfce4-screenshooter -d 1 -f -s /home/chip/Pictures</Program>
         <Separator/>

         <Restart label="Reload .jwmrc"/>
         <Program label="Edit .jwmrc">leafpad --tab-width=3 ~/.jwmrc</Program>
      </Menu>

   </RootMenu>

   <!-- By default we run all the programs maximized. -->
   <Group>
      <Name>.*</Name>
      <Option>maximized</Option>
   </Group>

   <!-- These have own preferences. -->
   <Group>
      <Name>sunvox|pico|retroarch|kodi</Name>
      <Option>notitle</Option>
      <Option>noborder</Option>
      <Option>maximized</Option>
   </Group>

   <!-- Programs that should not run maximized -->
   <Group>
      <Name>VisualBoyAdvance</Name>
   </Group>

   <Tray x="0" y="-1" height="20" autohide="off" layer="normal"> 

      <TrayButton label="Start" popup="">root:1</TrayButton>

      <Pager labeled="false"/>

      <TaskList maxwidth="150"/>

      <Dock/>

      <!-- Here an external X program (our battery status one) is started and is wrapped into the tray. -->
      <Swallow name="pocketchip-xbatt" width="70">pocketchip-xbatt --text=#ffffff --background=#ff007f</Swallow>

      <Clock format="%H:%M" zone=":Asia/Shanghai"/>

   </Tray>

   <WindowStyle>

      <Font>Sans-8:bold</Font>
      <Width>2</Width>
      <Height>15</Height>

      <Active>
         <Text>white</Text>
         <Title>#ff007f</Title>
         <Outline>white</Outline>
         <Opacity>1</Opacity>
         <Corner>1</Corner>
      </Active>

      <Inactive>
         <Text>white</Text>
         <Title>#ff007f</Title>
         <Outline>black</Outline>
         <Opacity>1</Opacity>
         <Corner>1</Corner>
      </Inactive>

   </WindowStyle>

   <TaskListStyle>
      <Font>Sans-8</Font>
      <ActiveForeground>#ff007f</ActiveForeground>
      <ActiveBackground>white</ActiveBackground>
      <Foreground>#ff007f</Foreground>
      <Background>white</Background>
      <Outline>black</Outline>
   </TaskListStyle>

   <TrayStyle>
      <Font>Sans-8:bold</Font>
      <Background>#ff007f</Background>
      <Foreground>white</Foreground>
      <Opacity>1</Opacity>
      <Decorations>flat</Decorations>
      <Outline>#ff007f</Outline>
      <Active>
         <Foreground>white</Foreground>
         <Background>#ff007f</Background>
      </Active>
   </TrayStyle>

   <PagerStyle>
      <Outline>black</Outline>
      <Foreground>gray90</Foreground>
      <Background>#808488</Background>
      <ActiveForeground>#70849d</ActiveForeground>
      <ActiveBackground>#2e3a67</ActiveBackground>
   </PagerStyle>

   <MenuStyle>
      <Font>Sans-8</Font>
      <Foreground>white</Foreground>
      <Background>#ff007f</Background>
      <Outline>#ff007f</Outline>
      <Corner>1</Corner>
      <ActiveForeground>#ff007f</ActiveForeground>
      <ActiveBackground>white</ActiveBackground>
      <Opacity>1</Opacity>
      <Decorations>flat</Decorations>
   </MenuStyle>

   <PopupStyle>
      <Enabled>false</Enabled>
      <Font>Sans-8</Font>
      <Outline>white</Outline>
      <Foreground>black</Foreground>
      <Background>yellow</Background>
   </PopupStyle>

   <IconPath>/home/chip/appIcons/</IconPath>

   <!-- Virtual Desktops -->
   <Desktops width="2" height="2">
      <!-- <Background type="solid">#4d4d4d</Background> -->
      <Background type="image">/home/chip/appIcons/background.jpg</Background>
   </Desktops>

   <!-- Double click speed (in milliseconds) -->
   <DoubleClickSpeed>400</DoubleClickSpeed>

   <!-- Double click delta (in pixels) -->
   <DoubleClickDelta>2</DoubleClickDelta>

   <!-- The focus model (sloppy or click) -->
   <FocusModel>click</FocusModel>

   <!-- The snap mode (none, screen, or border) -->
   <SnapMode distance="10">border</SnapMode>

   <!-- The move mode (outline or opaque) -->
   <MoveMode>opaque</MoveMode>

   <!-- The resize mode (outline or opaque) -->
   <ResizeMode>opaque</ResizeMode>

   <!--
    <StartupCommand>gkrellm</StartupCommand>
   -->

   <!-- Key bindings -->
   <Key key="Up">up</Key>
   <Key key="Down">down</Key>
   <Key key="Right">right</Key>
   <Key key="Left">left</Key>
   <Key key="h">left</Key>
   <Key key="j">down</Key>
   <Key key="k">up</Key>
   <Key key="l">right</Key>
   <Key key="Return">select</Key>
   <Key key="Escape">escape</Key>

   <Key mask="SA" key="3">exec:xfce4-screenshooter -f -s /home/chip/Pictures</Key>

   <Key mask="C" key="Tab">next</Key>
   <Key mask="A" key="Tab">next</Key>

   <Key mask="C" key="w">close</Key>
   <Key mask="C" key="q">close</Key>

   <Key mask="C" key="Escape">root:1</Key>
   <Key key="XF86PowerOff">showdesktop</Key>

   <Key mask="S" key="Escape">window</Key>

   <Key mask="C" key="#">desktop#</Key>
   <Key mask="C" key="Enter">maximize</Key>

   <Key mask="C" key="Right">rdesktop</Key>
   <Key mask="C" key="Left">ldesktop</Key>
   <Key mask="C" key="Up">udesktop</Key>
   <Key mask="C" key="Down">ddesktop</Key>
</JWM>

app图标路径<IconPath>/home/chip/appIcons/</IconPath>
appIcons.rar

Screenshot - 2020年11月14日 - 07时08分07秒.png

灰色的

<?xml version="1.0"?>
<JWM>
   <!-- vim: set expandtab ts=3 sw=3 ai : -->

   <RootMenu height="18" onroot="12">

      <Program icon="terminal.png" label="Terminal">vala-terminal -fs 8</Program>
      <Program icon="pico8.png" label="PICO-8">pico8</Program>
      <Program icon="musicsequencer.png" label="SunVox">sunvox</Program>
      <Program icon="filebrowser.png" label="File Manager">pcmanfm</Program>
      <Program icon="webbrowser.png" label="Internet">surf -n -p -u "Mozilla/4.0 (PSP (PlayStation Portable); 2.00)" google.com</Program>
      <Program icon="texteditor.png" label="Text Editor">leafpad</Program>
      <Program icon="virtualboy.png" label="RetroArch">retroarch</Program>     
      <Program icon="kodi.png" label="Kodi">kodi</Program>
      <Separator/>

      <Menu label="Sound">
         <Program label="Enable Internal Speaker">
            amixer sset 'Left Mixer Left DAC' playback on
            amixer sset 'Power Amplifier Mixer' playback off
            amixer sset 'Right Mixer Left DAC' playback off
            amixer sset 'Right Mixer Right DAC' playback off
         </Program>
         <Program label="Disable Internal Speaker">
            amixer sset 'Left Mixer Left DAC' playback off 
            amixer sset 'Power Amplifier Mixer' playback off
            amixer sset 'Right Mixer Left DAC' playback off
            amixer sset 'Right Mixer Right DAC' playback off
         </Program>
         <Separator/>
         <Program label="Low">amixer sset 'Power Amplifier' playback 40%</Program>
         <Program label="Medium">amixer sset 'Power Amplifier' playback 50%</Program>
         <Program label="High">amixer sset 'Power Amplifier' playback 70%</Program>
         <Program label="Max">amixer sset 'Power Amplifier' playback 100%</Program>
      </Menu>

      <Menu label="Backlight">
         <Program label="10%">echo "1" > /sys/class/backlight/backlight/brightness</Program>
         <Program label="20%">echo "2" > /sys/class/backlight/backlight/brightness</Program>
         <Program label="50%">echo "5" > /sys/class/backlight/backlight/brightness</Program>
         <Program label="80%">echo "8" > /sys/class/backlight/backlight/brightness</Program>
         <Program label="100%">echo "10" > /sys/class/backlight/backlight/brightness</Program>
      </Menu>

      <Menu label="WiFi">
         <Program label="Configure">xfce4-terminal --hide-menubar --hide-toolbar -e nmtui</Program>
      </Menu>

      <Menu label="More">
         <Program label="Shutdown">systemctl poweroff</Program>
         <Program label="Reboot">systemctl reboot</Program>
         <Exit label="Log Out"/>
         <Separator/>

         <Program label="Screenshoot (Shift+Alt+3)">xfce4-screenshooter -d 1 -f -s /home/chip/Pictures</Program>
         <Separator/>

         <Restart label="Reload .jwmrc"/>
         <Program label="Edit .jwmrc">leafpad --tab-width=3 ~/.jwmrc</Program>
      </Menu>

   </RootMenu>

   <!-- By default we run all the programs maximized. -->
   <Group>
      <Name>.*</Name>
      <Option>maximized</Option>
   </Group>

   <!-- These have own preferences. -->
   <Group>
      <Name>sunvox|pico|retroarch|kodi</Name>
      <Option>notitle</Option>
      <Option>noborder</Option>
      <Option>maximized</Option>
   </Group>

   <!-- Programs that should not run maximized -->
   <Group>
      <Name>VisualBoyAdvance</Name>
   </Group>

   <Tray x="0" y="-1" height="20" autohide="off" layer="normal"> 

      <TrayButton label="Start" popup="">root:1</TrayButton>

      <Pager labeled="false"/>

      <TaskList maxwidth="150"/>

      <Dock/>

      <!-- Here an external X program (our battery status one) is started and is wrapped into the tray. -->
      <Swallow name="pocketchip-xbatt" width="70">pocketchip-xbatt --text=#ffffff --background=#333333</Swallow>

      <Clock format="%H:%M" zone=":Asia/Shanghai"/>

   </Tray>

   <WindowStyle>

      <Font>Sans-8:bold</Font>
      <Width>2</Width>
      <Height>15</Height>

      <Active>
         <Text>white</Text>
         <Title>#ff007f</Title>
         <Outline>white</Outline>
         <Opacity>1</Opacity>
         <Corner>1</Corner>
      </Active>

      <Inactive>
         <Text>white</Text>
         <Title>#ff007f</Title>
         <Outline>black</Outline>
         <Opacity>1</Opacity>
         <Corner>1</Corner>
      </Inactive>

   </WindowStyle>

   <TaskListStyle>
      <Font>Sans-8</Font>
      <ActiveForeground>#333333</ActiveForeground>
      <ActiveBackground>white</ActiveBackground>
      <Foreground>#333333</Foreground>
      <Background>white</Background>
      <Outline>black</Outline>
   </TaskListStyle>

   <TrayStyle>
      <Font>Sans-8:bold</Font>
      <Background>#333333</Background>
      <Foreground>white</Foreground>
      <Opacity>1</Opacity>
      <Decorations>flat</Decorations>
      <Outline>#ff007f</Outline>
      <Active>
         <Foreground>white</Foreground>
         <Background>#ff007f</Background>
      </Active>
   </TrayStyle>

   <PagerStyle>
      <Outline>black</Outline>
      <Foreground>gray90</Foreground>
      <Background>#808488</Background>
      <ActiveForeground>#70849d</ActiveForeground>
      <ActiveBackground>#2e3a67</ActiveBackground>
   </PagerStyle>

   <MenuStyle>
      <Font>Sans-8</Font>
      <Foreground>white</Foreground>
      <Background>#333333</Background>
      <Outline>#ff007f</Outline>
      <Corner>1</Corner>
      <ActiveForeground>#ff007f</ActiveForeground>
      <ActiveBackground>white</ActiveBackground>
      <Opacity>1</Opacity>
      <Decorations>flat</Decorations>
   </MenuStyle>

   <PopupStyle>
      <Enabled>false</Enabled>
      <Font>Sans-8</Font>
      <Outline>white</Outline>
      <Foreground>black</Foreground>
      <Background>yellow</Background>
   </PopupStyle>

   <IconPath>/home/chip/appIcons/</IconPath>

   <!-- Virtual Desktops -->
   <Desktops width="2" height="2">
      <Background type="solid">#666666</Background>
   </Desktops>

   <!-- Double click speed (in milliseconds) -->
   <DoubleClickSpeed>400</DoubleClickSpeed>

   <!-- Double click delta (in pixels) -->
   <DoubleClickDelta>2</DoubleClickDelta>

   <!-- The focus model (sloppy or click) -->
   <FocusModel>click</FocusModel>

   <!-- The snap mode (none, screen, or border) -->
   <SnapMode distance="10">border</SnapMode>

   <!-- The move mode (outline or opaque) -->
   <MoveMode>opaque</MoveMode>

   <!-- The resize mode (outline or opaque) -->
   <ResizeMode>opaque</ResizeMode>

   <!--
    <StartupCommand>gkrellm</StartupCommand>
   -->

   <!-- Key bindings -->
   <Key key="Up">up</Key>
   <Key key="Down">down</Key>
   <Key key="Right">right</Key>
   <Key key="Left">left</Key>
   <Key key="h">left</Key>
   <Key key="j">down</Key>
   <Key key="k">up</Key>
   <Key key="l">right</Key>
   <Key key="Return">select</Key>
   <Key key="Escape">escape</Key>

   <Key mask="SA" key="3">exec:xfce4-screenshooter -f -s /home/chip/Pictures</Key>

   <Key mask="C" key="Tab">next</Key>
   <Key mask="A" key="Tab">next</Key>

   <Key mask="C" key="w">close</Key>
   <Key mask="C" key="q">close</Key>

   <Key mask="C" key="Escape">root:1</Key>
   <Key key="XF86PowerOff">showdesktop</Key>

   <Key mask="S" key="Escape">window</Key>

   <Key mask="C" key="#">desktop#</Key>
   <Key mask="C" key="Enter">maximize</Key>

   <Key mask="C" key="Right">rdesktop</Key>
   <Key mask="C" key="Left">ldesktop</Key>
   <Key mask="C" key="Up">udesktop</Key>
   <Key mask="C" key="Down">ddesktop</Key>
</JWM>

Screenshot - 2020年11月14日 - 07时59分11秒.png