Marvell PXA320 Based Linux Kernel
March 01, 2024 01:41PM
Hi all,
In past i was a tester on debian for Netgear RN102 with @bodhi.Thanks to him.

Now i need some advice/guidance for another device but this time it is not a Network Attached Storage. It is an old barcode reader/rugged pc from 2011-2012 era. My goal is to port an relatively updated kernel to it and boot linux.Since it is close enough SOC model to my RN102 i believe i can find suggestions on forum doozan.
Let me introduce this thing to you.I had to dissassemble unit and read some of part numbers.

Model No: BIP-5000(Black)
Manufacturer:Pidion (https://www.ruggedpcreview.com/3_handhelds_pidion_bip5000.html)
CPU:Marvell PXA320 (88AP320-BGR2) 806MHz
CPU Supported Instruction Set:ARM
Type of processor core:Intel XScale
RAM:64MB(K4X51163PI-FGC6 TWO CHIPS 512Mb DDR 32Mx16)
FLASH:125MB?(K9F2G08U0C-SCB0)
Wifi:Atheros (AR6002) 2.4/5GHz
LCD:GST3D5014 QVGA 240RGB*320dots Parallel RGB 18-BIT
Power Management IC:MAX8660
Serial Port(RS-232) IC:SP3220E
AC’97 Audio + Touchpanel CODEC:WM9713L
PCB MARKING: BIP-5000MC75i MAIN REV:1.1
Original OS:Windows CE 5.0.1400
Original Bootloader:EBOOT 2.1.1
I made an archive for all chips datasheets above here.
https://www.dropbox.com/scl/fo/6oz46kjt8plbdm9nlgtv7/h?rlkey=zmbe2k1dawy4l5zhw8h33xh09&dl=0

I have the below resources:

  • NANDO Nand Flash programmer (https://github.com/bbogush/nand_programmer)
  • 4 channel 50 MHz scope (Rigol-DS1054Z) with serial decoding capabilities
  • Cheap logic analzyer (FX2LP CY7C68013A USB)
  • Usb to serial converer (FT232)
  • Tl866ii Plus Universal Programmer
  • SMD Soldering-Desoldering skills
  • Linux build enviroment


I searched web about what people do with this SOC and linux before and found out that toradex (some kind of SBC manufacturer i think) made an u-boot bootloader, toolchain and rootfs and shared source codes and binary files and instructions for PXA320 in here.
https://files.toradex.com/Colibri/Linux/Images/PXA-as-is/toradex-bsp-2011.02/
https://developer-archives.toradex.com/knowledge-base/linux-colibri-pxa-flashing

The question i have is it possible to port relatively up-to-date kernel/u-boot for this device? My first plan is to backup original flash chip with NANDO programmer and flash u-boot from above link and try to read serial port output.Some of you may say why i don't get RPI or similiar SBC but i am doing this just for fun and to learn new things about embedded systems.

The device came with only itself no charging cable or dock so i reverse engineered exposed pins above and found out +5v GND USB DATA+ USB DATA- SERIAL TX AND RX as today. Sharing in here if someone needs it in future.I will update this folder regularly with my findings.
https://www.dropbox.com/scl/fo/pgn11cyc6owngok4wk5zx/h?rlkey=xgpf71cu1399fm6vukq2px5p8&dl=0

Could someone point me to right direction about booting kernel/porting debian on PXA320?
Re: Marvell PXA320 Based Linux Kernel
March 01, 2024 05:14PM
whitepawn,

Your best bet would be starting with Toradex u-boot and kernel.

> I searched web about what people do with this SOC
> and linux before and found out that toradex (some
> kind of SBC manufacturer i think) made an u-boot
> bootloader, toolchain and rootfs and shared source
> codes and binary files and instructions for PXA320
> in here.
> https://files.toradex.com/Colibri/Linux/Images/PXA-as-is/toradex-bsp-2011.02/
> https://developer-archives.toradex.com/knowledge-base/linux-colibri-pxa-flashing

And then work on mainline Linux kernel.

Currently this SoC is supported in mainline Linux

arch/arm/boot/dts/intel/pxa/pxa3xx.dtsi
arch/arm/mach-pxa
But as usual, you would need to write a new DTS for this board, using other boards as example. It will be a lot of works to incorporate what you find in the toradex kernel (which is 2.6.x) into the DTS.

And I would keep using Toradex u-boot. Rolling new u-boot is even more time consuming than kernel, since this SoC is not support in mainline u-boot, afaict.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Marvell PXA320 Based Linux Kernel
March 03, 2024 05:03AM
@bodhi many thanks for reply and advice.
I see, i have no intention of rolling my u-boot bootloader.If it boots "new kernel" i won't touch it.
I will flash u boot to a new NAND flash, solder it, test it and share my findings in here.
tme
Re: Marvell PXA320 Based Linux Kernel
March 03, 2024 08:14AM
Nice project, whitepawn. I wish you good luck, and hope you succeed!
Re: Marvell PXA320 Based Linux Kernel
June 23, 2024 09:18PM
Ah the "raw" GPIO accessed Samsung NAND ...

I was looking web pages that mentioned xscale IXP and linux ,and found your project.

I recently got NAND working with linux kernel, for openwrt.

The raw nand code in the kernel has a few problems.

* direct use of the memory mapped IO register in the driver C code. Should use the asm/io.h defined "writeb( ... )" .
Reason... This includes macros to stop the compiler optimising (eg skipping ) access to the memory cell.
also for the CPU bug later.

* insufficient delays ??? well the recipe section ( the steps to do a read, the steps to do an erase, etc) of the code sends through the delay spec for delay for that step.. In my testing, I guessed the timings were not right. eg because of such a fast CPU... the old timings were not right. and it is so, it didnt work until I just put a mass of standard, what I guessed as maximum, delays in the code for each step, "send a command" , "send a byte of address"..


* early ARM CPU bug workaround-- IO instructions may become out of order due to the cache . So a cache stall is induced between them, IO _SYNC. Linux had a mechanism for picking up the need for this from the DTS and use it in asm/io.h writeb( ...) .. but the raw nand code didnt make use of it properly. So put numerous syncs in to wrap the io.. U-boot didnt have any such fix. Redboot ... dont know. Intel redboot might fix it.


Here is where I posted the patch I made for raw nand to solve the above issues
Its really for the watchguard 20 , cpu ixp435 ...

https://github.com/greguu/linux_kernel_xtm2_richland/issues/1

(deleted bits which were probably IXP4xx specific.)



Edited 1 time(s). Last edit at 07/08/2024 06:46AM by Leon G.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: