




























































▒|D▒"!▒
▒@ ▒▒▒▒▒
▒▒▒F▒0▒▒ ▒▒"x▒▒▒
▒@@▒▒▒▒8▒▒ ▒▒
<▒
▒▒!@▒p▒▒@( @@▒▒▒▒▒▒▒@▒@ @(▒▒▒▒▒▒▒P`▒(▒@ 0! @@ ▒


































[root (ttyGS0)]# mount -o remount,rw /dev/mmcblk0p1 /initrd/mnt/sd
[root (ttyGS0)]# dd if=/dev/mmcblk2 of=/initrd/mnt/sd/mmcblk2.img
dd: /dev/mmcblk2: Input/output errorg_multi gadget: Multifunction Composite Gadget, version: 2009/07/21
g_multi gadget: g_multi ready
dr_controller_run: udc enter low power mode
fsl-usb2-udc: bind to driver g_multi
epdc_progress_work_func end progress.
usb wakeup is here
otg udc wakeup
try_wake_up_udc: udc out low power mode
it is ACTIVE host
g_multi gadget: high speed config #2: Multifunction Composite (RNDIS + MS + ACM)
mmcblk2: retrying using single block read(cmderr=0,dataerr=-110,stoperr=0)
mmcblk2: error -110 transferring data, sector 8160, nr 16, card status 0x80900
end_request: I/O error, dev mmcblk2, sector 8160
mmcblk2: error -110 transferring data, sector 8161, nr 15, card status 0x80900
end_request: I/O error, dev mmcblk2, sector 8161
mmcblk2: error -110 transferring data, sector 8162, nr 14, card status 0x80900
end_request: I/O error, dev mmcblk2, sector 8162
mmcblk2: error -110 transferring data, sector 8163, nr 13, card status 0x80900
end_request: I/O error, dev mmcblk2, sector 8163
Buffer I/O error on device mmcblk2, logical block 1020
mmcblk2: retrying using single block read(cmderr=0,dataerr=-110,stoperr=0)
mmcblk2: error -110 transferring data, sector 8160, nr 8, card status 0x80900
end_request: I/O error, dev mmcblk2, sector 8160
mmcblk2: error -110 transferring data, sector 8161, nr 7, card status 0x80900
end_request: I/O error, dev mmcblk2, sector 8161
mmcblk2: error -110 transferring data, sector 8162, nr 6, card status 0x80900
end_request: I/O error, dev mmcblk2, sector 8162
mmcblk2: error -110 transferring data, sector 8163, nr 5, card status 0x80900
end_request: I/O error, dev mmcblk2, sector 8163
Buffer I/O error on device mmcblk2, logical block 1020use e2fsck to
check and repair three file systems with this string of commands:
[root (ttyGS0)]# cd /initrd/mnt/sd/
[root (ttyGS0)]# busybox chmod +x e2fsck
[root (ttyGS0)]# e2fsck -v /dev/mmcblk2p9
[root (ttyGS0)]# e2fsck -v /dev/mmcblk2p10
[root (ttyGS0)]# e2fsck -v /dev/mmcblk2p6


















you can backup everything, but in order to restore a partition, you have to enter recovery mode and access the reader via serial gadget connection. but this is impossible with a damaged boot manager / initrd / kernel
So, I would not only backup the whole flash disk, but each partition seperately because in case of a messed up device, you will more likely want to restore system or data partition
its simply bricked then

















I haven't actually tried this myself, but I think you could get it done this way using the rupor USB shell:
1. Copy the uboot env from my image to a separate file:
Code:
dd if=sd_card_PRS-T1_1.0.07_adb_enabled.bin skip=786432 of=uboot_new.bin bs=1 count=131072




OS Firmware
|-files
| |-update.img
uboot_new.bin
Boot Rupor Rescue to get serial shell over USB (Hold HOME + MENU buttons before you turn on device).
Remount SD Card as writable.
mount -o remount,rw /dev/mmcblk0p1 /initrd/mnt/sd
Change directory to the SD Card mounted.
cd /initrd/mnt/sd
Backup the old uboot env to a file.
dd if=/dev/mmcblk2 skip=786432 of=uboot_old.bin bs=1 count=131072
Write a new one.
dd if=uboot_new.bin of=/dev/mmcblk2 seek=786432 bs=1 count=131072
Reset device and it should now be booting to the SD Card image. (edited)[root (ttyGS0)]# cat /sys/module/rawdatatable/parameters/rawdata_param
MBR :0x00000000:0x00000400
uBoot :0x00000400:0x000bfc00
Boot Env :0x000c0000:0x00020000
Reserved1 :0x000e0000:0x00020000
Normal Kernel :0x00100000:0x00400000
Normal Rootfs :0x00500000:0x00100000
Recovery Kernel :0x00600000:0x00400000
Reserved2 :0x00a00000:0x00500000
Normal Boot Env :0x00f00000:0x00020000
Recovery Boot Env :0x00f20000:0x00020000
Raw Data Table :0x00f40000:0x00020000
Info :0x00f60000:0x00020000
Id :0x00f80000:0x00020000
Reserved3 :0x00fa0000:0x00060000
Boot Image :0x01000000:0x00100000
Waveform :0x01100000:0x00200000
LOG :0x01300000:0x00500000 (edited)













stdin=serial
stdout=serial
stderr=serial
ethact=FEC0
loadaddr=0x70800000
loadaddr_ramdisk=0x70C00000
bootdev=2
rawtable=0xF40000
bootcmd=mmc read 2 ${loadaddr} 0x800 0x1400;bootm ${loadaddr}
bootargs=root=/dev/mmcblk0p1 rootfstype=ext4 rw rootwait init=/sbin/init bootdev=2 rawtable=0xF40000 

































usage: mkubootenv [-s <size>] <source file> <target file>
mkubootenv/mkubootenv -s 131072 boot-env.txt bootenv














qemu-img create -f qcow2 prstux.img 3.6G
modprobe nbd
qemu-nbd --connect /dev/nbd0 prstux.img
Then point your script to nbd0 (edited)
sudo apt install git linux-headers-$(uname -r) build-essential docker curl debootstrap qemu qemu-utils qemu-user-static binfmt-support imagemagick vim
sudo modprobe binfmt_misc
sudo curl -sSL https://get.docker.com/ | sh
mkdir code
cd code
git clone https://github.com/tklauser/mkubootenv.git
cd mkubootenv
sudo make
cd ..
git clone https://gitlab.com/phreakuencies/prstux.git
cd prstux
cp ~/code/mkubootenv/mkubootenv ~/code/prstux/mkubootenv/
Fix broken Makefile replace spaces with tabs
vim /home/nonasuomy/code/prstux/splash/Makefile
:%s/^[ ]\+/\t/g
remove the first ../ in front of the script path as well.
sudo make flash DEVICE=./prstux.img (edited)~/code/prstux$ make flash DEVICE=./prstux.img
make -C boot
make[1]: Entering directory '/home/nonasuomy/code/prstux/boot'
mkubootenv/mkubootenv -s 131072 boot-env.txt bootenv
make[1]: Leaving directory '/home/nonasuomy/code/prstux/boot'
make -C boot flash
make[1]: Entering directory '/home/nonasuomy/code/prstux/boot'
Flashing...
../scripts/flash_normal_bootenv.sh ./prstux.img
Will flash into device: ./prstux.img
Continue? Type 'yes': yes
+ echo 'Zeroing normal env area'
Zeroing normal env area
+ sudo dd if=/dev/zero of=./prstux.img bs=512 seek=30720 count=256
256+0 records in
256+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00130886 s, 100 MB/s
+ echo 'Flashing env'
Flashing env
+ sudo dd if=bootenv of=./prstux.img bs=512 seek=30720 count=256
256+0 records in
256+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00254849 s, 51.4 MB/s
+ sudo dd if=bootenv of=./prstux.img bs=512 seek=1536 count=256
256+0 records in
256+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00657853 s, 19.9 MB/s
+ echo Synching
Synching
+ sync
+ sync
+ sync
Done.
make[1]: Leaving directory '/home/nonasuomy/code/prstux/boot'
make -C splash flash
make[1]: Entering directory '/home/nonasuomy/code/prstux/splash'
convert splash.png -size 800x600 -depth 8 gray:bootsplash.bin
Flashing...
../scripts/flash_bootsplash.sh ./prstux.img
Flashing bootsplash
480000+0 records in
480000+0 records out
480000 bytes (480 kB, 469 KiB) copied, 1.40263 s, 342 kB/s
Synching
Done.
make[1]: Leaving directory '/home/nonasuomy/code/prstux/splash'

qemu-img create -f qcow2 prstux.img 3.6G
modprobe nbd
qemu-nbd --connect /dev/nbd0 prstux.img
Then point your script to nbd0 (edited)





~/code/prstux$ make flash DEVICE=./prstux.img
make -C boot
make[1]: Entering directory '/home/nonasuomy/code/prstux/boot'
mkubootenv/mkubootenv -s 131072 boot-env.txt bootenv
make[1]: Leaving directory '/home/nonasuomy/code/prstux/boot'
make -C boot flash
make[1]: Entering directory '/home/nonasuomy/code/prstux/boot'
Flashing...
../scripts/flash_normal_bootenv.sh ./prstux.img
Will flash into device: ./prstux.img
Continue? Type 'yes': yes
+ echo 'Zeroing normal env area'
Zeroing normal env area
+ sudo dd if=/dev/zero of=./prstux.img bs=512 seek=30720 count=256
256+0 records in
256+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00130886 s, 100 MB/s
+ echo 'Flashing env'
Flashing env
+ sudo dd if=bootenv of=./prstux.img bs=512 seek=30720 count=256
256+0 records in
256+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00254849 s, 51.4 MB/s
+ sudo dd if=bootenv of=./prstux.img bs=512 seek=1536 count=256
256+0 records in
256+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.00657853 s, 19.9 MB/s
+ echo Synching
Synching
+ sync
+ sync
+ sync
Done.
make[1]: Leaving directory '/home/nonasuomy/code/prstux/boot'
make -C splash flash
make[1]: Entering directory '/home/nonasuomy/code/prstux/splash'
convert splash.png -size 800x600 -depth 8 gray:bootsplash.bin
Flashing...
../scripts/flash_bootsplash.sh ./prstux.img
Flashing bootsplash
480000+0 records in
480000+0 records out
480000 bytes (480 kB, 469 KiB) copied, 1.40263 s, 342 kB/s
Synching
Done.
make[1]: Leaving directory '/home/nonasuomy/code/prstux/splash' 
-rw-r--r-- 1 nonasuomy nonasuomy 17257216 Apr 24 10:17 prstux.img












make all then
sudo make all
[sudo] password for nonasuomy:
make -C boot
make[1]: Entering directory '/home/nonasuomy/code/prstux/boot'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/nonasuomy/code/prstux/boot'
make -C splash
make[1]: Entering directory '/home/nonasuomy/code/prstux/splash'
make[1]: 'bootsplash.bin' is up to date.
make[1]: Leaving directory '/home/nonasuomy/code/prstux/splash'
make -C docker-build 14.04
make[1]: Entering directory '/home/nonasuomy/code/prstux/docker-build'
docker build -t prstux-dev:14.04 14.04
Sending build context to Docker daemon 2.56kB
Step 1/8 : FROM ubuntu:14.04
---> 13b66b487594
Step 2/8 : RUN apt-get -y update
---> Using cache
---> e2966287f94f
Step 3/8 : RUN apt-get install -y emdebian-archive-keyring
---> Using cache
---> 68f078683adf
Step 4/8 : RUN apt-get install -y build-essential git bison autoconf gperf flex texinfo help2man gawk libtool libncurses5-dev unzip bc
---> Using cache
---> 510d48b1e3ab
Step 5/8 : RUN apt-get install -y pkg-config-arm-linux-gnueabihf
---> Using cache
---> df7b42790e3a
Step 6/8 : RUN apt-get install -y u-boot-tools
---> Using cache
---> 5f70785bb8bb
Step 7/8 : RUN apt-get install -y wget vim
---> Using cache
---> 46afb16fe8b3
Step 8/8 : RUN apt-get install -y debootstrap qemu-user-static
---> Using cache
---> 322a2df2c107
Successfully built 322a2df2c107
Successfully tagged prstux-dev:14.04
make[1]: Leaving directory '/home/nonasuomy/code/prstux/docker-build'
make -C rootfs
make[1]: Entering directory '/home/nonasuomy/code/prstux/rootfs'
./make-base.sh
prstux-base docker image already exists. use make clean_base to remove if you want to rebuild it
make[1]: Leaving directory '/home/nonasuomy/code/prstux/rootfs'Build
TODO: not finished
In case you prefer to recreate PRSTUX image yourself, you can do so by cloning the repository and simply do:
$ make
This will produce a .tar file containing the contents of the root filesystem and a ready-made image appropriate for burning into an SD card. The .tar file is useful if you want to update PRSTUX after an update but want to leave your data (such as eBooks) intact.




mount: permission denied
update-binfmts: warning: Couldn't mount the binfmt_misc filesystem on /proc/sys/fs/binfmt_misc. (edited)







binfmt is trying to register qemu as a binary loader so you don't need to invoke qemu everytime you need to run a binary with it. To do that it requires privileges that the container doesn't have.
Ignore those warnings because it doesn't make sense to register binfmt on the host while the image is being built.



"I figured out the issue: I had been installing “sudo apt install -y binfmt-support qemu-system-common qemu-user-static" within the container, rather than the host.After installing it on the host, the issue was resolved." (edited)


I: Base system installed successfully.
sha256:f60291bf47337abb8193d56f1dd1b8dfae0bafd245cb93f6ece11260a4f64e60
make[1]: Leaving directory '/home/nonasuomy/code/prstux/rootfs'







:~/code/prstux$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
prstux-base latest f60291bf4733 13 minutes ago 342MB
prstux-dev 14.04 9fb33fb8ac9b 22 minutes ago 527MB
<none> <none> d97cb24c140d About an hour ago 524MB
ubuntu 14.04 13b66b487594 13 months ago 197MB

CID=$(docker run -d prstux-base /bin/true)
docker export -o prstux.tar ${CID}
sudo tar -tf
prstux.tar | grep -E '^[^/]*/?$'
.dockerenv
bin/
boot/
dev/
etc/
home/
lib/
media/
mnt/
opt/
proc/
root/
run/
sbin/
srv/
sys/
tmp/
usr/
var/ (edited)




git clone https://github.com/Kobo-InkBox/kernel
export PATH="${PATH}:/kernel/toolchain/gcc-4.8/bin"
cd "/sony/kernel/source"
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage (edited)dd if=uImage of=/dev/mmcblk0 bs=512 seek=2048
the seek value may not be the same if sony put the load sector elsewhere

stdin=serial
stdout=serial
stderr=serial
ethact=FEC0
loadaddr=0x70800000
loadaddr_ramdisk=0x70C00000
bootdev=2
rawtable=0xF40000
bootcmd=mmc read 2 ${loadaddr} 0x800 0x1400;bootm ${loadaddr}
bootargs=root=/dev/mmcblk0p1 rootfstype=ext4 rw rootwait init=/sbin/init bootdev=2 rawtable=0xF40000 
bootcmd part tells itmmc read 2 ${loadaddr} 0x800 0x1400
means read the MMC 2 from sector 2048 to sector 5120





git clone https://github.com/Kobo-InkBox/kernel
export PATH="${PATH}:/kernel/toolchain/gcc-4.8/bin"
cd "/sony/kernel/source"
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage (edited)~/code/linux-2.6.35.2$ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage
make: arm-linux-gnueabihf-gcc: No such file or directory
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
HOSTCC scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function ‘conf_sym’:
scripts/kconfig/conf.c:159:6: warning: variable ‘type’ set but not used [-Wunused-but-set-variable]
159 | int type;
| ^~~~
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:231:6: warning: variable ‘type’ set but not used [-Wunused-but-set-variable]
231 | int type;
| ^~~~
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/arm/Kconfig
***
*** You have not yet configured your kernel!
*** (missing kernel config file ".config")
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [/home/nonasuomy/code/linux-2.6.35.2/scripts/kconfig/Makefile:34: silentoldconfig] Error 1
make[1]: *** [/home/nonasuomy/code/linux-2.6.35.2/Makefile:464: silentoldconfig] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/kernel.release'. Stop.
env | grep PATH?
env | grep PATH
PATH=/home/nonasuomy/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin:/home/nonasuomy/code/kernel/toolchain/gcc-4.8/bin
arm-linux-gnueabihf-gcc, what does it output?
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage
scripts/kconfig/conf -s arch/arm/Kconfig
***
*** You have not yet configured your kernel!
*** (missing kernel config file ".config")
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [/home/nonasuomy/code/linux-2.6.35.2/scripts/kconfig/Makefile:34: silentoldconfig] Error 1
make[1]: *** [/home/nonasuomy/code/linux-2.6.35.2/Makefile:464: silentoldconfig] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/kernel.release'. Stop.
arch/arm/configs and try to see if you see something relevant for the Sony
~/code/linux-2.6.35.2/arch/arm/configs$ ls
acs5k_defconfig mx21_defconfig
acs5k_tiny_defconfig mx27_defconfig
afeb9260_defconfig mx31pdk_defconfig
am200epdkit_defconfig mx3_defconfig
am3517_evm_defconfig mx3_updater_defconfig
ams_delta_defconfig mx51_defconfig
ap4evb_defconfig n770_defconfig
assabet_defconfig n8x0_defconfig
at572d940hfek_defconfig neocore926_defconfig
at91cap9adk_defconfig neponset_defconfig
at91rm9200dk_defconfig netwinder_defconfig
at91rm9200ek_defconfig netx_defconfig
at91sam9260ek_defconfig nhk8815_defconfig
at91sam9261ek_defconfig ns9xxx_defconfig
at91sam9263ek_defconfig nuc910_defconfig
at91sam9g20ek_defconfig nuc950_defconfig
at91sam9rlek_defconfig nuc960_defconfig
ateb9200_defconfig omap_2430sdp_defconfig
badge4_defconfig omap_3430sdp_defconfig
bcmring_defconfig omap_3630sdp_defconfig
cam60_defconfig omap3_beagle_defconfig
carmeva_defconfig omap3_defconfig
cerfcube_defconfig omap3_evm_defconfig
cm_t35_defconfig omap3_pandora_defconfig
cm_x2xx_defconfig omap3_stalker_lks_defconfig
cm_x300_defconfig omap3_touchbook_defconfig
cns3420vb_defconfig omap_4430sdp_defconfig
colibri_pxa270_defconfig omap_apollon_2420_defconfig
colibri_pxa300_defconfig omap_generic_1510_defconfig
collie_defconfig omap_generic_1610_defconfig
corgi_defconfig omap_generic_1710_defconfig
cpu9260_defconfig omap_generic_2420_defconfig
cpu9g20_defconfig omap_h2_1610_defconfig
cpuat91_defconfig omap_h4_2420_defconfig
csb337_defconfig omap_innovator_1510_defconfig
csb637_defconfig omap_innovator_1610_defconfig
da8xx_omapl_defconfig omap_ldp_defconfig
davinci_all_defconfig omap_osk_5912_defconfig
devkit8000_defconfig omap_perseus2_730_defconfigdove_defconfig omap_zoom2_defconfig
ebsa110_defconfig omap_zoom3_defconfig
ecbat91_defconfig onearm_defconfig
edb7211_defconfig orion5x_defconfig
em_x270_defconfig overo_defconfig
ep93xx_defconfig palmte_defconfig
eseries_pxa_defconfig palmtt_defconfig
ezx_defconfig palmz71_defconfig
footbridge_defconfig palmz72_defconfig
fortunet_defconfig pcm027_defconfig
g3evm_defconfig picotux200_defconfig
g4evm_defconfig pleb_defconfig
h3600_defconfig pnx4008_defconfig
h5000_defconfig pxa168_defconfig
h7201_defconfig pxa255-idp_defconfig
h7202_defconfig pxa3xx_defconfig
hackkit_defconfig pxa910_defconfig
htcherald_defconfig qil-a9260_defconfig
igep0020_defconfig raumfeld_defconfig
imote2_defconfig realview_defconfig
imx23evk_defconfig realview-smp_defconfig
imx23evk_updater_defconfig rpc_defconfig
imx25_3stack_defconfig rx51_defconfig
imx25_updater_defconfig s3c2410_defconfig
imx28evk_defconfig s3c6400_defconfig
imx28evk_updater_defconfig s5p6440_defconfig
imx5_android_defconfig s5p6442_defconfig
imx5_defconfig s5pc100_defconfig
imx5_updater_defconfig s5pc110_defconfigintegrator_defconfig s5pv210_defconfig
iop13xx_defconfig sam9_l9260_defconfig
iop32x_defconfig shannon_defconfig
iop33x_defconfig shark_defconfig
ixp2000_defconfig simpad_defconfig
ixp23xx_defconfig spear300_defconfig
ixp4xx_defconfig spear310_defconfig
jornada720_defconfig spear320_defconfig
kafa_defconfig spear600_defconfig
kb9202_defconfig spitz_defconfig
kirkwood_defconfig stamp9g20_defconfig
ks8695_defconfig stmp378x_defconfig
lart_defconfig stmp37xx_defconfig
loki_defconfig sx1_defconfig
lpd270_defconfig tct_hammer_defconfig
lpd7a400_defconfig trizeps4_defconfig
lpd7a404_defconfig u300_defconfig
lubbock_defconfig u8500_defconfig
lusl7200_defconfig usb-a9260_defconfig
magician_defconfig usb-a9263_defconfig
mainstone_defconfig versatile_defconfig
mini2440_defconfig viper_defconfig
mmp2_defconfig xcep_defconfig
msm_defconfig yl9200_defconfig
mv78xx0_defconfig zeus_defconfig
mx1_defconfig
make ARCH=arm imx5_android_defconfig CROSS_COMPILE=arm-linux-gnueabihf- uImage
arch/arm/configs/imx5_android_defconfig:514:warning: override: reassigning to symbol NETFILTER_XT_CONNMARK
#
# configuration written to .config
#
scripts/kconfig/conf -s arch/arm/Kconfig
*** Error during update of the kernel configuration.
make[3]: *** [/home/nonasuomy/code/linux-2.6.35.2/scripts/kconfig/Makefile:34: silentoldconfig] Error 1
make[2]: *** [/home/nonasuomy/code/linux-2.6.35.2/Makefile:464: silentoldconfig] Error 2
make[1]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/kernel.release'. Stop.
make: *** [Makefile:444: uImage] Error 2
make ARCH=arm CORSS_COMPILE=arm-linux-gnueabihf- imx5_android_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage
nonasuomy@DebianCompiler:~/code/linux-2.6.35.2$ make ARCH=arm CORSS_COMPILE=arm-linux-gnueabihf- imx5_android_defconfig
arch/arm/configs/imx5_android_defconfig:514:warning: override: reassigning to symbol NETFILTER_XT_CONNMARK
#
# configuration written to .config
#
nonasuomy@DebianCompiler:~/code/linux-2.6.35.2$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage
scripts/kconfig/conf -s arch/arm/Kconfig
*** Error during update of the kernel configuration.
make[2]: *** [/home/nonasuomy/code/linux-2.6.35.2/scripts/kconfig/Makefile:34: silentoldconfig] Error 1
make[1]: *** [/home/nonasuomy/code/linux-2.6.35.2/Makefile:464: silentoldconfig] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/kernel.release'. Stop.
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper
Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at kernel/timeconst.pl line 373.
make[1]: *** [/home/nonasuomy/code/linux-2.6.35.2/kernel/Makefile:138: kernel/timeconst.h] Error 255
make: *** [Makefile:884: kernel] Error 2
vi kernel/timeconst.pl
go to line 373
replace the existing statement with
if (!@val) {






CC net/core/gen_stats.o
In file included from net/core/gen_stats.c:18:0:
include/linux/module.h:212:22: fatal error: closing dependency file net/core/.gen_stats.o.d: No space left on device
static const struct kernel_symbol __ksymtab_##sym \
^
include/linux/module.h:218:2: note: in expansion of macro ‘__EXPORT_SYMBOL’
__EXPORT_SYMBOL(sym, "")
^
net/core/gen_stats.c:252:1: note: in expansion of macro ‘EXPORT_SYMBOL’
EXPORT_SYMBOL(gnet_stats_finish_copy);
^
compilation terminated.
make[2]: *** [scripts/Makefile.build:231: net/core/gen_stats.o] Error 1
make[1]: *** [scripts/Makefile.build:366: net/core] Error 2
make: *** [Makefile:884: net] Error 2






-j4, -j8, etc.
CC net/socket.o
net/core/.scm.o.cmd:3: *** unterminated variable reference. Stop.
make[1]: *** [scripts/Makefile.build:366: net/core] Error 2
make: *** [Makefile:884: net] Error 2




-D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(scm)"
-D"KBUILD_MODNAME=KBUILD_STR(scm)"
to
-DKBUILD_STR(s)=#s
-DKBUILD_BASENAME=KBUILD_STR(scm)
-DKBUILD_MODNAME=KBUILD_STR(scm) (edited) CC net/socket.o
net/core/.scm.o.cmd:3: *** unterminated variable reference. Stop.
make[1]: *** [scripts/Makefile.build:366: net/core] Error 2
make: *** [Makefile:884: net] Error 2
/.gitignore
net/core/.request_sock.o.cmd
net/core/.rtnetlink.o.cmd
net/core/.scm.o.cmd
net/core/.secure_seq.o.cmd
net/core/.skbuff.o.cmd

Image Name: Linux-2.6.35.3
Created: Sun Apr 24 22:16:10 2022
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2246720 Bytes = 2194.06 KiB = 2.14 MiB
Load Address: 70008000
Entry Point: 70008000
Image arch/arm/boot/uImage is ready




dd if=uImage of=/dev/mmcblk0 bs=512 seek=2048
the seek value may not be the same if sony put the load sector elsewhere 










U-Boot 2009.08 (Dec 21 2011 - 14:48:38)
CPU: Freescale i.MX50 family 1.1V at 800 MHz
mx50 pll1: 800MHz
mx50 pll2: 400MHz
mx50 pll3: 216MHz
ipg clock : 66666666Hz
ipg per clock : 66666666Hz
uart clock : 24000000Hz
ahb clock : 133333333Hz
axi_a clock : 400000000Hz
axi_b clock : 200000000Hz
weim_clock : 100000000Hz
ddr clock : 160000000Hz
esdhc1 clock : 80000000Hz
esdhc2 clock : 80000000Hz
esdhc3 clock : 80000000Hz
esdhc4 clock : 80000000Hz
Board: MX50 ARM2 board
Boot Reason: [POR]
Boot Device: MMC
I2C: ready
DRAM: 256 MB
MMC: FSL_ESDHC: 0, FSL_ESDHC: 1, FSL_ESDHC: 2
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
temperature 31
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
In: serial
Out: serial
Err: serial
Net: got MAC address from IIM: 00:00:00:00:00:00
FEC0
Hit any key to stop autoboot: 0
MMC read: dev # 0, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
5120 blocks read: OKMMC read: dev # 0, block # 10240, count 600 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
600 blocks read: OK
## Booting kernel from Legacy Image at 70800000 ...
Image Name: Linux-2.6.35.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2246720 Bytes = 2.1 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 70c00000 ...
Image Name: Normal Rootfs
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 286848 Bytes = 280.1 kB
Load Address: 70308000
Entry Point: 70308000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OKStarting kernel ...
Linux version 2.6.35.3 (nonasuomy@DebianCompiler) (gcc version 4.8.1 20130401 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.04-20130417 - Linaro GCC 2013.04) ) #1 PREEMPT Sun Apr 24 22:16:04 EDT 2022
CPU: ARMv7 Processor [412fc085] revision 5 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Freescale MX50 ARM2 Board
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 63754
Kernel command line: console=ttymxc2,115200 init=/init bootdev=0 rawtable=0xF40000
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 251MB = 251MB total
Memory: 249236k/249236k available, 7788k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xf9e00000 - 0xffe00000 ( 96 MB)
vmalloc : 0x90000000 - 0xf4000000 (1600 MB)
lowmem : 0x80000000 - 0x8fb00000 ( 251 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.init : 0x80008000 - 0x80025000 ( 116 kB)
.text : 0x80025000 - 0x80412000 (4020 kB)
.data : 0x8042e000 - 0x804a86c0 ( 490 kB)
SLUB: Genslabs=9, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:396
MXC GPIO hardware
MXC IRQ initialized
You should not call the gpmi_set_parent
MXC_Early serial console at MMIO 0x63f90000 (options '115200')
bootconsole [ttymxc2] enabled
Console: colour dummy device 80x30
Mix log static memory : 7fe00000 - 7fffffff
address : 90400000
There is not the last log.Initialize a static memory for mix_logger.















make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf defconfigmake ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf -j8 install

export PATH="${PATH}:/home/nonasuomy/code/busybox"
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- imx5_android_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf -j8 install (edited)





make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf -j8 install 
export INSTALL_PATH=/home/nonasuomy/code/kernelinstall (edited)

Kernel: arch/arm/boot/Image is ready
/bin/bash /home/nonasuomy/code/linux-2.6.35.2/arch/arm/boot/install.sh 2.6.35.3 \
arch/arm/boot/Image System.map "/home/nonasuomy/code/kernelinstall/"





















_install folder in the busybox source?
~/code/kernelinstall$ ls
config-2.6.35.3 System.map-2.6.35.3 vmlinuz-2.6.35.3~/code/busybox$ cd _install
bash: cd: _install: No such file or directory
ls -shal ?

_install?


export INSTALL_PATH=/home/nonasuomy/code/kernelinstall
export PATH="${PATH}:/home/nonasuomy/code/busybox"
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- imx5_android_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf -j8 install




~/code/kernelinstall$ ls
config-2.6.35.3 System.map-2.6.35.3 vmlinuz-2.6.35.3 
nicolas@gentoo-ryzen ~/D/busybox-1.35.0> ls -shal _install
total 20K
4.0K drwxr-xr-x 5 nicolas nicolas 4.0K Apr 25 20:37 ./
4.0K drwxr-xr-x 36 nicolas nicolas 4.0K Apr 25 20:37 ../
4.0K drwxr-xr-x 2 nicolas nicolas 4.0K Apr 25 20:37 bin/
0 lrwxrwxrwx 1 nicolas nicolas 11 Apr 25 20:37 linuxrc -> bin/busybox*
4.0K drwxr-xr-x 2 nicolas nicolas 4.0K Apr 25 20:37 sbin/
4.0K drwxr-xr-x 4 nicolas nicolas 4.0K Apr 25 20:37 usr/
nicolas@gentoo-ryzen ~/D/busybox-1.35.0> Settings -> Static binarymake menuconfig)







CTRL+- and CTRL+SHIFT++









make install (edited)
cd ~/code/busybox
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/nonasuomy/code/kernel/toolchain/gcc-4.8/bin:/home/nonasuomy/code/busybox"
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- imx5_android_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 install


cd ~/code/busybox
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/nonasuomy/code/kernel/toolchain/gcc-4.8/bin"
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
# Enable static build #
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 install (edited)

cd ~/code/busybox
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/nonasuomy/code/kernel/toolchain/gcc-4.8/bin"
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
# Enable static build #
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 install (edited)--------------------------------------------------
You will probably need to make your busybox binary
setuid root to ensure all configured applets will
work properly.
--------------------------------------------------

cd ~/code/linux-2.6.35.2






make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig







console=ttymxc2,115200 rawtable=0xF40000 root=/dev/ram0 rdinit=/sbin/init rootfstype=ramfs
set this as the kernel command line (edited)

vi ~/code/busybox/_install/etc/init.d/rcS
create etc/init.d if not existing
populate rcS with this content:
#!/bin/sh
mkdir -p /sys /proc /dev
mount -t sysfs sysfs /sys
mount -t proc proc /proc
mount -t devtmpfs devtmpfs /dev
/bin/sh
then recompile the kernel (edited)
noinitrd console=ttymxc0,115200 root=/dev/mtdblock2 rw rootfstype=jffs2 ip=off









vi ~/code/busybox/_install/etc/init.d/rcS
create etc/init.d if not existing
populate rcS with this content:
#!/bin/sh
mkdir -p /sys /proc /dev
mount -t sysfs sysfs /sys
mount -t proc proc /proc
mount -t devtmpfs devtmpfs /dev
/bin/sh
then recompile the kernel (edited)

cd ~/code/linux-2.6.35.2
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/nonasuomy/code/kernel/toolchain/gcc-4.8/bin"
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- imx5_android_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
Go in General setup and make that part look like this
Change intramfs source file(s) path to
/home/nonasuomy/code/busybox/_install
Turn off Support initial ramdisks compressed using gzip
Turn on Support initial ramdisks compressed using LZMA
Exit General setup
Go into Boot options
Delete everything in the kernel command string
noinitrd console=ttymxc0,115200 root=/dev/mtdblock2 rw rootfstype=jffs2 ip=off
change it to this
console=ttymxc2,115200 rawtable=0xF40000 root=/dev/ram0 rdinit=/sbin/init rootfstype=ramfs
Then enable "Always use the default kernel command string"
Exit Boot Options
Exit Main Menu then save yes.
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 uImage
Flash to working Sony SD Image
dd if=uImage of=/dev/mmcblk0 bs=512 seek=2048 (edited)


imx5_android_defconfig reset .config

cd ~/code/linux-2.6.35.2
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/nonasuomy/code/kernel/toolchain/gcc-4.8/bin"
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 uImage

LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
UIMAGE arch/arm/boot/uImage
Image Name: Linux-2.6.35.3
Created: Mon Apr 25 21:54:31 2022
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3303116 Bytes = 3225.70 KiB = 3.15 MiB
Load Address: 70008000
Entry Point: 70008000
Image arch/arm/boot/uImage is ready










dd if=uImage of=/dev/mmcblk0 bs=512 seek=2048
the seek value may not be the same if sony put the load sector elsewhere 

U-Boot 2009.08 (Dec 21 2011 - 14:48:38)
CPU: Freescale i.MX50 family 1.1V at 800 MHz
mx50 pll1: 800MHz
mx50 pll2: 400MHz
mx50 pll3: 216MHz
ipg clock : 66666666Hz
ipg per clock : 66666666Hz
uart clock : 24000000Hz
ahb clock : 133333333Hz
axi_a clock : 400000000Hz
axi_b clock : 200000000Hz
weim_clock : 100000000Hz
ddr clock : 160000000Hz
esdhc1 clock : 80000000Hz
esdhc2 clock : 80000000Hz
esdhc3 clock : 80000000Hz
esdhc4 clock : 80000000Hz
Board: MX50 ARM2 board
Boot Reason: [POR]
Boot Device: MMC
I2C: ready
DRAM: 256 MB
MMC: FSL_ESDHC: 0, FSL_ESDHC: 1, FSL_ESDHC: 2
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
temperature 35
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
In: serial
Out: serial
Err: serial
Net: got MAC address from IIM: 00:00:00:00:00:00
FEC0
Hit any key to stop autoboot: 0
MMC read: dev # 0, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
5120 blocks read: OK
MMC read: dev # 0, block # 10240, count 600 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
600 blocks read: OK (edited)
## Booting kernel from Legacy Image at 70800000 ...
Image Name: Linux-2.6.35.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3303116 Bytes = 3.2 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
MX50_ARM2 U-Boot >

MX50_ARM2 U-Boot > printenv
stdin=serial
stdout=serial
stderr=serial
ethact=FEC0
loadaddr=0x70800000
loadaddr_ramdisk=0x70C00000
rawtable=0xF40000
bootargs=console=ttymxc2,115200 init=/init bootdev=0 rawtable=0xF40000
bootcmd=mmc read 0 ${loadaddr} 0x800 0x1400;mmc read 0 ${loadaddr_ramdisk} 0x2800 0x258;bootm ${loadaddr} ${loadaddr_ramdisk}
bootdev=0
Environment size: 326/131068 bytes
mmc read 0 ${loadaddr} 0x800 0x2710; bootm ${loadaddr}
MX50_ARM2 U-Boot > mmc read 0 ${loadaddr} 0x800 0x2710; bootm ${loadaddr}
MMC read: dev # 0, block # 2048, count 10000 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
10000 blocks read: OK
## Booting kernel from Legacy Image at 70800000 ...
Image Name: Linux-2.6.35.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3303116 Bytes = 3.2 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
U-Boot 2009.08 (Dec 21 2011 - 14:48:38)






earlyprintk=serial,ttymxc2,115200 init=/init bootdev=0 rawtable=0xF40000 root=/dev/ram0 rdinit=/sbin/init rootfstype=ramfs (edited)









Kernel hacking --->
[*] Kernel debugging
[*] Kernel low-level debugging functions
[*] Early printk
kernel/power/fbearlysuspend.c: In function ‘stop_drawing_early_suspend’:
kernel/power/fbearlysuspend.c:40:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
int ret;
^
CC kernel/time/tick-oneshot.o
CC kernel/time/tick-sched.o
LD kernel/irq/built-in.o
LD kernel/power/built-in.o
LD kernel/time/built-in.o
LD kernel/built-in.o
~/code/linux-2.6.35.2$ (edited)[*] Kernel low-level debugging functions
[*] Early printk
it compiles again...




qemu-img create -f qcow2 hd.img 40G
qemu-system-x86_64 -cdrom linux-livecd.iso -hda hd.img -m 4G -enable-kvm -vga virtio
As simple as that






kernel/power/fbearlysuspend.c: In function ‘stop_drawing_early_suspend’:
kernel/power/fbearlysuspend.c:40:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
int ret;
^
CC kernel/time/tick-oneshot.o
CC kernel/time/tick-sched.o
LD kernel/irq/built-in.o
LD kernel/power/built-in.o
LD kernel/time/built-in.o
LD kernel/built-in.o
~/code/linux-2.6.35.2$ (edited)







AS arch/arm/kernel/debug.o
In file included from arch/arm/plat-mxc/include/mach/debug-macro.S:52:0,
from arch/arm/kernel/debug.S:130:
arch/arm/plat-mxc/include/mach/mx5x.h:23:2: error: #error "Do not include directly."
#error "Do not include directly."
^
make[1]: *** [scripts/Makefile.build:266: arch/arm/kernel/debug.o] Error 1
make[1]: *** Waiting for unfinished jobs....//#ifndef __ASM_ARCH_MXC_HARDWARE_H__
//#error "Do not include directly."
//#endif CC arch/arm/mach-mx5/cpu.o
arch/arm/kernel/debug.S: Assembler messages:
arch/arm/kernel/debug.S:167: Error: garbage following instruction -- `ldrne r3,=MX51_AIPS1_IO_ADDRESS(MX51_UART1_BASE_ADDR)'
arch/arm/kernel/debug.S:183: Error: garbage following instruction -- `ldrne r3,=MX51_AIPS1_IO_ADDRESS(MX51_UART1_BASE_ADDR)'
make[1]: *** [scripts/Makefile.build:266: arch/arm/kernel/debug.o] Error 1
make[1]: *** Waiting for unfinished jobs....
CC arch/arm/mach-mx5/mm.o
CC arch/arm/mm/init.o
CC arch/arm/mm/iomap.o
CC arch/arm/mach-mx5/devices.o
CC arch/arm/mach-mx5/serial.o
CC arch/arm/mach-mx5/dma.o
CC arch/arm/mach-mx5/lpmodes.o
make: *** [Makefile:884: arch/arm/kernel] Error 2
make: *** Waiting for unfinished jobs....
CC arch/arm/mach-mx5/pm.o

arch/arm/kernel/debug.S: Assembler messages:
arch/arm/kernel/debug.S:167: Error: garbage following instruction -- `ldrne r3,=MX51_AIPS1_IO_ADDRESS(MX51_UART1_BASE_ADDR)'
arch/arm/kernel/debug.S:183: Error: garbage following instruction -- `ldrne r3,=MX51_AIPS1_IO_ADDRESS(MX51_UART1_BASE_ADDR)'
make[1]: *** [arch/arm/kernel/debug.o] Error 1
make: *** [arch/arm/kernel] Error 2
make: *** Waiting for unfinished jobs....
trace debug.S: 167
addruart r3, r1
addruart is defined in debug-macro.S:
.macro addruart, rx, tmp
mrc p15, 0, \rx, c1, c0
tst \rx, #1 @ MMU enabled?
ldreq \rx, =UART_PADDR @ physical
ldrne \rx, =UART_VADDR @ virtual
so is the definition of UART_VADDR: (debug-macro.S): MX51_AIPS1_IO_ADDRESS( ) is not expanded (defined). This is defined in mx51.h. Use git blame to find debug-macro.S, and found that it was include mx51.h. Later, after adding mx5x.h, it was changed to include mx51.h.. Change it back and build OK ... But. .After adding earlyprintk to boot argument, after , there is no message...
#include
#define UART_PADDR MX51_UART1_BASE_ADDR
#define UART_VADDR MX51_AIPS1_IO_ADDRESS(MX51_UART1_BASE_ADDR)
//#ifndef __ASM_ARCH_MXC_HARDWARE_H__
//#error "Do not include directly."
//#endif
// Issue: arch/arm/kernel/debug.S:167/183: Error: garbage following instruction -- `ldrne issue...
#define UART_PADDR MX51_UART1_BASE_ADDR
#define UART_VADDR MX51_AIPS1_IO_ADDRESS(MX51_UART1_BASE_ADDR)#include <mach/mx5x.h>
#define UART_PADDR MX51_UART1_BASE_ADDR
#define UART_VADDR MX51_AIPS1_IO_ADDRESS(MX51_UART1_BASE_ADDR)
#endif/* arch/arm/mach-imx/include/mach/debug-macro.S
*
* Debugging macro include header
*
* Copyright (C) 1994-1999 Russell King
* Moved from linux/arch/arm/kernel/debug.S by Ben Dooks

#else
#include <mach/debug-macro.S>
#endif /* CONFIG_DEBUG_ICEDCC */
#include <mach/debug-macro.S>
/*
* Useful debugging routines
*/ (edited) CC arch/arm/kernel/early_printk.o
In file included from arch/arm/kernel/debug.S:132:0:
arch/arm/plat-mxc/include/mach/debug-macro.S:51:2: error: #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
^

















stage1:
./make-base.sh
stage2: stage1
docker build -t prstux .
stage3: final_root.tar
final_root.tar: stage2 koreader
./make-rootfs.sh 














































bootm and it should boot























kobo => ext4load mmc 0:1 0x70800000 uImage-root
Loading file "uImage-root" from mmc device 0:1 (xxa1)
9254016 bytes read
kobo => (edited)
cat /sys/module/rawdatatable/parameters/rawdata_table
MBR :0x00000000:0x00000400
uBoot :0x00000400:0x000bfc00
Boot Env :0x000c0000:0x00020000
Reserved1 :0x000e0000:0x00020000
Normal Kernel :0x00100000:0x00400000
Normal Rootfs :0x00500000:0x00100000
Recovery Kernel :0x00600000:0x00400000
Reserved2 :0x00a00000:0x00500000
Normal Boot Env :0x00f00000:0x00020000
Recovery Boot Env :0x00f20000:0x00020000
Raw Data Table :0x00f40000:0x00020000
Info :0x00f60000:0x00020000
Id :0x00f80000:0x00020000
Reserved3 :0x00fa0000:0x00060000
Boot Image :0x01000000:0x00100000
Waveform :0x01100000:0x00200000
LOG :0x01300000:0x00500000Partitions
Disk /dev/mmcblk2: 1958 MB, 1958739968 bytes
4 heads, 16 sectors/track, 59776 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/mmcblk2p1 801 1120 10240 83 Linux
/dev/mmcblk2p2 1121 1440 10240 83 Linux
/dev/mmcblk2p3 1441 27008 818176 5 Extended
Partition 3 does not end on cylinder boundary
/dev/mmcblk2p4 27009 59776 1048576 b Win95 FAT32
Partition 4 does not end on cylinder boundary
/dev/mmcblk2p5 1441 2721 40984 83 Linux
/dev/mmcblk2p6 2722 7074 139288 83 Linux
/dev/mmcblk2p7 7075 7395 10264 83 Linux
/dev/mmcblk2p8 7396 9188 57368 83 Linux
/dev/mmcblk2p9 9189 22399 422743 82 Linux swap
/dev/mmcblk2p10 22400 27008 147480 82 Linux swapcorrespond to:
P1: recovery initrd. seems to test for update image on SD card and chroots into actual recovery root otherwise
P2: recovery root filesystem or "diagnostic" system
P3: extended partition
P4: user-data partition ("READER")
P5: font partition
P6: dictionary partition
P7: "setup" partition (contains Sony applications for Windows)
P8: "preload" partition (free ebooks and example content)
P9: Android data partition
P10: Android system partition

cat /sys/module/rawdatatable/parameters/rawdata_table
MBR :0x00000000:0x00000400
uBoot :0x00000400:0x000bfc00
Boot Env :0x000c0000:0x00020000
Reserved1 :0x000e0000:0x00020000
Normal Kernel :0x00100000:0x00400000
Normal Rootfs :0x00500000:0x00100000
Recovery Kernel :0x00600000:0x00400000
Reserved2 :0x00a00000:0x00500000
Normal Boot Env :0x00f00000:0x00020000
Recovery Boot Env :0x00f20000:0x00020000
Raw Data Table :0x00f40000:0x00020000
Info :0x00f60000:0x00020000
Id :0x00f80000:0x00020000
Reserved3 :0x00fa0000:0x00060000
Boot Image :0x01000000:0x00100000
Waveform :0x01100000:0x00200000
LOG :0x01300000:0x00500000 
Unmapped offsets
Bootsplash image: 0x01000000, 800x600 = 480000 bytes.


fatload mmc 2:4 0x70800000 uImage; bootm (edited)


bootm 0x708000000?


** Unable to read "uImage" from mmc 2:4 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!





fatls mmc 0:2?

fatls mmc 2:4 folder/?
MX50_ARM2 U-Boot > fatls mmc 2:4
521090 e2fsck
sony_reader/
books/
dcim/
214586 badblocks
2 file(s), 3 dir(s)


fatload mmc 2:4 0x70800000 sony_reader/uImage (edited)

fatload mmc 2:4 0x70800000 sony_reader/uImage; bootm (edited)







































i2c probe at the beginning of the bootcmd to disable the watchdog and didn't have problems after that. (edited)








PRSTUX
Installation
Flashing
WARNING install PRSTUX at your own risk. If you make a mistake or there's a problem during flashing, you risk bricking your device.
In order to install PRSTUX, you first need to clone/download the repository. Once you have booted into recovery mode (on PRS-T2 you need to hold Home and Menu keys while booting until you see the progress bar moving), plug the device into your computer using the USB cable. You should take note of the mass storage device name which is detected in your computer. You can retrieve this information running dmesg or having udiskctl monitor running before plugging in and noting the output. This guide will assume your device is named /dev/sdb.
Once plugged in, enter prstux directory and run
$ make flash DEVICE=/dev/sdb
replacing your device name as appropriate.
This will build the boot configuration or environment and also a custom boot splash image with the PRSTUX logo and then flash it to the reader. Before flashing, it will take a backup of the sections to be modified, just in case something goes wrong.Install PRSTUX into SD card
The next step is to write the PRSTUX image into an SD card. You should have a SD card with at least 4GB. To burn the image you should insert your SD card into a reader and do:
$ ddrescue --force --synchronous prstux.img <sd card device>
Note that you should use the entire device (such as /dev/sdc) and not of any existing partition in it (such as /dev/sdc1). Note that this creates an image with the root partition and a separate data partition. If your SD card is bigger than 4GB you can use gparted to increase the size of the data partition if you like.
After this step, poweroff your reader, insert the SD card and power on again. You should see the PRSTUX logo during boot.Usage
There are no specific instructions on how to use PRSTUX. Upon booting Koreader will open. Wifi works as expected. Pressing the power button will make the reader go to suspend mode (disabling devices including WiFi).
You can access the reader via SSH. If connected via USB, it will create a USB-based network. The device is set with IP 192.168.101.1 (so you can set yourself .2, for example). Otherwise, you can access via WiFi.
To add books, you should use calibre wireless connection (see Koreader wiki). At the moment, loading via USB is not possible.
KOreader settings are stored in /mnt/data/koreader. You should load data directly into /mnt/data.

PRSTUX
Installation
Flashing
WARNING install PRSTUX at your own risk. If you make a mistake or there's a problem during flashing, you risk bricking your device.
In order to install PRSTUX, you first need to clone/download the repository. Once you have booted into recovery mode (on PRS-T2 you need to hold Home and Menu keys while booting until you see the progress bar moving), plug the device into your computer using the USB cable. You should take note of the mass storage device name which is detected in your computer. You can retrieve this information running dmesg or having udiskctl monitor running before plugging in and noting the output. This guide will assume your device is named /dev/sdb.
Once plugged in, enter prstux directory and run
$ make flash DEVICE=/dev/sdb
replacing your device name as appropriate.
This will build the boot configuration or environment and also a custom boot splash image with the PRSTUX logo and then flash it to the reader. Before flashing, it will take a backup of the sections to be modified, just in case something goes wrong. all: boot splash rootfs
.PHONY: boot splash rootfs docker-build
boot:
$(MAKE) -C boot
splash:
$(MAKE) -C splash
rootfs: docker-build
$(MAKE) -C rootfs
docker-build:
$(MAKE) -C docker-build 14.04
flash: boot
$(MAKE) -C boot flash
$(MAKE) -C splash flash
clean:
$(MAKE) -C boot clean
$(MAKE) -C splash clean
$(MAKE) -C rootfs clean
flash: boot
$(MAKE) -C boot flash
$(MAKE) -C splash flash
~/code/prstux/boot/Makefile
.PHONY: clean flash
DEVICE ?=
all: bootenv
mkubootenv/mkubootenv:
$(MAKE) -C mkubootenv
# boot environment creation
bootenv: boot-env.txt mkubootenv/mkubootenv
mkubootenv/mkubootenv -s 131072 boot-env.txt bootenv
# backup of boot environment
bootenv.bak:
ifeq ($(DEVICE),)
@echo Please specify target device with the DEVICE variable
else
@echo Backing up current bootenv
../scripts/extract_normal_bootenv.sh $(DEVICE) > bootenv.bak
endif
# boot environment and splash image flashing
flash: bootenv bootenv.bak
ifeq ($(DEVICE),)
@echo Please specify target device with the DEVICE variable
else
@echo Flashing...
../scripts/flash_normal_bootenv.sh $(DEVICE)
@echo Done.
endif
clean:
rm -f bootenvstdin=serial
stdout=serial
stderr=serial
ethact=FEC0
loadaddr=0x70800000
loadaddr_ramdisk=0x70C00000
bootdev=2
rawtable=0xF40000
bootcmd=mmc read 2 ${loadaddr} 0x800 0x1400;bootm ${loadaddr}
bootargs=root=/dev/mmcblk0p1 rootfstype=ext4 rw rootwait init=/sbin/init bootdev=2 rawtable=0xF40000 #!/bin/bash
set -x
if [ "$1" != "" ]; then
sudo dd if=$1 bs=512 skip=$((0x00f00000/512)) count=$((0x00020000/512))
else
echo "usage: $(basename $0) <flash device>"
exit 1
fi#!/bin/bash
if [ "$1" != "" ]; then
dd if=$1 bs=1 skip=$((0x01000000)) count=$((800*600))
else
echo "usage: $(basename $0): <device>"
exit 1
fi#!/bin/bash
if [ "$1" != "" ]; then
echo "Will flash into device: $1"
echo -n "Continue? Type 'yes': "
read answer
if [ "$answer" = "yes" ]; then
set -x
echo "Zeroing normal env area"
sudo dd if=/dev/zero of=$1 bs=512 seek=$((0x00f00000/512)) count=$((0x00020000/512))
echo "Flashing env"
sudo dd if=bootenv of=$1 bs=512 seek=$((0x00f00000/512)) count=$((0x00020000/512))
sudo dd if=bootenv of=$1 bs=512 seek=$((0x000c0000/512)) count=$((0x00020000/512))
echo "Synching"
sync; sync; sync
else
echo "Aborted"
fi
else
echo "usage: $(basename $0): <flash device>"
exit 1
fi#!/bin/bash
if [ "$1" != "" ]; then
echo "Flashing bootsplash"
dd if=bootsplash.bin of=$1 bs=1 seek=$((0x01000000)) count=$((800*600))
echo "Synching"
sync; sync; sync
else
echo "usage $(basename $0): <device>"
exit 1
fi#!/bin/bash
echo "Zeroing normal kernel area"
dd if=/dev/zero of=/dev/mmcblk2 bs=512 seek=$((0x00100000/512)) count=$((0x00400000/512))
echo "Flashing kernel"
dd if=uImage of=/dev/mmcblk2 bs=512 seek=$((0x00100000/512))
echo "Synching"
sync; sync; sync#!/bin/bash
echo "Zeroing normal rootfs area"
dd if=/dev/zero of=/dev/mmcblk2 bs=512 seek=$((0x00500000/512)) count=$((0x00100000/512))
echo "Flashing kernel"
dd if=root.img of=/dev/mmcblk2 bs=512 seek=$((0x00500000/512))
echo "Synching"
sync; sync; sync.PHONY: flash clean
DEVICE ?=
bootsplash.bin: splash.png
convert splash.png -size 800x600 -depth 8 gray:bootsplash.bin
bootsplash.bin.bak:
ifeq ($(DEVICE),)
@echo Please specify target device with the DEVICE variable
else
@echo Backing up current bootplash image
../../scripts/extract_bootsplash.sh $(DEVICE) > bootsplash.bin.bak
endif
flash: bootsplash.bin bootsplash.bin.bak
ifeq ($(DEVICE),)
@echo Please specify target device with the DEVICE variable
else
@echo Flashing...
../../scripts/flash_bootsplash.sh $(DEVICE)
@echo Done.
endif
clean:
rm -f bootsplash.bin
all: bootsplash.bin
# /etc/fstab: static file system information.
#
# file system mount type options dump pass
/dev/mmcblk0p2 /mnt/data ext4 defaults 0 0
/dev/mmcblk2p10 /system ext4 defaults,ro 0 0
proc /proc proc defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0




































WDOG memory map
Absolute
address
(hex)
Register name Width
(in bits) Access Reset value Section/
page
53F9_8000 Watchdog Control Register (WDOG_WCR) 16 R/W 0030h 57.6.1/3418
53F9_8002 Watchdog Service Register (WDOG_WSR) 16 R/W 0000h 57.6.2/3420
53F9_8004 Watchdog Reset Status Register (WDOG_WRSR) 16 R 0000h 57.6.3/3421
53F9_8006 Watchdog Interrupt Control Register (WDOG_WICR) 16 R/W 0004h 57.6.4/3422
53F9_8008 Watchdog Miscellaneous Control Register (WDOG_WMCR) 16 R/W 0001h 57.6.5/3423
PCB PRS-T1/G1 M5047 1-884-610-12 BW1118073202953 Cast 2012/05/05A
MCIMX508CVK8B NXP i.MX50 32-bit MPU, ARM Cortex-A8 core, 800MHz, MAPBGA 416.
K4X2G323PC-8GD8 Samsung DRAM Chip Mobile LPDDR SDRAM 256Mbit 64Mx32 90-Pin FBGA
SDIN5D1-2G SanDisk e.MMC 2GB 4.41 BGA
F0513A Renesas MCU 8-bit 78K0 SISC 32KB Flash 5V 44-Pin LQFP (SDCard Controller?)
WM8321G Wolfson Processor Power Management Subsystem (PMIC)
CS42L52-CNZ Cirrus Logic Low-power, Stereo CODEC w/ Headphone & Speaker Amps
3611 WC120 Atheros 6k (6002?)
TPS65180 Texas Instruments PMIC for E Ink® Vizplex™-Enabled Electronic Paper Display
6 inch E-ink LCD (PRS-T1/NOOK Simple/ KOBO N905A/B/C) ED060SCE (LF)C1 RET60C4026(C118) E4K0C6B82M4VS5374AY -2.46
VM15AB LMV65 National Semiconductor LMV65x 12-MHz, Low Voltage (5V?), Low Power Amplifiers
2 x HC4067B 16-channel analog multiplexer/demultiplexer
LIS1476MHPPC(SY6) 1-853-104-11 Sony 01 W US304362 3.7V 3.6Wh 1500mA Max Charge 4.30V (edited)



# busybox i2cdetect
i2cdetect: applet not found# busybox --help
BusyBox v1.17.4 (2010-12-13 13:27:50 JST) multi-call binary.
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.
Currently defined functions:
[, [[, acpid, addgroup, adduser, adjtimex, arp, arping, ash, awk,
basename, beep, blkid, bootchartd, brctl, bunzip2, bzcat, bzip2, cal,
cat, catv, chat, chattr, chgrp, chmod, chown, chpasswd, chpst, chroot,
chrt, chvt, cksum, clear, cmp, comm, cp, cpio, crond, crontab, cryptpw,
cttyhack, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod,
devmem, df, dhcprelay, diff, dirname, dmesg, dnsd, dnsdomainname,
dos2unix, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env,
envdir, envuidgid, ether-wake, expand, expr, fakeidentd, false, fbset,
fbsplash, fdflush, fdformat, fdisk, fgconsole, fgrep, find, findfs,
flock, fold, free, freeramdisk, fsck, fsck.minix, fsync, ftpd, ftpget,
ftpput, fuser, getopt, getty, grep, gunzip, gzip, halt, hd, hdparm,
head, hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig,
ifdown, ifenslave, ifplugd, ifup, inetd, init, insmod, install, ionice,
ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel,
kbd_mode, kill, killall, killall5, klogd, last, length, less, linux32,
linux64, linuxrc, ln, loadfont, loadkmap, logger, login, logname,
logread, losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lspci, lsusb,
lzcat, lzma, lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg, microcom, mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix,
mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more,
mount, mountpoint, mt, mv, nameif, nc, netstat, nice, nmeter, nohup,
nslookup, ntpd, od, openvt, passwd, patch, pgrep, pidof, ping, ping6,
pipe_progress, pivot_root, pkill, popmaildir, poweroff, printenv,
printf, ps, pscan, pwd, raidautorun, rdate, rdev, readahead, readlink,
readprofile, realpath, reboot, reformime, renice, reset, resize, rev,
rm, rmdir, rmmod, route, rpm, rpm2cpio, rtcwake, run-parts, runlevel,
runsv, runsvdir, rx, script, scriptreplay, sed, sendmail, seq, setarch,
setconsole, setfont, setkeycodes, setlogcons, setsid, setuidgid, sh,
sha1sum, sha256sum, sha512sum, showkey, slattach, sleep, smemcap,
softlimit, sort, split, start-stop-daemon, stat, strings, stty, su,
sulogin, sum, sv, svlogd, swapoff, swapon, switch_root, sync, sysctl,
syslogd, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp,
tftpd, time, timeout, top, touch, tr, traceroute, traceroute6, true,
tty, ttysize, tunctl, udhcpc, udhcpd, udpsvd, umount, uname, unexpand,
uniq, unix2dos, unlzma, unlzop, unxz, unzip, uptime, usleep, uudecode,
uuencode, vconfig, vi, vlock, volname, wall, watch, watchdog, wc, wget,
which, who, whoami, xargs, xz, xzcat, yes, zcat, zcip~/code/i2c/i2c-tools-3.0.2/tools$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8
_install/bin/busybox




# ./busybox
./busybox: permission denied
# ls
database
i2cdetect
i2cdump
i2cget
i2cset
busybox Note: These work fine if ran without ./ from rupor’s rescue image. (edited)

platform-tools>adb root shell
adbd is already running as root

[root (ttyGS0)]# ./busybox i2cdetect -l
i2c-0 i2c imx-i2c I2C adapter
i2c-1 i2c imx-i2c I2C adapter
i2c-2 i2c imx-i2c I2C adapter
[root (ttyGS0)]# i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


MXC WatchDog Driver 2.0
MXC Watchdog # 0 Timer: initial timeout 60 sec




CONFIG_KEXEC in kernel config


























Starting kernel ...
Linux version 2.6.35.3 (nonasuomy@DebianCompiler) (gcc version 4.8.1 20130401 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.04-20130417 - Linaro GCC 2013.04) ) #1 PREEMPT Sun Apr 24 22:16:04 EDT 2022
CPU: ARMv7 Processor [412fc085] revision 5 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Freescale MX50 ARM2 Board
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 63754
Kernel command line: console=ttymxc2,115200 init=/init bootdev=0 rawtable=0xF40000
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 251MB = 251MB total
Memory: 249236k/249236k available, 7788k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xf9e00000 - 0xffe00000 ( 96 MB)
vmalloc : 0x90000000 - 0xf4000000 (1600 MB)
lowmem : 0x80000000 - 0x8fb00000 ( 251 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.init : 0x80008000 - 0x80025000 ( 116 kB)
.text : 0x80025000 - 0x80412000 (4020 kB)
.data : 0x8042e000 - 0x804a86c0 ( 490 kB)
SLUB: Genslabs=9, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:396
MXC GPIO hardware
MXC IRQ initialized
You should not call the gpmi_set_parent
MXC_Early serial console at MMIO 0x63f90000 (options '115200')
bootconsole [ttymxc2] enabled
Console: colour dummy device 80x30
Mix log static memory : 7fe00000 - 7fffffff
address : 90400000
There is not the last log. 






make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- installupx --ultra-brute _install/bin/busyboxkobo:/tmp# ./busybox
BusyBox v1.34.1 (2022-04-30 20:19:26 EDT) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.
Usage: busybox [function [arguments]...]
or: busybox --list[-full]
or: busybox --install [-s] [DIR]
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.
Currently defined functions:
[, [[, ash, awk, base64, cat, chattr, chgrp, chmod, chown, chroot, cp, cttyhack, cut, date, dd, devmem, dmesg, echo, env, false, fbset, fdformat, fold, free, fsck, fuser, getty, grep,
halt, i2cdetect, i2cdump, i2cget, i2cset, i2ctransfer, ifconfig, ifdown, ifenslave, ifplugd, ifup, init, insmod, kill, killall, linuxrc, ln, login, losetup, ls, lsattr, lsmod, lsof, mkdir,
mkfifo, mknod, mount, mv, nc, nohup, nproc, pidof, ping, poweroff, printf, ps, pwd, reboot, reset, rm, rmmod, route, run-init, rx, sed, sh, sha256sum, sleep, sort, split, stat, sync, test,
timeout, touch, tr, true, umount, uname, unlink, vi, watchdog, xxd, yes
kobo:/tmp# 





cp ~/Downloads/busybox ~/code/busybox/_install/bin/busybox




Image Name: Linux-2.6.35.3
Created: Sat Apr 30 20:33:57 2022
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2817996 Bytes = 2751.95 KiB = 2.69 MiB
Load Address: 70008000
Entry Point: 70008000
Image arch/arm/boot/uImage is ready
Let me just verify that the _install directory was in place though.







import serial, time, sys
s = serial.Serial("/dev/ttyUSB0", 115200, timeout = 0.1)
def slowsend(x):
for b in x:
s.write(b)
time.sleep(0.001)
while True:
d = s.read(32)
sys.stdout.write(d)
s.write(' ' * 32) # "Any key" for uboot
if 'Hit' in d:
slowsend("\r\nprintenv\r\n")
time.sleep(1.5)
# To boot recovery from SD card
slowsend("setenv bootargs 'root=/dev/mmcblk0p1 rootfstype=ext4 rw "
+ "rootwait init=/linuxrc console=ttymxc4,115200 bootdev=2 rawtable=0xF40000'\r\n")
# To boot normal system from SD card
# slowsend("setenv bootargs 'console=ttymxc4,115200 init=/init bootdev=0 rawtable=0xF40000'\r\n")
time.sleep(1.0)
slowsend("boot\r\n")
break
while True:
d = s.read(64)
sys.stdout.write(d)
You can also just copy-paste the commands to serial terminal, but that is a bit annoying as the watchdog will reboot the device if it is stuck in uboot for more than 10 seconds or so.

## Booting kernel from Legacy Image at 70800000 ...
Image Name: Normal Kernel
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2288064 Bytes = 2.2 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 70c00000 ...
Image Name: Normal Rootfs
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 214270 Bytes = 209.2 kB
Load Address: 70308000
Entry Point: 70308000
Verifying Checksum ... OK
Loading Kernel Image ... OK
MMC read: dev # 0, block # 10240, count 600 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
600 blocks read: OK
## Booting kernel from Legacy Image at 70800000 ...
Image Name: Linux-2.6.35.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2817996 Bytes = 2.7 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!









Hit any key to stop autoboot: 0
MMC read: dev # 0, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
5120 blocks read: OK
MMC read: dev # 0, block # 10240, count 600 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
600 blocks read: OK
## Booting kernel from Legacy Image at 70800000 ...
Image Name: Linux-2.6.35.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2226868 Bytes = 2.1 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 70c00000 ...
Image Name: Normal Rootfs
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 286848 Bytes = 280.1 kB
Load Address: 70308000
Entry Point: 70308000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Linux version 2.6.35.3 (nonasuomy@Marceline) (gcc version 4.8.1 20130401 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.04-20130417 - Linaro GCC 2013.04) ) #4 PREEMPT Sat Apr 30 22:57:06 EDT 2022
CPU: ARMv7 Processor [412fc085] revision 5 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Freescale MX50 ARM2 Board
Ignoring unrecognised tag 0x54410009
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 63754
Kernel command line: console=ttymxc2,115200 rawtable=0xF40000 root=/dev/ram0 rdinit=/sbin/init rootfstype=ramfs
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 251MB = 251MB total
Memory: 248600k/248600k available, 8424k reserved, 0K highmemVirtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xf9e00000 - 0xffe00000 ( 96 MB)
vmalloc : 0x90000000 - 0xf4000000 (1600 MB)
lowmem : 0x80000000 - 0x8fb00000 ( 251 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.init : 0x80008000 - 0x800be000 ( 728 kB)
.text : 0x800be000 - 0x804ad000 (4028 kB)
.data : 0x804ca000 - 0x80544760 ( 490 kB)
SLUB: Genslabs=9, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:396
MXC GPIO hardware
MXC IRQ initialized
You should not call the gpmi_set_parent
MXC_Early serial console at MMIO 0x63f90000 (options '115200')
bootconsole [ttymxc2] enabled
Console: colour dummy device 80x30
Mix log static memory : 7fe00000 - 7fffffff
address : 90400000
There is not the last log.
Initialize a static memory for mix_logger.
grep -r "There is not the last log" .
##### LOG START #####
Calibrating delay loop... 799.53 BogoMIPS (lpj=3997696)













Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xf9e00000 - 0xffe00000 ( 96 MB)
vmalloc : 0x90000000 - 0xf4000000 (1600 MB)
lowmem : 0x80000000 - 0x8fb00000 ( 251 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.init : 0x80008000 - 0x800be000 ( 728 kB)
.text : 0x800be000 - 0x804ad000 (4028 kB)
.data : 0x804ca000 - 0x80544760 ( 490 kB)
SLUB: Genslabs=9, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:396
MXC GPIO hardware
MXC IRQ initialized
You should not call the gpmi_set_parent
MXC_Early serial console at MMIO 0x63f90000 (options '115200')
bootconsole [ttymxc2] enabled
Console: colour dummy device 80x30
Mix log static memory : 7fe00000 - 7fffffff
address : 90400000
There is not the last log.
Initialize a static memory for mix_logger. 




















/ for WATCHDOG
--- Watchdog Timer Support
[*] Disable watchdog shutdown on close
*** Watchdog Device Drivers ***
< > Software watchdog
< > WM831x watchdog
<*> MXC watchdog
< > Max63xx watchdog
< > IMX2+ Watchdog
*** USB-based Watchdog Cards ***
< > Berkshire Products USB-PC Watchdog








x Say Y here to enable support for the power management unit x
x provided by Wolfson Microelectronics WM831x PMICs. 


CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
CONFIG_SOFT_WATCHDOG=m
CONFIG_MXC_WATCHDOG=m
# CONFIG_MAX63XX_WATCHDOG is not set
# CONFIG_USBPCWATCHDOG is not setCONFIG_WATCHDOG_NOWAYOUT=y
quite funny












sudo dd if=/media/nonasuomy/UNTITLED/uImage of=/dev/mmcblk0 bs=512 seek=2048
[sudo] password for nonasuomy:
4347+1 records in
4347+1 records out
2225904 bytes (2.2 MB, 2.1 MiB) copied, 0.273714 s, 8.1 MB/s
sync too


mkimage -l uImage
Image Name: Linux-2.6.35.3
Created: Sun May 1 21:44:35 2022
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2225840 Bytes = 2173.67 KiB = 2.12 MiB
Load Address: 70008000
Entry Point: 70008000Starting kernel ...
Linux version 2.6.35.3 (nonasuomy@Marceline) (gcc version 4.8.1 20130401 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.04-20130417 - Linaro GCC 2013.04) ) #5 PREEMPT Sun May 1 21:44:29 EDT 2022
CPU: ARMv7 Processor [412fc085] revision 5 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Freescale MX50 ARM2 Board
Ignoring unrecognised tag 0x54410009
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 63754
Kernel command line: console=ttymxc2,115200 rawtable=0xF40000 root=/dev/ram0 rdinit=/sbin/init rootfstype=ramfs
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 251MB = 251MB total
Memory: 248612k/248612k available, 8412k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xf9e00000 - 0xffe00000 ( 96 MB)
vmalloc : 0x90000000 - 0xf4000000 (1600 MB)
lowmem : 0x80000000 - 0x8fb00000 ( 251 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.init : 0x80008000 - 0x800be000 ( 728 kB)
.text : 0x800be000 - 0x804ac000 (4024 kB)
.data : 0x804c8000 - 0x80542660 ( 490 kB)
SLUB: Genslabs=9, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.NR_IRQS:396
MXC GPIO hardware
MXC IRQ initialized
You should not call the gpmi_set_parent
MXC_Early serial console at MMIO 0x63f90000 (options '115200')
bootconsole [ttymxc2] enabled
Console: colour dummy device 80x30
Mix log static memory : 7fe00000 - 7fffffff
address : 90400000
There is not the last log.
Initialize a static memory for mix_logger.






dd if=/dev/mmcblk2 skip=786432 of=uboot_old.bin bs=1 count=131072
dd if=sd_card_PRS-T1_1.0.07_adb_enabled.bin skip=786432 of=uboot_new.bin bs=1 count=131072
dd if=uboot_new.bin of=/dev/mmcblk2 seek=786432 bs=1 count=131072zcat /proc/config.gz > .config








wget http://www.sony.net/Products/Linux/Audio/Download/common/L1KaMCC9mHxsZfoFPJnsBg/linux-2.6.35.3-110901.tgz
wget
zcat /proc/config.gz > .config
make menuconfig (change what you want)
make uImage
make modules_install





wget http://www.sony.net/Products/Linux/Audio/Download/common/L1KaMCC9mHxsZfoFPJnsBg/linux-2.6.35.3-110901.tgz
wget
zcat /proc/config.gz > .config
make menuconfig (change what you want)
make uImage
make modules_install 

[root (ttyGS0)]# ls
1 193 332 driver pwr3
1008 197 382 execdomains sdma
1072 2 393 fb self
1074 201 397 filesystems slabinfo
1078 210 4 fs softirqs
1100 213 5 interrupts stat
1108 218 76 iomem swaps
1110 2264 77 ioports sys
1129 2275 8 irq sysvipc
1131 2282 9 kallsyms timer_list
1136 2286 apm kmsg tty
1144 2287 asound kpagecount uid_stat
1145 2288 buddyinfo kpageflags uptime
1150 2303 bus loadavg version
12 266 cmdline locks vmallocinfo
1229 3 config.gz meminfo vmstat
1230 306 cpu misc wakelocks
1247 308 cpuinfo modules zoneinfo
169 310 crypto mounts
171 312 devices net
173 315 diskstats pagetypeinfo
191 322 dma-engine partitions

cat /proc/cmdline
root=/dev/mmcblk2p1 rootfstype=ext4 rw rootwait init=/linuxrc console=ttymxc4,115200 bootdev=2 rawtable=0xF40000
Build: sony/sydney/EBX-5047/imx50_evk:2.2.1/FRG83/105:user/test-keys
Hardware: imx50_evk
Bootloader: unknown
Radio: unknown
Kernel: Linux version 2.6.35.3 (hudson@devuntu5) (gcc version 4.4.0 (GCC) ) #1 PREEMPT Wed May 7 15:03:54 JST 2014 (edited)





































MX50_ARM2 U-Boot > fatls mmc 2:4
** Partition 4 not valid on device 2 **
** Unable to use mmc 2:4 for fatls **
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
Device: FSL_ESDHC
Manufacturer ID: 2
OEM: 544d
Name: SD02G
Tran Speed: 25000000
Rd Block Len: 512
SD version 2.0
High Capacity: No
Capacity: 2013265920
Bus Width: 4-bit
Boot Partition Size: No boot partition available
MX50_ARM2 U-Boot > setenv bootargs 'console=ttymxc4,115200 init=/init bootdev=0 rawtable=0xF40000
MX50_ARM2 U-Boot > boot
MMC read: dev # 2, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
5120 blocks read: OK
MMC read: dev # 2, block # 10240, count 500 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
500 blocks read: OK
## Booting kernel from Legacy Image at 70800000 ...
Image Name: Normal Kernel
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2288064 Bytes = 2.2 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 70c00000 ...
Image Name: Normal Rootfs
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 214270 Bytes = 209.2 kB
Load Address: 70308000
Entry Point: 70308000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...Linux version 2.6.35.3 (hudson@devuntu5) (gcc version 4.4.0 (GCC) ) #1 PREEMPT Wed May 7 15:03:54 JST 2014
CPU: ARMv7 Processor [412fc085] revision 5 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Freescale MX50 ARM2 Board
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 63754
Kernel command line: console=ttymxc4,115200 init=/init bootdev=0 rawtable=0xF40000
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 251MB = 251MB total
Memory: 249220k/249220k available, 7804k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xf9e00000 - 0xffe00000 ( 96 MB)
vmalloc : 0x90000000 - 0xf4000000 (1600 MB)
lowmem : 0x80000000 - 0x8fb00000 ( 251 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.init : 0x80008000 - 0x80025000 ( 116 kB)
.text : 0x80025000 - 0x80424000 (4092 kB)
.data : 0x80444000 - 0x804be700 ( 490 kB)
SLUB: Genslabs=9, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:396
MXC GPIO hardware
MXC IRQ initialized
You should not call the gpmi_set_parent
MXC_Early serial console at MMIO 0x63f90000 (options '115200')
bootconsole [ttymxc4] enabled
Console: colour dummy device 80x30
Mix log static memory : 7fe00000 - 7fffffff
address : 90400000
There is not the last log.
Initialize a static memory for mix_logger.##### LOG START #####
Calibrating delay loop... 799.53 BogoMIPS (lpj=3997696)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
regulator: core version 0.5
NET: Registered protocol family 16
i.MX IRAM pool: 128 KB@0x90040000
CPU is i.MX50 Revision 1.1
IR Power is LDO4
This is TPS65181.
PWR3DET:power 3 detect
FEC disable
Using SDMA I.API
MXC DMA API initialized
IMX usb wakeup probe
IMX usb wakeup probe
bio: create slab <bio-0> at 0
CSPI: mxc_spi-0 probed
CSPI: mxc_spi-2 probed
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
wm831x 0-0034: WM8321 revision C
wm831x 0-0034: Security key had non-zero value 1
regulator: VCORE: 850 <--> 1100 mV at 1000 mV at 0 uA
regulator: VPERI: 950 <--> 1250 mV at 1250 mV at 0 uA
regulator: DCDC3: at 1800 mV
regulator: DCDC4: at 2900 mV
regulator: LDO1: 900 <--> 3300 mV at 1200 mV
regulator: LDO2: 900 <--> 3300 mV at 1200 mV
regulator: LDO3: 900 <--> 3300 mV at 2500 mV
regulator: LDO4: 900 <--> 3300 mV at 3200 mV
regulator: LDO5: 900 <--> 3300 mV at 2900 mV
regulator: LDO6: 900 <--> 3300 mV at 2500 mV
regulator: LDO7: 1000 <--> 3500 mV at 1800 mV
regulator: LDO8: 1000 <--> 3500 mV at 2500 mV
regulator: LDO9: 1000 <--> 3500 mV at 3100 mV
regulator: LDO10: 1000 <--> 3500 mV at 3200 mV
regulator: LDO11: 800 <--> 1550 mV at 1200 mV
Advanced Linux Sound Architecture Driver Version 1.0.23.
Switching to clocksource mxc_timer1
mxsdhci: MXC Secure Digital Host Controller Interface driver
mxsdhci: MXC SDHCI Controller Driver.
SDHC:sdhci_set_power:slot pwr off
mmc_detect_change: id=0
mmc0: SDHCI detect irq 179 irq 1 INTERNAL DMA
mxsdhci: MXC SDHCI Controller Driver.
SDHC:sdhci_set_power:slot pwr on
mmc_detect_change: id=1
mmc1: SDHCI detect irq 0 irq 2 INTERNAL DMA
mxsdhci: MXC SDHCI Controller Driver.
mmc_detect_change: id=2mmc2: SDHCI detect irq 228 irq 3 INTERNAL DMA
mxsdhci: MXC SDHCI Controller Driver.
mmc_detect_change: id=3
mmc3: SDHCI detect irq 0 irq 4 INTERNAL DMA
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Unpacking initramfs...
Freeing initrd memory: 208K
LPMode driver module loaded
Static Power Management for Freescale i.MX5
PM driver module loaded
sdram autogating driver module loaded
Bus freq driver module loaded
mxc_dvfs_core_probe
DVFS driver module loaded
i.MXC CPU frequency driver
DVFS PER driver module loaded
ashmem: initialized
msgmni has been set to 487
alg: No test for stdrng (krng)
cryptodev: driver loaded.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
regulator: DISPLAY:
regulator: VCOM: at 1250 mV
regulator: V3P3_CTRL:
regulator: PMIC_TEMP:
regulator: PWR0_CTRL:
regulator: PWR2_CTRL:
regulator: VSYS_EPD:
tps65180 1-0048: PMIC TPS6518x for eInk display
SDHC:sdhci_set_power:slot pwr on
mmc0: new high speed SDHC card at address e624
mmc_rescan:wake_lock_timeout (0)
mmc_rescan:detect done(id=0)
Serial: MXC Internal UART driver
mxcuart register
mxcintuart.2: ttymxc2 at MMIO 0x5000c000 (irq = 33) is a Freescale i.MX
mxcintuart.3: ttymxc3 at MMIO 0x53ff0000 (irq = 13) is a Freescale i.MX
mxcintuart.4: ttymxc4 at MMIO 0x63f90000 (irq = 86) is a Freescale i.MXconsole [ttymxc4] enabled, bootconsole disabled
console [ttymxc4] enabled, bootconsole disabled
mxcswuart register
mxcintswuart.0: ttymxc0 at MMIO 0x53fbc000 (irq = 31) is a Freescale i.MX
SSW:ssw port register 0
mxcintswuart.1: ttymxc1 at MMIO 0x53fc0000 (irq = 32) is a Freescale i.MX
SSW:ssw port register 1
loop: module loaded
FEC Ethernet Driver
PPP generic driver version 2.4.2
usbcore: registered new interface driver asix
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver net1080
usbcore: registered new interface driver cdc_subset
mmc2: new high speed MMC card at address 0001
input: gpio-keys as /devices/platform/gpio-keys/input/input0
mmc_rescan:wake_lock_timeout (2)
irtp_init
irtp_connect
mmc_rescan:wifi:wake unlock (3)
input: SONY IR Touchpanel as /devices/virtual/input/input1
IRTP: register early_suspend
input: wm831x_on as /devices/platform/imx-i2c.0/i2c-0/0-0034/wm831x-on/input/input2
input: phxlit_vbus as /devices/platform/phxlit_vbus.0/input/input3
phxlit_vbus phxlit_vbus.0: event(type 5 code 12)
wm831x-rtc wm831x-rtc: rtc core: registered wm831x as rtc0
mxc_rtc mxc_rtc.0: rtc core: registered mxc_rtc as rtc1
using rtc device, wm831x, for alarms
i2c /dev entries driver
APM Battery Driver
MXC WatchDog Driver 2.0
MXC Watchdog # 0 Timer: initial timeout 60 sec
mmcblk0: mmc0:e624 SU04G 3.69 GiB
mmcblk0: p1 p2 p3 < p5 p6 p7 p8 p9 p10 > p4
Raw data table load
mmcblk2: mmc2:0001 SEM02G 1.82 GiB
BUG: recent printk recursion!
<6> mmcblk2:
logger: created 64K log 'log_main'
logger: created 64K log 'log_events'
logger: created 64K log 'log_radio'
logger: created 64K log 'log_system'
logger: created 2047K log 'log_mix'
logger: created 64K log 'log_kernel'
Past log manager.
CS42L52: CODEC revision C1
DMA Sound Buffers Allocated:UseIram=1 buf->addr=f8006000 buf->area=90046000 size=24576
DMA Sound Buffers Allocated:UseIram=1 buf->addr=7e360000 buf->area=f9e01000 size=24576asoc: CS42L52 dai <-> imx-ssi-2-0 mapping ok
ALSA device list:
#0: imx-3stack (CS42L52 codec)
nf_conntrack version 0.5.0 (3897 buckets, 15588 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 17
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 2
tps65180_vsys_enable : wait VSYS_EPD.
regulator_init_complete: incomplete constraints, leaving PWR2_CTRL on
regulator_init_complete: incomplete constraints, leaving PMIC_TEMP on
epdc_progress_work_func start progress.
regulator_init_complete: incomplete constraints, leaving LDO11 on
regulator_init_complete: incomplete constraints, leaving LDO7 on
regulator_init_complete: incomplete constraints, leaving LDO6 on
regulator_init_complete: incomplete constraints, leaving LDO5 on
regulator_init_complete: incomplete constraints, leaving LDO3 on
regulator_init_complete: incomplete constraints, leaving LDO2 on
regulator_init_complete: incomplete constraints, leaving LDO1 on
input: sub_cpu_pwrbutton as /devices/platform/mxc_spi.2/spi3.2/sub_cpu_pwrbutton/input/input4
wm831x-rtc wm831x-rtc: setting system clock to 2010-01-01 00:01:59 UTC (1262304119)
Freeing init memory: 116K
init: cannot open '/initlogo.rle'
init: cannot find '/system/bin/switcher', disabling 'switcher'
init: cannot find '/system/bin/servicemanager', disabling 'servicemanager'
init: cannot find '/system/bin/vold', disabling 'vold'
init: cannot find '/system/bin/netd', disabling 'netd'
init: cannot find '/system/bin/dispd', disabling 'dispd'
init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
init: cannot find '/system/bin/rild', disabling 'ril-daemon'
init: cannot find '/system/bin/app_process', disabling 'zygote'
init: cannot find '/system/bin/mediaserver', disabling 'media'
init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'
init: cannot find '/system/bin/installd', disabling 'installd'init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
init: cannot find '/system/etc/firewall.sh', disabling 'firewall'
init: cannot find '/system/bin/keystore', disabling 'keystore'
init: cannot find '/system/bin/logwrapper', disabling 'wpa_supplicant'
epdc_progress_work_func end progress.MXC WatchDog Driver 2.0
MXC Watchdog # 0 Timer: initial timeout 60 secinput: wm831x_on as /devices/platform/imx-i2c.0/i2c-0/0-0034/wm831x-on/input/input2wm831x-rtc wm831x-rtc: rtc core: registered wm831x as rtc0
mxc_rtc mxc_rtc.0: rtc core: registered mxc_rtc as rtc1
using rtc device, wm831x, for alarms
setenv bootargs 'root=/dev/mmcblk0p1 rootfstype=ext4 rw rootwait init=/linuxrc console=ttymxc4,115200 bootdev=2 rawtable=0xF40000'
boot
To boot normal system from SD card
setenv bootargs 'console=ttymxc4,115200 init=/init bootdev=0 rawtable=0xF40000'
boot
Are we writing our kernel to one of these spots? (edited)

dd if=uImage of=/dev/mmcblk0 bs=512 seek=2048
sync (edited)











mmcinfo 0 in U-Boot









mmcinfo 0 in U-Boot 


MX50_ARM2 U-Boot > mmcinfo 0
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
Device: FSL_ESDHC
Manufacturer ID: 2
OEM: 544d
Name: SD02G
Tran Speed: 25000000
Rd Block Len: 512
SD version 2.0
High Capacity: No
Capacity: 2013265920
Bus Width: 4-bit
Boot Partition Size: No boot partition available
mmcinfo 1
if it doesn't work, mmcinfo 2

MX50_ARM2 U-Boot > mmcinfo 0
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
Device: FSL_ESDHC
Manufacturer ID: 2
OEM: 544d
Name: SD02G
Tran Speed: 25000000
Rd Block Len: 512
SD version 2.0
High Capacity: No
Capacity: 2013265920
Bus Width: 4-bit
Boot Partition Size: No boot partition available 
MX50_ARM2 U-Boot > mmcinfo 1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
Card did not respond to voltage select!
MMC card init failed!
MX50_ARM2 U-Boot > mmcinfo 2
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
Device: FSL_ESDHC
Manufacturer ID: 45
OEM: 100
Name: SEM02
Tran Speed: 25000000
Rd Block Len: 512
MMC version 4.0
High Capacity: No
Capacity: 1958739968
Bus Width: 4-bit
Boot Partition Size: 1024KB
Current Partition for boot: Not bootable
MX50_ARM2 U-Boot > mmcinfo 3
MMC Device 3 not found (edited)







console=ttymxc4,115200 rawtable=0xF40000 root=/dev/ram0 rdinit=/sbin/init rootfstype=ramfs
You want the default kernel command string to be changed to 2 -> 4 correct?


mmc read 1 0x800 0x1000
work or does it hang?

Rupor
N/A
Ours
CONFIG_ARM_L1_CACHE_SHIFT_6=y
Rupor
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_LZMA is not set
Ours
# CONFIG_KERNEL_GZIP is not set
CONFIG_KERNEL_LZMA=y
Rupor
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_LZO is not set
Ours
CONFIG_INITRAMFS_SOURCE="/home/nonasuomy/code/busybox/_install"
CONFIG_INITRAMFS_ROOT_UID=0
CONFIG_INITRAMFS_ROOT_GID=0
# CONFIG_RD_GZIP is not set
# CONFIG_RD_BZIP2 is not set
CONFIG_RD_LZMA=y
# CONFIG_RD_LZO is not set
CONFIG_INITRAMFS_COMPRESSION_NONE=y
# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set
# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
Rupor
CONFIG_ARM_L1_CACHE_SHIFT=5
Ours
CONFIG_ARM_L1_CACHE_SHIFT=6
Rupor
CONFIG_CMDLINE="noinitrd console=ttymxc0,115200 root=/dev/mtdblock2 rw rootfstype=jffs2 ip=off"
# CONFIG_CMDLINE_FORCE is not set
# CONFIG_XIP_KERNEL is not set
# CONFIG_KEXEC is not set
Ours
CONFIG_CMDLINE="console=ttymxc4,115200 rawtable=0xF40000 root=/dev/ram0 rdinit=/sbin/init rootfstype=ramfs"
CONFIG_CMDLINE_FORCE=y
# CONFIG_XIP_KERNEL is not set
CONFIG_KEXEC=y
CONFIG_ATAGS_PROC=y (edited)

Rupor
# CONFIG_NETWORK_SECMARK is not setONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
Ours
# CONFIG_NETWORK_SECMARK is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y
#
# Core Netfilter Configuration
#
# CONFIG_NETFILTER_NETLINK_QUEUE is not set
# CONFIG_NETFILTER_NETLINK_LOG is not set
CONFIG_NF_CONNTRACK=y
# CONFIG_NF_CT_ACCT is not set
# CONFIG_NF_CONNTRACK_MARK is not set
# CONFIG_NF_CONNTRACK_EVENTS is not set
# CONFIG_NF_CT_PROTO_DCCP is not set
# CONFIG_NF_CT_PROTO_SCTP is not set
# CONFIG_NF_CT_PROTO_UDPLITE is not set
# CONFIG_NF_CONNTRACK_AMANDA is not set
CONFIG_NF_CONNTRACK_FTP=y
# CONFIG_NF_CONNTRACK_H323 is not set
# CONFIG_NF_CONNTRACK_IRC is not set
# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
# CONFIG_NF_CONNTRACK_PPTP is not set
# CONFIG_NF_CONNTRACK_SANE is not set
# CONFIG_NF_CONNTRACK_SIP is not set
# CONFIG_NF_CONNTRACK_TFTP is not set
# CONFIG_NF_CT_NETLINK is not set
CONFIG_NETFILTER_XTABLES=y
#
# Xtables combined modules
#
# CONFIG_NETFILTER_XT_MARK is not set
# CONFIG_NETFILTER_XT_CONNMARK is not set
#
# Xtables targets
#
# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
Rupor
CONFIG_TOUCHSCREEN_SONYIR_NOFILM=y
Ours
# CONFIG_TOUCHSCREEN_SONYIR_NOFILM is not set
Rupor
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
#
# Watchdog Device Drivers
#
# CONFIG_SOFT_WATCHDOG is not set
# CONFIG_WM831X_WATCHDOG is not set
CONFIG_MXC_WATCHDOG=y
# CONFIG_MAX63XX_WATCHDOG is not set
# CONFIG_IMX2_WDT is not set
#
# USB-based Watchdog Cards
#
# CONFIG_USBPCWATCHDOG is not set
ours
# CONFIG_WATCHDOG is not setRupor
# USB Device Class dri
# CONFIG_USB_SERIAL_ARK3116 is not set
Ours
# USB Device Class drivers
#
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set
# CONFIG_USB_WDM is not set
# CONFIG_USB_TMC is not set
#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#
#
# also be needed; see USB_STORAGE Help for more info
#
# CONFIG_USB_LIBUSUAL is not set
#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
#
# USB port drivers
#
CONFIG_USB_SERIAL=m
# CONFIG_USB_EZUSB is not set
# CONFIG_USB_SERIAL_GENERIC is not set
# CONFIG_USB_SERIAL_AIRCABLE is not set
# CONFIG_USB_SERIAL_ARK3116 is not set
Rupor
CONFIG_USB_G_SERIAL=m
Ours
# CONFIG_USB_G_SERIAL is not set
Rupor
# CONFIG_USB_ANDROID is not set
Ours
CONFIG_USB_ANDROID=m
CONFIG_USB_ANDROID_ADB=y
CONFIG_USB_ANDROID_MASS_STORAGE=y
CONFIG_USB_ANDROID_MASS_STORAGE_EXTSCSI=y
# CONFIG_USB_ANDROID_RNDIS is not set
Rupor
#
# MXC support drivers
#
CONF_SECURITY_RNG is not set
Ours
CONFIG_MXC_IPU=y
CONFIG_MXC_IPU_V3=y
#
# MXC SSI support
#
# CONFIG_MXC_SSI is not set
#
# MXC Digital Audio Multiplexer support
#
# CONFIG_MXC_DAM is not set
#
# MXC PMIC support
#
# CONFIG_MXC_PMIC_MC13783 is not set
# CONFIG_MXC_PMIC_MC13892 is not set
# CONFIG_MXC_PMIC_MC34704 is not set
# CONFIG_MXC_PMIC_MC9SDZ60 is not set
# CONFIG_MXC_PMIC_MC9S08DZ60 is not set
#
# MXC Security Drivers
#
# CONFIG_MXC_SECURITY_SCC is not set
# CONFIG_MXC_SECURITY_SCC2 is not set
# CONFIG_MXC_SECURITY_RNG is not set
#
Rupor
CONFIG_DECOMPRESS_GZIP=y
Ours
CONFIG_DECOMPRESS_LZMA=y

mmc read 1 0x800 0x1000
work or does it hang? 

MX50_ARM2 U-Boot > mmc read 2 0x800 0x1000
MMC read: dev # 2, block # 4096, count 0 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz


mmc read 2 0x70008000 0x800 0x1000 (edited)
MX50_ARM2 U-Boot > mmc read 2 0x70008000 0x800 0x1000
MMC read: dev # 2, block # 2048, count 4096 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
4096 blocks read: OK
MX50_ARM2 U-Boot >


mmc read 2 0x70008000 0x800 0x2000
bootm 0x70008000


MX50_ARM2 U-Boot > mmc read 2 0x70008000 0x800 0x2000
MMC read: dev # 2, block # 2048, count 8192 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz


MX50_ARM2 U-Boot > mmc read 2 0x70008000 0x800 0x2000
MMC read: dev # 2, block # 2048, count 8192 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz 


MX50_ARM2 U-Boot > mmc read 2 0x70008000 0x800 0x1400
MMC read: dev # 2, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
5120 blocks read: OK
MX50_ARM2 U-Boot >


MX50_ARM2 U-Boot > mmc read 2 0x70008000 0x800 0x1400 bootm 0x70008000
mmc - MMC sub system
Usage:
mmc mmc read <device num> addr blk# cnt [partition]
mmc write <device num> addr blk# cnt [partition]
mmc rescan <device num>
mmc list - lists available devices
MX50_ARM2 U-Boot >


setenv bootcmd mmc read 2 0x70008000 0x800 0x1400\; bootm 0x70008000
saveenv
reset (edited)






setenv bootcmd mmc read 2 0x70008000 0x800 0x1400\; bootm 0x70008000
saveenv
reset (edited)
MX50_ARM2 U-Boot > setenv bootcmd mmc read 2 0x70008000 0x800 0x1400\; bootm
MX50_ARM2 U-Boot > saveenv
Saving Environment to MMC...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
Writing to MMC(2)... done
MX50_ARM2 U-Boot > reset
resetting ...
▒
U-Boot 2009.08 (Dec 21 2011 - 14:48:38)
CPU: Freescale i.MX50 family 1.1V at 800 MHz
mx50 pll1: 800MHz
mx50 pll2: 400MHz
mx50 pll3: 216MHz
ipg clock : 66666666Hz
ipg per clock : 66666666Hz
uart clock : 24000000Hz
ahb clock : 133333333Hz
axi_a clock : 400000000Hz
axi_b clock : 200000000Hz
weim_clock : 100000000Hz
ddr clock : 160000000Hz
esdhc1 clock : 80000000Hz
esdhc2 clock : 80000000Hz
esdhc3 clock : 80000000Hz
esdhc4 clock : 80000000Hz
Board: MX50 ARM2 board
Boot Reason: [WDOG]
Boot Device: MMC
I2C: ready
DRAM: 256 MB
MMC: FSL_ESDHC: 0, FSL_ESDHC: 1, FSL_ESDHC: 2
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
temperature 28
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
In: serial
Out: serial
Err: serial
Net: got MAC address from IIM: 00:00:00:00:00:00
FEC0
Hit any key to stop autoboot: 0

MX50_ARM2 U-Boot > setenv bootcmd mmc read 2 0x70008000 0x800 0x1400\; bootm 0x70008000
MX50_ARM2 U-Boot > saveenv
Saving Environment to MMC...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
Writing to MMC(2)... done
MX50_ARM2 U-Boot > reset
resetting ...
▒
U-Boot 2009.08 (Dec 21 2011 - 14:48:38)
CPU: Freescale i.MX50 family 1.1V at 800 MHz
mx50 pll1: 800MHz
mx50 pll2: 400MHz
mx50 pll3: 216MHz
ipg clock : 66666666Hz
ipg per clock : 66666666Hz
uart clock : 24000000Hz
ahb clock : 133333333Hz
axi_a clock : 400000000Hz
axi_b clock : 200000000Hz
weim_clock : 100000000Hz
ddr clock : 160000000Hz
esdhc1 clock : 80000000Hz
esdhc2 clock : 80000000Hz
esdhc3 clock : 80000000Hz
esdhc4 clock : 80000000Hz
Board: MX50 ARM2 board
Boot Reason: [WDOG]
Boot Device: MMC
I2C: ready
DRAM: 256 MB
MMC: FSL_ESDHC: 0, FSL_ESDHC: 1, FSL_ESDHC: 2
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
temperature 28
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
In: serial
Out: serial
Err: serial
Net: got MAC address from IIM: 00:00:00:00:00:00
FEC0
Hit any key to stop autoboot: 0MMC read: dev # 2, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
5120 blocks read: OK
## Booting kernel from Legacy Image at 70008000 ...
Image Name: Normal Kernel
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2288064 Bytes = 2.2 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
Starting kernel ...
U-Boot 2009.08 (Dec 21 2011 - 14:48:38)

MX50_ARM2 U-Boot > fatls mmc 0
failed in set read bl len = 0x0
** Can't read from device 0 **
** Unable to use mmc 0:1 for fatls **MX50_ARM2 U-Boot > fatls mmc 2
** Partition 1 not valid on device 2 **
** Unable to use mmc 2:1 for fatls **
MX50_ARM2 U-Boot >




setenv bootcmd mmc read 0 0x70008000 0x800 0x1400\; bootm 0x70008000
saveenv
reset
setenv bootcmd mmc read 0 0x70008000 0x800 0x1400\; bootm 0x70008000
boot






setenv bootcmd mmc read 0 0x70008000 0x800 0x1400\; bootm 0x70008000
saveenv
reset Hit any key to stop autoboot: 0
MMC read: dev # 0, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
5120 blocks read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!







Hit any key to stop autoboot: 0
MMC read: dev # 0, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
5120 blocks read: OK
## Booting kernel from Legacy Image at 70008000 ...
Image Name: Linux-2.6.35.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2225840 Bytes = 2.1 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
Starting kernel ...


















































[root (ttyGS0)]# ./busybox i2cdetect -l
i2c-0 i2c imx-i2c I2C adapter
i2c-1 i2c imx-i2c I2C adapter
i2c-2 i2c imx-i2c I2C adapter 
# remount SD card for writing
mount -o remount,rw /initrd/mnt/sd
# your screen driver
dd if=/dev/mmcblk2 of=/initrd/mnt/sd/WF.img skip=17408 count=2048 bs=1024
sync
# other important information, such as the operating voltage of the screen in line 5
dd if=/dev/mmcblk2 of=/initrd/mnt/sd/Vcom.img skip=15876 count=1 bs=1024
sync
# serial, MAC
dd if=/dev/mmcblk2 of=/initrd/mnt/sd/SN.img skip=15872 count=1 bs=1024
sync
Partitions
Disk /dev/sdb: 1.82 GiB, 1958739968 bytes, 3825664 sectors
Disk model: PRS-XXX
Units: 1 * 512 sectors = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size ( minimum/optimal): 512 bytes / 512 bytes
Disk Label Type: dos
Disk ID: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdb1 51200 71679 20480 10M 83 Linux
/dev/sdb2 71680 92159 20480 10M 83 Linux
/dev/sdb3 92160 866687 774528 378.2M 5 Extended
/dev/sdb4 866688 3825663 2958976 1.4G 83 Linux
/dev/sdb5 92176 124991 32816 16M 83 Linux
/dev/sdb6 125008 403583 278576 136M 83 Linux
/dev/sdb7 403600 424127 20528 10M 83 Linux
/dev/sdb8 424144 506111 81968 40M 83 Linux
/dev/sdb9 506128 604479 98352 48M 83 Linux
/dev/sdb10 604496 866687 262192 128M 83 Linux
Partition table entries are not ordered as they are on disk. (edited)













boot?










































ums command which does that too (USB export) (edited)
Hit any key to stop autoboot: 0
MX50_ARM2 U-Boot > sleep 16
MX50_ARM2 U-Boot > sl <-- All I was able to type before lockup and watchdog reset.





## Booting kernel from Legacy Image at 70008000 ...
Image Name: Linux-2.6.35.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2226004 Bytes = 2.1 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
Starting kernel ...
Do you want me to type
sleep 25
boot (edited)
sleep 25; boot could be interesting too (edited)
Hit any key to stop autoboot: 0
MX50_ARM2 U-Boot > sleep 25; boot
MMC read: dev # 0, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
5120 blocks read: OK
## Booting kernel from Legacy Image at 70008000 ...
Image Name: Linux-2.6.35.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2226004 Bytes = 2.1 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
Starting kernel ...
U-Boot 2009.08 (Dec 21 2011 - 14:48:38)
CPU: Freescale i.MX50 family 1.1V at 800 MHz
mx50 pll1: 800MHz
mx50 pll2: 400MHz
mx50 pll3: 216MHz
ipg clock : 66666666Hz
ipg per clock : 66666666Hz
uart clock : 24000000Hz
ahb clock : 133333333Hz
axi_a clock : 400000000Hz
axi_b clock : 200000000Hz
weim_clock : 100000000Hz
ddr clock : 160000000Hz
esdhc1 clock : 80000000Hz
esdhc2 clock : 80000000Hz
esdhc3 clock : 80000000Hz
esdhc4 clock : 80000000Hz
Board: MX50 ARM2 board
Boot Reason: [POR]
Boot Device: MMC
I2C: ready
DRAM: 256 MB
MMC: FSL_ESDHC: 0, FSL_ESDHC: 1, FSL_ESDHC: 2
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
temperature 28
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
In: serial
Out: serial
Err: serial
Net: got MAC address from IIM: 00:00:00:00:00:00
FEC0
Hit any key to stop autoboot: 0MMC read: dev # 0, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
5120 blocks read: OK
## Booting kernel from Legacy Image at 70008000 ...
Image Name: Linux-2.6.35.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2226004 Bytes = 2.1 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
Starting kernel ...Hit any key to stop autoboot: 0
MX50_ARM2 U-Boot > sleep 28; boot
MMC read: dev # 0, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
5120 blocks read: OK
## Booting kernel from Legacy Image at 70008000 ...
Image Name: Linux-2.6.35.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2226004 Bytes = 2.1 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... <-- Watchdog'd here (edited)Hit any key to stop autoboot: 0
MX50_ARM2 U-Boot > sleep 29; boot
MMC read: dev # 0, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz <-- Watchdog'd hereHit any key to stop autoboot: 0
MX50_ARM2 U-Boot > sleep 30; boot
MMC read: dev # 0, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1 <-- Watchdog'd here (edited)





BUG: scheduling while atomic: swapper/1/0x00000002
Modules linked in:
[<8002a594>] (unwind_backtrace+0x0/0xf0) from [<8031ef5c>] (schedule+0x6c/0x324)
[<8031ef5c>] (schedule+0x6c/0x324) from [<8031f80c>] (schedule_timeout+0x18/0x1fc)
[<8031f80c>] (schedule_timeout+0x18/0x1fc) from [<8031f688>] (wait_for_common+0xf8/0x1b8)
[<8031f688>] (wait_for_common+0xf8/0x1b8) from [<80245930>] (mmc_wait_for_req+0x114/0x120)
[<80245930>] (mmc_wait_for_req+0x114/0x120) from [<8024d530>] (transfer+0x1b8/0x318)
[<8024d530>] (transfer+0x1b8/0x318) from [<8024d7f0>] (rawdata_write+0x160/0x238)
[<8024d7f0>] (rawdata_write+0x160/0x238) from [<8025ec34>] (past_mmc_header_write+0x48/0xb4)
[<8025ec34>] (past_mmc_header_write+0x48/0xb4) from [<8025f770>] (past_mmc_write+0x4e0/0x4fc)
[<8025f770>] (past_mmc_write+0x4e0/0x4fc) from [<8025e114>] (pastlog_mix2past_write+0x44/0x50)
[<8025e114>] (pastlog_mix2past_write+0x44/0x50) from [<8025e138>] (pastlog_mix2past_flush+0x18/0x28)
[<8025e138>] (pastlog_mix2past_flush+0x18/0x28) from [<8025e188>] (past_flush+0x40/0x54)
[<8025e188>] (past_flush+0x40/0x54) from [<8031ed40>] (panic+0x70/0xe4)
[<8031ed40>] (panic+0x70/0xe4) from [<80008e14>] (mount_block_root+0x1cc/0x20c)
[<80008e14>] (mount_block_root+0x1cc/0x20c) from [<8000906c>] (prepare_namespace+0x128/0x180)
[<8000906c>] (prepare_namespace+0x128/0x180) from [<80008484>] (kernel_init+0x124/0x16c)
[<80008484>] (kernel_init+0x124/0x16c) from [<800269e0>] (kernel_thread_exit+0x0/0x8)











HOME + OPTION key input
...
Read recovery boot environment
At least I know it still detects pushing those buttons now. It just has no recovery data on the drive to point it to rupor recover.









make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 uImage














make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 uImage 














qemu-system-arm -M versatilepb -cpu cortex-a8 -kernel /home/nonasuomy/code/linux-2.6.35.3/arch/arm/boot/uImage -m 128
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argume






export PATH="${PATH}:${PWD}" (edited)CROSS_COMPILE to arm-none-linux-gnueabi-

Hit any key to stop autoboot: 0
MMC read: dev # 0, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
5120 blocks read: OK
## Booting kernel from Legacy Image at 70008000 ...
Image Name: Linux-2.6.35.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2244756 Bytes = 2.1 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
Starting kernel ...


























































[ 274.985211] wm8962_process_req
[ 274.988969] wm8962 1-001a: Writing reg : 0x19 value : 0x0
[ 274.990196] wm8962 1-001a: Writing reg : 0x1c value : 0x0
[ 274.992090] wm8962 1-001a: Writing reg : 0x30 value : 0x8221
[ 274.993315] wm8962 1-001a: Writing reg : 0x17 value : 0x0
[ 274.994540] wm8962 1-001a: Writing reg : 0x30 value : 0x8021
[ 274.995098] wm8962 1-001a: Writing reg : 0x81 value : 0x0


mw in U-Boot





[ 274.985211] wm8962_process_req
[ 274.988969] wm8962 1-001a: Writing reg : 0x19 value : 0x0
[ 274.990196] wm8962 1-001a: Writing reg : 0x1c value : 0x0
[ 274.992090] wm8962 1-001a: Writing reg : 0x30 value : 0x8221
[ 274.993315] wm8962 1-001a: Writing reg : 0x17 value : 0x0
[ 274.994540] wm8962 1-001a: Writing reg : 0x30 value : 0x8021
[ 274.995098] wm8962 1-001a: Writing reg : 0x81 value : 0x0 

find . -print | cpio -o -H newc | gzip -v9 > ../ramdisk-adb.gz
mkimage -A ARM -O Linux -T ramdisk -C gzip -a 0x70308000 -e 0x70308000 -n "Normal Rootfs" -d ramdisk-adb.gz ramdisk-adb.uimg













VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 35
EXTRAVERSION = .3
NAME = Sheep on Meth


cd ~/code
mkdir rootfs
dd if=t1_eng_\(1.82Gb\)_1.0.05.11130.img of=rootfs.img bs=1 skip=5242880 count=1048512
1048512+0 records in
1048512+0 records out
1048512 bytes (1.0 MB, 1.0 MiB) copied, 1.74376 s, 601 kB/s
dd if=t1_eng_\(1.82Gb\)_1.0.05.11130.img of=rootfs.img.gz bs=1 skip=5242944 count=1048512
1048512+0 records in
1048512+0 records out
1048512 bytes (1.0 MB, 1.0 MiB) copied, 1.76024 s, 596 kB/s
mv rootfs.img.gz ~/code/rootfs
cd ~/code/rootfs
gunzip -c rootfs.img.gz | cpio -i
842 blocks
gzip: rootfs.img.gz: decompression OK, trailing garbage ignored
mv rootfs.img.gz ../find . -print
.
./default.prop
./sys
./data
./ebook
./ebook/fonts
./ebook/preload
./ebook/dic
./sbin
./sbin/ts_calibrator
./init
./system
./init.rc
./lib
./lib/modules
./lib/modules/2.6.35.3
./lib/modules/2.6.35.3/build
./lib/modules/2.6.35.3/modules.usbmap
./lib/modules/2.6.35.3/modules.dep.bin
./lib/modules/2.6.35.3/modules.builtin
./lib/modules/2.6.35.3/modules.seriomap
./lib/modules/2.6.35.3/source
./lib/modules/2.6.35.3/modules.ofmap
./lib/modules/2.6.35.3/modules.isapnpmap
./lib/modules/2.6.35.3/modules.inputmap
./lib/modules/2.6.35.3/modules.alias.bin
./lib/modules/2.6.35.3/modules.dep
./lib/modules/2.6.35.3/modules.ccwmap
./lib/modules/2.6.35.3/kernel
./lib/modules/2.6.35.3/kernel/drivers
./lib/modules/2.6.35.3/kernel/drivers/usb
./lib/modules/2.6.35.3/kernel/drivers/usb/gadget
./lib/modules/2.6.35.3/kernel/drivers/usb/gadget/g_android.ko
./lib/modules/2.6.35.3/kernel/drivers/usb/gadget/arcotg_udc.ko
./lib/modules/2.6.35.3/kernel/drivers/usb/serial
./lib/modules/2.6.35.3/kernel/drivers/usb/serial/usbserial.ko
./lib/modules/2.6.35.3/kernel/drivers/usb/host
./lib/modules/2.6.35.3/kernel/drivers/usb/host/ehci-hcd.ko
./lib/modules/2.6.35.3/modules.builtin.bin
./lib/modules/2.6.35.3/modules.alias
./lib/modules/2.6.35.3/modules.pcimap
./lib/modules/2.6.35.3/modules.ieee1394map
./lib/modules/2.6.35.3/modules.order
./lib/modules/2.6.35.3/modules.symbols.bin
./lib/modules/2.6.35.3/modules.symbols
./init.goldfish.rc
./proc
./devfind . | cpio -o -H newc | gzip > ../newrootfs.img.gz
842 blocks
mkimage -A arm -O linux -C gzip -T ramdisk -n "Normal Rootfs" -a 0x500040 -e 0x500040 -d ../newrootfs.img.gz ../newrootfs.img
Image Name: Normal Rootfs
Created: Tue May 10 04:29:32 2022
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 214702 Bytes = 209.67 KiB = 0.20 MiB
Load Address: 00500040
Entry Point: 00500040
dd if=newrootfs.img of=t1_eng_\(1.82Gb\)_1.0.05.11130.img bs=1 seek=5242880
214766+0 records in
214766+0 records out
214766 bytes (215 kB, 210 KiB) copied, 0.347159 s, 619 kB/s























/*
* I2C Configs
*/
#ifdef CONFIG_CMD_I2C
#define CONFIG_HARD_I2C 1
#define CONFIG_I2C_MXC 1
#define CONFIG_SYS_I2C_PORT I2C2_BASE_ADDR
#define CONFIG_SYS_I2C_SPEED 100000
#define CONFIG_SYS_I2C_SLAVE 0xfe
#endif


i2c dev 0
i2c probe
i2c md.w 0x34 0x4008 -> default value is 0x0000
We have to write a magic value 0x9716 to this register, to allow writes to WDOG_DEBUG etc.
MX50_ARM2 U-Boot > i2c mm.w 0x34 0x4008 0x9716
Print out the bit set for 4004
MX50_ARM2 U-Boot > i2c md.w 0x34 0x4004
Then you should be abled to activate the watchdog debug mode
MX50_ARM2 U-Boot > i2c mm.w 0x34 0x4004 (change bit 14 of whatever you get from above to 1)
Then hopefully no more watch dog unless its that 8bit ic or that weird m430 doing it. (edited)

































## Booting kernel from Legacy Image at 70800000 ...
Image Name: Normal Kernel
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2288064 Bytes = 2.2 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 70c00000 ...
Image Name: Normal Rootfs
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 286848 Bytes = 280.1 kB
Load Address: 70308000
Entry Point: 70308000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

# cat /sys/module/rawdatatable/parameters/rawdata_param
MBR :0x00000000:0x00000400
uBoot :0x00000400:0x000bfc00
Boot Env :0x000c0000:0x00020000
Reserved1 :0x000e0000:0x00020000
Normal Kernel :0x00100000:0x00400000
Normal Rootfs :0x00500000:0x00100000
Recovery Kernel :0x00600000:0x00400000
Reserved2 :0x00a00000:0x00500000
Normal Boot Env :0x00f00000:0x00020000
Recovery Boot Env :0x00f20000:0x00020000
Raw Data Table :0x00f40000:0x00020000
Info :0x00f60000:0x00020000
Id :0x00f80000:0x00020000
Reserved3 :0x00fa0000:0x00060000
Boot Image :0x01000000:0x00100000
Waveform :0x01100000:0x00200000
LOG :0x01300000:0x00500000






md 0x53fd0004 1
53fd0004: d8200064 d. .
d8200064 = 32'b 1101 1000 0010 0000 0000 0000 0110 0100
echo "obase=2; ibase=16; D8200064" | bc
11011000001000000000000001100100
31=1 30=1 29=0 28=1 27=1 26=0 25=0 24=0 23=0 22=0 21=1 20=0 19=0 18=0 17=0 16=0 15=0 14=0 13=0 12=0 11=0 10=0 9=0 8=0 7=0 6=1 5=1 4=0 3=0 2=1 1=0 0=0
SRC_SBMR[25:24] = 0
BOOT_MODE[1:0]=0 => internal boot
eMMC normal boot
imx5 loads U-Boot from raw eMMC offset 2 sectors from the start (offset 1kiB from start of storage) (edited)dd if=/dev/mmcblkX bs=512 skip=2 count=1 | hexdump -vCMX50_ARM2 U-Boot > md $loadaddr 0x80
00000000: e59ff01c e59ff01c e59ff01c e59ff01c ................
00000010: e59ff01c e59ff01c e59ff01c e59ff01c ................
00000020: e59ff01c 0000e0fc f801ffbc f801ffc0 ................
00000030: f801ffc4 f801ffc8 f801ffcc f801ffd0 ................
00000040: f801ffd4 f801ffd8 00000011 20296328 ............(c)
00000050: 79706f43 68676972 30322074 202c3031 Copyright 2010,
00000060: 65657246 6c616373 65532065 6f63696d Freescale Semico
00000070: 6375646e 2c726f74 636e4920 6c41202e nductor, Inc. Al
00000080: 6972206c 73746867 73657220 65767265 l rights reserve
00000090: 00002e64 402c00dd 00007bf9 00007d8b d.....,@.{...}..
000000a0: 00007dc7 00008107 000080ab 00007fc9 .}..............
000000b0: 00007e71 0000822b 00008271 000082dd q~..+...q.......
000000c0: 000028a5 00002aad 0000307f 000043c5 .(...*...0...C..
000000d0: 0000453d 000067e5 00007693 f8524a22 =E...g...v.."JR.
000000e0: 68000020 f00040c8 47700001 2301b510 ..h.@....pG...#
000000f0: 3c184c1d f854408b 68010020 4319b10a .L.<.@T. ..h...C
00000100: 4399e000 bd106001 0594b5f0 4d16d516 ...C.`.........M
00000110: 3407f3c2 f3c23518 f8552681 b2d75020 ...4.5...&U. P..
00000120: c024f855 f04f00f6 fa0e0eff 40b7fe06 U.$...O........@
00000130: 0c0eea2c 070cea47 7024f845 d50b05d2 ,...G...E.$p....
00000140: 4c092201 408a3c30 0020f854 b10b6801 .".L0<.@T. ..h..
00000150: e0004311 60014391 4b03bdf0 f8533318 .C...C.`...K.3S.
00000160: f8400020 47702021 0000e4f4 68534aff .@.! pG.....JSh
00000170: 0302f023 68136053 0320f023 68936013 #...S`.h#. ..`.h
00000180: 03fff023 4bfa6093 0380eb03 3021f853 #....`.K....S.!0
00000190: 4bf76093 eb033310 f8530380 61133021 .`.K.3....S.!0.a
000001a0: 33204bf3 0080eb03 0021f850 681060d0 .K 3....P.!..`.h
000001b0: 0030f040 68506010 0002f040 68106050 @.0..`Ph@...P`.h000001c0: d0fc07c0 4aeb4770 f0436813 60134340 ....pG.J.hC.@C.`
000001d0: f0436853 60534340 f0236813 6013033f ShC.@CS`.h#.?..`
000001e0: f0236853 6053033f 28083aac e8dfd21e Sh#.?.S`.:.(....
000001f0: 2304f000 8a70523d b171bca4 d0162901 ...#=Rp...q..)..
MX50_ARM2 U-Boot >cd uboot
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j8 mx50_arm2_config
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j8
...
arm-none-linux-gnueabi/4.4.1/armv4t -lgcc -Map u-boot.map -o u-boot
arm-none-linux-gnueabi-objcopy -O srec u-boot u-boot.srec
arm-none-linux-gnueabi-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin (edited)

MX50_ARM2 U-Boot > printenv
stdin=serial
stdout=serial
stderr=serial
ethact=FEC0
loadaddr=0x70800000
loadaddr_ramdisk=0x70C00000
bootdev=2
rawtable=0xF40000
bootargs=root=/dev/mmcblk0p1 rootfstype=ext4 rw rootwait init=/linuxrc console=ttymxc4,115200 bootdev=0 rawtable=0xF40000
bootcmd=mmc read 0 ${loadaddr} 0x800 0x1400;mmc read 0 ${loadaddr_ramdisk} 0x2800 0x258;bootm ${loadaddr} ${loadaddr_ramdisk} bootdev=0
Environment size: 387/131068 bytes





cat /proc/cmdline



root=/dev/mmcblk0p1 rootfstype=ext4 rw rootwait init=/linuxrc console=ttymxc4,115200 bootdev=0 rawtable=0xF40000



tps65180_display_enable fail to read vcom from eMMC. -1









Warning: unable to open an initial console.
Freeing init memory: 728K
Kernel panic - not syncing: Attempted to kill init! (edited)


Unpacking initramfs...
Initramfs unpacking failed: compression method gzip not configured



Unpacking initramfs...
Initramfs unpacking failed: compression method gzip not configured # CONFIG_INITRAMFS_COMPRESSION_LZMA is not setCONFIG_INITRAMFS_COMPRESSION_NONE=y

Image Name: Linux-2.6.35.3
Created: Fri May 13 22:56:50 2022
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1669524 Bytes = 1630.39 KiB = 1.59 MiB
Load Address: 70008000
Entry Point: 70008000
Image arch/arm/boot/uImage is ready
1.59MB instead of what is on the device (2.2MB)


ls -shal /dev/ttymxc4 in the stock system?

ls -l maybe?


crw------- root root 207, 20 2010-01-01 02:00 ttymxc4
_install, do sudo mknod dev/ttymxc4 c 207 20

dev/ttymxc4mknod dev/console c 5 1
mknod dev/null c 1 3
mknod dev/ttymxc4 c 207 20
~/code/busybox/_install/dev$ ls -l
total 0
crw-r--r-- 1 root root 5, 1 May 13 23:53 console
crw-r--r-- 1 root root 1, 3 May 13 23:54 null
crw-r--r-- 1 root root 207, 20 May 13 23:54 ttymxc4




make install?
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j8 install
upx --ultra-brute _install/bin/busybox (edited)



UIMAGE arch/arm/boot/uImage
Image Name: Linux-2.6.35.3
Created: Sat May 14 00:10:45 2022
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1673520 Bytes = 1634.30 KiB = 1.60 MiB
Load Address: 70008000
Entry Point: 70008000
Image arch/arm/boot/uImage is ready
I did enable that lzma compression on initrams though.
CONFIG_INITRAMFS_SOURCE?









Unpacking initramfs...
Initramfs unpacking failed: compression method gzip not configured 


dd if=backup.img of=/dev/mmcblk0 bs=1M count=26
or something like that should work (don't remember the exact sector numbers)? (edited)
dd if=uImage of=/dev/mmcblk0 bs=512 seek=2048
sync



bootargs=root=/dev/mmcblk0p1 rootfstype=ext4 rw rootwait init=/linuxrc console=ttymxc4,115200 bootdev=0 rawtable=0xF40000
bootcmd=mmc read 0 ${loadaddr} 0x800 0x1400;mmc read 0 ${loadaddr_ramdisk} 0x2800 0x258;bootm ${loadaddr} ${loadaddr_ramdisk} bootdev=0
bootm ${loadaddr} ${loadaddr_ramdisk} bootdev=0
remove that part
setenv bootcmd 'mmc read 0 ${loadaddr} 0x800 0x1400;mmc read 0 ${loadaddr_ramdisk} 0x2800 0x258'
saveenv (edited)
setenv bootcmd mmc read 0 ${loadaddr} 0x800 0x1400\;mmc read 0 ${loadaddr_ramdisk} 0x2800 0x258 (edited)
Hit any key to stop autoboot: 0
MMC read: dev # 0, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
5120 blocks read: OK
MMC read: dev # 0, block # 10240, count 600 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
600 blocks read: OK
MX50_ARM2 U-Boot > (edited)
printenv
MX50_ARM2 U-Boot > printenv
stdin=serial
stdout=serial
stderr=serial
ethact=FEC0
loadaddr=0x70800000
loadaddr_ramdisk=0x70C00000
bootdev=2
rawtable=0xF40000
bootargs=root=/dev/mmcblk0p1 rootfstype=ext4 rw rootwait init=/linuxrc console=ttymxc4,115200 bootdev=0 rawtable=0xF40000
bootcmd=mmc read 0 0x70800000 0x800 0x1400;mmc read 0 0x70C00000 0x2800 0x258
Environment size: 329/131068 bytes



setenv bootcmd mmc read 0 ${loadaddr} 0x800 0x1400\;mmc read 0 ${loadaddr_ramdisk} 0x2800 0x258\;bootm
dd if=emmc.img of=kernel.bin bs=512 skip=2048 count=3072
but don't expect a lot (edited)







arm-none-linux-gnueabi)?
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j8 install




































































[kernel repo]/toolchain


Add config https://discordapp.com/channels/809205711778480158/966554812567130152/970116956122415154
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- menuconfig
Make sure this is on [*] Build static binary (no shared libs)
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j$(nproc)
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j$(nproc) install
upx --ultra-brute _install/bin/busybox (edited)







ipaddress applet build issues on old kernel headers


sync.c:(.text.sync_main+0x5c): undefined reference to syncfs'`syncfs() first appeared in Linux 2.6.39; library support was added to glibc in version 2.14.man syncfs



//config:config FEATURE_SYNC_FANCY
//config: bool "Enable -d and -f flags (requires syncfs(2) in libc)"



ENABLE_FSYNC does what it says on the tin, unrelated
















frontend/device/sony-prstux path (edited)


















UIMAGE arch/arm/boot/uImage
Image Name: Linux-2.6.35.3
Created: Sat May 14 22:56:43 2022
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2271056 Bytes = 2217.83 KiB = 2.17 MiB
Load Address: 70008000
Entry Point: 70008000
Image arch/arm/boot/uImage is ready





vi ~/code/busybox/_install/etc/init.d/rcS
create etc/init.d if not existing
populate rcS with this content:
#!/bin/sh
mkdir -p /sys /proc /dev
mount -t sysfs sysfs /sys
mount -t proc proc /proc
mount -t devtmpfs devtmpfs /dev
/bin/sh
then recompile the kernel (edited)









make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j$(nproc) uImage

CC drivers/regulator/tps65180-regulator.o
CC net/socket.o
drivers/regulator/tps65180-regulator.c: In function 'tps65180_vcom_get_voltage':
drivers/regulator/tps65180-regulator.c:838: warning: 'vcomValue' may be used uninitialized in this function



dd if=emmc.img of=kernel.bin bs=512 skip=2048 count=3072
but don't expect a lot (edited)~/code$ mkimage -l kernel.bin
GP Header: Size 27051956 LoadAddr c62947b6
when I run it against a uImage that we compiled I get:
~/code$ mkimage -l uImage
Image Name: Linux-2.6.35.3
Created: Sat May 14 00:10:45 2022
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1673520 Bytes = 1634.30 KiB = 1.60 MiB
Load Address: 70008000
Entry Point: 70008000 (edited)














# cat /sys/module/rawdatatable/parameters/rawdata_param
MBR :0x00000000:0x00000400
uBoot :0x00000400:0x000bfc00
Boot Env :0x000c0000:0x00020000
Reserved1 :0x000e0000:0x00020000
Normal Kernel :0x00100000:0x00400000
Normal Rootfs :0x00500000:0x00100000
Recovery Kernel :0x00600000:0x00400000
Reserved2 :0x00a00000:0x00500000
Normal Boot Env :0x00f00000:0x00020000
Recovery Boot Env :0x00f20000:0x00020000
Raw Data Table :0x00f40000:0x00020000
Info :0x00f60000:0x00020000
Id :0x00f80000:0x00020000
Reserved3 :0x00fa0000:0x00060000
Boot Image :0x01000000:0x00100000
Waveform :0x01100000:0x00200000
LOG :0x01300000:0x00500000

~/code$ mkimage -l kernel.bin
GP Header: Size 27051956 LoadAddr c62947b6
when I run it against a uImage that we compiled I get:
~/code$ mkimage -l uImage
Image Name: Linux-2.6.35.3
Created: Sat May 14 00:10:45 2022
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1673520 Bytes = 1634.30 KiB = 1.60 MiB
Load Address: 70008000
Entry Point: 70008000 (edited)header CRC: 0xC62947B6


etc/init.d/rcS
there has been some progress







~/code/busybox/_install/etc/init.d$ ls -l
total 4
-rwxr-xr-x 1 nonasuomy nonasuomy 128 May 14 23:19 rcS



~/code/busybox/_install/etc/init.d$ ls -l
total 4
-rwxr-xr-x 1 nonasuomy nonasuomy 128 May 14 23:19 rcS 
tps65180_display_enable fail to read vcom from eMMC. -1
------------[ cut here ]------------
WARNING: at drivers/regulator/core.c:1423 _regulator_disable+0x30/0x118()
unbalanced disables for DISPLAY
Modules linked in:
[<800c066c>] (unwind_backtrace+0x0/0xec) from [<800e0ca8>] (warn_slowpath_common+0x4c/0x64)
[<800e0ca8>] (warn_slowpath_common+0x4c/0x64) from [<800e0d40>] (warn_slowpath_fmt+0x2c/0x3c)
[<800e0d40>] (warn_slowpath_fmt+0x2c/0x3c) from [<8025017c>] (_regulator_disable+0x30/0x118)
[<8025017c>] (_regulator_disable+0x30/0x118) from [<8025033c>] (regulator_disable+0x1c/0x30)
[<8025033c>] (regulator_disable+0x1c/0x30) from [<802bfdb4>] (get_temperature+0x40/0x50)
[<802bfdb4>] (get_temperature+0x40/0x50) from [<802bfdd0>] (calculate_battery_capacity+0xc/0x8c)
[<802bfdd0>] (calculate_battery_capacity+0xc/0x8c) from [<803aa2f8>] (sub_cpu_bci_probe+0x2b4/0x36c)
[<803aa2f8>] (sub_cpu_bci_probe+0x2b4/0x36c) from [<80279908>] (platform_drv_probe+0x18/0x1c)
[<80279908>] (platform_drv_probe+0x18/0x1c) from [<80278aa8>] (driver_probe_device+0xc8/0x184)
[<80278aa8>] (driver_probe_device+0xc8/0x184) from [<80278bc4>] (__driver_attach+0x60/0x84)
[<80278bc4>] (__driver_attach+0x60/0x84) from [<802782c4>] (bus_for_each_dev+0x44/0x74)
(kernel_init+0xa8/0x168)
[<80008408>] (kernel_init+0xa8/0x168) from [<800bc9c0>] (kernel_thread_exit+0x0/0x8)
---[ end trace 37afc84e26cca609 ]---
Freeing init memory: 716K
mount: mounting devtmpfs on /dev failed: No such device
/bin/sh: can't access tty; job control turned off
/ #












---[ end trace f3fb3a274bc2f334 ]---
Freeing init memory: 716K
/bin/sh: can't access tty; job control turned off
/ #



make clean
in the kernel source directory and send you a tar ball of it even without the vcom issue fixed?











make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j$(nproc) modules
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
make[1]: 'include/generated/mach-types.h' is up to date.
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTLD scripts/mod/modpost
CC [M] drivers/usb/gadget/arcotg_udc.o
CC [M] drivers/usb/host/ehci-hcd.o
CC [M] drivers/usb/gadget/serial.o
drivers/usb/gadget/arcotg_udc.c:686: warning: 'udc_wait_b_session_low' defined but not used
drivers/usb/gadget/arcotg_udc.c:2423: warning: 'wake_up_irq' defined but not used
drivers/usb/host/ehci-hub.c:109: warning: 'ehci_adjust_port_wakeup_flags' defined but not used
CC [M] drivers/usb/serial/usb-serial.o
CC [M] drivers/usb/serial/generic.o
CC [M] drivers/usb/serial/bus.o
LD [M] drivers/usb/gadget/g_serial.o
LD [M] drivers/usb/serial/usbserial.o
Building modules, stage 2.
MODPOST 4 modules
WARNING: modpost: Found 3 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
CC drivers/usb/gadget/arcotg_udc.mod.o
CC drivers/usb/gadget/g_serial.mod.o
CC drivers/usb/host/ehci-hcd.mod.o
CC drivers/usb/serial/usbserial.mod.o
LD [M] drivers/usb/host/ehci-hcd.ko
LD [M] drivers/usb/gadget/g_serial.ko
LD [M] drivers/usb/serial/usbserial.ko
LD [M] drivers/usb/gadget/arcotg_udc.ko








make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j$(nproc) EXTRA_CFLAGS=-fno-pic INSTALL_MOD_PATH=sonymodules modules
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j$(nproc) uImage EXTRA_CFLAGS=-fno-pic INSTALL_MOD_PATH=sonymodules modules_install (edited)

sonymodules/
└── lib
└── modules
└── 2.6.35.3
├── build -> /home/nonasuomy/code/linux-2.6.35.2
├── kernel
│ └── drivers
│ └── usb
│ ├── gadget
│ │ ├── arcotg_udc.ko
│ │ └── g_serial.ko
│ ├── host
│ │ └── ehci-hcd.ko
│ └── serial
│ └── usbserial.ko
├── modules.alias
├── modules.alias.bin
├── modules.builtin
├── modules.builtin.alias.bin
├── modules.builtin.bin
├── modules.dep
├── modules.dep.bin
├── modules.devname
├── modules.order
├── modules.softdep
├── modules.symbols
├── modules.symbols.bin
└── source -> /home/nonasuomy/code/linux-2.6.35.2



~/code/busybox/_install$ ls
bin dev etc linuxrc sbin sonymodules usr

#!/bin/sh
vcom_uV=`epd_fb_test getvcom | awk '{ print $4 }'`
vcom_mV=`expr $vcom_uV / 1000`
echo ${vcom_mV}mV#!/bin/sh
if [ $# -ne 1 ] ; then
echo "Usage : vcom_set.sh vcom_value|off"
exit 1
fi
case $1 in
[Oo][Ff][Ff])
voltage.sh off epd
echo "Power off OK"
exit
;;
[0-9]*)
vcom_mV=$1
vcom_mV=`expr $vcom_mV / 10`
vcom_mV=`expr $vcom_mV \* 10`
vcom_uV=`expr $vcom_mV \* 1000`
echo "setVCOM ${vcom_mV}mV"
echo "VCOM write to eMMC"
epd_fb_test setvcom $vcom_uV > /dev/null
if [ $? -ne 0 ]; then
echo "NG : fail set vcom."
exit
fi
voltage.sh on epd
echo "Power on OK"
;;
*)
echo "NG : parameter error $1"
exit 1
;;
esac
exit 0#!/bin/sh
# 機能ブロックの全リスト
blocks_all="sd wan wifi epd"
power_impl=/proc/pwr3
power_block=phoenix
if [ -f $power_impl ]; then
if [ $(cat $power_impl) -ne 0 ]; then
power_block=wolfson
fi
fi
blocks_all="$blocks_all $power_block"
# 引数なしは NGとする
if [ -z "$1" ]; then
echo NG
exit 1
fi
#
# 小文字変換関数
# $1 変換対象
#
tolower()
{
echo $1 | tr '[A-Z]' '[a-z]'
}
#
# Regulator制御関数
# $1 on/off
# $2... Regulatorの名称
#
regulator_control()
{
# 引数なしはエラーとする
if [ -z "$*" ]; then
return 1
fi
# on/offで指定文字列を設定する
case $1 in
on)
control=enabled
;;
off)
control=disabled
;;
*)
return 1
;;
esac
shift
remain=$*
# 処理対象の Regulatorを検索する
for regulator in $*; do
# Regulator名称を参照する
for name in $(ls /sys/class/regulator/regulator.*/name); do
if [ $regulator != $(cat $name) ]; then
# 対象外だったため次を参照する
continue
fi
# 対象の Regulatorへ値を書き込む
node=$(echo $name | sed -e 's/name$/state/')
echo $control > $node
# 処理が済んだ Regulatorを外す
remain=$(echo $remain | sed -e "s/$regulator//")
break
done
# すべての Regulatorへ値を書き込んだか
if [ -z "$remain" ]; then
# すべて書き込んだ
break
fi
done
return 0
}
diag_sd()
{
case $1 in
on)
gpio 5 12 0
;;
off)
gpio 5 12 1
;;
*)
return 1
;;
esac
return 0
}
diag_wan()
{
case $1 in
on)
gpio 4 3 1
;;
off)
gpio 4 3 0
;;
*)
return 1
;;
esac
return 0
}
diag_wifi()
{
case $1 in
on)
gpio 5 25 1
;;
off)
gpio 5 25 0
;;
*)
return 1
;;
esac
return 0
}
diag_epd()
{
case $1 in
on)
regulators="$regulators DISPLAY V3P3_CTRL PWR0_CTRL VCOM"
;;
off)
regulators="$regulators VCOM PWR0_CTRL V3P3_CTRL DISPLAY"
;;
*)
return 1
;;
esac
return 0
}diag_wolfson()
{
case $1 in
on)
ldo=1
while [ $ldo -le 11 ]; do
regulators="$regulators LDO$ldo"
let ldo=$ldo+1
done
;;
off)
;;
*)
return 1
;;
esac
return 0
}
diag_phoenix()
{
case $1 in
on)
regulators="$regulators LDO1 LDO2 LDO3 LDO4 LDO5 LDO6 LDO7 VANA LDOLN LDOUSB SMPS3 SMPS4 VIO"
;;
off)
;;
*)
return 1
;;
esac
return 0
}
if [ -z "$2" -o "$(tolower $2)" == "all" ]; then
blocks=$blocks_all
elif echo $blocks_all | grep "\<$2\>" 2>&1 > /dev/null; then
blocks=$2
else
echo NG
exit 1
fi
for block in $blocks; do
if ! eval diag_$block $(tolower $1); then
break
fi
done
regulator_control $1 $regulators
if [ $? -eq 0 ]; then
echo OK
else
echo NG
fi

BW1120617204466 BU1125868900232 148427501482734 PVI6inchE120C
65
1990
AudioOK 2011/11/14-7:53:48


# remount SD card for writing
mount -o remount,rw /initrd/mnt/sd
# your screen driver
dd if=/dev/mmcblk2 of=/initrd/mnt/sd/WF.img skip=17408 count=2048 bs=1024
sync
# other important information, such as the operating voltage of the screen in line 5
dd if=/dev/mmcblk2 of=/initrd/mnt/sd/Vcom.img skip=15876 count=1 bs=1024
sync
# serial, MAC
dd if=/dev/mmcblk2 of=/initrd/mnt/sd/SN.img skip=15872 count=1 bs=1024
sync
Partitions
Disk /dev/sdb: 1.82 GiB, 1958739968 bytes, 3825664 sectors
Disk model: PRS-XXX
Units: 1 * 512 sectors = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size ( minimum/optimal): 512 bytes / 512 bytes
Disk Label Type: dos
Disk ID: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdb1 51200 71679 20480 10M 83 Linux
/dev/sdb2 71680 92159 20480 10M 83 Linux
/dev/sdb3 92160 866687 774528 378.2M 5 Extended
/dev/sdb4 866688 3825663 2958976 1.4G 83 Linux
/dev/sdb5 92176 124991 32816 16M 83 Linux
/dev/sdb6 125008 403583 278576 136M 83 Linux
/dev/sdb7 403600 424127 20528 10M 83 Linux
/dev/sdb8 424144 506111 81968 40M 83 Linux
/dev/sdb9 506128 604479 98352 48M 83 Linux
/dev/sdb10 604496 866687 262192 128M 83 Linux
Partition table entries are not ordered as they are on disk. (edited)#!/bin/sh
PATH=/diag/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
mount -t vfat -o rw,shortname=winnt /dev/mmcblk0p1 /initrd/mnt/sd
/diag/bin/epd_fb_test file GC16 FULL /initrd/mnt/sd/Updating_en.bmp
sleep 3
# /diag/bin/epd_fb_test file GC16 FULL /initrd/mnt/sd/Reading.bmp
# sleep 3
# # Reading
# # dd if=/dev/mmcblk2 of=/initrd/mnt/sd/old.ramdisk.uimg skip=10240 count=600 bs=512
# # sync
# # dd if=/dev/mmcblk2 of=/ initrd/mnt/sd/old.nboote.bin skip=30720 count=256 bs=512
# # sync
# # dd if=/dev/mmcblk2 of=/initrd/mnt/sd/Id.img skip=15872 count=128 bs=1024
# # sync
# # dd if=/dev/mmcblk2 of=/initrd/mnt/sd/WF_OLD.img skip=17408 count=2048 bs=1024
# # sync
# # dd if=/dev/mmcblk2 of=/initrd/mnt/sd/Vcom_OLD.img skip=15876 count=1 bs=1024
# # sync
# # dd if=/dev/mmcblk2 of=/initrd/mnt/sd/SN_OLD.img skip=15872 count=1 bs=1024
# # sync
# # dd if=/dev/mmcblk2 of=/initrd/mnt/sd/mmcblk2.img
# # sync
# # dd if=/dev/mmcblk2p1 of=/initrd/mnt/sd/mmcblk2p1.img
# # sync
# # dd if=/dev/mmcblk2p2 of=/initrd/mnt/sd/mmcblk2p2.img
# # sync
# # dd if=/dev/mmcblk2p3 of=/initrd/mnt/sd/mmcblk2p3.img
# # sync
# # dd if=/dev/mmcblk2p4 of=/initrd/mnt/sd/mmcblk2p4.img
# # sync
# # dd if=/dev/mmcblk2p5 of=/initrd/mnt/sd/mmcblk2p5.img
# # sync
# # dd if=/dev/mmcblk2p6 of=/initrd/mnt/sd/mmcblk2p6.img
# # sync
# # dd if=/dev/mmcblk2p7 of=/initrd/mnt/sd/mmcblk2p7.img
# # sync
# # dd if=/dev/mmcblk2p8 of=/initrd/mnt/sd/mmcblk2p8.img
# # sync
# # dd if=/dev/mmcblk2p9 of=/initrd/mnt/sd/mmcblk2p9.img
# # sync
# # dd if=/dev/loop0 of=/initrd/mnt/sd/loop0.img
# # sync
# /diag/bin/epd_fb_test file GC16 FULL /initrd/mnt/sd/Reading_done.bmp
# sleep 3
/diag/bin/epd_fb_test file GC16 FULL /initrd/mnt/sd/Writing.bmp
sleep 3 (edited)Writing
dd if=/initrd/mnt/sd /new.mmcblk2p4.img of=/dev/mmcblk2p4 conv=notruc
sync
dd if=/initrd/mnt/sd/new.mmcblk2.img of=/dev/mmcblk2
sync
dd if=/initrd/mnt/sd/mmcblk2p8. img of=/dev/mmcblk2p8 bs=1024
sync
dd if=/initrd/mnt/sd/ new.mmcblk2p7.img of=/dev/ mmcblk2p7 bs=1024
sync dd if=/initrd/mnt/sd/mmcblk2p9.img of=/dev/mmcblk2p9 bs=1024 sync cd /initrd/mnt/sd/ /diag/bin/version_check.sh > /initrd/mnt/sd/version.txt # mkfs.ext4 /dev/mmcblk2p6 -L dictionaries # mkfs.ext4 -m 0 -L data /dev/mmcblk2p8 # /diag/bin/epd_fb_test gettemp > /initrd/mnt/sd/epd_fb_test.txt # sync # dmesg > / initrd/mnt/sd/dmesg.txt ls -la /dev > /initrd/mnt/sd/dev.txt # /diag/bin/device_id.sh > /initrd/mnt/sd/device-id.txt # /diag /bin/serial_number.sh > /initrd/mnt/sd/serial_number.txt
# cat /sys/module/rawdatatable/parameters/rawdata_param > /initrd/mnt/sd/rawdata_param.txt
# cat /sys/module/rawdatatable/parameters/partition_param > /initrd/mnt/sd/partition_param.txt
# sync
# cat /proc/cpuinfo > /initrd/mnt/sd/cpuinfo.txt
# cat /proc/meminfo > /initrd/mnt/sd/meminfo.txt
/diag/bin/epd_fb_test file GC16 FULL /initrd/mnt/sd/Writing_done. bmp
sleep 3
/diag/bin/epd_fb_test file GC16 FULL /initrd/mnt/sd/Updating_en.bmp
sleep 3
# /sbin/getty -L 9600 ttyGS0 vt102
/sys/module/rawdatatable/parameters/partition_param
Recovery Rootfs :1: 0x00a00000
Diag :2: 0x00a00000
READER :4: 0x5a4d8000
fonts :5: 0x01000000
dictionaries :6: 0x08800000
SETTING :7: 0x00a00000
preload :8: 0x02800000
data :9: 0x03000000
system :10:0x08000000
---[ end trace 3edbcdd9724ba378 ]---
Freeing init memory: 704K
/proc/self/exeKernel panic - not syncing: Attempted to kill init!
[<800bd66c>] (unwind_backtrace+0x0/0xec) from [<803a8678>] (panic+0x6c/0xf0)
[<803a8678>] (panic+0x6c/0xf0) from [<800e1410>] (do_exit+0x68/0x67c)
[<800e1410>] (do_exit+0x68/0x67c) from [<800e1b2c>] (complete_and_exit+0x0/0x1c)
[<800e1b2c>] (complete_and_exit+0x0/0x1c) from [<800b8f80>] (ret_fast_syscall+0x0/0x30)


