Skip to content

Instantly share code, notes, and snippets.

View rogeliodh's full-sized avatar

Rogelio Domínguez Hernández rogeliodh

  • Mexico City
  • 03:02 (UTC -06:00)
View GitHub Profile
@rogeliodh
rogeliodh / fetch_news.sh
Created January 4, 2012 14:34
[Bash] Script to fetch news with calibre
#!/bin/bash
# This is free and unencumbered shell script released into the public domain.
#
####################### Begin Customization Section #############################
#
# Name of the recipe to fetch. You can run:
# ebook-convert --list-recipes
# to look for the correct name. Do not forget the .recipe suffix
RECIPE="La Jornada (Mexico).recipe"
# Official X1II 1.2 Firmware
devel@devel:~/fiio$ wget https://www.dropbox.com/s/8x0fhctajqm0wt1/X1II-FW1.2.zip?dl=1
devel@devel:~/fiio$ unzip X1II-FW1.2.zip
Archive: X1II-FW1.2.zip
inflating: X1II.fw
inflating: X1II firmware update instructions (abridged).txt
# fw is just a tgz
devel@devel:~/fiio$ file X1II.fw
X1II.fw: gzip compressed data, last modified: Sat Oct 1 12:36:19 2016, from Unix
@rogeliodh
rogeliodh / -
Created October 22, 2016 17:41
Bus 001 Device 017: ID 601a:4760 Ingenic Semiconductor Ltd.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x601a Ingenic Semiconductor Ltd.
@rogeliodh
rogeliodh / -
Created October 22, 2016 18:33
diff --git a/utils/hwstub/lib/hwstub_usb.cpp b/utils/hwstub/lib/hwstub_usb.cpp
index 6723656..0352872 100644
--- a/utils/hwstub/lib/hwstub_usb.cpp
+++ b/utils/hwstub/lib/hwstub_usb.cpp
@@ -535,6 +535,7 @@ error jz_handle::probe()
if(libusb_claim_interface(m_handle, 0) != 0)
m_probe_status = error::PROBE_FAILURE;
+ m_probe_status = error::SUCCESS;
return m_probe_status;
@rogeliodh
rogeliodh / -
Created October 22, 2016 18:35
Selecting soc jz4760b. Redirecting HW to hwstub.soc.jz4760b
Starting interactive lua session. Type 'help()' to get some help
information
hwstub
version: 4.3
device
version: 4.3.0
target
id: 0x37345a4a (JZ47)
name: JZ4760 USB Boot Device
File fs/dev/console is a character special file while file myfs/dev/console is a character special file
File fs/dev/null is a character special file while file myfs/dev/null is a character special file
File fs/dev/zero is a character special file while file myfs/dev/zero is a character special file
diff -ruN fs/etc/init.d/rcS myfs/etc/init.d/rcS
--- fs/etc/init.d/rcS 2016-09-01 00:55:51.000000000 -0500
+++ myfs/etc/init.d/rcS 2016-10-30 09:55:56.000000000 -0600
@@ -38,3 +38,5 @@
/usr/jz_mips/bin/udevd --daemon
/usr/jz_mips/bin/udevstart
[ 0.000000] Linux version 2.6.31.3-svn663 (chenyou@skytc7) (gcc version 4.1.2) #315 PREEMPT Sat Oct 1 20:55:25 CST 2016
[ 0.000000] Jz47XX Floating coprocessor work on 32*32bit mode
[ 0.000000] console [early0] enabled
[ 0.000000] CPU revision is: 2ed0024f (Ingenic JZRISC)
[ 0.000000] FPU revision is: 00330000
[ 0.000000] CPU clock: 432MHz, System clock: 144MHz, Peripheral clock: 72MHz, Memory clock: 72MHz
[ 0.000000] JZ4760B Lepus board setup
[ 0.000000] Power Management for JZ
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 04000000 @ 00000000 (usable)
@rogeliodh
rogeliodh / diff -ruN X1II-FW1.2 X1II-FW1.3.3 | diffstat
Last active November 1, 2016 13:05
Changes between Fiio X1 (2nd gen) firmware 1.2 and 1.3.3
X1II.fw |binary
X1II/fifo_rootfs.yaffs2 |binary
X1II/fifo_rootfs.yaffs2.md5 | 2
X1II/fifo_rootfs/lib/libtag.so.1 |binary
X1II/fifo_rootfs/usr/pv-project/320x240-Resource/Config/pic_list2.txt | 4
X1II/fifo_rootfs/usr/pv-project/320x240-Resource/Config/pic_list3.txt | 4
X1II/fifo_rootfs/usr/pv-project/320x240-Resource/Config/pic_list4.txt | 4
X1II/fifo_rootfs/usr/pv-project/320x240-Resource/Config/pic_list5.txt | 4
X1II/fifo_rootfs/usr/pv-project/320x240-Resource/Config/pic_list6.txt | 4
X1II/fifo_rootfs/usr/pv-project/320x240-Resource/Config/txt_list_big.txt | 1
@rogeliodh
rogeliodh / x1ii_fw_unpack.sh
Created January 20, 2017 22:31
script to unpack Fiio's X1ii firmware files
#!/bin/sh
set -e
mkdir -p myfw
tar zxvf X1II.fw -C myfw
# unyaffs2 from yaffs2utils is not working
#sudo ./unyaffs2 myfw/fifo_rootfs.yaffs2 myfw/fifo_rootfs
# Use unyaffs from ubuntu's unyaffs package (apt-get install unyaffs)
sudo unyaffs myfw/fifo_rootfs.yaffs2 myfw/fifo_rootfs
@rogeliodh
rogeliodh / x1ii_fw_pack.sh
Created January 20, 2017 22:32
script to repack Fiio's X1ii firmware files
#!/bin/sh
set -e
cd myfw
# mkyaffs2 from mkyaffs2 0.2.9_20120815
sudo ../mkyaffs2 fifo_rootfs fifo_rootfs.yaffs2
echo -n `md5sum fifo_rootfs.yaffs2 | cut -c1-32` > fifo_rootfs.yaffs2.md5
tar zcvf ../X1II.repacked.fw fifo_uimage fifo_uimage.md5 fifo_uimageesmt fifo_uimageesmt.md5 fifo_rootfs.yaffs2 fifo_rootfs.yaffs2.md5