Tiny Core Base > Raspberry Pi
Custom OS for Raspberry Pi Zero
ashfame:
--- Quote from: Rich on July 07, 2020, 07:30:46 AM ---Hi ashfame
--- End quote ---
Hi @Rich
Based on my understanding how things should be, I tried making a custom OS by using bits from piCore11
I mounted both the partitions from the img file, took a look at all the files and then copied over certain files from first partition to a `custom` directory and tce folder from second partition along with X-org tcz files that I downloaded using the bash script you gave me earlier.
BTW, I used this command to mount:
--- Code: ---mount -o loop,ro,offset=$((512*startblock)) piCore-11.0.img /mnt/tmp
--- End code ---
Contents of `custom` directory now looks like:
--- Code: ---root@localhost:/mnt/custom# ll
total 13M
drwxr-xr-x 3 root root 4.0K Jul 7 22:46 ./
drwxr-xr-x 6 root root 4.0K Jul 7 22:27 ../
-rwxr-xr-x 1 root root 3.4M Jul 7 19:56 11.0.gz*
-rwxr-xr-x 1 root root 1.3M Jul 7 19:56 4.19.81-piCore.gz*
-rwxr-xr-x 1 root root 52K Jul 7 22:27 bootcode.bin*
-rwxr-xr-x 1 root root 130 Jul 7 19:56 cmdline.txt*
-rwxr-xr-x 1 root root 2.1K Jul 7 22:27 config.txt*
-rwxr-xr-x 1 root root 4.8M Jul 7 19:56 kernel41981.img*
-rwxr-xr-x 1 root root 2.9M Jul 7 22:46 start.elf*
drwxr-xr-x 4 root root 4.0K Jul 7 20:50 tce/
--- End code ---
I then proceeded to make an iso by running:
--- Code: ---mkisofs -o piCoreXorg.iso custom
--- End code ---
but that didn't work and etcher complained about no partition table being there. I tried writing it to SD card anyway, because RaspberryPi's site explains they work off a config.txt file instead of BIOS. Didn't even get a boot (no led light action). I used `dd` and got same results.
I dug back into the book and tried `mkisofs` command with additional parameters to create partition correctly:
--- Code: ---mkisofs -l -J -r -V PiCoreXorg -no-emul-boot -boot-load-size 4 -boot-info-table -b bootcode.bin -c boot.cat -o picorexorg.iso custom
--- End code ---
but didn't get lucky. Same results like before. No boot, no led lighting up.
I am pretty sure I lack understanding of partitions here to put all the conceptual information I gathered to work. Please advice.
Juanito:
Maybe I'm missing something here, but if you wish to create a custom piCore and it will be booted from sd card then why not mount the piCore image, make your changes and then un-mount the image?
The modified image can then be written to sd card.
curaga:
ISO image = CD. Rpi does not use cds, that's more of an x86 thing.
You write the image to a SD card using dd.
edit:
--- Code: ---dd if=piCore-11.0.img of=/dev/sdd bs=1M
--- End code ---
When running dd, make triple sure /dev/sdd is your SD card and not your hd.
ashfame:
--- Quote from: Juanito on July 08, 2020, 12:49:05 AM ---Maybe I'm missing something here, but if you wish to create a custom piCore and it will be booted from sd card then why not mount the piCore image, make your changes and then un-mount the image?
The modified image can then be written to sd card.
--- End quote ---
I am building an air-gap device, hence using Raspberry Pi Zero (non-W), so I have no networking capabilities on that thing. And that's the only ARM device I have got. Moreover, I want to be able to package this custom OS along with an application program and let others download & use it, so I guess I am simply looking for a way to put the customized piCore back together in a format (disk image or iso) that can be easily written to a SD Card. Does that explain my situation?
ashfame:
--- Quote from: curaga on July 08, 2020, 03:16:33 AM ---ISO image = CD. Rpi does not use cds, that's more of an x86 thing.
You write the image to a SD card using dd.
edit:
--- Code: ---dd if=piCore-11.0.img of=/dev/sdd bs=1M
--- End code ---
When running dd, make triple sure /dev/sdd is your SD card and not your hd.
--- End quote ---
Right, that's what I did to write piCore to SD card and run it. I guess I don't know how to put that modified directory (modified piCore) back together as an IMG disk, that can be written to SD card?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version