setenv bootargs ‘root=/dev/mmcblk0p1 rootfstype=ext4 rw rootwait init=/linuxrc console=ttymxc4,115200 bootdev=0 rawtable=0xF40000’
setenv bootcmd mmc read 0 ${loadaddr} 0x800 0x1400\;mmc read 0 ${loadaddr_ramdisk} 0x2800 0x258\;bootm
saveenv

MX50_ARM2 U-Boot > printenv
stdin=serial
stdout=serial
stderr=serial
ethact=FEC0
loadaddr=0x70800000
loadaddr_ramdisk=0x70C00000
bootdev=2
rawtable=0xF40000
bootcmd=mmc read 0 0x70800000 0x800 0x1400;mmc read 0 0x70C00000 0x2800 0x258;bootm
bootargs=root=/dev/mmcblk0p1 rootfstype=ext4 rw rootwait rdinit=/linuxrc console=ttymxc4,115200 bootdev=0 rawtable=0xF40000
Environment size: 337/131068 bytes





## Booting kernel from Legacy Image at 70800000 ...
Image Name: Linux-2.6.35.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2276740 Bytes = 2.2 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
Loading Kernel Image ... OK**## Booting kernel from Legacy Image at 70800000 ...
Image Name: Normal Kernel
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2288064 Bytes = 2.2 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 70c00000 ...
Image Name: Normal Rootfs
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 214270 Bytes = 209.2 kB
Load Address: 70308000
Entry Point: 70308000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OKls -l ~/code/busybox/_install/dev
total 0
crw-r--r-- 1 root root 5, 1 May 17 10:15 console
crw-r--r-- 1 root root 1, 3 May 17 10:15 null
crw-r--r-- 1 root root 207, 20 May 17 10:15 ttymxc4#!/bin/sh
mkdir -p /sys /proc /dev
mount -t sysfs sysfs /sys
mount -t proc proc /proc
mount -t devtmpfs devtmpfs /dev
/bin/sh (edited)




**## Booting kernel from Legacy Image at 70800000 ...
Image Name: Normal Kernel
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2288064 Bytes = 2.2 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 70c00000 ...
Image Name: Normal Rootfs
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 214270 Bytes = 209.2 kB
Load Address: 70308000
Entry Point: 70308000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK 









---[ end trace 2e453d4d11b8a842 ]---
Freeing init memory: 716K
/bin/sh: can't access tty; job control turned off
/ # 

MX50_ARM2 U-Boot > printenv
stdin=serial
stdout=serial
stderr=serial
ethact=FEC0
loadaddr=0x70800000
loadaddr_ramdisk=0x70C00000
bootdev=2
rawtable=0xF40000
bootcmd=mmc read 0 0x70800000 0x800 0x1400;mmc read 0 0x70C00000 0x2800 0x258;bootm
bootargs=console=ttymxc4,115200 rawtable=0xF40000 root=/dev/ram0 rdinit=/linuxrc rootfstype=ramfs
Environment size: 313/131068 bytes






























MBR :0x00000000:0x00000400
uBoot :0x00000400:0x000bfc00
Boot Env :0x000c0000:0x00020000
Reserved1 :0x000e0000:0x00020000
Normal Kernel :0x00100000:0x00400000
Normal Rootfs :0x00500000:0x00100000
Recovery Kernel :0x00600000:0x00400000
Reserved2 :0x00a00000:0x00500000
Normal Boot Env :0x00f00000:0x00020000
Recovery Boot Env :0x00f20000:0x00020000
Raw Data Table :0x00f40000:0x00020000
Info :0x00f60000:0x00020000
Id :0x00f80000:0x00020000
Reserved3 :0x00fa0000:0x00060000
Boot Image :0x01000000:0x00100000
Waveform :0x01100000:0x00200000
LOG :0x01300000:0x00500000 (edited)

MBR :0x00000000:0x00000400
uBoot :0x00000400:0x000bfc00
Boot Env :0x000c0000:0x00020000
Reserved1 :0x000e0000:0x00020000
Normal Kernel :0x00100000:0x00400000
Normal Rootfs :0x00500000:0x00100000
Recovery Kernel :0x00600000:0x00400000
Reserved2 :0x00a00000:0x00500000
Normal Boot Env :0x00f00000:0x00020000
Recovery Boot Env :0x00f20000:0x00020000
Raw Data Table :0x00f40000:0x00020000
Info :0x00f60000:0x00020000
Id :0x00f80000:0x00020000
Reserved3 :0x00fa0000:0x00060000
Boot Image :0x01000000:0x00100000
Waveform :0x01100000:0x00200000
LOG :0x01300000:0x00500000 (edited)


Here is a little background:
Going by this Guide
https://web.archive.org/web/20170605084646/http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
(where I got most info from) the compressed image of Androids root file system is part of a boot image residing on a partition.
The T1 however seems to follow a different approach with a stand-alone root fs image in form of raw data on the unpartitioned area. (edited)

Search "mmcblk2" (1 hit in 1 file of 34444 searched)
G:\SonyPRST1\Sony OSS\PRST1_JP 20140702\linux-2.6.35.2-20140522-2\linux-2.6.35.2-20140522-2\linux-2.6.35.2\drivers\staging\pastlog\pastlog.c (1 hit)
Line 725: pastlog_emmc = is_rawdatadev("mmcblk2"); (edited)










#define RAWTABLE_DEV "mmcblk%d"
lets see what happens when we change that to 0 instead of %d




MBR :0x00000000:0x00000400
uBoot :0x00000400:0x000bfc00
Boot Env :0x000c0000:0x00020000
Reserved1 :0x000e0000:0x00020000
Normal Kernel :0x00100000:0x00400000
Normal Rootfs :0x00500000:0x00100000
Recovery Kernel :0x00600000:0x00400000
Reserved2 :0x00a00000:0x00500000
Normal Boot Env :0x00f00000:0x00020000
Recovery Boot Env :0x00f20000:0x00020000
Raw Data Table :0x00f40000:0x00020000
Info :0x00f60000:0x00020000
Id :0x00f80000:0x00020000
Reserved3 :0x00fa0000:0x00060000
Boot Image :0x01000000:0x00100000
Waveform :0x01100000:0x00200000
LOG :0x01300000:0x00500000 (edited)






MBR :0x00000000:0x00000400
uBoot :0x00000400:0x000bfc00
Boot Env :0x000c0000:0x00020000
Reserved1 :0x000e0000:0x00020000
Normal Kernel :0x00100000:0x00400000
Normal Rootfs :0x00500000:0x00100000
Recovery Kernel :0x00600000:0x00400000
Reserved2 :0x00a00000:0x00500000
Normal Boot Env :0x00f00000:0x00020000
Recovery Boot Env :0x00f20000:0x00020000
Raw Data Table :0x00f40000:0x00020000
Info :0x00f60000:0x00020000
Id :0x00f80000:0x00020000
Reserved3 :0x00fa0000:0x00060000
Boot Image :0x01000000:0x00100000
Waveform :0x01100000:0x00200000
LOG :0x01300000:0x00500000
Bytes in Decimal
MBR :0:1024
uBoot :1024:785408
Boot Env :786432:131072
Reserved1 :917504:131072
Normal Kernel :1048576:4194304
Normal Rootfs :5242880:1048576
Recovery Kernel :6291456:4194304
Reserved2 :10485760:5242880
Normal Boot Env :15728640:131072
Recovery Boot Env :15859712:131072
Raw Data Table :15990784:131072
Info :16121856:131072
Id :16252928:131072
Reserved3 :16384000:393216
Boot Image :16777216:1048576
Waveform :17825792:2097152
LOG :19922944:5242880 (edited)



MBR :0x00000000:0x00000400
uBoot :0x00000400:0x000bfc00
Boot Env :0x000c0000:0x00020000
Reserved1 :0x000e0000:0x00020000
Normal Kernel :0x00100000:0x00400000
Normal Rootfs :0x00500000:0x00100000
Recovery Kernel :0x00600000:0x00400000
Reserved2 :0x00a00000:0x00500000
Normal Boot Env :0x00f00000:0x00020000
Recovery Boot Env :0x00f20000:0x00020000
Raw Data Table :0x00f40000:0x00020000
Info :0x00f60000:0x00020000
Id :0x00f80000:0x00020000
Reserved3 :0x00fa0000:0x00060000
Boot Image :0x01000000:0x00100000
Waveform :0x01100000:0x00200000
LOG :0x01300000:0x00500000
Bytes in Decimal
MBR :0:1024
uBoot :1024:785408
Boot Env :786432:131072
Reserved1 :917504:131072
Normal Kernel :1048576:4194304
Normal Rootfs :5242880:1048576
Recovery Kernel :6291456:4194304
Reserved2 :10485760:5242880
Normal Boot Env :15728640:131072
Recovery Boot Env :15859712:131072
Raw Data Table :15990784:131072
Info :16121856:131072
Id :16252928:131072
Reserved3 :16384000:393216
Boot Image :16777216:1048576
Waveform :17825792:2097152
LOG :19922944:5242880 (edited)




grep -r "Recovery Boot Env" .



Permission of sysfs is defined in kernel space so you can not directly create the files or directory in /sys folder from the user space. If you want to create/modify the directory/file then I think you can achieve it through kernel module. There are loads of helper function that can be used to create the file attributes and directory inside /sys.
I belive already your driver will be using those helper function (something like sysfs_create_group or kobject_create_and_add). For changing the file permission and data read/write check your driver __ATTR and show/store function.
It should be something like:
static ssize_t fo_show(struct kobject *kobj, struct kobj_attribute
*attr,char *buf){
}
static ssize_t fo_store(struct kobject *kobj, struct kobj_attribute
*attr, const char *buf, size_t count){
}
static struct kobj_attribute baz_attribute =
__ATTR(foo, 0666, fo_show, fo_store);


Info :0x00f60000:0x00020000
Id :0x00f80000:0x00020000
Reserved3 :0x00fa0000:0x00060000
Boot Image :0x01000000:0x00100000
Waveform :0x01100000:0x00200000
LOG :0x01300000:0x00500000
Hex to Decimal
Info :16121856:131072
Id :16252928:131072
Reserved3 :16384000:393216
Boot Image :16777216:1048576
Waveform :17825792:2097152
LOG :19922944:5242880
How do you compute these values of dd to the above?
dd if=/dev/mmcblk2 of=/initrd/mnt/sd/WF_OLD.img skip=17408 count=2048 bs=1024
sync
dd if=/dev/mmcblk2 of=/initrd/mnt/sd/Vcom_OLD.img skip=15876 count=1 bs=1024
sync (edited)



dd if=/dev/mmcblk2 of=/initrd/mnt/sd/Vcom_OLD.img skip=15876 count=1 bs=1024
skip=15876
count=1
bs=1024
VCOM Start: 15876 * 1024 = 16257024
1*1024 = 1024
VCOM End: 16257024 + 1024 = 16258048
Id :0x00f80000:0x00020000
Id :16252928:131072
Therefore VCOM is inside Id of the 26MB Raw Data Area
Id Start: 16252928
VCOM Start: 16257024
VCOM End: 16258048
Id End: 16384000 (edited)

PRS-T1 UC,CEW^@^@^@^@^@^@^@^@^@^@0800461001BB6D47148427352023999.PRST1
STRING_PRODUCT_EMMC_ID_OFFSET 0x00 PRS-T1
STRING_SKU_EMMC_ID_OFFSET 0x10 UC,CEW (US) Also RU JP
STRING_SERIAL_EMMC_ID_OFFSET 0x30 148427352023999




#define WF_VER_OFFSET 0x0C
maybe this can give you a hint





#define WF_VER_OFFSET 0x0C
maybe this can give you a hint /mount/p7/Sony_Reader # xxd -l 120 WF_OLD.img
00000000: 4983 9360 2634 0100 a40b 0000 0506 7600 I..`&4........v.
00000010: 0333 0123 3c31 0085 0300 0000 4000 00bf .3.#<1......@...
00000020: 4700 0001 0004 0d00 fffc 0000 0000 0054 G..............T
00000030: 0003 0609 0c0f 1215 181b 1e21 262b 3028 ...........!&+0(
00000040: 0000 0000 0000 0008 8305 0000 0000 00e8 ................
00000050: f106 0000 0000 00c8 a60a 0000 0000 00a8 ................
00000060: 5b0e 0000 0000 0098 0000 0000 0000 00a0 [...............
00000070: 7700 0000 0000 00a8 w.......













https://inkbox.ddns.net/wiki and so is it on the new one now























root@debian-server /e/p/7/mods-available# tail -f /var/log/apache2/error.log
PHP Warning: PHP Startup: Unable to load dynamic library 'xmlreader' (tried: /usr/lib/php/20180731/xmlreader (/usr/lib/php/20180731/xmlreader: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/xmlreader.so (/usr/lib/php/20180731/xmlreader.so: undefined symbol: dom_node_class_entry)) in Unknown on line 0
[Fri May 20 00:05:33.317427 2022] [mpm_prefork:notice] [pid 57619] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Fri May 20 00:05:33.317457 2022] [core:notice] [pid 57619] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 20 00:11:01.006739 2022] [mpm_prefork:notice] [pid 57619] AH00169: caught SIGTERM, shutting down
[Fri May 20 00:11:01.107176 2022] [:notice] [pid 58849] mod_bw : Memory Allocated 96 bytes (each conf takes 48 bytes)
[Fri May 20 00:11:01.107222 2022] [:notice] [pid 58849] mod_bw : Version 0.92 - Initialized [2 Confs]
PHP Warning: PHP Startup: Unable to load dynamic library 'xmlreader' (tried: /usr/lib/php/20180731/xmlreader (/usr/lib/php/20180731/xmlreader: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/xmlreader.so (/usr/lib/php/20180731/xmlreader.so: undefined symbol: dom_node_class_entry)) in Unknown on line 0
PHP Warning: Module 'dom' already loaded in Unknown on line 0
[Fri May 20 00:11:01.135493 2022] [mpm_prefork:notice] [pid 58849] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Fri May 20 00:11:01.135528 2022] [core:notice] [pid 58849] AH00094: Command line: '/usr/sbin/apache2'

























sd_card_PRS-T1_1.0.07_adb_enabled.bin
The altered U-Boot from this image loads the kernel from the external SD card too?









Image Name: Linux-2.6.35.3
Created: Sun May 29 18:55:35 2022
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4412320 Bytes = 4308.91 KiB = 4.21 MiB
Load Address: 70008000
Entry Point: 70008000
Image arch/arm/boot/uImage is ready
how come it's 4.21 MiBImage Name: Linux-2.6.35.3
Created: Sun May 29 18:57:06 2022
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1409876 Bytes = 1376.83 KiB = 1.34 MiB
Load Address: 70008000
Entry Point: 70008000
Image arch/arm/boot/uImage is ready
better










dd if=/data/local/tmp/uImage of=/dev/block/mmcblk0 bs=512 seek=2048
It rebooted and UI started fine
Though adb/USB debugging has disappeared, so I can't see if it has actually booted that kernel
and it can't seem to detect that I plugged in USB (edited)












































OS Firmware
Sony_Reader
rVPzp8O1j0m01oOq.crsZVu8crtmXGrc2
nicolas@fedora ~> ls /mnt/tombstones/
tombstone_00 tombstone_01 tombstone_02 tombstone_03 tombstone_04 tombstone_05 tombstone_06 tombstone_07 tombstone_08 tombstone_09
nicolas@fedora ~>
...ok?nicolas@fedora ~> ls /mnt
anr/ app/ app-private/ backup/ dalvik-cache/ data/ dontpanic/ local/ lost+found/ misc/ property/ system/ tombstones/
nicolas@fedora ~>



nicolas@fedora ~> ls /mnt
audio/ books/ lost+found/ notepads/ pictures/ preload.xml* userguide/
nicolas@fedora ~>


nicolas@fedora ~> ls /mnt
audio/ books/ lost+found/ notepads/ pictures/ preload.xml* userguide/
nicolas@fedora ~> 
nicolas@fedora ~> ls /mnt
'OS Firmware'/ rVPzp8O1j0m01oOq.crsZVu8crtmXGrc2* Sony_Reader/
nicolas@fedora ~>
then, it is already there







Rupor
# USB Device Class dri
# CONFIG_USB_SERIAL_ARK3116 is not set
Ours
# USB Device Class drivers
#
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set
# CONFIG_USB_WDM is not set
# CONFIG_USB_TMC is not set
#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#
#
# also be needed; see USB_STORAGE Help for more info
#
# CONFIG_USB_LIBUSUAL is not set
#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
#
# USB port drivers
#
CONFIG_USB_SERIAL=m
# CONFIG_USB_EZUSB is not set
# CONFIG_USB_SERIAL_GENERIC is not set
# CONFIG_USB_SERIAL_AIRCABLE is not set
# CONFIG_USB_SERIAL_ARK3116 is not set
Rupor
CONFIG_USB_G_SERIAL=m
Ours
# CONFIG_USB_G_SERIAL is not set
Rupor
# CONFIG_USB_ANDROID is not set
Ours
CONFIG_USB_ANDROID=m
CONFIG_USB_ANDROID_ADB=y
CONFIG_USB_ANDROID_MASS_STORAGE=y
CONFIG_USB_ANDROID_MASS_STORAGE_EXTSCSI=y
# CONFIG_USB_ANDROID_RNDIS is not set
Rupor
#
# MXC support drivers
#
CONF_SECURITY_RNG is not set
Ours
CONFIG_MXC_IPU=y
CONFIG_MXC_IPU_V3=y
#
# MXC SSI support
#
# CONFIG_MXC_SSI is not set
#
# MXC Digital Audio Multiplexer support
#
# CONFIG_MXC_DAM is not set
#
# MXC PMIC support
#
# CONFIG_MXC_PMIC_MC13783 is not set
# CONFIG_MXC_PMIC_MC13892 is not set
# CONFIG_MXC_PMIC_MC34704 is not set
# CONFIG_MXC_PMIC_MC9SDZ60 is not set
# CONFIG_MXC_PMIC_MC9S08DZ60 is not set
#
# MXC Security Drivers
#
# CONFIG_MXC_SECURITY_SCC is not set
# CONFIG_MXC_SECURITY_SCC2 is not set
# CONFIG_MXC_SECURITY_RNG is not set
#
Rupor
CONFIG_DECOMPRESS_GZIP=y
Ours
CONFIG_DECOMPRESS_LZMA=y 































/proc/usid contains the serial number














PRS-T1 UC,CEW^@^@^@^@^@^@^@^@^@^@0800461001BB6D47148427352023999.PRST1
STRING_PRODUCT_EMMC_ID_OFFSET 0x00 PRS-T1
STRING_SKU_EMMC_ID_OFFSET 0x10 UC,CEW (US) Also RU JP
STRING_SERIAL_EMMC_ID_OFFSET 0x30 148427352023999 

#include <linux/fb.h>
#include "mxcfb.h"
#include <sys/mman.h>
#include <stdlib.h>
#include <sys/ioctl.h>
int fd = open("/dev/fb0",O_RDWR);
if(!fd || fd==-1)
exit(1);
{
struct mxcfb_update_data u;
u.update_region.top=0;
u.update_region.left=0;
u.update_region.width=800;
u.update_region.height=600;
// i read in mxc_epdc_fb.c in the kernel source
// to figure out the following
u.update_mode = UPDATE_MODE_FULL;
u.waveform_mode = 4; // fast black-and-white waveform, with no flashing
//WAVEFORM_MODE_AUTO; // blinking gray value waveform
int marker = 1;
u.update_marker = marker;
u.flags=0;
if(0>ioctl(fd,MXCFB_SEND_UPDATE,&u))
printf("problem with update\n");
if(0>ioctl(fd,MXCFB_WAIT_FOR_UPDATE_COMPLETE,&marker))
printf("problem during wait\n");
}
close(fd); (edited)



/dev/mmcblk0 didn't exist






U-Boot 2009.08 (Dec 21 2011 - 14:48:38)
CPU: Freescale i.MX50 family 1.1V at 800 MHz
mx50 pll1: 800MHz
mx50 pll2: 400MHz
mx50 pll3: 216MHz
ipg clock : 66666666Hz
ipg per clock : 66666666Hz
uart clock : 24000000Hz
ahb clock : 133333333Hz
axi_a clock : 400000000Hz
axi_b clock : 200000000Hz
weim_clock : 100000000Hz
ddr clock : 160000000Hz
esdhc1 clock : 80000000Hz
esdhc2 clock : 80000000Hz
esdhc3 clock : 80000000Hz
esdhc4 clock : 80000000Hz
Board: MX50 ARM2 board
Boot Reason: [POR]
Boot Device: MMC
I2C: ready
DRAM: 256 MB
MMC: FSL_ESDHC: 0, FSL_ESDHC: 1, FSL_ESDHC: 2
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
temperature 25
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
MMC set clock 50MHz
In: serial
Out: serial
Err: serial
Net: got MAC address from IIM: 00:00:00:00:00:00
FEC0
Hit any key to stop autoboot: 0
MMC read: dev # 0, block # 2048, count 5120 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
5120 blocks read: OK
MMC read: dev # 0, block # 10240, count 600 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
600 blocks read: OK
































## Loading init Ramdisk from Legacy Image at 70c00000 ...
Image Name: Normal Rootfs
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 286848 Bytes = 280.1 kB
Load Address: 70308000
Entry Point: 70308000
Verifying Checksum ... OK
Loading Kernel Image ... OK
I think this is the key
nicolas@fedora /t/w/_initrd.img.extracted [SIGINT]> cpio -t < 41-out
data
default.prop
dev
ebook
ebook/dic
ebook/fonts
ebook/preload
init
init.goldfish.rc
init.rc
lib
lib/modules
lib/modules/2.6.35.3
lib/modules/2.6.35.3/build
lib/modules/2.6.35.3/kernel
lib/modules/2.6.35.3/kernel/drivers
lib/modules/2.6.35.3/kernel/drivers/usb
lib/modules/2.6.35.3/kernel/drivers/usb/gadget
lib/modules/2.6.35.3/kernel/drivers/usb/gadget/arcotg_udc.ko
lib/modules/2.6.35.3/kernel/drivers/usb/gadget/g_android.ko
lib/modules/2.6.35.3/kernel/drivers/usb/host
lib/modules/2.6.35.3/kernel/drivers/usb/host/ehci-hcd.ko
lib/modules/2.6.35.3/kernel/drivers/usb/serial
lib/modules/2.6.35.3/kernel/drivers/usb/serial/usbserial.ko
lib/modules/2.6.35.3/modules.alias
lib/modules/2.6.35.3/modules.alias.bin
lib/modules/2.6.35.3/modules.builtin
lib/modules/2.6.35.3/modules.builtin.bin
lib/modules/2.6.35.3/modules.ccwmap
lib/modules/2.6.35.3/modules.dep
lib/modules/2.6.35.3/modules.dep.bin
lib/modules/2.6.35.3/modules.ieee1394map
lib/modules/2.6.35.3/modules.inputmap
lib/modules/2.6.35.3/modules.isapnpmap
lib/modules/2.6.35.3/modules.ofmap
lib/modules/2.6.35.3/modules.order
lib/modules/2.6.35.3/modules.pcimap
lib/modules/2.6.35.3/modules.seriomap
lib/modules/2.6.35.3/modules.symbols
lib/modules/2.6.35.3/modules.symbols.bin
lib/modules/2.6.35.3/modules.usbmap
lib/modules/2.6.35.3/source
proc
sbin
sbin/ts_calibrator
sys
system
842 blocks
nicolas@fedora /t/w/_initrd.img.extracted>



on boot
setprop ARGH ARGH
oki









These modules are from Sony's recovery root, without any modifications. Original sources can be found at:
http://oss.sony.net/Products/Linux/Audio/Download/PRS-T2_20140625/linux-2.6.35.2-20140522.tgz
License is GPLv2. (edited)





VFS: Cannot open root device "ram0" or unknown-block(1,0)
I am now stuck at this, for some reason (edited)



MMC read: dev # 0, block # 10240, count 600 partition # 0 ...
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x1
imx_esdhc.c bus_width 0x4
imx_esdhc.c bus_width 0x4
SD set clock 50MHz
600 blocks read: OK
## Booting kernel from Legacy Image at 70800000 ...
Image Name: Linux-2.6.35.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2246720 Bytes = 2.1 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 70c00000 ...
Image Name: Normal Rootfs
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 286848 Bytes = 280.1 kB
Load Address: 70308000
Entry Point: 70308000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Ram0 is probably that second entry there: normal rootfs. (edited)
























VFS: Cannot open root device "ram0" or unknown-block(1,0)
I am now stuck at this, for some reason (edited)
